:root {
  --bg: #0b0d11;
  --panel: rgba(18, 21, 27, 0.86);
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef0f3;
  --muted: #9aa1ac;
  --red: #c91a09;
  --red-hi: #e2321f;
  --navy: #16223a;
  --radius: 18px;
  --cjk: 'Noto Sans KR';
  --display: 'Barlow Condensed', var(--cjk), 'Bahnschrift', 'Arial Narrow', sans-serif;
  --ui: 'Inter', var(--cjk), 'Segoe UI', system-ui, sans-serif;
}
html[data-lang="ja"] { --cjk: 'Noto Sans JP'; }
html[data-lang="zh"] { --cjk: 'Noto Sans SC'; }
/* CJK headings: condensed Latin face has no CJK glyphs, so keep weights heavy and tracking tight */
html[data-lang="ko"] h1, html[data-lang="ja"] h1, html[data-lang="zh"] h1,
html[data-lang="ko"] h2, html[data-lang="ja"] h2, html[data-lang="zh"] h2,
html[data-lang="ko"] h3, html[data-lang="ja"] h3, html[data-lang="zh"] h3 { font-weight: 700; letter-spacing: 0; }

/* language picker */
.lang-wrap { position: relative; }
.lang-btn { gap: 6px; padding: 0 12px; }
.lang-btn svg { width: 17px; height: 17px; }
.lang-current { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; }
.lang-menu {
  position: absolute; right: 0; top: 46px; z-index: 30; min-width: 150px; padding: 6px;
  background: #151820; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.lang-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 9px; font-size: 14px; }
.lang-menu button:hover { background: rgba(255,255,255,0.06); }
.lang-menu button.active { color: #fff; background: rgba(201, 26, 9, 0.25); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--ui); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
svg { width: 22px; height: 22px; fill: currentColor; }

/* ------------------------------------------------ viewer */
body.viewer { overflow: hidden; overscroll-behavior: none; }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 12;  /* above side panels so its drop-downs are never hidden */
  display: flex; align-items: center; justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(var(--bg), rgba(11, 13, 17, 0));
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35)); }
.brand span { font-family: var(--display); font-weight: 700; letter-spacing: 0.08em; font-size: 20px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel); display: grid; place-items: center; backdrop-filter: blur(10px);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn svg path { stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; }
.icon-btn svg path:first-child { fill: currentColor; stroke: none; }
#btnClose svg path:first-child { fill: none; stroke: currentColor; stroke-width: 2; }
#btnSound.muted .wave { opacity: 0; }
#btnSound.muted { color: var(--muted); }
.pill-btn {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); backdrop-filter: blur(10px); display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; font-weight: 500; font-size: 14px;
}
.pill-btn b { background: var(--red); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.pill-btn.red { background: var(--red); border-color: var(--red); color: #fff; }

.title-block { position: fixed; top: 72px; left: 16px; z-index: 4; pointer-events: none; }
.title-block .loc { font-size: 11px; letter-spacing: 0.22em; color: var(--muted); }
.title-block h1 { margin: 2px 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(30px, 6vw, 48px); letter-spacing: 0.03em; line-height: 1; }
.title-block h1::after { content: ''; display: block; width: 40px; height: 3px; background: var(--red); margin-top: 10px; }

.hint {
  position: fixed; left: 50%; top: 150px; transform: translate(-50%, -8px); z-index: 6;
  background: rgba(255, 255, 255, 0.95); color: #111; padding: 10px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; opacity: 0; transition: opacity .25s, transform .25s; white-space: nowrap; pointer-events: none;
}
.hint.show { opacity: 1; transform: translate(-50%, 0); }

.panel {
  position: fixed; z-index: 5; left: 50%; transform: translateX(-50%);
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 22px));
  width: min(560px, calc(100vw - 24px));
  background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: rgba(255,255,255,0.05); border-radius: 12px; padding: 3px; margin-bottom: 12px; }
