/* 복서톡 — 화이트톤 기본. 링 위의 기록판처럼: 숫자는 굵게, 색은 의미(민트=승·진행, 빨강=홍/라이브, 파랑=청) */
:root {
  --bg: #F3F5F8;
  --card: #FFFFFF;
  --line: #E2E7EE;
  --divider: #EDF0F4;
  --text: #0F1722;
  --text-2: #4A5566;
  --text-3: #6B7686;
  --mint: #3FE0C8;
  --ink: #062421;
  --mint-text: #007A71;
  --mint-big: #008F85;
  --mint-soft: rgba(0, 169, 157, 0.10);
  --mint-line: rgba(0, 169, 157, 0.45);
  --red: #D93036;
  --red-soft: rgba(229, 72, 77, 0.10);
  --blue: #2B59C3;
  --blue-soft: rgba(43, 89, 195, 0.10);
  --amber-text: #8A5A00;
  --amber-soft: #FFF3D1;
  --neutral-soft: #EEF1F5;
  --shadow: 0 1px 2px rgba(15, 23, 34, 0.05), 0 10px 28px rgba(15, 23, 34, 0.05);
  --font-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-display: "Black Han Sans", "IBM Plex Sans KR", "Apple SD Gothic Neo", sans-serif;
  --font-num: "Barlow Condensed", "IBM Plex Sans KR", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--mint-text); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: rgba(243, 245, 248, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 560px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wordmark { font-family: var(--font-display); font-size: 21px; color: var(--text); text-decoration: none; letter-spacing: 0.01em; }
.wordmark b { color: var(--mint-text); font-weight: 400; }
.top-note { font-size: 12px; color: var(--text-3); }

.wrap { max-width: 560px; margin: 0 auto; padding: 14px 16px 40px; display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.hero { box-shadow: var(--shadow); border-radius: 20px; }
a.card { color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--mint-line); }
.wrap-list { display: flex; flex-direction: column; gap: 10px; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--mint-text); }
.title-lg { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.2; }
.meta { font-size: 12.5px; color: var(--text-2); }
.muted { font-size: 12px; color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }

