/* ============================================================
   NETIZEN AWARDS — Editorial voting desk
   Midnight ink · paper white · restrained bronze.
   Single-column app shell with candidate photography as the primary signal.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700;800&family=Noto+Sans+JP:wght@400;500;700;800&family=Noto+Sans+SC:wght@400;500;700;800&family=Noto+Sans+TC:wght@400;500;700;800&display=swap');

:root {
  --shell: 520px;
  --maxw: 520px;
  --gutter: 16px;
  --header-h: 60px;
  --navh: 62px;

  /* editorial night desk */
  --canvas: #10161d;
  --surface: #18212b;
  --surface-2: #202c38;
  --surface-3: #2a3947;
  --line: #344656;
  --line-strong: #52687a;

  --text: #f4f1e8;
  --text-dim: #c5c8be;
  --text-faint: #91a0a6;

  --gold: #c68b43;
  --gold-bright: #deb273;
  --gold-deep: #f0d2a0;
  --coral: #c86652;
  --coral-soft: #df8974;
  --mint: #8eb59c;
  --violet: #9ca9b5;
  --violet-soft: #c5ced2;

  --grad-gold: var(--gold);
  --grad-coral: var(--coral);
  --grad-violet: var(--surface-3);
  --grad-title: var(--text);
  --grad-hero: var(--surface);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.24);
  --shadow-gold: 0 1px 2px rgba(0,0,0,0.24);
  --glow-pink: none;
  --glow-violet: none;
  --shadow-shell: 0 0 0 1px var(--line), 0 10px 30px rgba(0,0,0,0.22);

  --font-display: 'Source Serif 4', 'Noto Serif KR', serif;
  --font-body: 'Source Sans 3', 'Noto Sans KR', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; max-width: 100%; overflow-x: clip; }
body {
  font-family: var(--font-body);
  background: var(--canvas);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  max-width: 100%;
  overflow-x: clip;
  padding-bottom: var(--navh);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; }
ul { list-style: none; }

/* ---- app shell ---- */
.wrap { width: 100%; max-width: var(--shell); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

body::before {
  content: "";
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: var(--shell); background: var(--surface); box-shadow: var(--shadow-shell);
  z-index: 0; pointer-events: none;
}
.site-header, .hero, .cat-bar, main, .site-footer, .page-hero, .board-tabs, .mobile-nav, .toast, .modal-overlay { position: relative; z-index: 2; }

.section { padding: 28px 0; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }
.section-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 5vw, 1.8rem); line-height: 1.12; letter-spacing: -0.4px; margin-top: 4px; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); display: flex; align-items: center; background: rgba(9,11,22,0.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; flex-shrink: 0; line-height: 0; }
.brand-logo { height: 30px; width: auto; max-width: 190px; display: block; object-fit: contain; }
.main-nav, .menu-toggle { display: none !important; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; font-size: 14px; padding: 11px 17px; border-radius: var(--r-pill); transition: transform 0.12s, box-shadow 0.2s, opacity 0.2s, background 0.2s; white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn-gold { background: var(--grad-gold); color: #fff; box-shadow: var(--shadow-gold); }
.btn-gold:hover { box-shadow: 0 8px 26px rgba(199,154,63,0.4); }
.btn-coral { background: var(--grad-coral); color: #fff; box-shadow: 0 6px 18px rgba(240,71,106,0.3); }
.btn-ghost { background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-deep); }
.btn-sm { padding: 8px 13px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---- hero ---- */
.hero { background: var(--grad-hero); padding: 30px 0 22px; border-bottom: 1px solid var(--line); }
.hero-inner { display: block; }
.season-tag { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line-strong); padding: 6px 12px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-deep); }
.season-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 8px var(--coral); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
.hero-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 9vw, 2.7rem); line-height: 1.02; letter-spacing: -1px; margin: 13px 0 11px; }
.hero-title em { font-style: italic; color: var(--gold-deep); }
.hero-sub { color: var(--text-dim); font-size: 1rem; }
.hero-cta { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hero-cta .btn { flex: 1; min-width: 140px; }
.live-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-top: 20px; }
.stat { background: var(--surface); padding: 14px 10px; text-align: center; }
.stat .label { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); font-weight: 700; }
.stat .value { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.1rem, 5vw, 1.4rem); margin-top: 3px; letter-spacing: -0.5px; }
.stat .value.gold { color: var(--gold-deep); }
.stat .value.coral { color: var(--coral); }

/* ---- category tabs ---- */
.cat-bar { position: sticky; top: var(--header-h); z-index: 40; background: rgba(9,11,22,0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); overflow-x: clip; }
.cat-scroll { display: flex; gap: 7px; overflow-x: auto; padding: 11px var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch; max-width: var(--shell); margin: 0 auto; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-scroll::after { content: ""; flex: 0 0 var(--gutter); }

/* ---- main single column ---- */
.layout, .board-wrap { display: block; max-width: var(--shell); }
.month-strip { display: flex; gap: 6px; overflow-x: auto; padding: 14px 0 12px; scrollbar-width: none; max-width: 100%; }
.month-strip::-webkit-scrollbar { display: none; }
.month-strip::after { content: ""; flex: 0 0 4px; }
.month-chip { flex-shrink: 0; padding: 7px 12px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; color: var(--text-dim); border: 1px solid var(--line); background: var(--surface); transition: 0.2s; white-space: nowrap; }
.month-chip:hover { color: var(--text); border-color: var(--line-strong); }
.month-chip.active { background: var(--surface-3); color: var(--gold-deep); border-color: var(--gold-bright); }
.month-chip .yr { opacity: 0.5; font-size: 11px; margin-right: 2px; }

.rank-head { margin-bottom: 14px; }
.rank-head .meta { display: flex; gap: 14px; font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.rank-head .meta b { color: var(--gold-deep); font-weight: 700; }
.countdown { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--coral); background: rgba(244,63,94,0.16); border: 1px solid rgba(236,72,153,0.40); padding: 6px 11px; border-radius: var(--r-pill); margin-top: 10px; }

.vote-list { display: grid; gap: 10px; }
.vote-card { display: grid; grid-template-columns: 88px 1fr; gap: 11px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px; box-shadow: var(--shadow-sm); transition: border-color 0.2s, box-shadow 0.2s; animation: rise 0.45s ease backwards; }
.vote-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.vote-rank { text-align: center; }
.vote-rank .num { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; line-height: 1; color: var(--text); }
.vote-card:nth-child(1) .vote-rank .num { color: var(--gold-deep); }
.vote-rank .up { color: var(--mint); }
.vote-rank .down { color: var(--coral); }
.vote-rank .same { color: var(--text-faint); }
.vote-photo { width: 56px; height: 56px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface-3); border: 1px solid var(--line); }
.vote-info { min-width: 0; }
.vote-info .name { font-weight: 700; font-size: 0.98rem; display: flex; align-items: center; gap: 7px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* external news link — must read as clickable at a glance */
.vote-info .news {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  margin: 2px 0 8px; padding: 3px 9px 3px 4px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-dim); font-size: 12.5px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s, transform 0.12s;
}
.vote-info .news .news-tag {
  flex-shrink: 0; font-size: 9.5px; font-weight: 800; letter-spacing: 0.8px;
  padding: 2px 6px; border-radius: var(--r-pill);
  background: var(--grad-gold); color: #fff;
}
.vote-info .news .news-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; text-decoration-color: rgba(212,175,55,0.45); text-underline-offset: 2px; }
.vote-info .news .news-ext { flex-shrink: 0; font-size: 11px; color: var(--gold, #d4af37); transition: transform 0.15s; }
.vote-info .news:hover,
.vote-info .news:focus-visible {
  color: var(--gold, #d4af37); border-color: var(--gold, #d4af37);
  background: rgba(212,175,55,0.10); transform: translateY(-1px);
}
.vote-info .news:hover .news-text { text-decoration-color: currentColor; }
.vote-info .news:hover .news-ext { transform: translate(1px, -1px); }
.vote-info .news:active { transform: translateY(0); }
.vote-info .news:focus-visible { outline: 2px solid var(--gold, #d4af37); outline-offset: 2px; }
.badge { font-size: 9px; font-weight: 800; letter-spacing: 0.4px; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; }
.vote-bar-row { display: flex; align-items: center; gap: 9px; }
.vote-bar { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.vote-bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--grad-gold); width: 0; transition: width 1s cubic-bezier(.2,.7,.2,1); }
.vote-pct { font-size: 12.5px; font-weight: 700; color: var(--gold-deep); min-width: 42px; text-align: right; }
.vote-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.vote-count { font-size: 12px; color: var(--text-faint); }
.vote-count b { color: var(--text); font-weight: 700; }
.vote-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.btn-heart { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; transition: 0.2s; color: var(--text-dim); }
.btn-heart:hover { border-color: var(--coral); color: var(--coral); }
.btn-free { background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; padding: 6px 12px; }
.btn-free:hover { border-color: var(--gold); color: var(--gold-deep); }
.btn-free small { font-size: 9px; font-weight: 600; opacity: 0.6; letter-spacing: 0.3px; }
.btn-free:disabled { opacity: 0.5; cursor: not-allowed; border-style: dashed; }
.btn-free.spent { opacity: 0.6; cursor: pointer; border-style: dashed; }
.btn-free.spent:hover { border-color: var(--line-strong); color: var(--text); }

.sidebar { display: grid; gap: 16px; margin-top: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.card h3 .ic { color: var(--gold); }
.news-item { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--text-dim); transition: color 0.2s; }
.news-item:last-child { border-bottom: none; }
.news-item:hover { color: var(--text); }
.news-item b { color: var(--gold-deep); margin-right: 5px; }
.ntube iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: var(--r-md); }

.plan-grid { display: grid; gap: 13px; grid-template-columns: 1fr; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 20px; text-align: center; box-shadow: var(--shadow-sm); transition: border-color 0.2s, box-shadow 0.2s; }
.plan:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.plan.featured { border-color: var(--gold-bright); box-shadow: var(--shadow-gold); }
.plan .ribbon { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--grad-gold); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; padding: 4px 13px; border-radius: var(--r-pill); }
.plan .pname { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); }
.plan .votes { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; color: var(--gold-deep); margin: 7px 0 2px; line-height: 1; }
.plan .votes small { font-size: 1rem; color: var(--text-dim); font-family: var(--font-body); font-weight: 600; }
.plan .price { font-size: 1.6rem; font-weight: 800; margin: 10px 0 3px; }
.plan .save { font-size: 12px; font-weight: 700; color: var(--mint); margin-bottom: 16px; min-height: 16px; }
.plan ul.perks { text-align: left; margin: 0 0 18px; display: grid; gap: 7px; }
.plan ul.perks li { font-size: 13px; color: var(--text-dim); display: flex; gap: 7px; }
.plan ul.perks li::before { content: "✦"; color: var(--gold); }
.pay-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; color: var(--text-faint); font-size: 13px; flex-wrap: wrap; }
.pay-badge { background: var(--surface); border: 1px solid var(--line-strong); padding: 6px 13px; border-radius: var(--r-sm); font-weight: 700; color: var(--text-dim); }

