/* TOTOSUN — floodlight night theme */
:root {
  --bg: #0b0e13;
  --surface: #11151c;
  --surface-2: #161b24;
  --surface-3: #1d2330;
  --line: #212833;
  --line-2: #2c3542;
  --text: #e9edf3;
  --text-2: #aab3c0;
  --text-3: #808a99;
  --sun: #ffb23f;
  --sun-2: #ffc56a;
  --sun-ink: #1d1405;
  --sun-soft: rgb(255 178 63 / 0.12);
  --hot: #ff6b4a;
  --pos: #3ddc97;
  --neg: #ff6b6b;
  --t-free: #8fb1ff;
  --t-analysis: #4fdca2;
  --t-scam: #ff7a7a;
  --t-humor: #ff9fcf;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --display: "Barlow Condensed", var(--font);
  --r: 12px;
  --r-sm: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-2) var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--font);
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  caret-color: var(--sun);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--sun); color: var(--sun-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--bg); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--sun-2); }
p a, .muted a { color: var(--sun); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.3; text-wrap: balance; letter-spacing: -0.02em; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
.i { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hp { position: absolute; left: -9999px; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; background: var(--sun); color: var(--sun-ink); padding: 8px 14px; border-radius: var(--r-sm); font-weight: 700; }
.skip:focus { top: 12px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgb(11 14 19 / 0.92); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 62px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-mark { width: 30px; height: 30px; color: var(--sun); }
.logo-word { font: italic 800 26px/1 var(--display); letter-spacing: 0.01em; }
.logo-word.sm { font-size: 20px; color: var(--text-2); }
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.nav a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 600; white-space: nowrap; transition: color 0.2s, background-color 0.2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current] { color: var(--sun); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--text); border-radius: var(--r-sm); }
.nav-toggle .i { width: 24px; height: 24px; }
.top-search { position: relative; display: flex; align-items: center; }
.top-search .i { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; }
.top-search input { width: 180px; height: 38px; padding: 0 12px 0 36px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; transition: border-color 0.2s, width 0.3s var(--ease); }
.top-search input:focus { outline: none; border-color: var(--sun); width: 230px; }
.top-search input::placeholder { color: var(--text-3); }
.top-user { display: flex; align-items: center; gap: 8px; }
.top-me { font-weight: 600; }

/* Layout */
.wrap { max-width: 1240px; margin: 0 auto; padding: 28px 20px 64px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.main { min-width: 0; }
.side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 86px; }
.main:only-child { grid-column: 1 / -1; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid transparent; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s; }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-sun { background: var(--sun); color: var(--sun-ink); }
.btn-sun:hover { background: var(--sun-2); color: var(--sun-ink); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-3); color: var(--text); background: var(--surface-2); }
.btn-danger { background: transparent; border-color: rgb(255 107 107 / 0.4); color: var(--neg); }
.btn-danger:hover { background: rgb(255 107 107 / 0.1); color: var(--neg); }

