/* 자동품절: 단색 강조, 시스템 폰트 스택 (외부 CDN 사용 안 함) */
:root {
  --bg: #f7f7f5;
  --fg: #1c1c1a;
  --muted: #6b6b66;
  --line: #deded8;
  --card: #ffffff;
  --accent: #14532d;
  --accent-fg: #ffffff;
  --ok: #14532d;
  --warn: #8a5a00;
  --bad: #a1271b;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614;
    --fg: #ecece8;
    --muted: #a3a39c;
    --line: #34342f;
    --card: #1e1e1b;
    --accent: #7fd1a0;
    --accent-fg: #0f1a13;
    --ok: #7fd1a0;
    --warn: #e0b45c;
    --bad: #f08a7e;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
}
a { color: var(--accent); }
h1 { font-size: 1.5rem; line-height: 1.35; margin: 0 0 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; margin: 1.6rem 0 .5rem; }

.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top));
}
.brand { color: var(--fg); text-decoration: none; font-weight: 700; }
.nav { display: flex; gap: 16px; }
.nav a { color: var(--fg); text-decoration: none; font-size: .95rem; }
.nav a:hover { text-decoration: underline; }

main { flex: 1; width: 100%; margin: 0 auto; padding: 0 16px 32px; }
main.center { max-width: 460px; padding-top: 12vh; text-align: center; }
main.narrow { max-width: 380px; padding-top: 8vh; }
main.wide { max-width: 640px; padding-top: 4vh; }
main.doc { max-width: 680px; padding-top: 4vh; }
main.doc li { margin: .25rem 0; }

#soldout-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.store-pick { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.store-pick select { font-size: .95rem; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); }
.store-name { margin: 0; font-size: .9rem; color: var(--muted); }

input[type=text], input[type=email], input[type=password] {
  width: 100%; height: 54px; padding: 0 14px;
  font: inherit; font-size: 17px; color: var(--fg);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
input:focus-visible, button:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 14px; font: inherit; font-size: .92rem;
  color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; min-height: 54px; font-size: 1.05rem; }
.btn.choice { margin: 4px 6px 0 0; }

.hint, .aside, .sub { color: var(--muted); font-size: .9rem; }
.notice { margin: 14px 0; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); font-size: .92rem; text-align: left; }
.notice.err { border-color: var(--bad); color: var(--bad); }
.notice.ok { border-color: var(--ok); color: var(--ok); }

.results { margin-top: 28px; text-align: left; }
.results-title { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.result-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.line { padding: 12px 2px; border-bottom: 1px solid var(--line); }
.line-head { font-size: 1.05rem; }
.line .app { font-weight: 600; }
.line .sub { margin-top: 2px; }
.line.st-done .st, .line.st-already .st { color: var(--ok); font-weight: 600; }
.line.st-failed .st, .line.st-reauth .st { color: var(--bad); font-weight: 600; }
.line.st-unverified .st, .line.st-ambiguous .st, .line.st-not_found .st { color: var(--warn); font-weight: 600; }
.line.st-queued .st, .line.st-running .st, .line.st-not_connected .st, .line.st-preparing .st { color: var(--muted); }
.link { display: inline-block; margin: 6px 12px 0 0; padding: 0; font: inherit; font-size: .92rem; color: var(--accent); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.choices { margin-top: 6px; }
.demo-note { margin: 12px 0 0; font-size: .85rem; color: var(--muted); }
.spin { display: inline-block; width: 10px; height: 10px; margin-left: 8px; border: 2px solid var(--line); border-top-color: var(--muted); border-radius: 50%; animation: spin .9s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
.stack label.check { flex-direction: row; align-items: center; gap: 8px; }

.store { margin: 0 0 28px; padding-bottom: 8px; }
.store.focus .store-head input { border-color: var(--accent); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.inline-form input[type=text], .inline-form input[type=password] { flex: 1 1 160px; width: auto; height: 42px; font-size: 16px; }
.card { margin: 10px 0; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.chip { font-size: .8rem; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.chip.st-on { color: var(--ok); border-color: var(--ok); }
.chip.st-reauth { color: var(--bad); border-color: var(--bad); }
.account { border-top: 1px solid var(--line); padding-top: 16px; }
details summary { cursor: pointer; color: var(--muted); font-size: .9rem; margin: 8px 0; }

.foot {
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); text-align: center;
  font-size: .82rem; color: var(--muted);
}
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 0; }
.foot span, .foot a { white-space: nowrap; }
.foot a { color: var(--muted); }
.foot .sep { margin: 0 6px; }
