/* Weniversal Moon 계정 웹(account.moon.weniver.se). 웹사이트(site/style.css)와 같은 밤하늘 단일 테마 · 달빛 노랑 강조이고, 글꼴은 시스템 글꼴만 쓴다(외부 글꼴 없음, CSP default-src 'none') */

:root {
  --night: #080a0f;
  --panel: #121724;
  --panel2: #1b2234;
  --line: #262f45;
  --line2: #323d58;
  --moon: #f3cf63;
  --moon-soft: rgba(243, 207, 99, 0.12);
  --moon-line: rgba(243, 207, 99, 0.45);
  --text: #eef1f8;
  --dim: #d4dae8;
  --dim2: #9ea8c0;
  --danger: #ff8a7a;
  --danger-soft: rgba(255, 138, 122, 0.1);
  --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", "Malgun Gothic", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--night);
  background-image: radial-gradient(1200px 600px at 50% -10%, rgba(59, 71, 99, 0.35), transparent 70%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.is-busy { cursor: progress; }
a { color: var(--moon); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 23px; font-weight: 600; line-height: 1.3; }
h2 { font-size: 17px; font-weight: 600; }

/* ---- 머리 · 꼬리 ---- */
.header { border-bottom: 1px solid var(--line); background: rgba(8, 10, 15, 0.78); }
.header__inner { max-width: 960px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.brand img { width: 28px; height: 28px; }
.brand strong { font-weight: 600; }
.brand__sub { margin-left: 4px; padding: 2px 8px; border: 1px solid var(--line2); border-radius: 6px; color: var(--dim2); font-size: 12.5px; }
.lang-toggle { margin-left: auto; border: 1px solid var(--line2); background: transparent; color: var(--dim); font: 600 12px var(--sans); padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.lang-toggle:hover { color: var(--text); border-color: var(--dim2); }
.footer { border-top: 1px solid var(--line); }
.footer__inner { max-width: 960px; margin: 0 auto; padding: 22px 20px 30px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; color: var(--dim2); font-size: 13px; }
.footer__inner a { color: var(--dim); }
.footer__inner .grow { flex: 1; }

/* ---- 몸 ---- */
.main { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 40px 20px 56px; display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.card--narrow { width: 100%; max-width: 460px; margin: 0 auto; }
.card--danger { border-color: var(--danger-soft); }
.step, .stack { display: flex; flex-direction: column; gap: 14px; }
.lead { color: var(--dim); }
.muted, .hint { color: var(--dim2); font-size: 13.5px; }
.label { color: var(--dim2); font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; }
.value { font-size: 15.5px; overflow-wrap: anywhere; }
.mono { font-family: var(--mono); font-size: 13.5px; overflow-wrap: anywhere; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.banner { padding: 10px 12px; border: 1px solid var(--moon-line); border-radius: 10px; background: var(--moon-soft); color: var(--moon); font-size: 14px; }
.warning { padding: 12px 14px; border: 1px solid var(--danger); border-radius: 10px; background: var(--danger-soft); color: var(--text); font-weight: 600; }
.status { min-height: 1.4em; color: var(--dim); font-size: 14px; }
.status:empty { min-height: 0; }
.status--error { color: var(--danger); }
.row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.sub { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; border-top: 1px dashed var(--line); }
.danger-zone { border-top-color: var(--danger); }

/* ---- 입력 · 단추 ---- */
.field { display: flex; flex-direction: column; gap: 6px; color: var(--dim2); font-size: 13px; font-weight: 600; }
.field input { font: 400 16px var(--sans); color: var(--text); background: var(--night); border: 1px solid var(--line2); border-radius: 10px; padding: 11px 12px; }
.field input:focus { outline: 2px solid var(--moon-line); outline-offset: 1px; border-color: var(--moon-line); }
.field input.code { font-family: var(--mono); font-size: 22px; letter-spacing: 0.3em; max-width: 220px; }
.field input.code--wide { letter-spacing: 0.12em; max-width: 280px; }
.btn { align-self: flex-start; font: 600 15px var(--sans); color: var(--night); background: var(--moon); border: 1px solid var(--moon); border-radius: 10px; padding: 10px 18px; cursor: pointer; }
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--ghost { color: var(--text); background: transparent; border-color: var(--line2); }
.btn--ghost:hover { border-color: var(--dim2); }
.btn--small { font-size: 13.5px; padding: 7px 12px; border-radius: 8px; }
.btn--danger { color: var(--danger); background: transparent; border-color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); }
.link { font: 500 14px var(--sans); color: var(--dim); background: none; border: none; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--text); }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--dim); font-size: 14.5px; }
.check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--moon); }

/* ---- 인증 앱 등록 · 백업 코드 ---- */
.slot:empty { display: none; }
.enroll, .codes { display: flex; flex-direction: column; gap: 10px; }
.enroll__qr { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.qr { max-width: 100%; height: auto; image-rendering: pixelated; border-radius: 8px; }
.codes__list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; font-size: 15px; letter-spacing: 0.06em; }

/* ---- 계정 ---- */
.account { display: flex; flex-direction: column; gap: 16px; }
.account__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.tab { font: 600 14.5px var(--sans); color: var(--dim2); background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 12px; cursor: pointer; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab--on { color: var(--text); border-bottom-color: var(--moon); }
.panel { display: flex; flex-direction: column; gap: 16px; }
.list { list-style: none; display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: none; }
.item--note { color: var(--dim2); font-size: 14px; }
.item__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item__main { color: var(--text); overflow-wrap: anywhere; }
.item__id { color: var(--dim2); font-family: var(--mono); font-size: 12.5px; }
.item__meta { color: var(--dim2); font-size: 13px; overflow-wrap: anywhere; }
.badge { flex: none; padding: 2px 8px; border: 1px solid var(--moon-line); border-radius: 6px; color: var(--moon); font-size: 12px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; }
.facts dt { color: var(--dim2); font-size: 13.5px; }
.facts dd { color: var(--text); overflow-wrap: anywhere; }

/* ---- 겹친 창 ---- */
.overlay { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(4, 6, 10, 0.72); }
.dialog { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.dialog .lead { white-space: pre-line; }

@media (max-width: 560px) {
  .main { padding: 24px 16px 40px; }
  .card { padding: 18px; }
  .codes__list { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .item { align-items: flex-start; flex-direction: column; }
}