/* ---- boards ---- */
.page-hero { padding: 30px 0 26px; background: var(--grad-hero); border-bottom: 1px solid var(--line); }
.page-hero .hero-title { font-size: clamp(1.7rem, 7vw, 2.3rem); margin: 9px 0 7px; }
.page-hero .hero-sub { margin: 0; }
.board-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 14px 0; scrollbar-width: none; max-width: 100%; }
.board-tabs::-webkit-scrollbar { display: none; }
.board-tabs::after { content: ""; flex: 0 0 4px; }
.board-tab { flex-shrink: 0; padding: 8px 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: var(--text-dim); border: 1px solid var(--line); background: var(--surface); transition: 0.2s; white-space: nowrap; }
.board-tab:hover { color: var(--text); border-color: var(--line-strong); }
.board-tab.active { background: var(--grad-gold); color: #fff; border-color: transparent; font-weight: 700; }
.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.board-count { font-size: 13px; color: var(--text-dim); }
.board-count b { color: var(--gold-deep); font-weight: 700; }
.board-sort { display: flex; gap: 5px; }
.sort-btn { font-size: 12px; font-weight: 600; color: var(--text-dim); padding: 6px 11px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); transition: 0.2s; }
.sort-btn.active { color: var(--gold-deep); border-color: var(--gold-bright); }
.letter-list { display: grid; gap: 9px; }
.letter { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 14px; box-shadow: var(--shadow-sm); transition: border-color 0.2s; animation: rise 0.4s ease backwards; }
.letter:hover { border-color: var(--line-strong); }
.letter-cat { font-size: 10px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; color: var(--gold-deep); background: rgba(168,85,247,0.15); border: 1px solid rgba(168,85,247,0.38); padding: 4px 8px; border-radius: 6px; white-space: nowrap; align-self: flex-start; }
.letter-body { min-width: 0; }
.letter-body .lt { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.letter-body .lm { font-size: 12px; color: var(--text-faint); margin-top: 4px; display: flex; gap: 9px; flex-wrap: wrap; }
.letter-like { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text-dim); transition: 0.2s; }
.letter-like:hover { color: var(--coral); }
.letter-like .lk-ic { font-size: 16px; }
.letter-like .lk-n { font-size: 12px; font-weight: 700; }
.letter .hot-flag { font-size: 9px; font-weight: 800; color: var(--coral); margin-left: 5px; }
.compose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 17px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.compose h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; margin-bottom: 11px; }
.compose .row { display: grid; gap: 9px; }
.compose select, .compose input, .compose textarea { width: 100%; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 11px 12px; color: var(--text); font-family: inherit; font-size: 14px; }
.compose textarea { resize: vertical; min-height: 78px; }
.compose select:focus, .compose input:focus, .compose textarea:focus { outline: none; border-color: var(--gold); }
.compose .actions { display: flex; justify-content: flex-end; margin-top: 11px; }
.compose-rules { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); line-height: 1.5; }
.compose-rules .ic { margin-right: 4px; }
.notice-list { display: grid; gap: 7px; }
.notice-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow-sm); transition: 0.2s; animation: rise 0.4s ease backwards; }
.notice-row:hover { border-color: var(--line-strong); }
.notice-row .tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; padding: 4px 9px; border-radius: 6px; white-space: nowrap; background: var(--surface-3); color: var(--gold-deep); }
.notice-row .tag.pin { background: var(--grad-coral); color: #fff; }
.notice-row .nt { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-row .nd { font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.sched-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
.sched-card { display: flex; align-items: center; gap: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px; box-shadow: var(--shadow-sm); transition: 0.2s; animation: rise 0.4s ease backwards; }
.sched-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.sched-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: var(--r-sm); flex-shrink: 0; background: linear-gradient(165deg, rgba(168,85,247,0.13), var(--surface)); border: 1px solid var(--line); }
.sched-date .d { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1; color: var(--gold-deep); }
.sched-date .mo { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--text-dim); letter-spacing: 1px; }
.sched-info { min-width: 0; }
.sched-info .st { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sched-info .ss { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.sched-type { font-size: 9px; font-weight: 800; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; }
.sched-type.bday { background: rgba(244,63,94,0.16); color: var(--coral); }
.sched-type.show { background: rgba(16,185,129,0.16); color: var(--mint); }
.load-more { display: flex; justify-content: center; margin-top: 20px; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; margin-top: 24px; background: var(--surface); }
.footer-brand .brand-logo { height: 34px; }
.footer-brand p { color: var(--text-faint); font-size: 13px; margin-top: 8px; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 20px; }
.footer-col h4 { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 10px; }
.footer-col a { display: block; color: var(--text-dim); font-size: 14px; padding: 5px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; color: var(--text-faint); font-size: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---- bottom tab bar (all sizes) ---- */
.mobile-nav { display: flex; position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--shell); height: var(--navh); z-index: 60; background: rgba(9,11,22,0.90); backdrop-filter: blur(12px); border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.mobile-nav a { flex: 1; padding: 8px 0 10px; text-align: center; font-size: 10px; font-weight: 700; color: var(--text-faint); letter-spacing: 0.2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.mobile-nav a.active { color: var(--gold-deep); }
.mobile-nav a .mi { font-size: 18px; }

/* ---- modal ---- */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(3,4,12,0.66); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: 18px; }
.modal-overlay.open { display: flex; animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; position: relative; box-shadow: var(--shadow-md); animation: pop 0.25s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal .close { position: absolute; top: 15px; right: 15px; font-size: 22px; color: var(--text-faint); }
.modal .close:hover { color: var(--text); }
.modal h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin-bottom: 5px; }
.modal p.lead { color: var(--text-dim); font-size: 14px; margin-bottom: 18px; }
.modal-candidate { display: flex; align-items: center; gap: 11px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px; margin-bottom: 18px; }
.modal-candidate img { width: 46px; height: 46px; border-radius: var(--r-sm); object-fit: cover; }
.modal-candidate .n { font-weight: 700; }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.qty-row label { font-size: 13px; color: var(--text-dim); font-weight: 600; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-pill); overflow: hidden; }
.qty-control button { width: 36px; height: 36px; font-size: 18px; font-weight: 700; background: var(--surface-2); transition: 0.15s; }
.qty-control button:hover { background: var(--surface-3); color: var(--gold-deep); }
.qty-control input { width: 50px; text-align: center; background: var(--surface); border: none; color: var(--text); font-weight: 700; font-size: 16px; -moz-appearance: textfield; }
.qty-control input::-webkit-outer-spin-button, .qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; }
.balance-note { font-size: 13px; color: var(--text-faint); margin-bottom: 16px; }
.balance-note b { color: var(--gold-deep); }
.social-grid { display: grid; gap: 9px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 12px; border-radius: var(--r-pill); font-weight: 700; font-size: 14px; border: 1px solid var(--line-strong); background: var(--surface); transition: 0.2s; }
.social-btn:hover { border-color: var(--gold); }

.toast { position: fixed; bottom: calc(var(--navh) + 16px); left: 50%; transform: translateX(-50%) translateY(120px); background: var(--grad-gold); color: #fff; font-weight: 700; font-size: 14px; padding: 12px 20px; border-radius: var(--r-pill); box-shadow: var(--shadow-gold); z-index: 200; opacity: 0; transition: 0.35s cubic-bezier(.2,.8,.2,1); }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.coral { background: var(--grad-coral); box-shadow: 0 6px 18px rgba(240,71,106,0.4); }

/* ---- responsive ---- */
@media (max-width: 380px) {
  :root { --gutter: 13px; }
  .stat .value { font-size: 1.05rem; }
  .letter { grid-template-columns: 1fr auto; }
  .letter-cat { grid-column: 1 / -1; }
}
@media (max-width: 552px) {
  body::before { display: none; }
  body { background: var(--surface); }
  .mobile-nav { border-left: none; border-right: none; }
}
@media (hover: none) {
  .btn, .btn-heart, .month-chip, .board-tab { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   HALL OF FAME cards + closed badge
   ============================================================ */
.closed-badge { background: var(--surface-3); color: var(--text-faint); }

/* ============================================================
   RESPONSIVE — explicit PC / tablet / mobile optimization.
   The shell stays centered; what changes is shell width, gutter,
   font scale, grid density, and the desktop ad rails.
   ============================================================ */

/* MOBILE (default, < 600px): shell fills viewport, full white bg.
   Already the base styles. Just ensure comfortable density. */

/* LARGE PHONE / SMALL TABLET (600–833px): slightly wider shell */
@media (min-width: 600px) and (max-width: 833px) {
  :root { --shell: 560px; --gutter: 20px; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .sched-grid { grid-template-columns: repeat(2, 1fr); }  /* 2-up schedule */
}

/* TABLET (834–1099px): wider reading column, 2-up grids, no ad rails yet */
@media (min-width: 834px) and (max-width: 1099px) {
  :root { --shell: 620px; --gutter: 22px; }
  .hero-title { font-size: 2.9rem; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .sched-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: repeat(4, 1fr); }
}

/* SMALL DESKTOP (1100–1339px): shell + single context column could fit,
   but we keep the single-column app feel and turn on ONE ad rail side
   only if there's room; rails appear from 920px already. Widen shell a touch. */
@media (min-width: 1100px) and (max-width: 1339px) {
  :root { --shell: 600px; --gutter: 22px; }
  .footer-cols { grid-template-columns: repeat(4, 1fr); }
}

/* LARGE DESKTOP (>= 1340px): comfortable shell with both ad rails,
   bigger hero, multi-column footer. */
@media (min-width: 1340px) {
  :root { --shell: 600px; --gutter: 24px; }
  .hero-title { font-size: 3rem; }
  .footer-cols { grid-template-columns: repeat(4, 1fr); }
}

/* ad rails only when the viewport can fit shell + 2 rails + gaps.
   Recompute the show threshold against the (possibly larger) shell. */

/* on tablet the bottom tab bar gets a hair more height for touch */
@media (min-width: 600px) and (max-width: 1099px) {
  :root { --navh: 66px; }
  .mobile-nav a { font-size: 11px; }
  .mobile-nav a .mi { font-size: 20px; }
}

/* group row scrolls horizontally on phones; on wider screens it can wrap
   so all groups are visible without scrolling */
@media (min-width: 834px) {
  .group-row { flex-wrap: wrap; overflow-x: visible; }
  .group-row::after { display: none; }
}

/* ============================================================
   2-LEVEL CATEGORY TABS (v2): segmented group control + sub chips
   Level 1 reads as ONE boxed control; level 2 reads as outlined
   chips under an explicit parent label. Clear visual hierarchy.
   ============================================================ */
.cat-scroll { flex-direction: column; gap: 0; align-items: stretch; overflow-x: visible; padding: 10px var(--gutter) 11px; }

/* ---- level 1: segmented control ---- */
.cat-seg {
  display: flex; gap: 2px; padding: 4px;
  background: var(--surface-3); border: 1px solid var(--line);
  border-radius: var(--r-pill);
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.cat-seg::-webkit-scrollbar { display: none; }
.grp {
  flex: 0 0 auto; scroll-snap-align: start;
  padding: 8px 15px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700; color: var(--text-dim);
  white-space: nowrap; transition: 0.18s; background: transparent;
}
.grp:hover { color: var(--text); }
.grp.active { background: var(--surface); color: var(--gold-deep); box-shadow: var(--shadow-sm); }

/* ---- level 2: parent label + sub chips ---- */
.cat-subwrap {
  display: flex; align-items: center; gap: 8px;
  margin-top: 11px; overflow-x: auto; scrollbar-width: none;
}
.cat-subwrap::-webkit-scrollbar { display: none; }
.subs-parent {
  flex: 0 0 auto; font-size: 10px; font-weight: 800; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--gold-deep);
  background: rgba(168,85,247,0.15); border: 1px solid rgba(168,85,247,0.38);
  padding: 5px 9px; border-radius: 6px; white-space: nowrap;
}
.subs-arrow { flex: 0 0 auto; color: var(--text-faint); font-size: 15px; font-weight: 700; margin: 0 -2px; }
.cat-subs { display: flex; gap: 6px; }
.cat-subs::after { content: ""; flex: 0 0 var(--gutter); }
.sub {
  flex: 0 0 auto; padding: 7px 14px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  border: 1px solid var(--line-strong); background: var(--surface);
  white-space: nowrap; transition: 0.18s;
}
.sub:hover { color: var(--text); border-color: var(--gold-bright); }
.sub.active { background: var(--grad-gold); color: #fff; border-color: transparent; font-weight: 700; box-shadow: var(--shadow-gold); }

/*
 * tablet+ : 상이 20개까지 늘어나는데 다 보이면 투표 화면을 가린다.
 * 처음엔 6개만, "더보기"로 펼친다.
 */
@media (min-width: 834px) {
  .cat-seg { flex-wrap: wrap; overflow-x: visible; row-gap: 4px; border-radius: var(--r-md, 12px); }
  .cat-seg--collapsed .grp--overflow { display: none; }
  .cat-seg--expanded { flex-wrap: wrap; }
  .cat-more {
    margin-top: 6px; padding: 6px 14px; border: 1px solid var(--line-strong);
    border-radius: var(--r-pill); background: var(--surface); color: var(--text-dim);
    font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: 0.18s;
  }
  .cat-more:hover { color: var(--text); border-color: var(--gold-bright); }
}
    scroll-snap-type: none;
  }
  .cat-subwrap { flex-wrap: wrap; overflow-x: visible; }
  .cat-subs { flex-wrap: wrap; row-gap: 6px; }
}

/* keep comfy tap targets on touch */
@media (hover: none) {
  .grp, .sub { min-height: 38px; }
}

/* ============================================================
   ACCOUNT / PAYMENT / LEGAL / SUPPORT PAGES
   ============================================================ */

/* page intro (shared) */
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 700; color: var(--gold-deep);
  margin-bottom: 14px; padding: 8px 15px 8px 12px;
  border: 1.5px solid var(--gold-deep); border-radius: 999px;
  background: rgba(201,162,39,0.08); line-height: 1;
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.back-link::before {
  content: "←"; font-size: 17px; font-weight: 800; line-height: 1;
  transition: transform .15s ease;
}
.back-link:hover {
  color: var(--gold-deep);
  background: rgba(201,162,39,0.18);
  box-shadow: 0 2px 10px rgba(201,162,39,0.25);
}
.back-link:hover::before { transform: translateX(-3px); }
.back-link:active { transform: scale(0.97); }

/* user identity card (mypage top) */
.user-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(160deg, rgba(168,85,247,0.13), var(--surface)); border: 1px solid rgba(168,85,247,0.38); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.user-meta { min-width: 0; }
.user-meta .un { font-weight: 800; font-size: 1.1rem; }
.user-meta .ue { font-size: 13px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; }

/* stat tiles */
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.acct-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 10px; text-align: center; box-shadow: var(--shadow-sm); }
.acct-stat .v { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--gold-deep); line-height: 1; }
.acct-stat .l { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 5px; font-weight: 700; }

/* account menu list */
.acct-menu { display: grid; gap: 8px; margin-top: 18px; }
.acct-menu-group { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); margin: 12px 2px 2px; }
.acct-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 15px; transition: 0.18s; box-shadow: var(--shadow-sm); }
.acct-row:hover { border-color: var(--gold-bright); transform: translateX(2px); }
.acct-row .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-3); display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.acct-row .tx { flex: 1; min-width: 0; }
.acct-row .tx .t { font-weight: 700; font-size: 14.5px; }
.acct-row .tx .d { font-size: 12px; color: var(--text-faint); margin-top: 1px; }
.acct-row .arr { color: var(--text-faint); font-size: 18px; }
.acct-row.danger:hover { border-color: var(--coral); }
.acct-row.danger .ic { background: rgba(244,63,94,0.16); }