.demo-banner { background: var(--amber-soft); color: var(--amber-text); border-radius: 12px; padding: 9px 12px; font-size: 12.5px; font-weight: 600; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.status.live .dot { background: #E5484D; }
.status.done .dot { background: var(--mint-big); }
.progress { height: 6px; border-radius: 99px; background: #E6EAF0; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--mint); border-radius: 99px; transition: width 0.6s ease; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--mint-soft); color: var(--mint-text); border-color: var(--mint-line); }
.chip small { font-weight: 500; color: var(--text-3); margin-left: 4px; }

.stage-h { font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: 0.04em; margin-top: 4px; }
.bout { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; display: flex; flex-direction: column; }
.bout.live { border-color: rgba(229, 72, 77, 0.5); }
.bout.final { border: 1.5px solid var(--mint-line); }
.bout-top { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--text-3); padding-bottom: 4px; }
.bout-top .res { font-weight: 700; color: var(--text-2); }
.bout-top .res.live { color: var(--red); }
.fighter { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.fighter + .fighter { border-top: 1px solid var(--divider); }
.fighter.lost { opacity: 0.45; }
.corner { width: 6px; align-self: stretch; border-radius: 3px; flex-shrink: 0; }
.corner.red { background: var(--red); }
.corner.blue { background: var(--blue); }
.f-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.f-name { font-size: 14.5px; font-weight: 600; color: var(--text); text-decoration: none; }
a.f-name:hover { text-decoration: underline; }
.f-gym { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-badge { font-size: 12px; font-weight: 700; color: var(--ink); background: var(--mint); border-radius: 8px; padding: 4px 9px; flex-shrink: 0; }

.btn { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.btn.danger { color: var(--red); border-color: rgba(217, 48, 54, 0.4); }
.btn.danger.armed { background: var(--red); color: #FFFFFF; border-color: var(--red); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }

.record { display: flex; align-items: flex-end; gap: 22px; }
.record .n { font-family: var(--font-num); font-weight: 700; line-height: 0.95; font-variant-numeric: tabular-nums; }
.record .w .n { font-size: 60px; color: var(--mint-big); }
.record .l .n { font-size: 44px; }
.record span.lb { display: block; font-size: 12px; color: var(--text-2); }
.record .side { margin-left: auto; text-align: right; font-size: 12px; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--divider); }
.list-row:first-child { border-top: 0; }
.wl { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.wl.W { background: var(--mint); color: var(--ink); }
.wl.L { background: var(--red-soft); color: var(--red); }

.tag { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 2px 7px; background: var(--neutral-soft); color: var(--text-2); }
.tag.ok { background: var(--mint-soft); color: var(--mint-text); }
.tag.warn { background: var(--amber-soft); color: var(--amber-text); }
.tag.red { background: var(--red-soft); color: var(--red); }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
input[type=text], input[type=password], input[type=tel], input[type=number], select { width: 100%; min-height: 44px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: #FAFBFC; font-size: 15px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-height: 36px; }
.check input { width: 18px; height: 18px; accent-color: #00A99D; margin: 0; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.seg button { min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; font-size: 15px; cursor: pointer; }
.seg button.red[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #FFFFFF; }
.seg button.blue[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #FFFFFF; }
.seg3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: #E8ECF1; border-radius: 12px; padding: 4px; }
.seg3 button { min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-weight: 600; cursor: pointer; }
.seg3 button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 34, 0.12); }

.seg.one { grid-template-columns: minmax(0, 1fr); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.result-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--divider); }

.empty { border: 1px dashed var(--line); border-radius: 14px; padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; color: var(--text-2); font-size: 13px; }
.empty b { color: var(--text); font-size: 14px; }
.notice { font-size: 12.5px; color: var(--amber-text); background: var(--amber-soft); border-radius: 10px; padding: 9px 12px; }
.error-box { font-size: 13px; color: var(--red); background: var(--red-soft); border-radius: 10px; padding: 10px 12px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--text); color: #FFFFFF; font-size: 13px; font-weight: 600; border-radius: 99px; padding: 10px 16px; z-index: 30; max-width: calc(100% - 32px); text-align: center; box-shadow: var(--shadow); }

.foot { max-width: 560px; margin: 0 auto; padding: 8px 16px 32px; font-size: 11.5px; color: var(--text-3); text-align: center; line-height: 1.7; }

/* ---------- v0.2 단체 접수 ---------- */
.btn.armed { background: var(--text); color: #FFFFFF; border-color: var(--text); }
textarea, input[type=date] { width: 100%; min-height: 44px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: #FAFBFC; font-size: 15px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
textarea:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.field > small { font-size: 11.5px; color: var(--text-3); }
.check.multi { align-items: flex-start; }
.check.multi input { margin-top: 2px; flex-shrink: 0; }

.status.open .dot { background: var(--mint-big); }
.status.open { color: var(--mint-text); }

.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: #E8ECF1; border-radius: 12px; padding: 4px; }
.tabs button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-weight: 700; font-size: 14px; cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 34, 0.12); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: #F7F9FB; border: 1px solid var(--divider); border-radius: 12px; padding: 10px 10px 9px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stat b { font-family: var(--font-num); font-weight: 700; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat span { font-size: 11.5px; color: var(--text-2); }
.stat.good b { color: var(--mint-big); }
.stat.warn b { color: var(--amber-text); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: step; }
.steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.steps li::before { counter-increment: step; content: counter(step); flex: 0 0 24px; height: 24px; border-radius: 8px; background: var(--mint-soft); color: var(--mint-text); font-weight: 700; font-size: 12.5px; display: flex; align-items: center; justify-content: center; }
.steps b { color: var(--text); font-weight: 700; }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 14px; font-size: 13px; margin: 0; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.link-box { display: flex; gap: 8px; align-items: center; background: #F7F9FB; border: 1px solid var(--divider); border-radius: 12px; padding: 6px 6px 6px 12px; }
.link-box code { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.card.pay { border: 1.5px solid var(--mint-line); }
.amount { font-family: var(--font-num); font-weight: 700; font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.amount small { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--text-2); margin-left: 2px; }

.consent-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.consent-item.required { border-color: var(--mint-line); background: rgba(0, 169, 157, 0.03); }
.consent-item .check { font-weight: 700; font-size: 14px; }
.consent-item ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }
.consent-item ul b { color: var(--text); font-weight: 600; }
.badge-req { color: var(--mint-text); }
.badge-opt { color: var(--text-3); }

details > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--mint-text); min-height: 32px; display: flex; align-items: center; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; display: inline-block; width: 16px; font-weight: 700; }
details[open] > summary::before { content: "−"; }

.team-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.team-head .f-body { gap: 2px; }
a.tel { color: var(--text-2); text-decoration: none; font-size: 12.5px; }
.list-row.entry { align-items: flex-start; }
.list-row .actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.new-flash { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 12px; }

@media (max-width: 380px) { .grid2 { grid-template-columns: minmax(0, 1fr); } .record .w .n { font-size: 52px; } .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