/* Level badge */
.who { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.lv { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 5px; font: 700 13px/1 var(--display); background: var(--surface-3); color: var(--text-2); }
.lv-3, .lv-4 { background: #1f3346; color: #8fc4ff; }
.lv-5, .lv-6 { background: #183a2d; color: var(--pos); }
.lv-7, .lv-8 { background: #3d2c0f; color: var(--sun); }
.lv-9, .lv-10 { background: var(--sun); color: var(--sun-ink); }
.lv-lg { min-width: 36px; height: 36px; font-size: 20px; border-radius: 9px; }
.lv-xl { min-width: 64px; height: 64px; font-size: 36px; border-radius: 14px; }

/* Tags & chips */
.tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.tag-free { color: var(--t-free); background: rgb(143 177 255 / 0.12); }
.tag-analysis { color: var(--t-analysis); background: rgb(79 220 162 / 0.12); }
.tag-scam { color: var(--t-scam); background: rgb(255 122 122 / 0.12); }
.tag-humor { color: var(--t-humor); background: rgb(255 159 207 / 0.12); }
.tag-notice { color: var(--sun); background: var(--sun-soft); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.chip-done { color: var(--pos); background: rgb(61 220 151 / 0.12); }
.chip-op { color: var(--sun); background: var(--sun-soft); }
.chip-ban { color: var(--neg); background: rgb(255 107 107 / 0.12); }

/* Notice bar */
.notice-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 28px; border-radius: var(--r); background: var(--sun-soft); color: var(--text); }
.notice-bar .i { color: var(--sun); }
.notice-t { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Blocks */
.block { margin-bottom: 44px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.block-title { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; }
.block-title .hot { color: var(--hot); }
.block-note { font-size: 13px; }
.more, .more-inline { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-weight: 600; font-size: 14px; }
.more { margin-top: 14px; }

/* Hot list */
.hot { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(5, auto); column-gap: 32px; }
.hot-item a { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.hot-rank { width: 30px; flex: none; font: italic 800 30px/0.9 var(--display); color: var(--text-3); text-align: center; transition: color 0.2s; }
.hot-item.is-top .hot-rank { color: var(--sun); }
.hot-item a:hover .hot-rank { color: var(--sun-2); }
.hot-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hot-t { font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hot-item a:hover .hot-t { color: var(--sun-2); }
.hot-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; }

/* Tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2); border: 1px solid var(--line); transition: all 0.2s; }
.tabs a:hover { color: var(--text); border-color: var(--line-2); }
.tabs a[aria-current] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Rows */
.rows { list-style: none; margin: 0; padding: 0; }
.row { border-bottom: 1px solid var(--line); }
.row-link { display: flex; align-items: center; gap: 16px; padding: 13px 4px; transition: background-color 0.15s; }
.row-link:hover { background: var(--surface); color: inherit; }
.row-link:hover .row-t { color: var(--sun-2); }
.row-no { width: 52px; flex: none; text-align: center; font-size: 13px; color: var(--text-3); }
.row.is-pinned { background: var(--sun-soft); }
.row.is-pinned .row-no { color: var(--sun); }
.row.is-current .row-t { color: var(--sun); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.15s; }
.row-c { color: var(--sun); font-size: 13px; font-weight: 700; flex: none; }
.row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.row-meta .who { font-weight: 500; color: var(--text-2); }
.row-stat { display: inline-flex; align-items: center; gap: 3px; }
.row-stat.hot { color: var(--hot); }

/* Feature (analysis) */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.feature-item { display: flex; flex-direction: column; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.feature-item h3 { font-size: 17px; font-weight: 700; }
.feature-item p { margin: 0; color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feature-item:hover h3 { color: var(--sun-2); }

/* Empty states */
.empty { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 20px; margin-top: 16px; border-radius: var(--r); background: var(--surface); color: var(--text-2); }
.empty p { margin: 0; }
.empty strong { color: var(--text); }
.empty-sm { color: var(--text-3); padding: 16px 0; margin: 0; }

/* Sidebar */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.panel-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--text-2); margin-bottom: 10px; }
.me-head { display: flex; align-items: center; gap: 12px; }
.me-head strong { display: block; font-size: 16px; }
.meter { height: 6px; margin-top: 14px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--sun); border-radius: 99px; }
.meter-lg { height: 8px; max-width: 420px; }
.meter-cap { margin: 6px 0 0; font-size: 12px; }
.meter-cap b { color: var(--text-2); }
.me-links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 14px; }
.me-links a, .me-links button { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; color: var(--text-2); background: none; border: 0; cursor: pointer; width: 100%; text-align: left; }
.me-links a:hover, .me-links button:hover { background: var(--surface-2); color: var(--text); }
.side-login { display: flex; flex-direction: column; gap: 8px; }
.side-login input, .field input, .field textarea, .attend-cta input, .board-search input, .board-search select, .c-form textarea, .inline-search input {
  width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-sm); transition: border-color 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--sun); }
.side-join { margin: 12px 0 0; font-size: 13px; text-align: center; }
.attend-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.attend-row .panel-title { margin-bottom: 2px; }
.attend-count { margin: 0; color: var(--text-2); font-size: 14px; }
.attend-count b { font: 700 22px/1 var(--display); color: var(--text); margin-right: 2px; }
.board-dir { list-style: none; margin: 0; padding: 0; }
.board-dir a { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 600; }
.board-dir a:hover { background: var(--surface-2); color: var(--text); }
.board-dir span { flex: 1; }
.board-dir em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--sun); }
.recent-c { list-style: none; margin: 0; padding: 0; }
.recent-c a { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.recent-c li:first-child a { border-top: 0; padding-top: 0; }
.rc-body { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-meta { font-size: 12px; }

/* Board */
.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.board-title { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.board-title .i { color: var(--sun); }
.board-head p { margin: 0; }
.board-search { display: flex; gap: 8px; margin-top: 24px; }
.board-search input { flex: 1; }
.board-search select { width: auto; }
.pager { display: flex; justify-content: center; gap: 4px; margin-top: 24px; }
.pager a, .pager span { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: var(--r-sm); font-weight: 600; color: var(--text-2); }
.pager a:hover { background: var(--surface-2); color: var(--text); }
.pager span[aria-current] { background: var(--sun); color: var(--sun-ink); }

/* Post */
.post { padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.post-head { padding-bottom: 20px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.post-board { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--sun); margin-bottom: 10px; }
.post-title { font-size: 28px; font-weight: 800; margin-bottom: 14px; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.post-body { font-size: 16px; line-height: 1.85; max-width: 72ch; min-height: 120px; }
.post-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.owner-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.like { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; cursor: pointer; transition: border-color 0.2s, background-color 0.2s, color 0.2s; }
.like:hover { border-color: var(--hot); color: var(--hot); }
.like .i { transition: transform 0.4s var(--ease); }
.like.is-on { border-color: var(--hot); color: var(--hot); background: rgb(255 107 74 / 0.1); }
.like.is-on .i { fill: currentColor; transform: scale(1.12); }

/* Comments */
.comments { margin-bottom: 44px; }
.comments .block-title { margin-bottom: 8px; }
.c-list { list-style: none; margin: 0; padding: 0; }
.c-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.c-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.c-meta form { margin-left: auto; }
.c-del { background: none; border: 0; padding: 4px; color: var(--text-3); cursor: pointer; border-radius: 4px; }
.c-del:hover { color: var(--neg); }
.c-body { margin: 6px 0 0; max-width: 72ch; }
.c-item.is-op .who { color: var(--sun); }
.c-form { display: flex; gap: 8px; align-items: stretch; margin-top: 16px; }
.c-form textarea { flex: 1; resize: vertical; min-height: 76px; }
.c-form .btn { height: auto; padding: 0 22px; }
.c-login { margin-top: 16px; padding: 16px; border-radius: var(--r); background: var(--surface); color: var(--text-2); }

/* Forms */
.write, .auth { max-width: 760px; }
.auth { max-width: 420px; margin: 24px auto; }
.auth p { margin: 4px 0 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 14px; font-weight: 700; color: var(--text-2); }
.field small { font-size: 12px; }
.field textarea { resize: vertical; line-height: 1.7; }
.form-error { padding: 12px 14px; border-radius: var(--r-sm); background: rgb(255 107 107 / 0.1); color: #ffb3b3; margin: 14px 0; }
.auth-alt { text-align: center; margin-top: 18px !important; font-size: 14px; }
.board-pick { border: 0; padding: 0; margin: 20px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.board-pick legend { font-size: 14px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; padding: 0; }
.board-pick input { position: absolute; opacity: 0; }
.board-pick span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 600; color: var(--text-2); cursor: pointer; transition: all 0.2s; }
.board-pick input:checked + span { background: var(--sun); border-color: var(--sun); color: var(--sun-ink); }
.board-pick input:focus-visible + span { outline: 2px solid var(--sun); outline-offset: 2px; }
.write-note { font-size: 13px; }
.write-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Attendance */
.attend-hero { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; padding: 28px; margin-bottom: 40px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.attend-date { display: flex; flex-direction: column; }
.attend-day { font: italic 800 92px/0.85 var(--display); color: var(--sun); }
.attend-cta { flex: 1; min-width: 240px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.attend-cta p { margin: 0; width: 100%; }
.attend-cta input { flex: 1; min-width: 180px; }
.attend-list { list-style: none; margin: 0; padding: 0; }
.attend-list li { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.attend-rank { width: 28px; text-align: center; font: italic 800 20px/1 var(--display); color: var(--text-3); }
.attend-rank.is-top { color: var(--sun); }
.attend-msg { flex: 1; min-width: 0; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Profile */
.profile { display: flex; gap: 20px; align-items: flex-start; padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.profile h1 { font-size: 24px; font-weight: 800; }
.profile h1 .muted { font-size: 15px; font-weight: 500; }
.profile p { margin: 4px 0 0; }
.profile-main { flex: 1; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: grid; grid-template-columns: 1fr auto 56px; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ledger b { text-align: right; }
.ledger .pos { color: var(--pos); }
.ledger .neg { color: var(--neg); }

/* Admin */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0 0 40px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stats div { background: var(--surface); padding: 18px; }
.stats dt { font-size: 13px; color: var(--text-3); font-weight: 600; }
.stats dd { margin: 4px 0 2px; font: 700 34px/1 var(--display); }
.stats span { font-size: 12px; }
.inline-search { display: flex; gap: 6px; }
.inline-search input { width: 200px; padding: 6px 10px; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td form { display: inline; }
.tbl .r { text-align: right; }
.tbl tr.is-banned td { opacity: 0.55; }

/* Toast — the one moment of motion */
.toast { position: fixed; left: 50%; top: 76px; z-index: 30; translate: -50% 0; padding: 12px 20px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 700; box-shadow: 0 12px 32px rgb(0 0 0 / 0.45); animation: toast-in 0.6s var(--ease) both, toast-out 0.4s ease-in 3.6s forwards; }
@keyframes toast-in { from { opacity: 0; translate: -50% -16px; filter: blur(6px); } }
@keyframes toast-out { to { opacity: 0; translate: -50% -8px; visibility: hidden; } }

/* Footer */
.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 28px 20px 40px; display: flex; gap: 20px; align-items: baseline; flex-wrap: wrap; }
.foot p { margin: 0; color: var(--text-3); font-size: 13px; }

/* Responsive */
@media (max-width: 1080px) {
  .top-search input { width: 140px; }
  .top-search input:focus { width: 170px; }
}
@media (max-width: 960px) {
  .wrap { grid-template-columns: 1fr; }
  .side { position: static; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 62px; flex-direction: column; padding: 8px 12px 14px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 16px 32px rgb(0 0 0 / 0.4); }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; }
  .top-search { display: none; }
  .top-in { gap: 12px; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .top-in, .wrap, .foot-in { padding-left: 16px; padding-right: 16px; }
  .wrap { padding-top: 20px; }
  .hot { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; }
  .feature, .split { grid-template-columns: 1fr; }
  .row-no { display: none; }
  .row-link { padding: 12px 0; }
  .row-t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .post-title { font-size: 22px; }
  .board-title { font-size: 22px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .attend-hero { padding: 20px; gap: 20px; }
  .attend-day { font-size: 72px; }
  .c-form { flex-direction: column; }
  .c-form .btn { height: 44px; }
  .board-search { flex-wrap: wrap; }
  .logo-word { font-size: 23px; }
  .top-user .btn-ghost { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  .toast { animation: toast-out 0.01ms 4s forwards; }
}

/* Main: welcome band */
.welcome { position: relative; display: grid; grid-template-columns: 1fr 300px; align-items: center; gap: 24px; padding: 34px 0 34px 34px; margin-bottom: 28px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.welcome h1 { font-size: 32px; font-weight: 800; line-height: 1.25; letter-spacing: -0.03em; }
.welcome p { margin: 12px 0 0; color: var(--text-2); max-width: 44ch; }
.welcome-cta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.welcome-art { width: 100%; height: auto; align-self: end; margin-bottom: -34px; }
.welcome-art .rays { transform-origin: 160px 140px; animation: rise 1.4s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: scale(0.82); } }

/* Main: board grid */
.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 32px; }
.bg-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.bg-head h2 { font-size: 17px; font-weight: 800; }
.bg-head h2 a { display: inline-flex; align-items: center; gap: 8px; }
.bg-head h2 .i { color: var(--sun); }
.bg-list { list-style: none; margin: 0; padding: 0; }
.bg-list a { display: flex; align-items: center; gap: 6px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.bg-list a:hover .bg-t { color: var(--sun-2); }
.bg-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.15s; }
.bg-time { margin-left: auto; padding-left: 12px; font-size: 12px; flex: none; }
.bg-empty { margin: 0; padding: 18px 0; color: var(--text-3); font-size: 14px; }

/* Sidebar: ranking */
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.rank-no { width: 18px; text-align: center; font: italic 800 17px/1 var(--display); color: var(--text-3); }
.rank li.is-top .rank-no { color: var(--sun); }
.rank-p { margin-left: auto; font-size: 13px; }

@media (max-width: 720px) {
  .welcome { grid-template-columns: 1fr; padding: 26px 20px 0; gap: 8px; }
  .welcome h1 { font-size: 26px; }
  .welcome-art { max-width: 260px; justify-self: center; margin-bottom: 0; }
  .board-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* Main: live scoreboard */
.scores { margin-bottom: 28px; }
.scores-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.live-chip { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; padding: 2px 9px; border-radius: 999px; background: rgb(255 77 77 / 0.14); color: #ff7b7b; font: 700 13px/1.4 var(--font); letter-spacing: 0.02em; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 0 0 rgb(255 77 77 / 0.6); animation: live 1.8s ease-out infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgb(255 77 77 / 0); } 100% { box-shadow: 0 0 0 0 rgb(255 77 77 / 0); } }
.scores-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.scores-tabs button { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.scores-tabs button:hover { color: var(--text); border-color: var(--line-2); }
.scores-tabs button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.scores-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 214px; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 10px; scrollbar-width: thin; mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.scores-strip:focus-visible { outline-offset: 4px; }
.match { scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.match[hidden] { display: none; }
.match.is-in { border-color: rgb(255 77 77 / 0.35); background: linear-gradient(180deg, rgb(255 77 77 / 0.06), transparent 60%), var(--surface); }
.match-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.match-league { font-weight: 800; color: var(--text-2); letter-spacing: 0.02em; }
.match-status { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.match.is-in .match-status { color: #ff7b7b; }
.match-team { display: flex; align-items: center; gap: 9px; min-width: 0; }
.match-team img, .logo-ph { width: 24px; height: 24px; flex: none; object-fit: contain; }
.logo-ph { border-radius: 50%; background: var(--surface-3); }
.match-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-score { font: 700 20px/1 var(--display); min-width: 18px; text-align: right; }
.match.is-post .match-team:not(.is-win) { color: var(--text-3); }
.match.is-post .match-team.is-win .match-score { color: var(--sun); }
.scores-empty { margin: 0; padding: 20px; border-radius: var(--r); background: var(--surface); color: var(--text-3); grid-column: 1 / -1; }
.scores-src { margin: 4px 0 0; font-size: 12px; }
@media (max-width: 720px) {
  .scores-strip { grid-auto-columns: 78%; }
}

/* Main: league table */
.standings { margin-top: 44px; }
.table-panel[hidden] { display: none; }
.league { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 4px; }
.league th { font-size: 12px; font-weight: 600; color: var(--text-3); text-align: center; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.league th:nth-child(2) { text-align: left; }
.league td { text-align: center; padding: 9px 6px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.league td.tm { text-align: left; color: var(--text); font-weight: 600; }
.league td.tm span { vertical-align: middle; }
.league td.tm img { width: 20px; height: 20px; object-fit: contain; vertical-align: middle; margin-right: 10px; }
.league td.rk { width: 36px; font: italic 800 16px/1 var(--display); color: var(--text-3); }
.league td.rk.is-top { color: var(--sun); }
.league td.pts { color: var(--text); font-weight: 800; }
.league tbody tr { transition: background-color 0.15s; }
.league tbody tr:hover { background: var(--surface); }
.league tr.is-extra { display: none; }
.table-panel.is-open .league tr.is-extra { display: table-row; }
.table-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; background: none; border: 0; padding: 4px 0; color: var(--text-2); font-weight: 600; font-size: 14px; cursor: pointer; }
.table-more:hover { color: var(--sun-2); }
.table-more[aria-expanded="true"] .i { transform: rotate(90deg); }
@media (max-width: 720px) {
  .league th:nth-child(4), .league td:nth-child(4), .league th:nth-child(5), .league td:nth-child(5), .league th:nth-child(6), .league td:nth-child(6) { display: none; }
}