/* generic card section */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.panel h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin-bottom: 14px; }
.panel h3 { font-size: 0.95rem; font-weight: 800; margin: 16px 0 8px; }

/* nickname + duplicate check row */
.nick-row { display: flex; gap: 8px; align-items: stretch; }
.nick-row input { flex: 1 1 auto; min-width: 0; }
.nick-row .btn { flex: 0 0 auto; white-space: nowrap; padding-inline: 16px; }
.hint.ok { color: var(--mint); font-weight: 600; }
.hint.err { color: var(--coral); font-weight: 600; }

/* forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--text-dim); }
.field input, .field select, .field textarea { width: 100%; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 11px 12px; color: var(--text); font-family: inherit; font-size: 14px; }
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field .hint { font-size: 11.5px; color: var(--text-faint); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; flex-wrap: wrap; }

/* data table (payments, votes) */
.dt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dt th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-faint); padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
.dt td { padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dt tr:last-child td { border-bottom: none; }
.dt .amt { font-weight: 700; }
.dt .pill { font-size: 10px; font-weight: 800; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-pill); }
.pill.ok { background: rgba(16,185,129,0.16); color: var(--mint); }
.pill.pending { background: rgba(168,85,247,0.15); color: var(--gold-deep); }
.dt .lnk { font-weight: 700; color: var(--gold-deep); font-size: 12.5px; }
.dt .lnk:hover { text-decoration: underline; }