.tab { border: 0; background: transparent; padding: 8px 6px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tab.active { background: #fff; color: #111; }

.step-card { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; min-height: 44px; }
.swatch {
  width: 36px; height: 36px; border-radius: 9px; flex: none; position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), inset 0 -6px 10px rgba(0,0,0,0.25);
}
.swatch::after { /* stud */
  content: ''; position: absolute; left: 50%; top: 50%; width: 46%; height: 46%; transform: translate(-50%, -50%);
  border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.28), 0 2px 3px rgba(0,0,0,0.3);
}
.swatch.empty { background: rgba(255,255,255,0.06); }
.swatch.empty::after { display: none; }
.swatch.trans { background: linear-gradient(135deg, rgba(220,235,255,0.55), rgba(255,255,255,0.12)); }
.step-info { flex: 1; min-width: 0; }
.part-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.part-meta { color: var(--muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-num { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; text-align: right; }
.step-num small { font-size: 15px; color: var(--muted); margin-left: 3px; }

input[type=range] { width: 100%; accent-color: var(--red); height: 24px; margin: 0 0 6px; }
.sections { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.sections::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: rgba(255,255,255,0.04); border-radius: 999px;
  font-size: 12px; padding: 5px 11px; color: var(--muted); white-space: nowrap;
}
.chip.active { border-color: var(--red); color: #fff; background: rgba(201, 26, 9, 0.25); }
.controls { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 4px; }
.ctl { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,0.05); display: grid; place-items: center; }
.ctl:active { transform: scale(0.94); }
.ctl.play { width: 56px; height: 56px; background: var(--red); border-color: var(--red); color: #fff; }
.ctl svg { width: 20px; height: 20px; }

.build-help { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.build-help b { color: #fff; }
.build-row { display: flex; gap: 8px; align-items: center; }
.progress { flex: 1; height: 8px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, #fff, var(--red-hi)); border-radius: 999px; transition: width .25s; }
.ghost-btn { border: 1px solid var(--line); background: rgba(255,255,255,0.05); border-radius: 999px; padding: 7px 12px; font-size: 12px; white-space: nowrap; }

/* parts drawer */
.drawer {
  position: fixed; z-index: 20; top: 0; right: 0; bottom: 0; width: min(400px, 100vw);  /* full-height overlay on smaller screens */
  background: #11141a; border-left: 1px solid var(--line); transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column;
}
.drawer.open { transform: none; box-shadow: -30px 0 60px rgba(0,0,0,0.5); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding: max(16px, env(safe-area-inset-top)) 18px 12px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-family: var(--display); letter-spacing: 0.04em; font-size: 26px; }
.drawer-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.bom { list-style: none; margin: 0; padding: 6px 10px; overflow-y: auto; flex: 1; }
.bom li { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; }
.bom li.current { background: rgba(201, 26, 9, 0.2); }
.bom li.used-up { opacity: 0.45; }
.bom .swatch { width: 28px; height: 28px; border-radius: 7px; }
.bom-name { flex: 1; font-size: 14px; font-weight: 500; }
.bom-name small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 1px; }
.bom-count { font-family: var(--display); font-size: 18px; color: var(--muted); }
.bom-count b { color: #fff; }
.fineprint { color: var(--muted); font-size: 11px; padding: 10px 18px 18px; margin: 0; border-top: 1px solid var(--line); }

/* completion */
.done { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(5,6,9,0.6); backdrop-filter: blur(6px); padding: 16px; animation: fade .4s; }
.done[hidden] { display: none; }
.done-card { background: #12151b; border: 1px solid var(--line); border-radius: 24px; padding: 30px 26px; text-align: center; max-width: 380px; width: 100%; }
.done-kicker { color: var(--red-hi); font-size: 12px; letter-spacing: 0.3em; font-weight: 600; }
.done-card h2 span { color: var(--text); }
.done-card h2 { font-family: var(--display); font-size: 40px; line-height: 1.02; margin: 10px 0; letter-spacing: 0.02em; }
.done-card p { color: var(--muted); margin: 0 0 22px; }
.done-card p b { color: #fff; }
.done-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@keyframes fade { from { opacity: 0; } }

.loader { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: var(--bg); transition: opacity .4s, visibility .4s; }
.loader.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.loader .err { text-align: center; color: var(--muted); }
.stud-spin { display: grid; grid-template-columns: repeat(2, 18px); gap: 8px; }
.stud-spin i { width: 18px; height: 18px; border-radius: 50%; background: var(--red); animation: pop 1s infinite ease-in-out; }
.stud-spin i:nth-child(2) { animation-delay: .15s; } .stud-spin i:nth-child(4) { animation-delay: .3s; } .stud-spin i:nth-child(3) { animation-delay: .45s; }
@keyframes pop { 0%, 100% { transform: scale(0.6); opacity: .4; } 50% { transform: scale(1); opacity: 1; } }

.legal { position: fixed; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 10px; color: rgba(154,161,172,0.6); z-index: 4; padding: 0 12px; pointer-events: none; }

/* mobile: compact section chips, desktop-only extras hidden */
.desk-info, .kbd-hint, .chip .sec-count, .chip .sec-bar { display: none; }
.drawer { --docked: 0; }

/* ------------------------------------------------ desktop: left control column, centred model */
@media (min-width: 1000px) {
  .topbar { padding: 18px 28px 12px; }
  .brand img { width: 38px; height: 38px; }
  .brand span { font-size: 22px; }
  .title-block { top: 82px; left: 28px; width: 380px; }
  .title-block h1 { font-size: 46px; }
  .panel {
    left: 24px; right: auto; transform: none; top: 172px; bottom: 24px; width: 388px;
    display: flex; flex-direction: column; padding: 18px 18px 16px; overflow: hidden;
  }
  #stepsUI, #buildUI { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  #stepsUI[hidden], #buildUI[hidden] { display: none; }
  .desk-info { display: block; margin-bottom: 14px; }
  .blurb { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stats div { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
  .stats b { display: block; font-family: var(--display); font-size: 26px; line-height: 1; }
  .stats span { color: var(--muted); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
  .tab { padding: 10px 6px; font-size: 14px; }
  .step-card { padding: 12px; background: rgba(255,255,255,0.035); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
  .step-card .swatch { width: 44px; height: 44px; border-radius: 11px; }
  .part-name { font-size: 16px; }
  .step-num { font-size: 36px; }

  /* sections become a vertical progress list */
  .sections { flex-direction: column; overflow-y: auto; overflow-x: hidden; gap: 4px; padding: 4px 0 10px; flex: 1; min-height: 0; }
  .chip {
    display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 6px; text-align: left;
    border-radius: 11px; padding: 9px 12px; font-size: 13px; background: transparent; border-color: transparent;
  }
  .chip:hover { background: rgba(255,255,255,0.05); }
  .chip.active { background: rgba(201, 26, 9, 0.16); border-color: rgba(201, 26, 9, 0.6); }
  .chip.complete .sec-name { color: var(--text); }
  .chip .sec-name { font-weight: 500; }
  .chip .sec-count { display: block; font-family: var(--display); font-size: 15px; color: var(--muted); }
  .chip .sec-bar { display: block; grid-column: 1 / -1; height: 3px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
  .chip .sec-bar em { display: block; height: 100%; width: 0; background: #fff; transition: width .2s; }
  .chip.active .sec-bar em { background: var(--red-hi); }
  .controls { margin-top: auto; padding-top: 8px; }
  .ctl { width: 46px; height: 46px; }
  .ctl.play { width: 60px; height: 60px; }
  .kbd-hint { display: block; text-align: center; color: var(--muted); font-size: 11.5px; margin: 12px 0 0; }
  kbd { font-family: var(--ui); font-size: 10.5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; background: rgba(255,255,255,0.05); color: var(--text); }
  #buildUI .build-help { font-size: 14px; }
  #buildUI .kbd-hint { margin-top: auto; }
  .hint { top: 96px; left: calc(50% + 200px); }
  .legal { left: 430px; right: 0; }
}

/* short desktop windows (laptops): trim the info block to leave room for the section list */
@media (min-width: 1000px) and (max-height: 820px) {
  .title-block { top: 72px; }
  .title-block h1 { font-size: 38px; }
  .panel { top: 146px; padding-top: 14px; }
  .blurb { display: none; }
  .stats div { padding: 7px 10px; }
  .stats b { font-size: 20px; }
  .step-card { padding: 9px 10px; }
  .kbd-hint { display: none; }
}

/* wide desktop: parts list docked on the right */
@media (min-width: 1280px) {
  .drawer {
    --docked: 1;
    z-index: 4;  /* docked under the top bar */
    top: 82px; right: 24px; bottom: 24px; width: 340px; transform: none;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  }
  .drawer-head { padding: 16px 18px 12px; }
  .drawer-head h2 { font-size: 24px; }
  #btnClose, #btnParts { display: none; }
  .hint { left: calc(50% + 20px); }
  .legal { right: 380px; }
}

/* ------------------------------------------------ creator */
.creator .brand-sub { font-style: normal; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; margin-left: 2px; }
svg .st { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn svg path.st { fill: none; stroke: currentColor; stroke-width: 2; }
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: 46px; z-index: 20; min-width: 270px; padding: 6px;
  background: #151820; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 9px; font-size: 14px; }
.menu button:hover { background: rgba(255,255,255,0.06); }
.menu button.danger { color: #ff7a6b; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

.palette {
  position: fixed; z-index: 5; left: 12px; right: 12px; bottom: max(26px, calc(env(safe-area-inset-bottom) + 20px));
  max-height: 40vh; overflow-y: auto; padding: 12px 12px 10px;
  background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.palette h2 { margin: 0; font-family: var(--display); font-size: 20px; letter-spacing: 0.04em; }
.pal-head h2 { display: none; }
.pal-title { margin: 12px 0 8px !important; display: flex; gap: 8px; align-items: baseline; }
.pal-title #colorName { font-family: var(--ui); font-size: 12px; color: var(--muted); letter-spacing: 0; }
.cat-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs .chip { padding: 6px 12px; }
.cat-tabs .chip.active { background: #fff; color: #111; border-color: #fff; }
.part-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 74px; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.part-btn {
  border: 1px solid var(--line); background: rgba(255,255,255,0.03); border-radius: 12px; padding: 6px 4px 7px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); line-height: 1.15; text-align: center;
}
.part-btn:hover { background: rgba(255,255,255,0.07); color: var(--text); }
.part-btn.active { border-color: #fff; color: #fff; background: rgba(255,255,255,0.1); }
.picon { width: 44px; height: 44px; }
.color-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 34px; gap: 7px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.color-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 2px solid transparent; background: var(--c); position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), inset 0 -5px 8px rgba(0,0,0,0.22);
}
.color-btn::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.3); }
.color-btn.trans { background: linear-gradient(135deg, var(--c), rgba(255,255,255,0.15)); opacity: 0.85; }
.color-btn.active { border-color: #fff; transform: scale(1.08); }

.toolbar {
  position: fixed; z-index: 6; left: 50%; transform: translateX(-50%); top: 70px;
  display: flex; align-items: center; gap: 8px; padding: 6px;
  background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 999px;
}
.modes { display: flex; background: rgba(255,255,255,0.05); border-radius: 999px; padding: 3px; }
.mode { border: 0; background: none; border-radius: 999px; padding: 7px 12px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mode svg { width: 17px; height: 17px; }
.mode.active { background: #fff; color: #111; }
.mode[data-mode="erase"].active { background: #ff6b5b; color: #fff; }
.toolbar .ctl { width: 40px; height: 40px; }
.toolbar .count { display: flex; flex-direction: column; align-items: center; padding: 0 10px 0 4px; line-height: 1; }
.toolbar .count b { font-family: var(--display); font-size: 22px; }
.toolbar .count small { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
#scene[data-mode="erase"] { cursor: crosshair; }
#scene[data-mode="paint"] { cursor: cell; }
.creator .hint { top: 128px; }
.creator .legal { display: none; }
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .creator .brand span { display: none; }
  .mode span { display: none; }
  .mode { padding: 8px 11px; }
  .toolbar { top: 64px; }
  .creator .hint { top: 122px; }
}
@media (min-width: 1000px) {
  .palette {
    left: 24px; right: auto; top: 82px; bottom: 24px; width: 330px; max-height: none; padding: 18px;
    display: flex; flex-direction: column;
  }
  .pal-head h2 { display: block; margin-bottom: 10px; }
  .cat-tabs { flex-wrap: wrap; }
  .part-grid { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; overflow: visible; }
  .part-btn { padding: 8px 4px; }
  .color-grid { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); grid-auto-columns: auto; overflow: visible; }
  .color-btn { width: 100%; height: auto; aspect-ratio: 1; }
  .creator-keys { display: block; margin-top: auto; padding-top: 12px; text-align: left; line-height: 1.9; }
  .toolbar { top: auto; bottom: 28px; left: calc(50% + 177px); }
  .creator .hint { left: calc(50% + 177px); top: 96px; }
  .creator .legal { display: block; left: 370px; }
}
@media (max-width: 400px) { .creator .brand-sub { display: none; } }

/* ------------------------------------------------ site navigation */
.brand-row { display: flex; align-items: center; gap: 18px; min-width: 0; }
.site-nav { display: none; align-items: center; gap: 4px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.nav-link { display: flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav-link svg { width: 16px; height: 16px; }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-link.active { background: #fff; color: #111; }
.nav-mobile { position: relative; }
.nav-menu-btn { gap: 7px; padding: 0 13px; }
.nav-menu-btn svg { width: 18px; height: 18px; }
.nav-menu {
  position: absolute; left: 0; top: 46px; z-index: 40; min-width: 210px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
  background: #151820; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.nav-menu[hidden] { display: none; }
.nav-menu .nav-link { padding: 11px 12px; border-radius: 10px; font-size: 15px; }
.nav-menu .nav-link svg { width: 19px; height: 19px; }
.nav-menu .nav-link.active { background: rgba(201, 26, 9, 0.22); color: #fff; }
.show-sm { display: none !important; }
@media (min-width: 900px) {
  .site-nav { display: flex; }
  .nav-mobile { display: none; }
}
@media (max-width: 560px) {
  .show-sm { display: grid !important; }
  .viewer .brand span { display: none; }
  .nav-menu-btn span { display: none; }
  .nav-menu-btn { width: 40px; padding: 0; justify-content: center; }
  .brand-row { gap: 10px; }
}

/* ------------------------------------------------ main page + gallery */
body.page { min-height: 100%; }
.page .topbar { position: sticky; background: rgba(11, 13, 17, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hero { max-width: 1180px; margin: 0 auto; padding: 28px 20px 36px; display: grid; gap: 28px; }
.kicker { color: var(--muted); letter-spacing: 0.24em; font-size: 12px; text-transform: uppercase; }
.hero h1 { font-family: var(--display); font-size: clamp(46px, 10vw, 100px); line-height: 0.95; margin: 10px 0 16px; letter-spacing: 0.02em; }
html[data-lang="ko"] .hero h1, html[data-lang="ja"] .hero h1, html[data-lang="zh"] .hero h1 { font-size: clamp(38px, 7.5vw, 76px); line-height: 1.12; }
.hero h1 .accent { color: var(--red-hi); }
.hero p { color: var(--muted); max-width: 540px; font-size: 16px; line-height: 1.6; margin: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pill-btn.big { height: 48px; padding: 0 22px; font-size: 15px; font-weight: 600; }
.feature { position: relative; display: block; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: #0e1014; text-decoration: none; }
.feature img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .5s; }
.feature:hover img { transform: scale(1.03); }
.feature-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 22px 20px; background: linear-gradient(transparent, rgba(5,6,9,0.92)); }
.feature-label small { display: block; color: var(--red-hi); letter-spacing: 0.2em; font-size: 11px; font-weight: 600; }
.feature-label b { display: block; font-family: var(--display); font-size: 34px; letter-spacing: 0.02em; margin: 4px 0 2px; }
.feature-label span { color: var(--muted); font-size: 13px; }

.choices { max-width: 1180px; margin: 0 auto; padding: 0 20px 56px; display: grid; gap: 16px; }
.choice { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; padding: 18px; border-radius: 22px; background: #12151b; border: 1px solid var(--line); text-decoration: none; transition: transform .2s, border-color .2s; }
.choice:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.22); }
.choice small { color: var(--red-hi); letter-spacing: 0.2em; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.choice h2 { font-family: var(--display); font-size: 28px; margin: 4px 0 6px; letter-spacing: 0.02em; }
.choice p { color: var(--muted); margin: 0 0 10px; font-size: 14px; line-height: 1.55; }
.choice .go { font-size: 14px; font-weight: 600; }
.choice-art { height: 120px; border-radius: 16px; position: relative; overflow: hidden; background: #0d0f13 center / cover no-repeat; }
.creator-art i {
  position: absolute; left: calc(var(--x) * 17px + 8px); bottom: calc(var(--y) * 17px + 18px); width: calc(var(--w) * 17px); height: 16px;
  background: var(--c); border-radius: 3px; box-shadow: inset 0 -3px 5px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(255,255,255,0.15);
}

.page-head { max-width: 1180px; margin: 0 auto; padding: 30px 20px 22px; }
.page-head h1 { font-family: var(--display); font-size: clamp(40px, 7vw, 68px); margin: 8px 0 10px; letter-spacing: 0.02em; line-height: 1; }
.page-head p { color: var(--muted); max-width: 600px; margin: 0; line-height: 1.6; }
.grid { max-width: 1180px; margin: 0 auto; padding: 0 20px 80px; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: block; border-radius: 22px; overflow: hidden; background: #12151b; border: 1px solid var(--line); text-decoration: none; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.22); }
.card .thumb { aspect-ratio: 4 / 5; background: #0e1014 center / cover no-repeat; position: relative; }
.card .badge { position: absolute; top: 12px; left: 12px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 4px 10px; letter-spacing: 0.06em; }
.card .meta { padding: 16px 18px 18px; display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.card .meta small { color: var(--muted); font-size: 11px; letter-spacing: 0.16em; }
.card h3 { margin: 4px 0 2px; font-family: var(--display); font-size: 28px; letter-spacing: 0.03em; }
.card .go { background: #fff; color: #111; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.card.soon { display: grid; place-items: center; min-height: 300px; border-style: dashed; color: var(--muted); text-align: center; padding: 24px; }
.card.soon:hover { transform: none; }
.card.soon b { display: block; color: var(--text); font-family: var(--display); font-size: 24px; letter-spacing: 0.04em; margin-bottom: 6px; }
.site-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 0 20px 40px; }

@media (min-width: 900px) {
  .page .topbar { padding: 16px 32px; }
  .hero { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 56px; padding: 56px 32px; min-height: calc(100vh - 220px); }
  .hero p { font-size: 18px; }
  .feature { max-width: 420px; justify-self: end; width: 100%; box-shadow: 0 40px 80px rgba(0,0,0,0.5); }
  .choices { grid-template-columns: 1fr 1fr; padding: 0 32px 80px; gap: 20px; }
  .choice { grid-template-columns: 170px 1fr; padding: 22px; }
  .choice-art { height: 160px; }
  .creator-art i { left: calc(var(--x) * 22px + 12px); bottom: calc(var(--y) * 22px + 30px); width: calc(var(--w) * 22px); height: 20px; }
  .page-head { padding: 48px 32px 28px; }
  .grid { padding: 0 32px 96px; grid-template-columns: repeat(auto-fill, minmax(260px, 300px)); }
}
