/* 콘솔·로그인·관리자 페이지가 함께 쓰는 공통 테마와 컴포넌트 스타일 */
  :root {
    --bg: #f7f7f5; --surface: #ffffff; --border: #e7e5e0; --text: #1c1917; --muted: #78716c;
    --accent: #ea580c; --accent-soft: #fff1e6; --primary: #1c1917; --on-primary: #ffffff;
    --seg: #ecebe7; --live: #dc2626; --ok: #16a34a; --field: #ffffff;
    --shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 12px 32px -16px rgba(28, 25, 23, 0.18);
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #0e0e10; --surface: #18181b; --border: #2b2b30; --text: #f4f4f5; --muted: #a1a1aa;
      --accent: #fb923c; --accent-soft: #2b1b10; --primary: #f4f4f5; --on-primary: #18181b;
      --seg: #222226; --live: #f87171; --ok: #4ade80; --field: #131316;
      --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
    }
  }
  * { box-sizing: border-box; }
  body {
    margin: 0; color: var(--text); font: 14px/1.6 Inter, "Noto Sans KR", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
    background: radial-gradient(900px 360px at 50% -120px, var(--accent-soft), transparent 70%), var(--bg);
  }
  header { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 28px 16px 4px; }
  .lang-pick { position: absolute; top: 14px; right: 16px; width: auto; height: 32px; padding: 0 10px; font-size: 13px; }
  .logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
  .logo em { font-style: normal; color: var(--accent); }
  nav { display: flex; gap: 2px; padding: 4px; background: var(--seg); border-radius: 12px; max-width: 100%; overflow-x: auto; }
  nav button { display: flex; align-items: center; gap: 7px; background: none; border: 0; color: var(--muted); padding: 8px 14px; border-radius: 9px; font-weight: 600; white-space: nowrap; transition: color .15s, background .15s; }
  nav button svg { width: 16px; height: 16px; flex: none; }
  nav button:hover { color: var(--text); }
  nav button[aria-selected=true] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
  .layout { max-width: 1120px; margin: 0 auto; padding: 22px 16px 64px; display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  @media (max-width: 900px) { .layout { grid-template-columns: 1fr; } aside { order: -1; position: static !important; } }
  .card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 22px; }
  .panel { display: none; gap: 20px; }
  .panel.on { display: grid; }
  h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
  .sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
  label b { color: var(--text); font-weight: 600; margin-left: 4px; }
  h3 { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
  .row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
  label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
  input, select, button { font: inherit; color: var(--text); }
  input, select { background: var(--field); border: 1px solid var(--border); border-radius: 9px; padding: 0 11px; height: 38px; transition: border-color .15s, box-shadow .15s; }
  input:focus-visible, select:focus-visible, button:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  input[type=color] { padding: 3px; width: 52px; cursor: pointer; }
  input[type=range] { padding: 0; height: 24px; accent-color: var(--accent); background: none; border: 0; }
  input[type=range]:focus-visible { box-shadow: none; }
  button { cursor: pointer; height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; transition: background .15s, transform .05s; }
  button:hover { background: var(--bg); }
  button:active { transform: translateY(1px); }
  button.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
  button.primary:hover { opacity: 0.88; background: var(--primary); }
  #toggle[data-live=true] { background: var(--live); border-color: var(--live); color: #fff; }
  button:disabled { opacity: 0.5; cursor: default; }
  .langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .langs label { flex-direction: row; align-items: center; gap: 7px; color: var(--text); font-size: 13px; font-weight: 500; background: var(--field); border: 1px solid var(--border); border-radius: 999px; padding: 5px 13px; cursor: pointer; transition: border-color .15s, background .15s; }
  .langs label:hover { border-color: var(--muted); }
  .langs label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
  .langs input { height: auto; accent-color: var(--accent); margin: 0; }
  .links { display: grid; gap: 4px; margin-top: 14px; }
  .links .row { flex-wrap: nowrap; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
  .links .row:first-child { border-top: 0; }
  .links .name { width: 160px; flex: none; font-weight: 600; font-size: 13px; }
  .links .url { color: var(--muted); font-size: 12px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
  .url { flex: 1; min-width: 0; }
  .hint { color: var(--muted); font-size: 12.5px; }
  .status { color: var(--muted); font-size: 12.5px; }
  .log { margin-top: 14px; max-height: 260px; overflow-y: auto; display: grid; gap: 8px; }
  .log .item { background: var(--field); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
  .log .item .tr { color: var(--accent); font-weight: 600; }
  .log .item .o { color: var(--muted); font-size: 12px; }
  aside { position: sticky; top: 16px; display: grid; gap: 16px; }
  .stage { min-height: 190px; border-radius: 12px; display: flex; align-items: flex-end; justify-content: center; padding: 14px; margin-top: 14px;
    background: repeating-conic-gradient(#2c2c30 0% 25%, #232326 0% 50%) 50% / 20px 20px; }
  .live { display: flex; gap: 10px; margin-top: 14px; }
  .live .primary { flex: 1; }
  .state { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
  .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
  .dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }

  .lang-rows { display: grid; gap: 8px; }
  .lang-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 8px 12px; background: var(--field); border: 1px solid var(--border); border-radius: 10px; }
  .lang-row .name { width: 130px; font-weight: 600; font-size: 13px; }
  .lang-row label { flex-direction: row; align-items: center; gap: 8px; }
  .lang-row button { height: 30px; padding: 0 10px; font-size: 12px; margin-left: auto; }
  [hidden] { display: none !important; }
  label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
  label.check input { height: auto; accent-color: var(--accent); margin: 0; }
  .lang-row select { max-width: 210px; }
  .stack { display: grid; gap: 18px; }
  details summary { cursor: pointer; font-weight: 600; font-size: 13px; }
  .words { display: grid; gap: 6px; line-height: 1.7; }
  .words b { color: var(--text); }
  .stage { position: relative; }
  .theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
  .theme-card { height: auto; padding: 10px; display: grid; gap: 8px; text-align: left; }
  .theme-card .nm { font-weight: 700; font-size: 13px; }
  .theme-card .nt { color: var(--muted); font-size: 12px; font-weight: 400; }
  .theme-sample { background: #232326; border-radius: 8px; padding: 10px 12px; min-height: 64px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; }
  .sec { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
  .sec > h3:first-child { margin: 0 0 8px; padding-left: 10px; border-left: 3px solid var(--accent); font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--text); text-transform: none; letter-spacing: -0.01em; }