/* card-list (mobile-friendly alt to tables) */
.rec-list { display: grid; gap: 10px; }
.rec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow-sm); }
.rec-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rec-top .rt { font-weight: 700; font-size: 14.5px; }
.rec-top .ra { font-weight: 800; }
.rec-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 12.5px; color: var(--text-dim); flex-wrap: wrap; }
.rec-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* legal document */
.legal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.legal .updated { font-size: 12px; color: var(--text-faint); margin-bottom: 18px; }
.legal .lang-note {
  margin-top: 26px; padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px; color: var(--text-faint); line-height: 1.6;
}
.legal h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin: 22px 0 8px; }
.legal h2:first-of-type { margin-top: 0; }
.legal p { font-size: 14px; color: var(--text-dim); margin-bottom: 11px; line-height: 1.65; }
.legal ul { margin: 0 0 12px 0; display: grid; gap: 7px; }
.legal ul li { font-size: 14px; color: var(--text-dim); padding-left: 18px; position: relative; line-height: 1.6; }
.legal ul li::before { content: "·"; position: absolute; left: 6px; color: var(--gold); font-weight: 800; }
.legal table.info { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 12px; }
.legal table.info th { text-align: left; width: 38%; padding: 9px 10px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; color: var(--text-dim); vertical-align: top; }
.legal table.info td { padding: 9px 10px; border: 1px solid var(--line); }

/* FAQ accordion */
.faq-list { display: grid; gap: 8px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; font-weight: 700; font-size: 14.5px; cursor: pointer; }
.faq-q .chev { color: var(--text-faint); transition: transform 0.2s; flex-shrink: 0; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); color: var(--gold-deep); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a-inner { padding: 0 16px 16px; font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }

/* consent (signup) */
.consent-row { display: flex; align-items: flex-start; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.consent-row:last-of-type { border-bottom: none; }
.consent-row input[type=checkbox] { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--gold); flex-shrink: 0; cursor: pointer; }
.consent-row .cl { font-size: 13.5px; }
.consent-row .cl .req { color: var(--coral); font-weight: 700; }
.consent-row .cl .opt { color: var(--text-faint); }
.consent-row .cl a { color: var(--gold-deep); font-weight: 700; text-decoration: underline; }
.consent-all { display: flex; align-items: center; gap: 11px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 14px; margin-bottom: 6px; font-weight: 700; }
.consent-all input { width: 20px; height: 20px; accent-color: var(--gold); }

/* callout / danger zone */
.callout { border-radius: var(--r-md); padding: 14px 16px; font-size: 13.5px; line-height: 1.6; margin-bottom: 16px; }
.callout.warn { background: rgba(244,63,94,0.16); border: 1px solid rgba(236,72,153,0.40); color: #fda4c0; }
.callout.info { background: rgba(168,85,247,0.13); border: 1px solid rgba(168,85,247,0.38); color: var(--gold-deep); }
.callout b { font-weight: 800; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-faint); }
.empty-state .ico { font-size: 32px; margin-bottom: 10px; }

/* simple link list (legal footer hub) */


/* ============================================================
   FINAL RESPONSIVE PASS — fixes real clipping + tablet polish
   ============================================================ */

/* --- notice rows: title was nowrap and overflowed on phones.
   Let it shrink/ellipsis properly; stack date under title when tight. --- */
.notice-row .nt { min-width: 0; }            /* allow ellipsis to engage */
@media (max-width: 560px) {
  .notice-row { flex-wrap: wrap; align-items: flex-start; row-gap: 4px; }
  .notice-row .tag { order: 1; }
  .notice-row .nt { order: 3; flex: 1 1 100%; white-space: normal; }  /* wrap full title */
  .notice-row .nd { order: 2; margin-left: auto; }
}

/* --- generic guard: any flex row with truncating text needs min-width:0 --- */
.letter-body, .sched-info, .rec, .acct-row .tx, .user-meta { min-width: 0; }

/* --- data tables: never let a wide table push the shell; scroll inside --- */
.panel .dt { display: block; overflow-x: auto; white-space: nowrap; }
@media (max-width: 460px) {
  .acct-stats { gap: 7px; }
  .acct-stat { padding: 12px 6px; }
  .acct-stat .v { font-size: 1.3rem; }
  .acct-stat .l { font-size: 10px; letter-spacing: 0.4px; }
}

