:root {
  --bg: #16181c;
  --fg: #f7f5f0;
  --muted: #aeb3ba;
  --card: #232529;
  --line: #3a3d42;
  --soft: #2c2e33;
  --accent: #d5e4f7;
  --accent-ink: #141a24;
  --danger: #ffb4b4;
  --header: 86px;
  font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }

button, input { font: inherit; color: inherit; }

a { color: inherit; }

.site {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.bar,
.foot-inner {
  width: min(1240px, calc(100% - 96px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.bar {
  min-height: var(--header);
  flex-wrap: wrap;
  padding-block: 14px;
}

header { border-bottom: 1px solid var(--line); }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.wordmark img { display: block; }

.langs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.langs button {
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.langs button:hover,
.langs button[aria-current="true"] {
  background: var(--soft);
  color: var(--fg);
}

.langs button[aria-current="true"] { color: var(--accent); }

.workspace {
  flex: 1;
  width: min(1240px, calc(100% - 96px));
  margin-inline: auto;
  padding-block: 64px 86px;
  display: grid;
  grid-template-columns: minmax(0, 650fr) minmax(0, 480fr);
  align-items: center;
  gap: clamp(48px, 6vw, 92px);
}

.featured {
  margin: 0;
}

.stage {
  width: min(100%, 560px);
  margin-inline: auto;
  aspect-ratio: 1;
  border-radius: 24px;
  overflow: hidden;
  background: var(--card);
}

.stage img,
.thumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.16);
  transform-origin: center;
}

.caption {
  margin: 12px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.rows {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.rows h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.thumbs {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.thumbs button {
  aspect-ratio: 1;
  padding: 0;
  border-radius: 14px;
  border: 2px solid transparent;
  background: var(--card);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.74;
}



.thumbs button:hover { opacity: 1; }

.thumbs button[aria-checked="true"] {
  opacity: 1;
  border-color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(34px, 3.6vw, 52px);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

h1 span { display: block; }

html[lang="ko"] h1 { line-height: 1.35; font-weight: 700; }

.intro {
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.55;
  letter-spacing: -0.03em;
}

.actions {
  margin-top: 42px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pair {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 10px;
}

.btn {
  min-height: 76px;
  border-radius: 16px;
  padding: 16px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn svg { width: 20px; height: 20px; flex: none; }

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn.primary:hover { filter: brightness(1.05); }

.btn.ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}

.btn.ghost:hover { background: var(--soft); }

.btn:disabled { opacity: 0.6; cursor: progress; }

.btn:focus-visible,
.thumbs button:focus-visible,
.langs button:focus-visible,
.help summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.status {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.status[data-error="true"] { color: var(--danger); }

.guide {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.help { margin-top: 8px; }

.help summary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  list-style: none;
}

.help summary::-webkit-details-marker { display: none; }

.help summary:hover { color: var(--fg); }

.help summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.help[open] summary::after { transform: rotate(225deg) translateY(-1px); }

.help p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.prompt-box {
  margin-top: 14px;
}

.prompt-box summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}

.prompt-box pre {
  margin: 12px 0 0;
  padding: 16px;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  background: var(--card);
  border-radius: 12px;
  color: var(--fg);
  font-family: Consolas, "Cascadia Mono", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.note {
  margin: 22px 0 0;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.note strong { color: var(--fg); font-weight: 650; }

.rule {
  margin-top: 30px;
  border: 0;
  border-top: 1px solid var(--line);
}

.steps {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 18px;
  font-weight: 550;
  letter-spacing: -0.03em;
}

.steps li { display: flex; gap: 22px; align-items: baseline; }

.steps span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

footer { border-top: 1px solid var(--line); }

.foot-inner {
  min-height: 86px;
  flex-wrap: wrap;
  padding-block: 16px;
  font-size: 14px;
  color: var(--muted);
}

.credit a { color: var(--fg); }

.tagline { margin-left: auto; }

@media (max-width: 1050px) {
  .bar, .foot-inner, .workspace { width: calc(100% - 48px); }
  .workspace { gap: 40px; }
  h1 { font-size: 34px; }
  .intro { font-size: 18px; }
}

@media (max-width: 760px) {
  .bar, .foot-inner, .workspace { width: calc(100% - 32px); }
  .wordmark { font-size: 22px; gap: 10px; }
  .wordmark img { width: 30px; height: 30px; }
  .workspace {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-block: 28px 48px;
  }
  .stage { max-width: 420px; border-radius: 18px; }
  .rows { max-width: 420px; margin-inline: auto; }
  .thumbs { gap: 10px; }
  .pair { grid-template-columns: 1fr; }
  .btn { min-height: 60px; }
  .tagline { margin-left: 0; }
}
