@font-face { font-family: "PretendardLocal"; font-weight: 400; font-display: swap; src: url("/static/fonts/Pretendard-Regular.subset.woff2") format("woff2"); }
@font-face { font-family: "PretendardLocal"; font-weight: 700; font-display: swap; src: url("/static/fonts/Pretendard-Bold.subset.woff2") format("woff2"); }
@font-face { font-family: "PretendardLocal"; font-weight: 800; font-display: swap; src: url("/static/fonts/Pretendard-ExtraBold.subset.woff2") format("woff2"); }

:root {
  --bg: #fbf8f1;
  --surface: #ffffff;
  --ink: #14213d;
  --muted: #4a5568;
  --line: #d9d3c4;
  --brand: #1f4fd8;
  --brand-ink: #ffffff;
  --brand-soft: #e6edff;
  --ok: #0f7a45;
  --ok-soft: #e3f5ec;
  --warn: #9a3412;
  --warn-soft: #fff1e6;
  --radius: 14px;
  --font: "PretendardLocal", "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.55; font-size: 17px; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--brand); }
button, input, textarea, select { font: inherit; color: inherit; }
.wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }
.narrow { max-width: 520px; }
h1 { text-wrap: balance; font-size: 1.6rem; line-height: 1.3; margin: 8px 0 8px; font-weight: 800; }
h2 { font-size: 1.2rem; margin: 28px 0 10px; font-weight: 800; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.hidden { display: none !important; }

.notice { background: var(--warn-soft); border: 1px solid #f2c9a8; color: var(--warn); border-radius: var(--radius); padding: 12px 14px; font-weight: 700; font-size: .95rem; margin: 12px 0 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin: 14px 0; }
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.cards a.card { display: block; text-decoration: none; color: var(--ink); }
.cards a.card strong { display: block; font-size: 1.2rem; margin-bottom: 6px; color: var(--brand); }

/* 폼 */
.field { margin: 0 0 18px; }
.field > .label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 1.05rem; }
.req { display: inline-block; margin-left: 6px; font-size: .78rem; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 1px 6px; vertical-align: 2px; }
input[type=text], input[type=password], textarea { width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 17px; }
textarea { min-height: 220px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.45; }
input:focus, textarea:focus { outline: 3px solid var(--brand-soft); border-color: var(--brand); }
.choices { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.choices label { position: relative; display: flex; align-items: center; min-height: 52px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 600; font-size: 1rem; }
.choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choices label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.choices label:has(input:focus-visible) { outline: 3px solid var(--brand-soft); }
.choices label.checked { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
@media (max-width: 359px) { .choices { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 20px; border-radius: 12px; border: 1.5px solid var(--brand); background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 1.05rem; cursor: pointer; text-decoration: none; }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--brand); }
.btn.small { min-height: 40px; padding: 6px 12px; font-size: .92rem; }
.btn[disabled] { opacity: .55; cursor: wait; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.msg { border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-weight: 600; }
.msg.err { background: var(--warn-soft); color: var(--warn); border: 1px solid #f2c9a8; }
.msg.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #a7dcc0; }
.msg ul { margin: 6px 0 0; padding-left: 20px; }
.done { text-align: center; padding: 28px 16px; }
.done .big { font-size: 1.8rem; font-weight: 800; color: var(--ok); margin: 6px 0; }
.done .num { font-size: 1.1rem; }

.copybox { background: #f4f1e8; border: 1px dashed var(--line); border-radius: 12px; padding: 12px; white-space: pre-wrap; font-size: .95rem; margin: 8px 0; }
.links { display: grid; gap: 10px; }
.links .item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.links .item b { display: block; margin-bottom: 4px; }
.links .item code { display: block; word-break: break-all; font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.qrbox { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.qrbox img { width: 160px; height: 160px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.mylist li { margin: 6px 0; }

/* 보드 */
body.board { font-size: clamp(16px, 1.05vw, 22px); }
.bd { display: grid; grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); gap: 2.2vw; padding: 2.2vw 2.6vw; min-height: 100vh; }
.bd-left { display: flex; flex-direction: column; gap: 1.6vw; min-width: 0; }
.bd-right { display: flex; flex-direction: column; gap: 1.6vw; min-width: 0; }
.bd-title { font-size: clamp(26px, 2.6vw, 56px); font-weight: 800; line-height: 1.2; margin: 0; }
.bd-status { font-size: clamp(14px, .95vw, 20px); color: var(--muted); font-weight: 700; }
.bd-status.live::before { content: ""; display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--ok); margin-right: .45em; vertical-align: 0; }
.bd-status.down::before { content: ""; display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--warn); margin-right: .45em; }
.panel { background: var(--surface); border: 2px solid var(--line); border-radius: 22px; padding: 1.4vw 1.6vw; }
.count-label { font-size: clamp(20px, 1.7vw, 36px); font-weight: 800; color: var(--muted); }
.count { font-size: clamp(90px, 11vw, 230px); font-weight: 800; line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.count small { font-size: .32em; color: var(--ink); margin-left: .15em; }
.join { display: flex; gap: 1.4vw; align-items: center; }
.join img { width: clamp(150px, 13vw, 280px); height: clamp(150px, 13vw, 280px); background: #fff; border-radius: 12px; border: 2px solid var(--line); flex: none; }
.join > div { min-width: 0; }
.join .url { font-size: clamp(16px, 1.3vw, 30px); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.join .hint { font-size: clamp(15px, 1.1vw, 24px); color: var(--muted); font-weight: 700; margin-top: .4em; }
.bars-title { font-size: clamp(22px, 1.8vw, 40px); font-weight: 800; margin: 0 0 .6em; }
.bar { display: grid; grid-template-columns: minmax(6em, 28%) 1fr 3.2em; align-items: center; gap: .8vw; margin: .55em 0; font-size: clamp(18px, 1.55vw, 34px); font-weight: 800; }
.bar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .track { height: 1.25em; background: #efe9db; border-radius: 10px; overflow: hidden; }
.bar .fill { height: 100%; width: 0; background: var(--brand); border-radius: 10px; transition: width .6s ease; }
.bar .val { text-align: right; font-variant-numeric: tabular-nums; }
.recent-title { font-size: clamp(20px, 1.5vw, 32px); font-weight: 800; margin: 0 0 .5em; }
.chips { display: flex; flex-wrap: wrap; gap: .6vw; }
.chip { background: var(--brand-soft); color: var(--ink); border-radius: 999px; padding: .35em .9em; font-size: clamp(17px, 1.35vw, 30px); font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.new { animation: pop 1.2s ease; }
.chip .sub { color: var(--muted); font-weight: 700; margin-left: .4em; font-size: .8em; }
@keyframes pop { 0% { transform: scale(.6); background: #ffd84d; } 40% { transform: scale(1.08); background: #ffd84d; } 100% { transform: scale(1); } }
.count.bump { animation: bump .5s ease; }
@keyframes bump { 40% { transform: scale(1.06); } }
.stat { font-size: clamp(18px, 1.4vw, 30px); font-weight: 800; margin: .3em 0; }
.below { padding: 0 2.6vw 3vw; }
.below h2 { font-size: clamp(20px, 1.4vw, 30px); }
table.entries { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 15px; }
table.entries th, table.entries td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
table.entries th { background: #f4f1e8; }
.tablewrap { overflow-x: auto; }
.empty { color: var(--muted); font-weight: 700; font-size: clamp(16px, 1.3vw, 28px); }

@media (max-width: 900px) {
  .bd { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .panel { padding: 16px; }
  .bar { grid-template-columns: minmax(5em, 34%) 1fr 2.6em; }
}
@media (prefers-reduced-motion: reduce) { .chip.new, .count.bump { animation: none; } .bar .fill { transition: none; } }
.compact .bd { min-height: 0; }
#extra .panel { margin-bottom: 14px; }