/* ---------- TABLET (768–1099px): use the extra width sensibly ---------- */
@media (min-width: 768px) and (max-width: 1099px) {
  .acct-stats { grid-template-columns: repeat(3, 1fr); }
  .rec-list, .letter-list, .notice-list, .sched-grid.one { gap: 12px; }
  /* schedule + payments read better as 2 columns of cards */
  .sched-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- DESKTOP (≥1100px): comfortable, rails on ---------- */
@media (min-width: 1100px) {
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- very small phones (≤360px): tighten chrome ---------- */
@media (max-width: 360px) {
  .header-actions { gap: 6px; }
  .brand-logo { height: 24px; }
  .legal { padding: 18px; }
  .legal table.info th { width: 42%; }
}

/* ---------- safe-area for notched phones (bottom tab bar) ---------- */
@supports (padding: max(0px)) {
  .mobile-nav { padding-bottom: max(0px, env(safe-area-inset-bottom)); height: calc(var(--navh) + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(var(--navh) + env(safe-area-inset-bottom)); }
}

/* ============================================================
   FINAL RESPONSIVE PASS 2 — remaining clips
   ============================================================ */

/* notice title overflowed above 560px too: the real fix is making the
   flex item shrinkable at ALL widths (min-width:0 + overflow hidden),
   not just stacking on phones. Keep single-line ellipsis on wider, wrap on phone. */
.notice-row { min-width: 0; }
.notice-row .nt { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 561px) {
  .notice-row .nt { white-space: nowrap; }   /* ellipsis on tablet/desktop */
}

/* commerce / legal info table: allow horizontal scroll inside its own
   box instead of stretching the page; on phones reduce to label-over-value */
.legal table.info { display: block; overflow-x: auto; }
@media (max-width: 520px) {
  .legal table.info, .legal table.info tbody, .legal table.info tr { display: block; width: 100%; }
  .legal table.info th, .legal table.info td { display: block; width: 100%; border-bottom: none; }
  .legal table.info th { background: var(--surface-2); border-radius: var(--r-sm) var(--r-sm) 0 0; }
  .legal table.info td { border-radius: 0 0 var(--r-sm) var(--r-sm); margin-bottom: 8px; }
}

/* ============================================================
   FIX: when .wrap and .section are on the SAME element (account/
   legal pages), .section's "padding: 28px 0" was zeroing the
   horizontal gutter that .wrap provides — pushing content 22px
   left of the header. Restore the gutter for that combination.
   ============================================================ */
.wrap.section {
  padding-top: 28px;
  padding-bottom: 28px;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ============================================================
   STATUS PAGES (payment result, 404, maintenance, suspended)
   ============================================================ */
.status-page { max-width: 460px; margin: 0 auto; text-align: center; padding: 30px 0 10px; }
.status-ico { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 20px; font-size: 40px; }
.status-ico.ok { background: rgba(16,185,129,0.16); }
.status-ico.fail { background: rgba(244,63,94,0.16); }
.status-ico.warn { background: rgba(168,85,247,0.13); }
.status-ico.neutral { background: var(--surface-3); }
.status-page h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 6vw, 2.1rem); letter-spacing: -0.5px; margin-bottom: 10px; }
.status-page .big-code { font-family: var(--font-display); font-weight: 900; font-size: clamp(3.5rem, 16vw, 5.5rem); line-height: 1; color: var(--gold-deep); letter-spacing: -2px; margin-bottom: 6px; }
.status-page p { color: var(--text-dim); font-size: 0.98rem; line-height: 1.6; margin-bottom: 8px; }
.status-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; margin: 20px 0; text-align: left; box-shadow: var(--shadow-sm); }
.status-detail .srow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13.5px; }
.status-detail .srow:not(:last-child) { border-bottom: 1px solid var(--line); }
.status-detail .srow .k { color: var(--text-dim); }
.status-detail .srow .v { font-weight: 700; }
.status-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.status-actions .btn { flex: 1; min-width: 150px; }

/* minimal centered shell for 404 / maintenance */
.minimal-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 18px; text-align: center; }
.minimal-page .brand { margin-bottom: 26px; justify-content: center; }
.minimal-page .brand-logo { height: 40px; max-width: 78vw; }

/* ============================================================
   SEARCH
   ============================================================ */
.search-box { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 4px 6px 4px 16px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.search-box .si { color: var(--text-faint); font-size: 17px; flex-shrink: 0; }
.search-box input { flex: 1; border: none; background: none; font-family: inherit; font-size: 15px; color: var(--text); padding: 11px 0; outline: none; }
.search-box input::placeholder { color: var(--text-faint); }
.search-box .clear-s { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--text-faint); flex-shrink: 0; }
.search-box .clear-s:hover { background: var(--surface-3); color: var(--text); }


.search-section-label { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); margin: 18px 2px 8px; }
.search-result { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-sm); transition: 0.18s; margin-bottom: 8px; }
.search-result:hover { border-color: var(--gold-bright); transform: translateX(2px); }
.search-result img { width: 46px; height: 46px; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; background: var(--surface-3); }
.search-result .sr-body { flex: 1; min-width: 0; }
.search-result .sr-name { font-weight: 700; font-size: 14.5px; }
.search-result .sr-meta { font-size: 12.5px; color: var(--text-dim); }
.search-result .sr-cat { font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--gold-deep); background: rgba(168,85,247,0.15); border: 1px solid rgba(168,85,247,0.38); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }

/* search icon in header */
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text-dim); transition: 0.18s; flex-shrink: 0; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

/* ============================================================
   REPORT button + modal
   ============================================================ */
.btn-report { background: none; color: var(--text-faint); font-size: 12px; font-weight: 600; padding: 4px 6px; display: inline-flex; align-items: center; gap: 4px; transition: 0.18s; }
.btn-report:hover { color: var(--coral); }
.report-reason { display: grid; gap: 8px; margin-bottom: 16px; }
.report-opt { display: flex; align-items: center; gap: 10px; padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer; font-size: 14px; transition: 0.15s; }
.report-opt:hover { border-color: var(--gold-bright); }
.report-opt input { accent-color: var(--coral); width: 18px; height: 18px; }
.report-opt.sel { border-color: var(--coral); background: rgba(244,63,94,0.16); }

/* FIX: minimal pages (404, maintenance) must sit above the fixed white
   shell strip (body::before z-index:0). Without this they were hidden. */
.minimal-page { position: relative; z-index: 2; }

/* ============================================================
   UTILITY CLASSES (replacing former inline styles, A-plan refactor)
   Visual output identical; styles now centralized here.
   ============================================================ */
.page-head      { margin-bottom: 18px; }              /* was margin-bottom:18px */
.page-h1        { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 6vw, 2rem); letter-spacing: -0.5px; margin-top: 4px; }
.page-desc      { color: var(--text-dim); font-size: 0.95rem; margin-top: 6px; }

.u-flex         { display: flex; }
.u-flex-center  { justify-content: center; }
.u-flex-between { justify-content: space-between; }
.u-center       { text-align: center; }

.u-gold         { color: var(--gold-deep); }
.u-gold-bold    { color: var(--gold-deep); font-weight: 700; }
.u-gold-soft    { color: var(--gold); }
.u-coral        { color: var(--coral); }

.u-mt-8   { margin-top: 8px; }
.u-mt-14  { margin-top: 14px; }
.u-mt-16  { margin-top: 16px; }
.u-mt-18  { margin-top: 18px; }
.u-mb-16  { margin-bottom: 16px; }
.u-pt-8   { padding-top: 8px; }
.u-spacer-10 { height: 10px; }
.u-hidden { display: none; }

.u-dim-sm        { font-size: 13px; color: var(--text-dim); }
.u-dim-sm-mt8    { font-size: 13px; color: var(--text-dim); margin-top: 8px; }
.u-faint-sm      { font-size: 13px; color: var(--text-faint); }
.u-note-sm       { font-size: 13.5px; color: var(--text-dim); margin-bottom: 14px; }

.u-center-mt16   { margin-top: 16px; text-align: center; }
.u-finehint      { text-align: center; color: var(--text-faint); font-size: 12px; margin-top: 24px; max-width: 52ch; margin-inline: auto; }


.pill-primary    { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: var(--r-pill); }

.bare-list       { margin: 8px 0 0; padding: 0; list-style: none; }

/* disabled-looking primary buttons (gating states) */
.btn-locked      { opacity: 0.45; cursor: not-allowed; }
.btn-coral-locked { background: var(--grad-coral); color: #fff; opacity: 0.45; cursor: not-allowed; }

/* ensure utility text classes win over descendant rules like .status-page p
   (they replaced inline styles, which always won; keep that behavior).
   Scope to .status-page so utilities match the old inline rendering exactly. */
.status-page p.u-faint-sm { font-size: 13px; color: var(--text-faint); }

/* ============================================================
   PAYMENT PENDING — spinner
   ============================================================ */
.spinner { width: 56px; height: 56px; border-radius: 50%; border: 5px solid var(--surface-3); border-top-color: var(--gold); margin: 0 auto 22px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status-ico.pending { background: var(--gold-lite, rgba(168,85,247,0.13)); }

/* ============================================================
   NOTICE DETAIL VIEW
   ============================================================ */
.notice-view { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.notice-view .nv-tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; background: var(--surface-3); color: var(--gold-deep); margin-bottom: 12px; }
.notice-view .nv-tag.pin { background: var(--grad-coral); color: #fff; }
.notice-view h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 5vw, 1.9rem); line-height: 1.25; letter-spacing: -0.4px; margin-bottom: 12px; }
.notice-view .nv-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-faint); padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.notice-view .nv-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
.notice-view .nv-body p { font-size: 15px; color: var(--text); line-height: 1.75; margin-bottom: 15px; }
.notice-view .nv-body h2 { font-size: 1.05rem; font-weight: 800; margin: 22px 0 9px; }
.notice-view .nv-body ul { margin: 0 0 15px; display: grid; gap: 8px; }
.notice-view .nv-body ul li { font-size: 15px; color: var(--text-dim); padding-left: 20px; position: relative; line-height: 1.6; }
.notice-view .nv-body ul li::before { content: "•"; position: absolute; left: 6px; color: var(--gold); font-weight: 800; }
.notice-view .nv-body strong { color: var(--gold-deep); font-weight: 700; }
.notice-view .nv-callout { background: rgba(168,85,247,0.13); border: 1px solid rgba(168,85,247,0.38); border-radius: var(--r-md); padding: 14px 16px; font-size: 14px; color: var(--gold-deep); margin: 16px 0; line-height: 1.6; }

/* notice nav (prev / next / list) */
.notice-nav { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.notice-nav .btn { flex: 1; min-width: 120px; }

/* make notice rows look clickable */
.notice-row { cursor: pointer; }
.notice-row .nt { transition: color 0.15s; }
.notice-row:hover .nt { color: var(--gold-deep); }

/* ============================================================
   K-POP APP RESTYLE  (overrides — photo-forward, bright, rounded)
   ============================================================ */

/* heavier, friendlier headings */
.hero-title { font-weight: 800; letter-spacing: -1.2px; }
.hero-title em { font-style: normal; color: var(--gold); }   /* no serif italic */
.section-title { font-weight: 800; letter-spacing: -0.5px; }
.modal h2, .panel h2, .notice-view h1, .stat .value, .plan .votes, .plan .price, .acct-stat .v, .big-code { font-weight: 800; }
.card h3, .compose h3 { font-weight: 800; }

/* hero gets a bright gradient wash */
.hero { padding-bottom: 26px; }
.season-tag { background: var(--surface); color: var(--gold-deep); border-color: rgba(236,72,153,0.45); }
.season-tag .dot { background: var(--coral); box-shadow: 0 0 10px var(--coral); }

/* live stats: rounder, pop */
.live-stats { border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.stat .value.gold { color: var(--gold-deep); }
.stat .value.coral { color: var(--violet); }

/* ---- category tabs: brighter pills ---- */
.grp.active { color: var(--gold-deep); }
.sub.active { box-shadow: var(--shadow-gold); }

/* ============================================================
   VOTE CARD — photo-forward, big image, bold vote button
   ============================================================ */
.vote-card {
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: var(--r-md);
  position: relative;
  border-color: var(--line);
}
.vote-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* rank now overlays the photo as a badge */
.vote-rank {
  position: absolute;
  top: 22px; left: 22px;
  z-index: 3;
  width: auto; text-align: left;
}
.vote-rank .num {
  display: inline-grid; place-items: center;
  min-width: 30px; height: 30px; padding: 0 7px;
  background: rgba(28,21,48,0.78); color: #fff;
  border-radius: var(--r-pill);
  font-size: 0.95rem; font-weight: 800; line-height: 1;
  backdrop-filter: blur(4px);
}
.vote-card:nth-child(1) .vote-rank .num { background: var(--grad-gold); color:#fff; }
.vote-card:nth-child(2) .vote-rank .num { background: var(--grad-violet); color:#fff; }
.vote-card:nth-child(3) .vote-rank .num { background: linear-gradient(135deg,#ffb86b,#ff8a3d); color:#fff; }

/* big rounded photo */
.vote-photo {
  width: 88px; height: 88px;
  border-radius: var(--r-md);
  border: none;
  box-shadow: var(--shadow-sm);
}

.vote-info .name { font-size: 1.06rem; font-weight: 800; letter-spacing:-0.3px; }
.vote-info .news { font-size: 13px; margin: 3px 0 9px; }

/* gradient vote bar */
.vote-bar { height: 8px; background: var(--surface-3); }
.vote-bar i { background: var(--grad-gold); }
.vote-pct { color: var(--gold-deep); font-weight: 800; }


/* ---- action buttons: bigger, bolder ---- */
.vote-actions { gap: 8px; margin-top: 2px; }
.btn-heart { width: 40px; height: 40px; border-color: var(--line-strong); }
.btn-heart:hover { background:rgba(236,72,153,0.18); }
.btn-free { border-radius: var(--r-pill); padding: 8px 14px; font-weight: 700; }

/* buttons globally a bit bolder/rounder */
.btn { font-weight: 800; }
.btn-gold:hover { filter: brightness(1.04); box-shadow: 0 10px 30px rgba(255,46,131,0.42); }

.plan.featured { border-color: var(--gold-bright); }

/* ============================================================
   HEART-BURST vote feedback
   ============================================================ */
.heart-layer { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.burst-heart {
  position: absolute; font-size: 26px; will-change: transform, opacity;
  animation: floatUp 1s ease-out forwards;
}
@keyframes floatUp {
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  15%  { opacity: 1; transform: translateY(-8px) scale(1.15); }
  100% { transform: translateY(-120px) scale(1); opacity: 0; }
}

/* big center pop on confirmed vote */
.vote-pop {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%,-50%) scale(0.4);
  z-index: 320; pointer-events: none; font-size: 84px; opacity: 0;
}
.vote-pop.go { animation: votePop 0.85s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes votePop {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(0.4) rotate(-12deg); }
  35%  { opacity: 1; transform: translate(-50%,-50%) scale(1.15) rotate(6deg); }
  70%  { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%,-58%) scale(1) rotate(0deg); }
}

/* search icon + chips brighter */
.icon-btn:hover { background:rgba(236,72,153,0.18); color: var(--gold-deep); }

/* vote-card consistency fixes after photo-forward switch */
.vote-foot { margin-top: 8px; }

/* vote-card: pin photo & info to explicit grid cells so the absolutely-
   positioned rank badge can't disturb column flow */
.vote-card { align-items: start; }
.vote-card .vote-photo { grid-column: 1; grid-row: 1; align-self: start; }
.vote-card .vote-info  { grid-column: 2; grid-row: 1; }
.vote-card .vote-rank  { grid-column: 1; grid-row: 1; }

/* compact action row: keep buttons on one line under the bar */
.vote-foot { flex-direction: column; align-items: stretch; gap: 8px; }
.vote-count { order: -1; }
.vote-actions { justify-content: flex-start; flex-wrap: nowrap; }
.vote-actions .btn-free { flex: 1; flex-direction: row; gap: 5px; align-items: center; justify-content: center; }
.vote-actions .btn-free small { display: none; }   /* keep it tight; tooltip-free */
.btn-heart { flex: 0 0 auto; }
@media (min-width: 420px) {
  .vote-actions .btn-free small { display: block; }
}

/* keep the action row strictly inside the card */
.vote-info { overflow: hidden; }
.vote-actions { width: 100%; min-width: 0; }
.vote-actions .btn-free { min-width: 0; }
.vote-actions .btn-heart { width: 38px; height: 38px; }
/* shorten extra label via CSS content swap on narrow screens handled in JS text */

/* ============================================================
   DARK NEON POLISH (final layer)
   ============================================================ */

/* gradient title text: hot-pink → neon-purple */
.hero-title {
  background: none;
  color: var(--text);
}
.hero-title em { color: var(--gold-deep); background: none; }

/* neon glow on primary actions & key chips */
.btn-gold { box-shadow: var(--shadow-gold); }
.btn-gold:hover { box-shadow: 0 0 28px rgba(236,72,153,0.7), 0 8px 22px rgba(236,72,153,0.4); filter: none; }
.sub.active { box-shadow: var(--shadow-gold); }
.vote-bar i { box-shadow: 0 0 10px rgba(236,72,153,0.6); }

/* mint = rank-up / success glow */
.vote-rank .up, .pill.ok, .sched-type.show { text-shadow: 0 0 10px rgba(16,185,129,0.5); }

/* photos: subtle neon ring on dark */
.vote-photo { border: 1px solid var(--line-strong); box-shadow: 0 0 0 1px rgba(236,72,153,0.08), var(--shadow-sm); }
.vote-card:nth-child(1) .vote-photo { box-shadow: 0 0 18px rgba(236,72,153,0.35); }

/* rank badge over photo stays dark/legible */
.vote-rank .num { background: rgba(7,9,19,0.82); border: 1px solid var(--line-strong); }
.vote-card:nth-child(1) .vote-rank .num { background: var(--grad-gold); border-color: transparent; box-shadow: var(--glow-pink); }
.vote-card:nth-child(2) .vote-rank .num { background: var(--grad-violet); border-color: transparent; box-shadow: var(--glow-violet); }
.vote-card:nth-child(3) .vote-rank .num { background: linear-gradient(135deg,#fbbf24,#f59e0b); border-color: transparent; }

/* ghost buttons readable on dark */
.btn-ghost { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-deep); }
.btn-free { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.btn-free:hover { border-color: var(--gold); color: var(--gold-deep); }
.btn-heart { background: var(--surface-2); border-color: var(--line-strong); color: var(--text-dim); }
.btn-heart:hover { background: rgba(236,72,153,0.16); color: var(--gold-bright); border-color: var(--gold); }

/* form fields on dark */
.field input, .field select, .field textarea,
.compose input, .compose select, .compose textarea,
.qty-control input, .search-box { background: var(--surface-2); color: var(--text); }
.qty-control button { background: var(--surface-3); }
.social-btn { background: var(--surface-2); border-color: var(--line-strong); }
.social-btn:hover { border-color: var(--gold); }

/* inputs placeholder */
::placeholder { color: var(--text-faint); }

/* bottom nav active glows pink */
.mobile-nav a.active { color: var(--gold-bright); }
.mobile-nav a.active .mi { filter: drop-shadow(0 0 6px rgba(236,72,153,0.6)); }

/* category active underline already gradient; ensure visible */
.grp.active { color: var(--gold-bright); }
.grp.active::after { background: var(--grad-gold); }

/* status icons keep their tinted bg (already dark-translucent) */
.status-ico.ok { background: rgba(16,185,129,0.16); }
.status-ico.fail { background: rgba(244,63,94,0.16); }
.status-ico.warn { background: rgba(168,85,247,0.16); }
.status-ico.neutral, .status-ico.pending { background: var(--surface-3); }

/* spinner track/ް */
.spinner { border-color: var(--surface-3); border-top-color: var(--gold); }

/* legal/news links pink */
.news-item b { color: var(--gold-deep); }

/* scrollbar (webkit) dark */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--canvas); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; border: 2px solid var(--canvas); }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

/* selection */
::selection { background: rgba(236,72,153,0.35); color: #fff; }

/* subtle neon glow behind hero */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
  width: 480px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(236,72,153,0.22), transparent 62%);
  pointer-events: none; z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

/* ad rail label readable */

/* ============================================================
   #5 — rank BELOW the photo (no overlay on the image)
   ============================================================ */
.vote-card {
  grid-template-columns: 88px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px; row-gap: 8px;
  align-items: start;
}
.vote-card .vote-photo { grid-column: 1; grid-row: 1; }
.vote-card .vote-rank  {
  grid-column: 1; grid-row: 2;
  position: static; top: auto; left: auto;
  width: 88px; display: flex; align-items: center; justify-content: center; gap: 5px;
}
.vote-card .vote-info  { grid-column: 2; grid-row: 1 / span 2; }

/* rank number becomes a centered pill under the photo */
.vote-rank .num {
  display: inline-flex; align-items: center; gap: 4px;
  min-width: 0; height: 26px; padding: 0 12px;
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: 0.9rem; font-weight: 800; line-height: 1; backdrop-filter: none;
}
/* top-3 colored rank pills (now under photo) */
.vote-card:nth-child(1) .vote-rank .num { background: var(--grad-gold);   color:#fff; border-color: transparent; box-shadow: var(--glow-pink); }
.vote-card:nth-child(2) .vote-rank .num { background: var(--grad-violet); color:#fff; border-color: transparent; box-shadow: var(--glow-violet); }
.vote-card:nth-child(3) .vote-rank .num { background: linear-gradient(135deg,#fbbf24,#f59e0b); color:#fff; border-color: transparent; }
/* photo: no rank overlap now, keep neon ring */
.vote-card:nth-child(1) .vote-photo { box-shadow: 0 0 18px rgba(236,72,153,0.30); }


/* HoF cards: same stacked rank treatment */

/* ============================================================
   FIX — align vote-rank on the SAME line as vote-actions, and
   match the rank pill height to the action buttons.
   col1: photo (top) + flexible gap + rank (bottom)
   col2: info spanning all rows → its last row (actions) bottom-aligns
         with the rank pill in col1.
   ============================================================ */
.vote-card {
  grid-template-columns: 88px 1fr;
  grid-template-rows: auto 1fr auto;
  column-gap: 14px; row-gap: 0;
  align-items: stretch;
}
.vote-card .vote-photo { grid-column: 1; grid-row: 1; }
.vote-card .vote-info  { grid-column: 2; grid-row: 1 / span 3; }
.vote-card .vote-rank  {
  grid-column: 1; grid-row: 3;
  align-self: end;                 /* sit at the bottom of col1 */
  width: 88px; height: 40px;       /* match the action-button row height */
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
/* rank pill = same height as buttons (40px), vertically centered */
.vote-card .vote-rank .num {
  height: 40px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 0.95rem;
}
/* the action row also 40px so both lines match exactly */
.vote-actions { align-items: center; min-height: 40px; }
.vote-actions .btn-free, .btn-heart { width: 40px; height: 40px; }


/* ad rails must sit above full-width section backgrounds (hero/main)
   so they're visible in the side margins regardless of scroll position.
   Kept below sticky header(50)/cat-bar(40) which only occupy the top. */

/* ============================================================
   PER-LANGUAGE FONTS (switched by html.lang-* from i18n.js)
   ============================================================ */
html.lang-ko      { --font-display: 'Noto Sans KR', 'Source Serif 4', serif; --font-body: 'Noto Sans KR', 'Source Sans 3', sans-serif; }
html.lang-ja      { --font-display: 'Noto Sans JP', 'Source Serif 4', serif; --font-body: 'Noto Sans JP', 'Source Sans 3', sans-serif; }
html.lang-zhHans  { --font-display: 'Noto Sans SC', 'Source Serif 4', serif; --font-body: 'Noto Sans SC', 'Source Sans 3', sans-serif; }
html.lang-zhHant  { --font-display: 'Noto Sans TC', 'Source Serif 4', serif; --font-body: 'Noto Sans TC', 'Source Sans 3', sans-serif; }

/* ============================================================
   #3 — constrain the WHOLE layout to the central content width
   so header/footer/hero backgrounds don't bleed full-width.
   Everything centers as one column on the canvas.
   ============================================================ */
.site-header,
.cat-bar,
main,
.site-footer,
.hero,
.page-hero {
  max-width: var(--shell);
  margin-left: auto;
  margin-right: auto;
}
.site-footer { margin-top: 24px; }   /* preserve top spacing after centering */

/* ============================================================
   LANGUAGE SWITCHER (header)
   ============================================================ */
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 11px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-pill); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: 0.18s;
}
.lang-btn:hover { border-color: var(--gold); color: var(--gold-deep); }
.lang-btn .cur-flag { font-size: 15px; line-height: 1; }
.lang-btn .caret { font-size: 9px; opacity: 0.7; }

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 150px; max-height: 340px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); box-shadow: var(--shadow-md);
  padding: 6px; z-index: 70;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border: none; background: none;
  border-radius: var(--r-sm); cursor: pointer;
  font-family: inherit; font-size: 13.5px; color: var(--text); text-align: left;
  transition: 0.14s;
}
.lang-opt:hover { background: var(--surface-3); }
.lang-opt.active { background: rgba(236,72,153,0.16); color: var(--gold-deep); font-weight: 700; }
.lang-opt .flag { font-size: 16px; line-height: 1; flex-shrink: 0; }
.lang-opt .lo-code { flex: 1; font-size: 13px; color: var(--text); font-weight: 700; letter-spacing: 0.5px; }
.lang-opt.active .lo-code { color: var(--gold-deep); }
.lang-opt .check { color: var(--gold); font-weight: 800; opacity: 0; }
.lang-opt.active .check { opacity: 1; }

/* ============================================================
   HERO bottom spacing — consistent breathing room before content
   (PC / tablet / mobile)
   ============================================================ */
.page-hero { padding-bottom: 26px; }

/* space between hero and the content section that follows */
.page-hero + main,
.page-hero + .section,

/* the first .section right after a hero shouldn't double-pad */
.page-hero ~ main .section:first-child { padding-top: 0; }

/* ============================================================
   SMALL SCREENS (≤380px) — vote card sizing (consolidated)
   ============================================================ */
@media (max-width: 380px) {
  .vote-card { grid-template-columns: 76px 1fr; gap: 11px; padding: 12px; }
  .vote-card .vote-photo { width: 76px; height: 76px; }
  .vote-card .vote-rank { width: 76px; height: 38px; }
  .vote-card .vote-rank .num { height: 38px; }
  .vote-actions .btn-free, .btn-heart { height: 38px; }
  .btn-free { padding: 7px 11px; font-size: 12px; }
}

/* ============================================================
   RESPONSIVE HARDENING — audit fixes
   ============================================================ */

/* 1) 긴 이메일·URL·영수증번호가 좁은 화면에서 넘치는 문제 */
body, p, li, td, th, .lead, .page-desc, .hint,
.rec-top .rt, .rec-meta, .letter-body, .status-detail .srow,
.legal table.info td, .nv-callout, .callout {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* 2) iOS Safari: 입력 폼 포커스 시 자동 확대 방지 (16px 미만이면 확대됨) */
@media (max-width: 833px) {
  .field input, .field select, .field textarea,
  .compose input, .compose select, .compose textarea,
  .search-box input, .qty-control input {
    font-size: 16px;
  }
}

/* 3) 모바일 브라우저 주소창 때문에 100vh가 화면보다 커지는 문제 */
.minimal-page { min-height: 100vh; min-height: 100dvh; }

/* 4) 하단 탭바가 없는 페이지(404·점검·정지)에서 불필요한 하단 여백 제거 */
body:not([data-layout="app"]) { padding-bottom: 0; }

/* 5) 터치 기기에서 아이콘 버튼 탭 영역 확대 (36px → 40px) */
@media (hover: none) {
  .icon-btn, .lang-btn { min-width: 40px; height: 40px; }
  .btn-heart { min-width: 40px; height: 40px; }
}

/* 6) 가로 모드 낮은 높이에서 헤더가 화면을 잠식하지 않도록 */
@media (max-height: 480px) and (orientation: landscape) {
  :root { --header-h: 50px; }
  .page-hero { padding: 18px 0 14px; }
}

/* 로그인 필수 페이지 안내 */
.auth-gate { max-width: 460px; margin: 48px auto; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 38px 26px; box-shadow: var(--shadow-sm); }
.auth-gate .ic { font-size: 40px; line-height: 1; margin-bottom: 14px; }
.auth-gate h2 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.auth-gate p { font-size: 14px; color: var(--text-dim); line-height: 1.65; margin-bottom: 20px; }

/* ============================================================
   서버 렌더 목록 — 로딩 · 오류 · 빈 상태
   공지 · 스타 캘린더 · 팬레터는 js/boards.js 가 API 로 그린다.
   ============================================================ */
.skel { display: grid; gap: 10px; }
.skel-row {
  height: 56px; border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%);
  background-size: 400% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
}
@keyframes skel-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skel-row { animation: none; } }

.board-error, .board-empty {
  text-align: center; padding: 34px 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.board-error p, .board-empty p { font-size: 14px; color: var(--text-dim); margin-bottom: 14px; }
.board-empty p { margin-bottom: 0; }

/* ============================================================
   CBC EDITORIAL REFINEMENT
   후보 사진, 순위, 무료 투표 행동을 한 화면에서 빠르게 읽도록 정리합니다.
   ============================================================ */
.hero::before { display: none; }
.hero, .page-hero { background: var(--surface); }
.site-header, .cat-bar { backdrop-filter: none; }
.hero-title, .section-title, .page-h1 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
.hero-sub { max-width: 60ch; }
.btn-gold, .board-tab.active, .vote-bar i { box-shadow: none; filter: none; }
.btn-gold:hover, .btn-gold { color: #10161d; }
.vote-card {
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 0 16px;
  padding: 16px;
  border-radius: var(--r-md);
  box-shadow: none;
  animation: none;
}
.vote-card:hover { transform: none; box-shadow: none; border-color: var(--gold-bright); }
.vote-card .vote-photo,
.vote-card .vote-photo-placeholder {
  grid-column: 1;
  grid-row: 1;
  width: 96px;
  height: 96px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.vote-card .vote-photo-placeholder {
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--gold-deep);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}
.vote-card .vote-info { grid-column: 2; grid-row: 1 / span 3; overflow: visible; }
.vote-card .vote-rank { grid-column: 1; grid-row: 3; width: 96px; height: 40px; }
.vote-card .vote-rank .num,
.vote-card:nth-child(1) .vote-rank .num,
.vote-card:nth-child(2) .vote-rank .num,
.vote-card:nth-child(3) .vote-rank .num {
  background: transparent;
  border: 1px solid var(--line-strong);
  box-shadow: none;
  color: var(--text);
}
.vote-card:nth-child(1) .vote-rank .num { border-color: var(--gold); color: var(--gold-deep); }
.vote-card:nth-child(1) .vote-photo { box-shadow: none; }
.vote-info .name { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; }
.vote-info .news { border-radius: 4px; background: transparent; padding-left: 0; }
.vote-info .news .news-tag { border-radius: 3px; background: var(--gold); color: #10161d; }
.vote-bar { border-radius: 2px; }
.vote-bar i { background: var(--gold); border-radius: 2px; }
.btn-free, .btn-heart { border-radius: 4px; }
.btn-heart:hover { background: var(--surface-3); color: var(--text); border-color: var(--gold); }
.live-stats, .card, .plan, .panel, .auth-gate, .board-error, .board-empty { box-shadow: none; }
.live-stats { border-radius: var(--r-md); }
.season-tag, .month-chip, .board-tab, .countdown { border-radius: 4px; }
.mobile-nav a.active .mi { filter: none; }

@media (max-width: 380px) {
  .vote-card { grid-template-columns: 76px minmax(0, 1fr); gap: 0 12px; }
  .vote-card .vote-photo, .vote-card .vote-photo-placeholder { width: 76px; height: 76px; }
  .vote-card .vote-rank { width: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
