/* 뱅온로그 — 기본 테마는 판타지(양피지). 아래쪽에 SF, 블록(마크) 테마가 이어집니다. */
:root {
  --bg: #efe4cc;
  --bg-2: #e6d7b6;
  --vignette: rgba(92, 64, 24, 0.22);
  --fg: #2a1f14;
  --muted: #6e5c44;
  --card: #fbf4e3;
  --card-2: #f4e9d0;
  --line: #d3bd92;
  --line-soft: rgba(140, 104, 46, 0.25);
  --accent: #a87526;      /* 금빛 */
  --accent-hi: #d9a943;
  --accent-ink: #84571a;
  --accent-2: #2f7a6e;    /* 비취빛 마력 */
  --on-accent: #2a1a06;
  --glow: rgba(196, 140, 40, 0.35);
  --cell-empty: #e6d8b9;
  --live: #b8323f;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 10px 24px -12px rgba(70, 45, 10, 0.35);
  --title-font: "Gowun Batang", "Nanum Myeongjo", serif;
  --rune-font: "Cinzel", "Gowun Batang", serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  /* 한글이 낱글자로 끊겨 "요." 같은 한 글자만 다음 줄로 넘어가지 않게 */
  word-break: keep-all;
  overflow-wrap: break-word;
  min-height: 100vh;
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 50% -20%, var(--bg-2), transparent 70%),
    radial-gradient(ellipse at 50% 120%, var(--bg-2), transparent 60%);
  background-attachment: fixed;
  font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.65;
  letter-spacing: -0.005em;
}
/* 가장자리를 어둡게 눌러 주는 비네트와 종이·별가루 질감 */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(ellipse at center, transparent 55%, var(--vignette) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .4 0 0 0 0 .25 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, .brand-name, .button { font-family: var(--title-font); }
.num, .mono { font-family: var(--rune-font); font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0.02em; }
a { color: var(--accent-ink); }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.muted { color: var(--muted); }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }

/* 머리말 */
.topbar { padding-top: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.brand svg { width: 40px; height: 44px; filter: drop-shadow(0 0 8px var(--glow)); }
.brand-name { font-size: 1.35rem; font-weight: 700; line-height: 1; color: var(--accent-ink); }
.brand-sub { display: block; font-family: var(--rune-font); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.34em; color: var(--muted); margin-top: 4px; }
.icon-button {
  flex: none;
  display: inline-grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: radial-gradient(circle at 35% 30%, var(--card-2), var(--card));
  box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--line);
  color: var(--accent-ink);
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
}
.icon-button:hover { box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--accent), 0 0 16px var(--glow); }
.icon-button:active { transform: scale(0.95); }
.icon-button .icon { width: 19px; height: 19px; }
.theme-picker { display: flex; gap: 8px; }
.theme-picker .icon-button { width: 38px; height: 38px; opacity: .55; }
.theme-picker .icon-button[aria-pressed="true"] { opacity: 1; }

/* 히어로 */
.hero { padding: 52px 0 12px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--rune-font); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3em;
  color: var(--accent-ink);
}
.eyebrow::before, .eyebrow::after { content: ""; width: 36px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.eyebrow::after { transform: scaleX(-1); }
.hero h1 { font-size: clamp(2rem, 6.5vw, 3.3rem); line-height: 1.25; margin: 14px 0 12px; font-weight: 700; }
.hero h1 .hl {
  background: linear-gradient(180deg, var(--accent-hi), var(--accent) 60%, var(--accent-ink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 10px var(--glow));
}
.hero p { margin: 0 auto; max-width: 30em; color: var(--muted); font-size: 1.02rem; }
.divider { display: block; width: 220px; max-width: 70%; height: 18px; margin: 22px auto 0; color: var(--accent); }

/* 패널: 금테 두른 액자 */
.panel {
  position: relative;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 40%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px 22px;
  box-shadow: var(--shadow), inset 0 0 0 4px var(--card), inset 0 0 0 5px var(--line-soft);
}
.panel::before {
  content: ""; position: absolute; inset: 5px; pointer-events: none;
  background: var(--accent);
  -webkit-mask: url(corner-tl.svg) top left / 26px no-repeat, url(corner-tr.svg) top right / 26px no-repeat,
    url(corner-bl.svg) bottom left / 26px no-repeat, url(corner-br.svg) bottom right / 26px no-repeat;
  mask: url(corner-tl.svg) top left / 26px no-repeat, url(corner-tr.svg) top right / 26px no-repeat,
    url(corner-bl.svg) bottom left / 26px no-repeat, url(corner-br.svg) bottom right / 26px no-repeat;
}
.panel-title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
  font-size: 1.12rem; font-weight: 700;
}
.medal {
  flex: none; display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  color: var(--accent-ink);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 25%, var(--card)), var(--card));
  border: 1px solid var(--accent);
  box-shadow: 0 0 10px -2px var(--glow);
}
.medal .icon { width: 16px; height: 16px; }
.panel-title .sub { margin-left: auto; font-family: inherit; font-size: 0.78rem; font-weight: 500; color: var(--muted); }
.panel-title::after { content: none; }
section + section, .stack > * + * { margin-top: 18px; }
.grid-2 > * { margin-top: 0; }

/* 지금 상황 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 28px; }
.stat { display: flex; align-items: center; gap: 16px; }
.stat-icon {
  flex: none; display: grid; place-items: center;
  width: 50px; height: 50px; transform: rotate(45deg); border-radius: 8px;
  color: var(--accent-ink);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--card)), var(--card));
  border: 1px solid var(--accent);
  box-shadow: 0 0 14px -4px var(--glow);
  margin: 4px;
}
.stat-icon > .icon { transform: rotate(-45deg); width: 22px; height: 22px; }
.stat-icon.alt { color: var(--accent-2); border-color: var(--accent-2); background: linear-gradient(135deg, color-mix(in srgb, var(--accent-2) 20%, var(--card)), var(--card)); }
.stat .label { display: block; color: var(--muted); font-size: 0.85rem; }
.stat strong { display: block; font-size: 1.9rem; line-height: 1.15; font-weight: 700; color: var(--accent-ink); }
.stat strong small { font-family: var(--title-font); font-size: 0.95rem; color: var(--muted); font-weight: 500; margin-left: 3px; }

/* 지금 많이 보는 방송 */
.lives { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.lives > li.muted { grid-column: 1 / -1; }
.live-card {
  display: flex; gap: 12px; align-items: flex-start; height: 100%;
  padding: 12px; border-radius: 6px;
  background: var(--card-2); border: 1px solid var(--line-soft);
  color: inherit; text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.live-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 20px -10px var(--glow); }
.live-card .avatar-wrap { position: relative; flex: none; }
.live-card { gap: 14px; }
.live-card .avatar { width: 72px; height: 72px; font-size: 1.6rem; border: 2px solid var(--accent); box-shadow: 0 0 0 2px var(--card-2), 0 0 0 3px var(--line); }
@media (max-width: 620px) { .live-card .avatar { width: 60px; height: 60px; font-size: 1.35rem; } }
.live-card .avatar-wrap::after {
  content: ""; position: absolute; right: 0; bottom: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--live); border: 2px solid var(--card-2);
}
.live-card .body { min-width: 0; flex: 1; }
.live-card .name { display: block; font-family: var(--title-font); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-card .title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 0.86rem; color: var(--muted); line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere;
}
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tag { font-size: 0.72rem; padding: 1px 7px; border-radius: 3px; color: var(--accent-2); border: 1px solid color-mix(in srgb, var(--accent-2) 40%, transparent); background: color-mix(in srgb, var(--accent-2) 8%, transparent); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tag.cat { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 600; }

/* 검색 */
.search { display: flex; gap: 8px; }
.search-box { position: relative; flex: 1; min-width: 0; }
.search-box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--accent-ink); width: 18px; height: 18px; }
.search input {
  width: 100%; height: 48px;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--card-2); color: var(--fg);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
  padding: 0 14px 0 42px; font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15), 0 0 0 3px var(--glow); }
.button {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px;
  border: 1px solid color-mix(in srgb, var(--accent-ink) 80%, black);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent) 55%, color-mix(in srgb, var(--accent) 75%, black));
  color: var(--on-accent); font-size: 1rem; font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 0 rgba(0, 0, 0, 0.2), 0 6px 16px -6px var(--glow);
  cursor: pointer; white-space: nowrap;
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.button:hover { filter: brightness(1.07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 0 rgba(0, 0, 0, 0.2), 0 8px 22px -6px var(--glow); }
.button:active { transform: translateY(1px); }
.button .icon { width: 18px; height: 18px; }
.results { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.results:empty { display: none; }
.results li.muted { padding: 8px 2px; }
.results a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 4px;
  border: 1px solid var(--line-soft); background: var(--card-2);
  color: inherit; text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.results a:hover { border-color: var(--accent); transform: translateX(2px); }
.results .name { flex: 1; min-width: 0; font-family: var(--title-font); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results .go { color: var(--muted); width: 18px; height: 18px; }
.results a:hover .go { color: var(--accent-ink); }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--cell-empty); flex: none; }
.avatar-fallback {
  display: grid; place-items: center;
  font-family: var(--title-font); font-weight: 700; color: var(--on-accent);
  background: radial-gradient(circle at 35% 30%, var(--accent-hi), var(--accent) 60%, var(--accent-ink));
}

/* 카테고리 막대: 경험치 바 */
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.bars .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .count { color: var(--muted); font-size: 0.85rem; }
.bars .track { grid-column: 1 / -1; height: 10px; border-radius: 2px; background: var(--cell-empty); border: 1px solid var(--line-soft); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25); }
.bars .fill { display: block; height: 100%; background: linear-gradient(180deg, var(--accent-hi), var(--accent) 60%, var(--accent-ink)); box-shadow: 0 0 10px var(--glow); }
.updated { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; margin-top: 16px; }

/* 생활기록부 */
.player { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.player-avatar { position: relative; flex: none; width: 88px; height: 88px; }
.player-avatar svg.ring { position: absolute; inset: -10px; width: 108px; height: 108px; overflow: visible; }
.player-avatar .avatar { width: 88px; height: 88px; font-size: 2.2rem; }
.player-avatar.live svg.ring .spin { transform-origin: 54px 54px; animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player-info { flex: 1; min-width: 0; }
.kicker { margin: 0; font-family: var(--rune-font); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.26em; color: var(--accent-ink); }
.player-info h1 { margin: 2px 0 0; font-size: clamp(1.55rem, 5vw, 2.2rem); line-height: 1.25; overflow-wrap: anywhere; }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  margin-left: 8px; padding: 1px 10px; border-radius: 3px;
  font-family: var(--rune-font); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--live) 80%, white), var(--live));
  border: 1px solid color-mix(in srgb, var(--live) 70%, black);
  box-shadow: 0 0 14px color-mix(in srgb, var(--live) 45%, transparent);
}
.live-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.titles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.title-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 14px 3px 10px;
  font-family: var(--title-font); font-size: 0.84rem; font-weight: 700;
  color: var(--accent-ink);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 18%, var(--card)), var(--card-2));
  border: 1px solid var(--accent);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
}
.title-badge .icon { width: 13px; height: 13px; color: var(--accent); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; }
@media (max-width: 680px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.gauge { display: flex; flex-direction: column; align-items: center; text-align: center; }
.gauge .panel-title { align-self: stretch; }
.gauge > svg { width: 210px; height: 210px; max-width: 100%; overflow: visible; }
.gauge .g-track { stroke: var(--cell-empty); }
.gauge .g-rim { stroke: var(--accent); opacity: 0.55; }
.gauge .g-fill { stroke: url(#gauge-grad); filter: drop-shadow(0 0 6px var(--glow)); transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.gauge .g-fill.live { stroke: var(--live); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--live) 60%, transparent)); }
.gauge .g-ticks { fill: var(--accent); }
.gauge .g-value { fill: var(--accent-ink); font-family: var(--rune-font); font-weight: 700; font-size: 42px; }
.gauge .g-value.small { font-family: var(--title-font); font-size: 24px; }
.gauge .g-unit { fill: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.24em; font-family: var(--rune-font); }
.gauge .g-scan { stroke: var(--accent-2); stroke-dasharray: 3 9; animation: dash 2.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.gauge .slot { margin: 6px 0 0; font-family: var(--title-font); font-weight: 700; font-size: 1.05rem; }
.gauge .note { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fact { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 4px; background: var(--card-2); border: 1px solid var(--line-soft); }
.fact .stat-icon { width: 34px; height: 34px; border-radius: 6px; margin: 4px; }
.fact .stat-icon > .icon { width: 17px; height: 17px; }
@media (max-width: 480px) { .fact { flex-direction: column; align-items: flex-start; gap: 10px; } }
.fact .label { display: block; color: var(--muted); font-size: 0.78rem; }
.fact strong { display: block; font-family: var(--title-font); font-size: 1.08rem; line-height: 1.35; overflow-wrap: anywhere; color: var(--fg); }
.fact strong.num { font-family: var(--rune-font); color: var(--accent-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { font-size: 0.82rem; font-weight: 600; padding: 1px 10px; border-radius: 3px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-ink); }

.heatmap {
  display: grid;
  grid-template-columns: 1.6em repeat(24, minmax(0, 1fr));
  gap: 3px;
  font-size: 0.68rem;
  color: var(--muted);
}
.heatmap .hour-label { grid-row: 1; white-space: nowrap; font-family: var(--rune-font); }
.heatmap .day-label { align-self: center; font-family: var(--title-font); font-weight: 700; }
.heatmap .cell { aspect-ratio: 1; border-radius: 2px; background: var(--cell-empty); transition: transform .1s; cursor: pointer; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18); }
.heatmap .cell.unknown { background: repeating-linear-gradient(135deg, var(--cell-empty) 0 2px, transparent 2px 5px); box-shadow: none; }
.heatmap .cell.now { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.heatmap .cell:hover, .heatmap .cell.active { transform: scale(1.35); outline: 2px solid var(--fg); outline-offset: 0; position: relative; z-index: 1; }
.heatmap .cell.l1, .legend .swatch.l1 { background: color-mix(in srgb, var(--accent) 28%, var(--cell-empty)); }
.heatmap .cell.l2, .legend .swatch.l2 { background: color-mix(in srgb, var(--accent) 48%, var(--cell-empty)); }
.heatmap .cell.l3, .legend .swatch.l3 { background: color-mix(in srgb, var(--accent) 68%, var(--cell-empty)); }
.heatmap .cell.l4, .legend .swatch.l4 { background: color-mix(in srgb, var(--accent) 85%, var(--cell-empty)); }
.heatmap .cell.l5, .legend .swatch.l5 { background: radial-gradient(circle at 35% 30%, var(--accent-hi), var(--accent)); box-shadow: 0 0 8px var(--glow); }
.readout {
  display: flex; align-items: center; gap: 8px;
  min-height: 2.6em; margin: 14px 0 0; padding: 8px 12px;
  border-radius: 4px; background: var(--card-2); border: 1px dashed var(--line);
  font-size: 0.88rem;
}
.readout .icon { color: var(--accent-2); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 10px; font-size: 0.78rem; color: var(--muted); }
.legend .scale { display: inline-flex; align-items: center; gap: 3px; }
.legend .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; background: var(--cell-empty); }
.legend .swatch.unknown { background: repeating-linear-gradient(135deg, var(--cell-empty) 0 2px, transparent 2px 5px); border: 1px solid var(--line); }
.legend .swatch.now { outline: 2px solid var(--accent-2); outline-offset: 1px; margin-right: 3px; }

.share-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin-top: 24px; }
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 16px; padding: 12px 16px; border-radius: 4px;
  background: color-mix(in srgb, var(--accent-2) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent-2) 35%, var(--line));
  font-size: 0.9rem;
}
.notice .icon { color: var(--accent-2); margin-top: 3px; }
.xp { height: 8px; border-radius: 2px; background: var(--cell-empty); margin-top: 8px; overflow: hidden; border: 1px solid var(--line-soft); }
.xp span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), color-mix(in srgb, var(--accent-2) 50%, var(--accent-hi))); box-shadow: 0 0 8px color-mix(in srgb, var(--accent-2) 50%, transparent); }

.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 40px 0; }
.loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }

/* 내용을 불러오는 동안 꼬리말이 화면 안에 있다가 아래로 밀려나면 화면이 덜컹여요(CLS). 본문이 처음부터 화면 높이를 차지하게 둡니다. */
main.wrap { min-height: 100vh; min-height: 100svh; }
/* 불러오는 동안 자리를 미리 잡아 둬서, 내용이 들어올 때 아래쪽이 밀리며 덜컹이지 않게 */
#catalog-count:empty { min-height: 46px; }
#games-sub:empty::before { content: "\00a0"; }
#catalog-badges:has(> li.muted:only-child), #games:has(> li.muted:only-child) { min-height: 100vh; }
footer.wrap { margin-top: 72px; }
footer { padding: 24px 16px 48px; border-top: 1px solid var(--line-soft); font-size: 0.82rem; color: var(--muted); text-align: center; }
footer p { margin: 4px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 520px) {
  .panel-title { flex-wrap: wrap; }
  .panel-title .sub { flex-basis: 100%; margin: -10px 0 0 40px; }
}

/* 오늘의 발견 */
.discover { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.discover > li.muted { grid-column: 1 / -1; }
.discover-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; height: 100%;
  padding: 16px; border-radius: 6px; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent-2) 12%, var(--card-2)), var(--card-2) 60%);
  border: 1px solid color-mix(in srgb, var(--accent-2) 35%, var(--line));
  color: inherit; text-decoration: none;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.discover-card::after {
  content: ""; position: absolute; right: -18px; top: -18px; width: 86px; height: 86px; opacity: .14; pointer-events: none;
  background: var(--accent-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l2.8 8.2L23 12l-8.2 2.8L12 23l-2.8-8.2L1 12l8.2-2.8Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l2.8 8.2L23 12l-8.2 2.8L12 23l-2.8-8.2L1 12l8.2-2.8Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.discover-card:hover { transform: translateY(-2px); border-color: var(--accent-2); box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent-2) 60%, transparent); }
.discover-card .head { display: flex; align-items: center; gap: 12px; }
.discover-card .avatar { width: 54px; height: 54px; font-size: 1.4rem; border: 2px solid var(--accent-2); box-shadow: 0 0 0 2px var(--card-2), 0 0 0 3px var(--line); }
.discover-card .who { min-width: 0; display: grid; }
.discover-card .name { font-family: var(--title-font); font-weight: 700; font-size: 1.08rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discover-card .followers { font-size: 0.8rem; color: var(--muted); }
.facts-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fact-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 600; padding: 2px 9px; border-radius: 3px; background: var(--card); border: 1px solid var(--line-soft); }
.fact-chip .icon { width: 13px; height: 13px; color: var(--accent-2); }
.discover-card .quote { display: flex; gap: 6px; font-size: 0.88rem; line-height: 1.5; overflow-wrap: anywhere; }
.discover-card .quote .icon { width: 14px; height: 14px; color: var(--accent); margin-top: 3px; }
.discover-card .quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.discover-card .tags { margin-top: 0; }
.discover-card .go { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; align-self: flex-end; font-size: 0.82rem; font-weight: 700; color: var(--accent-ink); }
.discover-card .go .icon { width: 15px; height: 15px; transition: transform .15s; }
.discover-card:hover .go .icon { transform: translateX(3px); }

/* 트렌드 */
.trends { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.trends > p { grid-column: 1 / -1; margin: 0; }
.trend-col.wide { grid-column: 1 / -1; }
@media (max-width: 620px) { .trends { grid-template-columns: minmax(0, 1fr); } }
.trend-col h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 0.98rem; color: var(--accent-ink); }
.trend-col h3 .icon { width: 17px; height: 17px; }
.rank-list, .steady { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 4px; min-height: 38px; }
.rank-list li:nth-child(odd) { background: color-mix(in srgb, var(--card-2) 70%, transparent); }
.rank-list .name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .meta { font-size: 0.8rem; color: var(--muted); }
.rank { flex: none; display: inline-grid; place-items: center; width: 28px; font-family: var(--rune-font); font-weight: 700; color: var(--muted); font-size: 0.92rem; }
.rank svg { width: 24px; height: 28px; overflow: visible; }
.rank .ribbon { fill: var(--accent-2); opacity: .75; }
.rank .disc { fill: var(--m-hi); stroke: var(--m-lo); stroke-width: 1.5; }
.rank .rim { stroke: rgba(255, 255, 255, .55); stroke-width: 1; }
.rank text { font-family: var(--rune-font); font-size: 11px; font-weight: 700; fill: var(--m-ink); }
.rank.r1 { --m-hi: #ffd75e; --m-lo: #a87a12; --m-ink: #4a3300; }
.rank.r2 { --m-hi: #e9edf2; --m-lo: #8b95a1; --m-ink: #333b45; }
.rank.r3 { --m-hi: #eaa36a; --m-lo: #8a4b22; --m-ink: #3d1e08; }
.flag { flex: none; display: inline-flex; align-items: center; gap: 2px; font-family: var(--rune-font); font-size: 0.68rem; font-weight: 700; padding: 0 6px; border-radius: 3px; line-height: 1.6; }
.flag.new { color: #fff; background: var(--live); }
.flag.up { color: var(--accent-2); border: 1px solid color-mix(in srgb, var(--accent-2) 50%, transparent); }
.flag .icon { width: 10px; height: 10px; }
.steady { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
@media (max-width: 620px) { .steady { grid-template-columns: minmax(0, 1fr); } }
.steady a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; background: var(--card-2); border: 1px solid var(--line-soft); color: inherit; text-decoration: none; transition: border-color .15s; }
.steady a:hover { border-color: var(--accent); }
.steady .avatar { width: 34px; height: 34px; font-size: .95rem; }
.steady .info { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.steady .info .name { font-family: var(--title-font); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steady .info .meta { font-size: 0.76rem; color: var(--muted); }
.pips { flex: none; width: 66px; height: 9px; }
.pips rect { fill: var(--cell-empty); }
.pips rect.on { fill: var(--accent); }
.trend-note { font-size: 0.8rem; }

/* 업적 배지 */
.badges { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.badge-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 6px; background: var(--card-2); border: 1px solid var(--line-soft); }
.badge-card.tier-1 { --b-hi: #eaa36a; --b-lo: #8a4b22; --b-edge: #5e3315; --b-ink: #fff3e6; }
.badge-card.tier-2 { --b-hi: #f4f6f9; --b-lo: #8b95a1; --b-edge: #59626d; --b-ink: #2b323b; }
.badge-card.tier-3 { --b-hi: #ffe28a; --b-lo: #b8860b; --b-edge: #7a5703; --b-ink: #3d2a00; }
.badge-card.tier-0 { --b-hi: var(--cell-empty); --b-lo: color-mix(in srgb, var(--cell-empty) 70%, var(--muted)); --b-edge: var(--line); --b-ink: var(--muted); }
.badge-card.tier-3 { border-color: color-mix(in srgb, #d9a943 60%, var(--line)); box-shadow: 0 0 18px -8px rgba(217, 169, 67, .8); }
.emblem { flex: none; width: 60px; height: 60px; overflow: visible; }
.emblem .e-body { stroke: var(--b-edge); stroke-width: 2; }
.emblem .e-inner { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: 1.2; }
.emblem .e-wing { fill: none; stroke: var(--b-lo); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.emblem .e-icon { color: var(--b-ink); }
.emblem .gem { fill: var(--accent-2); stroke: var(--b-edge); stroke-width: .8; }
.tier-0 .emblem .e-wing { display: none; }
.tier-0 .emblem { opacity: .75; }
.b-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.b-tier { font-family: var(--rune-font); font-size: 0.68rem; font-weight: 700; letter-spacing: .12em; color: var(--b-lo); }
.tier-0 .b-tier { color: var(--muted); }
.b-name { font-family: var(--title-font); font-size: 1.02rem; line-height: 1.3; }
.tier-0 .b-name { color: var(--muted); }
.b-desc { font-size: 0.8rem; color: var(--muted); }
.b-desc b { color: var(--fg); font-weight: 700; }
.b-next { margin-top: 5px; font-size: 0.74rem; color: var(--muted); display: grid; gap: 3px; }
.b-next.done { display: flex; align-items: center; gap: 4px; color: var(--accent-ink); font-weight: 700; }
.b-next.done .icon { width: 12px; height: 12px; }
.b-bar { display: block; height: 6px; border-radius: 2px; background: var(--cell-empty); overflow: hidden; }
.b-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); }

/* 머리말 메뉴와 계정 */
.topbar { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav tools"; align-items: center; gap: 12px 18px; min-height: 64px; }
.topbar .brand { grid-area: brand; }
.main-nav { grid-area: nav; display: flex; gap: 4px; justify-content: center; }
.tools { grid-area: tools; display: flex; align-items: center; gap: 10px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 4px;
  color: var(--muted); text-decoration: none; font-family: var(--title-font); font-weight: 700; font-size: 0.92rem; white-space: nowrap;
  border: 1px solid transparent; transition: color .15s, border-color .15s, background .15s;
}
.nav-link .icon { width: 16px; height: 16px; }
.nav-link:hover { color: var(--accent-ink); }
.nav-link[aria-current="page"] { color: var(--accent-ink); border-color: var(--line); background: color-mix(in srgb, var(--accent) 10%, var(--card)); box-shadow: 0 0 12px -6px var(--glow); }
@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; grid-template-areas: "brand tools" "nav nav"; }
  .main-nav { justify-content: space-between; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 4px 0; }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-link { flex: 1; justify-content: center; padding: 7px 6px; font-size: 0.86rem; }
}
@media (max-width: 420px) {
  .brand-sub { display: none; }
  .theme-picker { gap: 4px; }
  .theme-picker .icon-button { width: 32px; height: 32px; }
  .theme-picker .icon-button .icon { width: 16px; height: 16px; }
  .nav-link { flex-direction: column; gap: 2px; font-size: 0.76rem; }
}
.account { position: relative; }
.account-button {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px 0 10px; border-radius: 19px;
  border: 1px solid var(--accent); background: var(--card); color: var(--accent-ink); font: inherit; font-weight: 700; font-size: 0.88rem; cursor: pointer;
}
.account-button.signed-in { padding-left: 3px; }
.account-button .avatar { width: 30px; height: 30px; font-size: .85rem; }
.account-button .label { max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .account-button .label { display: none; } .account-button { padding: 0 9px; } .account-button.signed-in { padding: 0 3px; } }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(280px, calc(100vw - 32px));
  display: grid; gap: 8px; padding: 14px; border-radius: 6px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .45);
}
.account-menu .who { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.account-menu .who > span { display: grid; min-width: 0; }
.account-menu .who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-lead { margin: 0; font-size: 0.88rem; }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 4px; background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--card-2); }
.menu-item.danger { color: var(--live); }
.menu-foot { font-size: 0.76rem; color: var(--muted); text-align: right; margin: 0; }
.menu-foot a { color: inherit; }
.small { font-size: 0.8rem; }
.login-list { display: grid; gap: 8px; }
.login-button {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px; border-radius: 6px; border: 0;
  font: inherit; font-weight: 700; font-size: 0.95rem; color: #fff; cursor: pointer; transition: filter .15s;
}
.login-button:hover { filter: brightness(1.08); }
.login-button.discord { background: #5865f2; }
.login-button.naver { background: #03c75a; }
.login-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; font-family: Arial, sans-serif; font-weight: 900; }
.login-mark .icon { width: 20px; height: 20px; }

/* 쪽 머리말 (작은 히어로) */
.hero.small { padding: 34px 0 4px; }
.hero.small h1 { font-size: clamp(1.7rem, 5.5vw, 2.5rem); margin: 10px 0 8px; }
a.panel { display: block; color: inherit; text-decoration: none; }
a.panel.stat { display: flex; transition: transform .15s; }
a.panel.stat:hover, a.panel.quick:hover { transform: translateY(-2px); }
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 18px; }
.quick { display: flex !important; align-items: center; gap: 16px; transition: transform .15s; }
.quick > span:last-child { display: grid; }
.quick strong { font-family: var(--title-font); font-size: 1.05rem; }
.more-link { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 12px; font-weight: 700; font-size: 0.88rem; text-decoration: none; }
.more-link .icon { width: 15px; height: 15px; }

/* 인기 랭킹 */
.popular { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.popular-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 6px;
  background: var(--card-2); border: 1px solid var(--line-soft); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s;
}
.popular-row:hover { border-color: var(--accent); transform: translateX(2px); }
.popular li:nth-child(-n+3) .popular-row { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, var(--card-2)), var(--card-2)); }
.popular-row .avatar { width: 42px; height: 42px; }
.popular-row .info { flex: 1; min-width: 0; display: grid; }
.popular-row .name { font-family: var(--title-font); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popular-row .meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 0.76rem; color: var(--muted); }
.popular-row .meta .icon { width: 12px; height: 12px; }
.popular-row .score { display: grid; justify-items: end; line-height: 1.1; }
.popular-row .score strong { font-size: 1.35rem; color: var(--accent-ink); }
.popular-row .score .unit { font-size: 0.72rem; color: var(--muted); }
.popular.compact .popular-row .meta { display: none; }
.score-rules { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.score-rules li { display: flex; align-items: center; gap: 14px; }
.score-rules li > span:last-child { display: grid; }
.pts { flex: none; display: grid; place-items: center; width: 52px; height: 36px; border-radius: 4px; font-weight: 700; color: var(--on-accent); background: linear-gradient(180deg, var(--accent-hi), var(--accent)); }
.score-rules .muted { font-size: 0.82rem; }

/* 글 (개인정보 처리방침) */
.prose h2 { font-size: 1.1rem; margin: 22px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.login-panel { max-width: 420px; margin: 48px auto 0; }
.login-panel p { margin: 0 0 14px; }

/* Up */
.up-slot:empty { display: none; }
.up-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; }
.up-button {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--live) 70%, black); color: #fff; font: inherit; font-weight: 800; letter-spacing: .04em; cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--live) 75%, white), var(--live));
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--live) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .15s, filter .15s;
}
.up-button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
.up-button:active:not(:disabled) { transform: scale(.97); }
.up-button .icon { width: 20px; height: 20px; }
.up-button.done { cursor: default; background: var(--card-2); color: var(--accent-ink); border-color: var(--line); box-shadow: none; }
.up-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 0.86rem; color: var(--muted); }
.up-stats strong { color: var(--fg); }
.score-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 3px; border: 1px solid var(--line); text-decoration: none; color: var(--accent-ink); }
.score-chip .icon { width: 13px; height: 13px; }

/* 응원 댓글 */
.comment-form { display: grid; gap: 8px; }
.comment-form textarea {
  width: 100%; min-height: 84px; resize: vertical; padding: 12px; border-radius: 4px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--fg); font: inherit; line-height: 1.55;
}
.comment-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.form-foot { display: flex; align-items: center; gap: 12px; }
.form-foot .muted { flex: 1; }
.form-foot .counter { font-size: 0.78rem; color: var(--muted); }
.form-foot .button { height: 40px; padding: 0 18px; }
.button:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }
.comment-login { display: grid; gap: 10px; padding: 14px; border-radius: 6px; border: 1px dashed var(--line); background: var(--card-2); }
.comment-login p { margin: 0; }
.comment-login .login-list { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.comment-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.best-list { padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.comment { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 6px; background: var(--card-2); border: 1px solid var(--line-soft); }
.comment.best { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, var(--card-2)), var(--card-2)); }
.comment.mine { border-left: 3px solid var(--accent-2); }
.comment .avatar { width: 38px; height: 38px; }
.c-body { flex: 1; min-width: 0; }
.c-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.8rem; color: var(--muted); }
.c-name { color: var(--fg); font-size: 0.92rem; font-family: var(--title-font); overflow-wrap: anywhere; }
.best-mark { display: inline-flex; align-items: center; gap: 3px; padding: 0 7px; border-radius: 3px; font-weight: 700; color: var(--on-accent); background: linear-gradient(180deg, var(--accent-hi), var(--accent)); }
.best-mark .icon { width: 11px; height: 11px; }
.provider-mark { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 3px; color: #fff; font: 900 10px/1 Arial, sans-serif; }
.provider-mark.naver { background: #03c75a; }
.provider-mark.discord { background: #5865f2; }
.provider-mark .icon { width: 12px; height: 12px; }
.c-text { margin: 4px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.c-actions { display: flex; align-items: center; gap: 10px; }
.c-up, .c-link { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 14px; font: inherit; font-size: 0.8rem; cursor: pointer; }
.c-up { border: 1px solid var(--line); background: var(--card); color: var(--fg); }
.c-up .icon { width: 14px; height: 14px; color: var(--live); }
.c-up.on { border-color: var(--live); color: var(--live); }
.c-up:disabled { cursor: default; }
.c-link { border: 0; background: none; color: var(--muted); padding: 0 4px; }
.c-link .icon { width: 13px; height: 13px; }
.c-link:hover { color: var(--fg); }
.comments-panel .empty { margin: 16px 0 0; }
.comments-panel .rules { margin: 14px 0 0; }

.login-dialog { width: min(380px, calc(100vw - 32px)); padding: 22px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--fg); }
.login-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.login-dialog p { margin: 0 0 14px; }
.dialog-close { margin-top: 12px; width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 6px; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px);
  padding: 10px 18px; border-radius: 6px; background: var(--fg); color: var(--bg); font-weight: 700; font-size: 0.9rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* SNS 공유 */
.share-row { gap: 8px; }
.share-button {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 6px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit; font-weight: 700; font-size: 0.86rem; text-decoration: none; cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.share-button:hover { border-color: var(--accent); transform: translateY(-1px); }
.share-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font: 900 14px/1 Arial, sans-serif; background: var(--accent); }
.share-mark .icon { width: 15px; height: 15px; }
.share-button.x .share-mark { background: #111; }
.share-button.threads .share-mark { background: #222; }
.share-button.facebook .share-mark { background: #1877f2; }
.share-button.band .share-mark { background: #06c755; }
.share-row .muted { flex-basis: 100%; text-align: center; }

/* ===== SF 테마: 우주 기지 홀로그램 ===== */
:root[data-theme="sf"] {
  --bg: #04070d; --bg-2: #0a1a2e; --vignette: rgba(0,0,0,.65);
  --fg: #dff6ff; --muted: #7d98ad; --card: rgba(8, 20, 34, .82); --card-2: rgba(14, 32, 52, .7);
  --line: #1d4a66; --line-soft: rgba(56, 220, 255, .18);
  --accent: #38dcff; --accent-hi: #a6f1ff; --accent-ink: #5fe6ff; --accent-2: #b26bff;
  --on-accent: #001018; --glow: rgba(56, 220, 255, .45); --cell-empty: #0e2236; --live: #ff3d71;
  --title-font: "Pretendard Variable", system-ui, sans-serif; --rune-font: "Chakra Petch", "Pretendard Variable", sans-serif;
  --shadow: 0 0 0 1px rgba(56,220,255,.08), 0 0 30px -10px rgba(56,220,255,.35);
}
:root[data-theme="sf"] body { background-image: linear-gradient(rgba(56,220,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(56,220,255,.05) 1px, transparent 1px), radial-gradient(ellipse at 50% -10%, #0c2a48, transparent 65%), radial-gradient(ellipse at 100% 100%, rgba(178,107,255,.18), transparent 50%); background-size: 28px 28px, 28px 28px, auto, auto; }
:root[data-theme="sf"] body::before { background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.6)); }
:root[data-theme="sf"] h1, :root[data-theme="sf"] h2, :root[data-theme="sf"] h3, :root[data-theme="sf"] .brand-name { letter-spacing: .02em; }
:root[data-theme="sf"] .panel { border-radius: 0; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(56,220,255,.07), transparent 40%), var(--card); backdrop-filter: blur(6px);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px); box-shadow: inset 0 0 0 1px rgba(56,220,255,.06), inset 0 1px 0 rgba(166,241,255,.15); }
:root[data-theme="sf"] .panel::before { -webkit-mask: none; mask: none; inset: auto; top: 0; left: 18px; width: 90px; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); box-shadow: 0 0 10px var(--accent); }
:root[data-theme="sf"] .panel::after { content: ""; position: absolute; right: 0; bottom: 18px; width: 2px; height: 60px; background: linear-gradient(0deg, var(--accent-2), transparent); box-shadow: 0 0 10px var(--accent-2); }
:root[data-theme="sf"] .medal { border-radius: 0; transform: rotate(45deg); width: 26px; height: 26px; background: rgba(56,220,255,.1); }
:root[data-theme="sf"] .medal .icon { transform: rotate(-45deg); }
:root[data-theme="sf"] .stat-icon { border-radius: 0; transform: none; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); border: none; background: rgba(56,220,255,.16); }
:root[data-theme="sf"] .stat-icon > .icon { transform: none; }
:root[data-theme="sf"] .stat-icon.alt { background: rgba(178,107,255,.18); }
:root[data-theme="sf"] .stat strong, :root[data-theme="sf"] .fact strong.num, :root[data-theme="sf"] .gauge .g-value { text-shadow: 0 0 12px var(--glow); }
:root[data-theme="sf"] .button { border-radius: 0; border: 1px solid var(--accent); background: linear-gradient(180deg, rgba(56,220,255,.35), rgba(56,220,255,.12)); color: var(--accent-hi); text-shadow: 0 0 8px var(--glow);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); box-shadow: inset 0 0 20px rgba(56,220,255,.2); }
:root[data-theme="sf"] .search input { border-radius: 0; }
:root[data-theme="sf"] .icon-button { border-radius: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); box-shadow: none; background: rgba(56,220,255,.12); }
:root[data-theme="sf"] .title-badge { clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); background: rgba(178,107,255,.14); border-color: var(--accent-2); color: #d9b8ff; font-family: var(--rune-font); }
:root[data-theme="sf"] .title-badge .icon { color: var(--accent-2); }
:root[data-theme="sf"] .live-card, :root[data-theme="sf"] .fact, :root[data-theme="sf"] .results a, :root[data-theme="sf"] .readout, :root[data-theme="sf"] .notice { border-radius: 0; }
:root[data-theme="sf"] .live-card .avatar { border-color: var(--accent); }
:root[data-theme="sf"] .tag { border-radius: 0; }
:root[data-theme="sf"] .tag.cat { color: var(--accent-hi); }
:root[data-theme="sf"] .heatmap .cell { border-radius: 1px; box-shadow: none; }
:root[data-theme="sf"] .bars .track { border-radius: 0; height: 6px; }
:root[data-theme="sf"] .bars .fill { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
:root[data-theme="sf"] .hero h1 .hl { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="sf"] .eyebrow::before, :root[data-theme="sf"] .eyebrow::after { background: linear-gradient(90deg, transparent, var(--accent)); }
:root[data-theme="sf"] .kicker, :root[data-theme="sf"] .eyebrow, :root[data-theme="sf"] .brand-sub { color: var(--accent); }
:root[data-theme="sf"] .gauge .g-rim { stroke: var(--accent); stroke-dasharray: 2 6; opacity: .7; }
:root[data-theme="sf"] .player-avatar .avatar-fallback, :root[data-theme="sf"] .avatar-fallback { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
:root[data-theme="sf"] footer { border-top-color: var(--line-soft); }

:root[data-theme="sf"] .discover-card, :root[data-theme="sf"] .steady a, :root[data-theme="sf"] .badge-card, :root[data-theme="sf"] .fact-chip, :root[data-theme="sf"] .rank-list li { border-radius: 0; }
:root[data-theme="sf"] .discover-card { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); background: linear-gradient(160deg, rgba(178,107,255,.16), rgba(14,32,52,.7) 60%); }
:root[data-theme="sf"] .discover-card .avatar { border-radius: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); box-shadow: none; border: 0; }
:root[data-theme="sf"] .trend-col h3 { font-family: var(--rune-font); letter-spacing: .06em; color: var(--accent); }
:root[data-theme="sf"] .rank .ribbon { fill: var(--accent); }
:root[data-theme="sf"] .rank .disc { filter: drop-shadow(0 0 4px var(--m-hi)); }
:root[data-theme="sf"] .flag { border-radius: 0; }
:root[data-theme="sf"] .pips rect { rx: 0; }
:root[data-theme="sf"] .pips rect.on { fill: var(--accent); filter: drop-shadow(0 0 2px var(--accent)); }
:root[data-theme="sf"] .badge-card.tier-1 { --b-hi: #ff9f6b; --b-lo: #b4522a; }
:root[data-theme="sf"] .badge-card.tier-2 { --b-hi: #bff6ff; --b-lo: #3aa6c9; --b-edge: #1d6a85; --b-ink: #001c26; }
:root[data-theme="sf"] .badge-card.tier-3 { --b-hi: #fff1a8; --b-lo: #e0a420; box-shadow: 0 0 22px -8px rgba(255, 210, 80, .7); border-color: rgba(255, 210, 80, .5); }
:root[data-theme="sf"] .emblem .e-body { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--b-hi) 60%, transparent)); }
:root[data-theme="sf"] .tier-0 .emblem .e-body { filter: none; }
:root[data-theme="sf"] .b-bar { border-radius: 0; }
:root[data-theme="sf"] .b-bar span { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }

:root[data-theme="sf"] .nav-link, :root[data-theme="sf"] .popular-row, :root[data-theme="sf"] .comment, :root[data-theme="sf"] .comment-login, :root[data-theme="sf"] .account-menu, :root[data-theme="sf"] .pts, :root[data-theme="sf"] .score-chip { border-radius: 0; }
:root[data-theme="sf"] .nav-link { font-family: var(--rune-font); letter-spacing: .04em; }
:root[data-theme="sf"] .nav-link[aria-current="page"] { color: var(--accent-hi); border-color: var(--accent); background: rgba(56,220,255,.1); text-shadow: 0 0 8px var(--glow); }
:root[data-theme="sf"] .account-button { border-radius: 0; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); background: rgba(56,220,255,.1); }
:root[data-theme="sf"] .account-menu { background: #081422; backdrop-filter: blur(8px); }
:root[data-theme="sf"] .up-button { border-radius: 0; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); background: linear-gradient(180deg, #ff6f95, #ff3d71); box-shadow: 0 0 20px rgba(255,61,113,.5); }
:root[data-theme="sf"] .up-button.done { background: rgba(56,220,255,.1); color: var(--accent); box-shadow: none; }
:root[data-theme="sf"] .pts { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #001018; }
:root[data-theme="sf"] .popular-row .score strong { text-shadow: 0 0 10px var(--glow); }
:root[data-theme="sf"] .comment-form textarea { border-radius: 0; background: rgba(4,12,22,.8); }
:root[data-theme="sf"] .best-mark { border-radius: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #001018; }
:root[data-theme="sf"] .login-dialog { border-radius: 0; background: #081422; }
:root[data-theme="sf"] .share-button { border-radius: 0; background: rgba(56,220,255,.06); }
:root[data-theme="sf"] .share-mark { border-radius: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
:root[data-theme="sf"] .toast { background: var(--accent); color: #001018; border-radius: 0; }

/* ===== 블록 테마: 픽셀 글꼴과 블록 질감 (질감은 site/mc/ 에 직접 그린 그림) ===== */
:root[data-theme="mc"] {
  --bg: #1b1d2b; --fg: #f2f2f2; --muted: #b9b9b9;
  --card: #2d2d33; --card-2: #3a3a42; --line: #000; --line-soft: rgba(0,0,0,.6);
  --accent: #5fd35f; --accent-hi: #a0ff7a; --accent-ink: #ffe066; --accent-2: #55d6ff;
  --on-accent: #fff; --glow: transparent; --cell-empty: #3c3c44; --live: #ff5555;
  --title-font: "Galmuri11", monospace; --rune-font: "Galmuri11", monospace;
  --shadow: none;
}
:root[data-theme="mc"] * { image-rendering: pixelated; }
:root[data-theme="mc"], :root[data-theme="mc"] body { font-family: "Galmuri11", monospace; letter-spacing: 0; }
:root[data-theme="mc"] body { background: url(mc/deepslate.png) 0 0 / 48px 48px; }
:root[data-theme="mc"] body::before { background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.45)); }
:root[data-theme="mc"] .topbar { position: relative; }
:root[data-theme="mc"] .hero { position: relative; padding-bottom: 72px; }
:root[data-theme="mc"] { overflow-x: clip; }
:root[data-theme="mc"] .hero::after { content: ""; position: absolute; left: 50%; width: 100vw; transform: translateX(-50%); bottom: 0; height: 48px; background: url(mc/grass.png) 0 0 / 48px 48px; box-shadow: 0 4px 0 #000; }
:root[data-theme="mc"] .hero h1 { text-shadow: 4px 4px 0 #3f3f3f; font-weight: 700; }
:root[data-theme="mc"] .hero h1 .hl { background: none; color: #ffe066; -webkit-text-fill-color: #ffe066; filter: none; text-shadow: 4px 4px 0 #3f3a14; }
:root[data-theme="mc"] .hero p { color: #e0e0e0; text-shadow: 2px 2px 0 #000; }
:root[data-theme="mc"] .eyebrow { color: #ffe066; text-shadow: 2px 2px 0 #3f3a14; letter-spacing: .1em; }
:root[data-theme="mc"] .eyebrow::before, :root[data-theme="mc"] .eyebrow::after { background: #ffe066; height: 4px; }
:root[data-theme="mc"] .divider { display: none; }
:root[data-theme="mc"] .brand-name { color: #fff; text-shadow: 3px 3px 0 #3f3f3f; }
:root[data-theme="mc"] .brand-sub { color: #ffe066; letter-spacing: .2em; }
:root[data-theme="mc"] .brand svg { filter: none; }
:root[data-theme="mc"] .panel {
  border: 0; border-radius: 0;
  background: url(mc/stone.png) 0 0 / 48px 48px;
  box-shadow: 0 0 0 4px #000, inset 4px 4px 0 rgba(255,255,255,.35), inset -4px -4px 0 rgba(0,0,0,.4);
  padding: 22px 20px;
}
:root[data-theme="mc"] .panel::before { display: none; }
:root[data-theme="mc"] .panel-title { text-shadow: 2px 2px 0 #3f3f3f; color: #fff; }
:root[data-theme="mc"] .panel-title .sub { color: #e6e6e6; text-shadow: 1px 1px 0 #000; }
:root[data-theme="mc"] .medal { border-radius: 0; border: 0; background: url(mc/planks.png) 0 0 / 30px 30px; box-shadow: 0 0 0 2px #000, inset 2px 2px 0 rgba(255,255,255,.3); color: #fff; }
:root[data-theme="mc"] .stat-icon, :root[data-theme="mc"] .stat-icon.alt { transform: none; border-radius: 0; border: 0; margin: 0; background: url(mc/dirt.png) 0 0 / 48px 48px; box-shadow: 0 0 0 3px #000, inset 3px 3px 0 rgba(255,255,255,.25); color: #fff; }
:root[data-theme="mc"] .stat-icon > .icon { transform: none; }
:root[data-theme="mc"] .stat-icon.alt { background-image: url(mc/planks.png); }
:root[data-theme="mc"] .stat .label, :root[data-theme="mc"] .fact .label { color: #e6e6e6; text-shadow: 1px 1px 0 #000; }
:root[data-theme="mc"] .stat strong, :root[data-theme="mc"] .fact strong, :root[data-theme="mc"] .fact strong.num { color: #fff; text-shadow: 3px 3px 0 #3f3f3f; font-weight: 700; }
:root[data-theme="mc"] .stat strong small { color: #e6e6e6; }
:root[data-theme="mc"] .live-card, :root[data-theme="mc"] .fact, :root[data-theme="mc"] .results a, :root[data-theme="mc"] .readout, :root[data-theme="mc"] .notice {
  border: 0; border-radius: 0; background: #8b8b8b;
  box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #ffffff;
}
:root[data-theme="mc"] .live-card, :root[data-theme="mc"] .fact, :root[data-theme="mc"] .results a, :root[data-theme="mc"] .readout { background: #4a4a52; box-shadow: inset 3px 3px 0 #202024, inset -3px -3px 0 #75757f; }
:root[data-theme="mc"] .live-card:hover { transform: none; box-shadow: inset 3px 3px 0 #202024, inset -3px -3px 0 #75757f, 0 0 0 3px #ffe066; }
:root[data-theme="mc"] .live-card .name { color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
:root[data-theme="mc"] .live-card .title { color: #e0e0e0; }
:root[data-theme="mc"] .live-card .avatar, :root[data-theme="mc"] .avatar { border-radius: 0; border: 0; box-shadow: 0 0 0 3px #000; }
:root[data-theme="mc"] .live-card .avatar-wrap::after { border-radius: 0; border: 2px solid #000; }
:root[data-theme="mc"] .avatar-fallback { background: url(mc/grass.png) 0 0 / 48px 48px; color: #fff; text-shadow: 2px 2px 0 #000; }
:root[data-theme="mc"] .tag { border-radius: 0; border: 0; background: #1e1e1e; color: #55d6ff; box-shadow: 0 0 0 2px #000; }
:root[data-theme="mc"] .tag.cat { color: #ffe066; background: #3a2c10; }
:root[data-theme="mc"] .button {
  border: 0; border-radius: 0; clip-path: none;
  background: #6f6f6f; color: #fff; text-shadow: 2px 2px 0 #3f3f3f; font-weight: 400;
  box-shadow: 0 0 0 3px #000, inset 3px 3px 0 #aaa, inset -3px -4px 0 #4a4a4a;
}
:root[data-theme="mc"] .button:hover { background: #7f8fd0; box-shadow: 0 0 0 3px #fff, inset 3px 3px 0 #b0bcff, inset -3px -4px 0 #4a5590; filter: none; transform: none; }
:root[data-theme="mc"] .search input { border: 0; border-radius: 0; background: #000; color: #fff; box-shadow: 0 0 0 3px #a0a0a0; font-family: inherit; }
:root[data-theme="mc"] .search-box .icon { color: #a0a0a0; }
:root[data-theme="mc"] .icon-button { border-radius: 0; border: 0; background: url(mc/planks.png) 0 0 / 42px 42px; box-shadow: 0 0 0 3px #000, inset 3px 3px 0 rgba(255,255,255,.3); color: #fff; }
:root[data-theme="mc"] .bars .name, :root[data-theme="mc"] .bars .count { color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
:root[data-theme="mc"] .bars .track { border: 0; border-radius: 0; height: 12px; background: #1e1e1e; box-shadow: 0 0 0 2px #000; }
:root[data-theme="mc"] .bars .fill { background: repeating-linear-gradient(90deg, #80ff20 0 18px, #4fbf10 18px 20px); box-shadow: none; }
:root[data-theme="mc"] .updated, :root[data-theme="mc"] footer { color: #e0e0e0; text-shadow: 1px 1px 0 #000; }
:root[data-theme="mc"] footer { border-top: 0; }
:root[data-theme="mc"] .kicker { color: #ffe066; text-shadow: 2px 2px 0 #3f3a14; letter-spacing: .12em; }
:root[data-theme="mc"] .player-info h1 { color: #fff; text-shadow: 3px 3px 0 #3f3f3f; }
:root[data-theme="mc"] .player-avatar svg.ring { display: none; }
:root[data-theme="mc"] .player-avatar .avatar { box-shadow: 0 0 0 4px #000, 0 0 0 8px #ffe066; }
:root[data-theme="mc"] .live-pill { border-radius: 0; border: 0; box-shadow: 0 0 0 2px #000; background: #ff5555; }
:root[data-theme="mc"] .title-badge { clip-path: none; border: 0; background: #1e1e1e; color: #ffe066; box-shadow: 0 0 0 2px #000; font-weight: 400; }
:root[data-theme="mc"] .title-badge .icon { color: #ffe066; }
:root[data-theme="mc"] .chip { border-radius: 0; border: 0; background: #1e1e1e; color: #ffe066; box-shadow: 0 0 0 2px #000; }
:root[data-theme="mc"] .gauge .g-track { stroke: #1e1e1e; }
:root[data-theme="mc"] .gauge .g-fill { stroke: #80ff20; filter: none; stroke-linecap: butt; }
:root[data-theme="mc"] .gauge .g-rim, :root[data-theme="mc"] .gauge .g-ticks { display: none; }
:root[data-theme="mc"] .gauge .g-value { fill: #fff; font-family: "Galmuri11"; }
:root[data-theme="mc"] .gauge .g-unit { fill: #ffe066; font-family: "Galmuri11"; }
:root[data-theme="mc"] .gauge .slot { color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
:root[data-theme="mc"] .gauge .note { color: #e6e6e6; text-shadow: 1px 1px 0 #000; }
:root[data-theme="mc"] .heatmap { color: #fff; gap: 2px; }
:root[data-theme="mc"] .heatmap .cell { border-radius: 0; background: #2a2a30; box-shadow: inset 2px 2px 0 rgba(0,0,0,.4); }
:root[data-theme="mc"] .heatmap .cell.l1, :root[data-theme="mc"] .legend .swatch.l1 { background: #3d6b22; }
:root[data-theme="mc"] .heatmap .cell.l2, :root[data-theme="mc"] .legend .swatch.l2 { background: #4f8f2a; }
:root[data-theme="mc"] .heatmap .cell.l3, :root[data-theme="mc"] .legend .swatch.l3 { background: #64b432; }
:root[data-theme="mc"] .heatmap .cell.l4, :root[data-theme="mc"] .legend .swatch.l4 { background: #80d83c; }
:root[data-theme="mc"] .heatmap .cell.l5, :root[data-theme="mc"] .legend .swatch.l5 { background: #a6ff5c; box-shadow: inset 2px 2px 0 rgba(255,255,255,.5), inset -2px -2px 0 rgba(0,0,0,.25); }
:root[data-theme="mc"] .heatmap .cell.now { outline: 3px solid #ffe066; }
:root[data-theme="mc"] .legend { color: #fff; text-shadow: 1px 1px 0 #000; }
:root[data-theme="mc"] .legend .swatch { border-radius: 0; }
:root[data-theme="mc"] .xp span { background: repeating-linear-gradient(90deg, #80ff20 0 18px, #4fbf10 18px 20px); }
/* 블록 테마 가독성: 픽셀 글꼴은 정해진 크기(Galmuri14 = 15px, Galmuri11 = 12px의 배수)에서만 또렷해서
   글자 크기를 그 값에 맞추고, 돌 질감 위에는 어두운 막을 깔아 글자와 배경의 대비를 높입니다. */
:root[data-theme="mc"] { --muted: #d2d2d2; --fg: #ffffff; }
:root[data-theme="mc"] body { font-family: "Galmuri14", "Galmuri11", monospace; font-size: 15px; line-height: 1.75; -webkit-font-smoothing: none; }
:root[data-theme="mc"] h1, :root[data-theme="mc"] h2, :root[data-theme="mc"] h3, :root[data-theme="mc"] .brand-name,
:root[data-theme="mc"] .button, :root[data-theme="mc"] .num, :root[data-theme="mc"] strong { font-family: "Galmuri11", monospace; font-weight: 700; }
:root[data-theme="mc"] .hero h1 { font-size: 36px; line-height: 1.4; }
@media (min-width: 640px) { :root[data-theme="mc"] .hero h1 { font-size: 48px; } }
:root[data-theme="mc"] .hero p { font-size: 15px; color: #fff; }
:root[data-theme="mc"] .brand-name { font-size: 24px; }
:root[data-theme="mc"] .brand-sub, :root[data-theme="mc"] .eyebrow, :root[data-theme="mc"] .kicker { font-family: "Galmuri11", monospace; font-size: 12px; }
:root[data-theme="mc"] .panel {
  background: linear-gradient(rgba(22, 22, 26, .72), rgba(22, 22, 26, .72)), url(mc/stone.png) 0 0 / 48px 48px;
  box-shadow: 0 0 0 4px #000, inset 4px 4px 0 rgba(255,255,255,.18), inset -4px -4px 0 rgba(0,0,0,.5);
}
:root[data-theme="mc"] .panel-title { font-size: 24px; line-height: 1.3; text-shadow: 2px 2px 0 #000; }
:root[data-theme="mc"] .panel-title .sub { font-family: "Galmuri14", monospace; font-size: 15px; font-weight: 400; color: var(--muted); text-shadow: none; }
:root[data-theme="mc"] .stat .label, :root[data-theme="mc"] .fact .label { font-size: 15px; color: var(--muted); text-shadow: none; }
:root[data-theme="mc"] .stat strong { font-size: 36px; text-shadow: 3px 3px 0 #000; }
:root[data-theme="mc"] .stat strong small { font-family: "Galmuri14", monospace; font-size: 15px; }
:root[data-theme="mc"] .fact strong { font-size: 24px; text-shadow: 2px 2px 0 #000; }
:root[data-theme="mc"] .live-card, :root[data-theme="mc"] .fact, :root[data-theme="mc"] .results a, :root[data-theme="mc"] .readout,
:root[data-theme="mc"] .notice, :root[data-theme="mc"] .discover-card, :root[data-theme="mc"] .steady a, :root[data-theme="mc"] .badge-card {
  border: 0; border-radius: 0; background: #1f1f24; box-shadow: inset 3px 3px 0 #0c0c0e, inset -3px -3px 0 #4a4a52;
}
:root[data-theme="mc"] .live-card .name, :root[data-theme="mc"] .results .name { font-family: "Galmuri11", monospace; font-size: 15px; text-shadow: none; }
:root[data-theme="mc"] .live-card .title { font-size: 15px; line-height: 1.6; color: #e8e8e8; }
:root[data-theme="mc"] .tag { font-family: "Galmuri11", monospace; font-size: 12px; padding: 2px 6px; background: #000; }
:root[data-theme="mc"] .tag.cat { background: #000; }
:root[data-theme="mc"] .bars .name, :root[data-theme="mc"] .bars .count { font-size: 15px; text-shadow: none; }
:root[data-theme="mc"] .updated, :root[data-theme="mc"] footer { font-size: 15px; text-shadow: none; color: var(--muted); }
:root[data-theme="mc"] footer { font-size: 12px; font-family: "Galmuri11", monospace; }
:root[data-theme="mc"] .search input { font-size: 15px; }
:root[data-theme="mc"] .button { font-size: 15px; }
:root[data-theme="mc"] .muted { color: var(--muted); }
:root[data-theme="mc"] .title-badge, :root[data-theme="mc"] .chip { font-family: "Galmuri11", monospace; font-size: 12px; background: #000; }
:root[data-theme="mc"] .player-info h1 { font-size: 36px; text-shadow: 3px 3px 0 #000; }
:root[data-theme="mc"] .gauge .slot { font-size: 15px; text-shadow: none; }
:root[data-theme="mc"] .gauge .note, :root[data-theme="mc"] .readout, :root[data-theme="mc"] .notice { font-size: 15px; text-shadow: none; color: #fff; }
:root[data-theme="mc"] .heatmap { font-size: 12px; }
:root[data-theme="mc"] .heatmap .hour-label, :root[data-theme="mc"] .heatmap .day-label { font-family: "Galmuri11", monospace; }
:root[data-theme="mc"] .legend { font-size: 12px; font-family: "Galmuri11", monospace; text-shadow: none; }

/* 블록 테마: 오늘의 발견·트렌드·업적 */
:root[data-theme="mc"] .discover-card { gap: 12px; }
:root[data-theme="mc"] .discover-card::after { opacity: .2; background: #55d6ff; }
:root[data-theme="mc"] .discover-card:hover, :root[data-theme="mc"] .steady a:hover { transform: none; box-shadow: inset 3px 3px 0 #0c0c0e, inset -3px -3px 0 #4a4a52, 0 0 0 3px #ffe066; }
:root[data-theme="mc"] .discover-card .avatar { border: 0; box-shadow: 0 0 0 3px #000, 0 0 0 6px #55d6ff; }
:root[data-theme="mc"] .discover-card .name { font-family: "Galmuri11", monospace; font-size: 15px; }
:root[data-theme="mc"] .discover-card .followers { font-size: 15px; color: var(--muted); }
:root[data-theme="mc"] .fact-chip { border: 0; border-radius: 0; background: #000; font-family: "Galmuri11", monospace; font-size: 12px; font-weight: 400; color: #fff; padding: 3px 8px; }
:root[data-theme="mc"] .fact-chip .icon { color: #55d6ff; }
:root[data-theme="mc"] .discover-card .quote { font-size: 15px; line-height: 1.6; }
:root[data-theme="mc"] .discover-card .quote .icon { color: #ffe066; }
:root[data-theme="mc"] .discover-card .go { font-family: "Galmuri11", monospace; font-size: 12px; color: #ffe066; }
:root[data-theme="mc"] .trend-col h3 { font-size: 15px; color: #ffe066; text-shadow: 2px 2px 0 #3f3a14; }
:root[data-theme="mc"] .rank-list li { border-radius: 0; }
:root[data-theme="mc"] .rank-list li:nth-child(odd) { background: rgba(0, 0, 0, .35); }
:root[data-theme="mc"] .rank-list .name { font-weight: 400; }
:root[data-theme="mc"] .rank-list .meta, :root[data-theme="mc"] .steady .info .meta { font-family: "Galmuri11", monospace; font-size: 12px; color: var(--muted); }
:root[data-theme="mc"] .rank { font-family: "Galmuri11", monospace; font-size: 15px; color: #fff; }
:root[data-theme="mc"] .rank .disc { stroke: #000; stroke-width: 2; }
:root[data-theme="mc"] .rank .rim { display: none; }
:root[data-theme="mc"] .rank text { font-family: "Galmuri11", monospace; font-size: 12px; }
:root[data-theme="mc"] .rank .ribbon { fill: #c03838; opacity: 1; }
:root[data-theme="mc"] .flag { border-radius: 0; font-family: "Galmuri11", monospace; font-size: 12px; font-weight: 400; }
:root[data-theme="mc"] .flag.new { background: #ff5555; box-shadow: 0 0 0 2px #000; }
:root[data-theme="mc"] .flag.up { color: #80ff20; border: 0; background: #000; }
:root[data-theme="mc"] .steady .avatar { box-shadow: 0 0 0 2px #000; }
:root[data-theme="mc"] .steady .info .name { font-family: "Galmuri11", monospace; font-size: 15px; }
:root[data-theme="mc"] .pips rect { rx: 0; fill: #000; }
:root[data-theme="mc"] .pips rect.on { fill: #80ff20; }
:root[data-theme="mc"] .badge-card.tier-1 { --b-hi: #d98a4e; --b-lo: #8a4b22; --b-edge: #000; }
:root[data-theme="mc"] .badge-card.tier-2 { --b-hi: #e6e6e6; --b-lo: #8b8b8b; --b-edge: #000; }
:root[data-theme="mc"] .badge-card.tier-3 { --b-hi: #ffe066; --b-lo: #c79a00; --b-edge: #000; box-shadow: inset 3px 3px 0 #0c0c0e, inset -3px -3px 0 #4a4a52, 0 0 0 3px #ffe066; }
:root[data-theme="mc"] .badge-card.tier-0 { --b-hi: #4a4a52; --b-lo: #2a2a30; --b-edge: #000; --b-ink: #9a9a9a; }
:root[data-theme="mc"] .emblem .e-body { stroke-width: 3; stroke-linejoin: miter; }
:root[data-theme="mc"] .emblem .e-inner { stroke: rgba(255, 255, 255, .35); stroke-width: 2; }
:root[data-theme="mc"] .emblem .gem { fill: #55d6ff; stroke: #000; }
:root[data-theme="mc"] .b-tier { font-family: "Galmuri11", monospace; font-size: 12px; letter-spacing: .05em; color: var(--b-hi); }
:root[data-theme="mc"] .tier-0 .b-tier { color: var(--muted); }
:root[data-theme="mc"] .b-name { font-size: 15px; }
:root[data-theme="mc"] .tier-0 .b-name { color: #bdbdbd; }
:root[data-theme="mc"] .b-desc { font-size: 15px; line-height: 1.5; color: var(--muted); }
:root[data-theme="mc"] .b-desc b { color: #fff; }
:root[data-theme="mc"] .b-next { font-family: "Galmuri11", monospace; font-size: 12px; color: var(--muted); }
:root[data-theme="mc"] .b-next.done { color: #ffe066; }
:root[data-theme="mc"] .b-bar { border-radius: 0; height: 8px; background: #000; box-shadow: 0 0 0 2px #000; }
:root[data-theme="mc"] .b-bar span { background: repeating-linear-gradient(90deg, #80ff20 0 10px, #4fbf10 10px 12px); }
:root[data-theme="mc"] .trend-note { font-size: 12px; font-family: "Galmuri11", monospace; }
/* 블록 테마: 메뉴·로그인·인기 랭킹·댓글 */
:root[data-theme="mc"] .nav-link { border-radius: 0; font-family: "Galmuri11", monospace; font-size: 12px; color: #d2d2d2; text-shadow: 1px 1px 0 #000; }
@media (min-width: 761px) { :root[data-theme="mc"] .nav-link { font-size: 15px; font-family: "Galmuri14", monospace; } }
:root[data-theme="mc"] .nav-link[aria-current="page"] { color: #ffe066; border: 0; background: #000; box-shadow: 0 0 0 2px #ffe066; }
:root[data-theme="mc"] .main-nav { border-color: #000; }
:root[data-theme="mc"] .account-button { border: 0; border-radius: 0; height: 38px; background: #6f6f6f; color: #fff; text-shadow: 2px 2px 0 #3f3f3f; box-shadow: 0 0 0 3px #000, inset 3px 3px 0 #aaa, inset -3px -3px 0 #4a4a4a; font-family: "Galmuri11", monospace; font-size: 12px; }
:root[data-theme="mc"] .account-menu, :root[data-theme="mc"] .login-dialog { border: 0; border-radius: 0; background: #c6c6c6; color: #3f3f3f; box-shadow: 0 0 0 4px #000, inset 4px 4px 0 #fff, inset -4px -4px 0 #555; }
:root[data-theme="mc"] .account-menu .muted, :root[data-theme="mc"] .account-menu .menu-foot, :root[data-theme="mc"] .login-dialog .dialog-close { color: #3f3f3f; }
:root[data-theme="mc"] .account-menu .who { border-color: #8b8b8b; }
:root[data-theme="mc"] .menu-item { border-radius: 0; color: #2a2a2a; }
:root[data-theme="mc"] .menu-item:hover { background: #a9a9a9; }
:root[data-theme="mc"] .menu-item.danger { color: #a01818; }
:root[data-theme="mc"] .login-dialog .panel-title { color: #3f3f3f; text-shadow: none; }
:root[data-theme="mc"] .login-button { border-radius: 0; box-shadow: 0 0 0 3px #000, inset 3px 3px 0 rgba(255,255,255,.35), inset -3px -3px 0 rgba(0,0,0,.3); font-family: "Galmuri11", monospace; font-size: 15px; text-shadow: 2px 2px 0 rgba(0,0,0,.4); }
:root[data-theme="mc"] .dialog-close { border-radius: 0; border: 0; box-shadow: 0 0 0 2px #000; background: #8b8b8b; color: #fff !important; }
:root[data-theme="mc"] .popular-row, :root[data-theme="mc"] .comment, :root[data-theme="mc"] .comment-login {
  border: 0; border-radius: 0; background: #1f1f24; box-shadow: inset 3px 3px 0 #0c0c0e, inset -3px -3px 0 #4a4a52;
}
:root[data-theme="mc"] .popular li:nth-child(-n+3) .popular-row, :root[data-theme="mc"] .comment.best { background: #2a2614; box-shadow: inset 3px 3px 0 #0c0c0e, inset -3px -3px 0 #4a4a52, 0 0 0 2px #ffe066; }
:root[data-theme="mc"] .popular-row:hover { transform: none; box-shadow: inset 3px 3px 0 #0c0c0e, inset -3px -3px 0 #4a4a52, 0 0 0 3px #ffe066; }
:root[data-theme="mc"] .popular-row .avatar, :root[data-theme="mc"] .comment .avatar { box-shadow: 0 0 0 2px #000; }
:root[data-theme="mc"] .popular-row .name, :root[data-theme="mc"] .c-name { font-family: "Galmuri11", monospace; font-size: 15px; }
:root[data-theme="mc"] .popular-row .meta, :root[data-theme="mc"] .c-head { font-family: "Galmuri11", monospace; font-size: 12px; color: var(--muted); }
:root[data-theme="mc"] .popular-row .score strong { font-size: 24px; color: #ffe066; text-shadow: 2px 2px 0 #3f3a14; }
:root[data-theme="mc"] .popular-row .score .unit { font-family: "Galmuri11", monospace; font-size: 12px; }
:root[data-theme="mc"] .pts { border-radius: 0; background: #5fd35f; color: #fff; text-shadow: 2px 2px 0 #2a5a2a; box-shadow: 0 0 0 2px #000, inset 2px 2px 0 rgba(255,255,255,.4); }
:root[data-theme="mc"] .score-rules .muted { font-size: 15px; }
:root[data-theme="mc"] .quick strong { font-size: 15px; }
:root[data-theme="mc"] .more-link { color: #ffe066; font-family: "Galmuri11", monospace; font-size: 12px; }
:root[data-theme="mc"] .hero.small h1 { font-size: 36px; }
:root[data-theme="mc"] .up-button { border: 0; border-radius: 0; height: 44px; background: #c03838; color: #fff; text-shadow: 2px 2px 0 #5a1414; font-family: "Galmuri11", monospace; font-size: 15px; letter-spacing: 0; box-shadow: 0 0 0 3px #000, inset 3px 3px 0 #ff7a7a, inset -3px -4px 0 #7a1c1c; }
:root[data-theme="mc"] .up-button:hover:not(:disabled) { transform: none; background: #d84848; }
:root[data-theme="mc"] .up-button.done { background: #3a3a42; color: #80ff20; text-shadow: none; box-shadow: 0 0 0 3px #000, inset 3px 3px 0 #55555f, inset -3px -4px 0 #202024; }
:root[data-theme="mc"] .up-stats { font-size: 15px; color: var(--muted); }
:root[data-theme="mc"] .score-chip { border: 0; border-radius: 0; background: #000; color: #ffe066; font-family: "Galmuri11", monospace; font-size: 12px; padding: 4px 8px; }
:root[data-theme="mc"] .comment-form textarea { border: 0; border-radius: 0; background: #000; color: #fff; box-shadow: 0 0 0 3px #a0a0a0; font-size: 15px; }
:root[data-theme="mc"] .comment-form textarea:focus { box-shadow: 0 0 0 3px #fff; }
:root[data-theme="mc"] .form-foot .counter, :root[data-theme="mc"] .small { font-family: "Galmuri11", monospace; font-size: 12px; }
:root[data-theme="mc"] .c-text { font-size: 15px; }
:root[data-theme="mc"] .c-up { border: 0; border-radius: 0; background: #000; color: #fff; box-shadow: 0 0 0 2px #555; font-family: "Galmuri11", monospace; font-size: 12px; }
:root[data-theme="mc"] .c-up.on { color: #ff5555; box-shadow: 0 0 0 2px #ff5555; }
:root[data-theme="mc"] .c-up .icon { color: #ff5555; }
:root[data-theme="mc"] .c-link { font-family: "Galmuri11", monospace; font-size: 12px; color: var(--muted); }
:root[data-theme="mc"] .best-mark { border-radius: 0; background: #ffe066; color: #3f3a14; font-family: "Galmuri11", monospace; }
:root[data-theme="mc"] .best-list { border-color: #000; }
:root[data-theme="mc"] .provider-mark { border-radius: 0; box-shadow: 0 0 0 1px #000; }
:root[data-theme="mc"] .share-button { border: 0; border-radius: 0; background: #6f6f6f; color: #fff; text-shadow: 2px 2px 0 #3f3f3f; box-shadow: 0 0 0 3px #000, inset 3px 3px 0 #aaa, inset -3px -3px 0 #4a4a4a; font-family: "Galmuri11", monospace; font-size: 12px; }
:root[data-theme="mc"] .share-button:hover { transform: none; background: #7f8fd0; }
:root[data-theme="mc"] .share-mark { border-radius: 0; box-shadow: 0 0 0 2px #000; text-shadow: none; }
:root[data-theme="mc"] .toast { border-radius: 0; background: #000; color: #fff; box-shadow: 0 0 0 3px #fff; font-family: "Galmuri11", monospace; font-weight: 400; }
:root[data-theme="mc"] .prose h2 { font-size: 24px; text-shadow: 2px 2px 0 #000; }
/* 블록 테마의 잔디 땅은 첫 화면에만 */
:root:not([data-theme="mc"]) .hero::after { content: none; }

/* ---------- 팔로워 성장 ---------- */
.steady.growth { grid-template-columns: minmax(0, 1fr); }
.steady.growth .flag { font-size: 0.78rem; padding: 1px 7px; }
.follower-chart-wrap { margin: 4px 0 10px; }
.follower-chart { display: block; width: 100%; height: auto; touch-action: pan-y; color: var(--accent); }
.fg-stop-top { stop-color: var(--accent); stop-opacity: 0.35; }
.fg-stop-bottom { stop-color: var(--accent); stop-opacity: 0; }
.fg-grid { stroke: var(--line-soft); stroke-dasharray: 3 5; }
.fg-axis { stroke: var(--line); }
.fg-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.fg-dot { fill: var(--card); stroke: var(--accent); stroke-width: 2; }
.fg-focus { fill: none; stroke: var(--accent-2); stroke-width: 2.5; pointer-events: none; }
.fg-days { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 0.8rem; color: var(--muted); }
.fg-days b { color: var(--fg); font-weight: 600; }
:root[data-theme="sf"] .fg-line { filter: drop-shadow(0 0 4px var(--accent)); }
:root[data-theme="sf"] .fg-focus { filter: drop-shadow(0 0 4px var(--accent-2)); }
:root[data-theme="mc"] .fg-line { stroke: #80ff20; stroke-width: 3; stroke-linejoin: miter; stroke-linecap: square; }
:root[data-theme="mc"] .fg-stop-top { stop-color: #80ff20; stop-opacity: 0.3; }
:root[data-theme="mc"] .fg-stop-bottom { stop-color: #80ff20; }
:root[data-theme="mc"] .fg-dot { fill: #000; stroke: #80ff20; }
:root[data-theme="mc"] .fg-focus { stroke: #ffe066; }
:root[data-theme="mc"] .fg-grid { stroke: rgba(255, 255, 255, 0.18); }
:root[data-theme="mc"] .fg-axis { stroke: rgba(255, 255, 255, 0.4); }
:root[data-theme="mc"] .fg-days { font-family: "Galmuri11", monospace; font-size: 12px; color: #ddd; }
:root[data-theme="mc"] .fg-days b { color: #fff; font-family: inherit; font-weight: 400; }

/* ---------- 광고 ---------- */
.ad-slot { display: grid; justify-items: center; gap: 4px; margin: 22px auto; max-width: 100%; overflow: hidden; }
.ad-label { font-size: 0.68rem; letter-spacing: 0.08em; color: var(--muted); }
.ad-slot ins { max-width: 100%; }
.ad-slot .adsbygoogle { width: 100%; min-height: 90px; }
:root[data-theme="mc"] .ad-label { font-family: "Galmuri11", monospace; font-size: 12px; color: #ddd; }
.ad-side { display: none; }
@media (min-width: 1320px) {
  .ad-side { display: grid; justify-items: center; gap: 4px; position: fixed; top: 110px; width: 160px; z-index: 1; }
  .ad-side.left { left: calc(50% - 460px - 24px - 160px); }
  .ad-side.right { right: calc(50% - 460px - 24px - 160px); }
}

/* ---------- 공유 카드 ---------- */
.share-card { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border: 1px solid var(--line); border-radius: 6px; background: #04070d; }
.share-panel .muted.small { margin: 10px 0 0; text-align: center; }
.share-panel .share-row { margin-top: 14px; }
.share-button.save .share-mark { background: var(--accent-2); }
:root[data-theme="sf"] .share-card { border-radius: 0; }
:root[data-theme="mc"] .share-card { border-radius: 0; border: 3px solid #000; image-rendering: auto; }

/* 홈: 방송 수 MAX 표시 */
.max-badge {
  display: inline-block; margin-left: 8px; padding: 2px 7px; vertical-align: 0.35em;
  font-family: var(--title-font); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em;
  color: var(--card); background: var(--accent-2); border-radius: 4px; transform: rotate(-6deg); text-shadow: none;
}
.stat-note { display: block; margin-top: 4px; font-size: 0.78rem; line-height: 1.45; color: var(--muted); }
:root[data-theme="sf"] .max-badge { border-radius: 0; box-shadow: 0 0 10px var(--accent-2); }
:root[data-theme="mc"] .max-badge { border-radius: 0; transform: none; text-shadow: none !important; font-family: "Galmuri11", monospace; font-weight: 400; font-size: 12px; color: #000; background: #ffe066; box-shadow: 0 0 0 2px #000; }
:root[data-theme="mc"] .stat-note { font-size: 12px; font-family: "Galmuri11", monospace; color: #ddd; }

/* 홈: 오늘 시청 흐름 */
.flow-chart { display: block; width: 100%; height: auto; touch-action: pan-y; }
.flow-yesterday { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 5 5; opacity: 0.7; }
.flow-hours { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.78rem; color: var(--muted); }
.flow-key { display: inline-flex; align-items: center; gap: 6px; }
.flow-key::before { content: ""; width: 18px; border-top: 3px solid var(--accent); }
.flow-key.yesterday::before { border-top: 2px dashed var(--muted); }
:root[data-theme="mc"] .flow-hours { font-family: "Galmuri11", monospace; font-size: 12px; color: #ddd; }
:root[data-theme="mc"] .flow-key::before { border-top-color: #80ff20; }
:root[data-theme="mc"] .flow-yesterday { stroke: #ccc; }

/* 홈: 생활기록부 검색을 크게 */
.search-feature {
  margin-top: 8px; padding: 30px 28px 26px; text-align: center;
  border-color: var(--accent);
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    var(--card);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 18px 40px -22px var(--glow);
}
.search-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.search-badge .icon { width: 15px; height: 15px; }
.search-feature h2 { margin: 14px 0 8px; font-size: clamp(1.45rem, 4.6vw, 2.1rem); line-height: 1.3; }
.search-feature > p.muted { margin: 0 auto 20px; max-width: 32em; }
.search-feature .search { max-width: 640px; margin: 0 auto; }
.search.big input { height: 60px; font-size: 1.08rem; padding-left: 50px; border-color: var(--accent); }
.search.big .search-box .icon { left: 18px; width: 22px; height: 22px; }
.search.big .button { height: 60px; padding: 0 28px; font-size: 1.05rem; }
.search-feature .results { max-width: 640px; margin-left: auto; margin-right: auto; text-align: left; }
.search-try { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 18px auto 0; max-width: 640px; }
.search-try > .muted { width: 100%; font-size: 0.82rem; }
.try-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 5px 12px 5px 5px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card-2);
  color: inherit; text-decoration: none; font-size: 0.88rem; font-weight: 600;
  transition: border-color .15s, transform .15s;
}
.try-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.try-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.try-chip .avatar { width: 28px; height: 28px; font-size: 0.8rem; }
.br-mobile { display: none; }
@media (max-width: 620px) {
  .search-feature { padding: 24px 16px 20px; }
  .br-mobile { display: inline; }
  .search.big input { height: 54px; font-size: 1rem; }
  .search.big .button { height: 54px; padding: 0 18px; }
}
:root[data-theme="sf"] .search-feature { border-radius: 0; }
:root[data-theme="sf"] .search-badge, :root[data-theme="sf"] .try-chip { border-radius: 0; }
:root[data-theme="sf"] .search.big input:focus { box-shadow: 0 0 0 3px var(--glow), 0 0 24px -4px var(--accent); }
:root[data-theme="mc"] .search-feature { background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.35)), url(mc/stone.png) 0 0 / 48px 48px; box-shadow: 0 0 0 4px #000, 0 0 0 7px #ffe066, inset 4px 4px 0 rgba(255,255,255,.35), inset -4px -4px 0 rgba(0,0,0,.4); }
:root[data-theme="mc"] .search-badge { border-radius: 0; border: 0; background: #ffe066; color: #000; box-shadow: 0 0 0 3px #000; font-family: "Galmuri11", monospace; font-weight: 400; font-size: 12px; }
:root[data-theme="mc"] .search-feature h2 { text-shadow: 3px 3px 0 #000; }
:root[data-theme="mc"] .search.big input { box-shadow: 0 0 0 3px #ffe066; }
:root[data-theme="mc"] .try-chip { border-radius: 0; border: 0; background: #4a4a52; box-shadow: 0 0 0 2px #000, inset 2px 2px 0 #75757f; }
:root[data-theme="mc"] .search-try > .muted { font-family: "Galmuri11", monospace; font-size: 12px; color: #ddd; }

/* 짧은 안내 문장은 줄 길이를 고르게 */
h1, h2, h3, .hero p, .search-feature > p, .muted, .stat-note { text-wrap: balance; }

/* 짧은 안내 문장은 줄 길이를 고르게 */
h1, h2, h3, .hero p, .search-feature > p, .muted, .stat-note { text-wrap: balance; }

/* 생활기록부: 방송국·나무위키 바로가기 배지 */
.link-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.link-badge {
  --lb: var(--accent);
  display: inline-flex; align-items: stretch; max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--lb) 70%, transparent); border-radius: 999px; overflow: hidden;
  color: inherit; text-decoration: none; font-size: 0.84rem; line-height: 1; white-space: nowrap;
  box-shadow: 0 4px 14px -8px var(--lb);
  transition: transform .15s, box-shadow .15s;
}
.link-badge:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px var(--lb); }
.link-badge.wiki { --lb: var(--accent-2); }
.link-badge.live { --lb: var(--live); }
.lb-key {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px 8px 12px;
  background: var(--lb); color: var(--on-accent); font-family: var(--title-font); font-weight: 700;
}
.lb-key .icon { width: 17px; height: 17px; }
.lb-value {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 8px 10px;
  background: color-mix(in srgb, var(--lb) 12%, var(--card-2)); font-weight: 600;
}
.lb-out { width: 13px; height: 13px; opacity: 0.7; }
.link-badge.live .lb-key { color: #fff; }
.link-badge.live .lb-key .icon { animation: lb-pulse 1.6s ease-in-out infinite; }
@keyframes lb-pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .link-badge.live .lb-key .icon { animation: none; } }
:root[data-theme="sf"] .link-badge { border-radius: 0; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); border: 0; }
:root[data-theme="sf"] .lb-key { padding-left: 16px; }
:root[data-theme="sf"] .lb-value { padding-right: 18px; }
/* 밝은 분홍 바탕 위 흰 글씨는 대비가 부족해서(3.4:1) 어두운 글씨로 */
:root[data-theme="sf"] .link-badge.live .lb-key { color: #1a0008; }
:root[data-theme="mc"] .link-badge { border: 0; border-radius: 0; overflow: visible; box-shadow: 0 0 0 3px #000; font-size: 15px; }
:root[data-theme="mc"] .lb-key { text-shadow: none; font-weight: 400; color: #000; background: #ffe066; box-shadow: inset 2px 2px 0 rgba(255,255,255,.5), inset -2px -2px 0 rgba(0,0,0,.25); }
:root[data-theme="mc"] .link-badge.wiki .lb-key { background: #55d6ff; }
:root[data-theme="mc"] .link-badge.live .lb-key { background: #d32f2f; color: #fff; text-shadow: none; }
:root[data-theme="mc"] .lb-value { background: #4a4a52; color: #fff; box-shadow: inset 2px 2px 0 #75757f, inset -2px -2px 0 #202024; }
/* 생활기록부 프로필: 왼쪽은 누구인지(사진·이름·칭호), 오른쪽은 할 수 있는 것(바로가기·Up) */
.player-panel { padding-top: 26px; padding-bottom: 26px; }
.player { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px 28px; }
.player-info h1 { margin: 4px 0 0; }
.titles { gap: 6px; margin-top: 12px; }
.title-badge { padding: 2px 12px 2px 9px; font-size: 0.78rem; font-weight: 600; }
.title-badge .icon { width: 11px; height: 11px; }
.player-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; max-width: 340px; }
.player-actions .up-box { margin-top: 0; justify-content: flex-end; }

.link-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.link-badge {
  --lb: var(--accent);
  display: inline-flex; align-items: stretch; white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--lb) 70%, transparent); border-radius: 999px; overflow: hidden;
  color: inherit; text-decoration: none; font-size: 0.8rem; line-height: 1;
  transition: transform .15s, box-shadow .15s;
}
.link-badge:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -8px var(--lb); }
.link-badge.wiki { --lb: var(--accent-2); }
.link-badge.live { --lb: var(--live); }
.lb-key {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px 7px 11px;
  background: var(--lb); color: var(--on-accent); font-family: var(--title-font); font-weight: 700;
}
.link-badge.live .lb-key { color: #fff; }
.lb-key .icon { width: 15px; height: 15px; }
.lb-tail {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 9px;
  background: color-mix(in srgb, var(--lb) 12%, var(--card-2));
}
.lb-out { width: 12px; height: 12px; color: var(--muted); }
.link-badge:hover .lb-out { color: var(--fg); }
.lb-state { display: inline-flex; align-items: center; gap: 5px; font-family: var(--rune-font); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; }
.lb-lamp { width: 9px; height: 9px; }
.lb-state.on { color: var(--fg); }
.lb-state.on .lb-lamp circle { fill: var(--live); }
.lb-state.on .lb-lamp { filter: drop-shadow(0 0 4px var(--live)); animation: lb-pulse 1.6s ease-in-out infinite; }
.lb-state.off { color: var(--muted); }
.lb-state.off .lb-lamp circle { fill: none; stroke: currentColor; stroke-width: 1.6; }
@keyframes lb-pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .lb-state.on .lb-lamp { animation: none; } }
:root[data-theme="sf"] .link-badge { border-radius: 0; border: 0; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
:root[data-theme="sf"] .lb-key { padding-left: 14px; }
:root[data-theme="sf"] .lb-tail { padding-right: 15px; }
:root[data-theme="mc"] .link-badge { border: 0; border-radius: 0; overflow: visible; box-shadow: 0 0 0 3px #000; font-size: 14px; }
:root[data-theme="mc"] .lb-key { text-shadow: none; font-weight: 400; color: #000; background: #ffe066; box-shadow: inset 2px 2px 0 rgba(255,255,255,.5), inset -2px -2px 0 rgba(0,0,0,.25); }
:root[data-theme="mc"] .link-badge.wiki .lb-key { background: #55d6ff; }
:root[data-theme="mc"] .link-badge.live .lb-key { background: #d32f2f; color: #fff; }
:root[data-theme="mc"] .lb-tail { background: #4a4a52; color: #fff; box-shadow: inset 2px 2px 0 #75757f, inset -2px -2px 0 #202024; }
:root[data-theme="mc"] .lb-state { font-family: "Galmuri11", monospace; font-size: 12px; font-weight: 400; }
:root[data-theme="mc"] .lb-state.on { color: #fff; }
:root[data-theme="mc"] .lb-state.off { color: #ccc; }

/* 중간 화면: 바로가기·Up을 이름 아래 한 줄로 */
@media (max-width: 900px) {
  .player { grid-template-columns: auto minmax(0, 1fr); }
  .player-actions { grid-column: 1 / -1; max-width: none; flex-direction: row; flex-wrap: wrap-reverse; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px dashed var(--line); }
  .player-actions .up-box { justify-content: flex-start; }
}
/* 좁은 화면: 사진을 줄이고 이름 옆에 */
@media (max-width: 620px) {
  .player { gap: 16px 16px; }
  .player-avatar, .player-avatar .avatar { width: 64px; height: 64px; font-size: 1.6rem; }
  .player-avatar svg.ring { inset: -8px; width: 80px; height: 80px; }
  .player-info h1 { font-size: 1.45rem; }
  .player-actions { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .player-actions .up-box { justify-content: space-between; }
  .link-badges { justify-content: flex-start; }
}

/* 업적 배지: 진행률 순 + 펼쳐보기 */
.badge-meter { height: 6px; margin: -4px 0 16px; border-radius: 3px; background: var(--cell-empty); overflow: hidden; }
.badge-meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.badges.collapsed .badge-card.extra { display: none; }
.b-steps { color: var(--muted); font-weight: 500; }
.more-toggle {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 14px; padding: 11px;
  border: 1px dashed var(--line); border-radius: 6px; background: transparent; color: var(--accent-ink);
  font: inherit; font-weight: 700; cursor: pointer; transition: border-color .15s, background .15s;
}
.more-toggle:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.more-toggle .chevron { width: 16px; height: 16px; transform: rotate(90deg); transition: transform .2s; }
.more-toggle[aria-expanded="true"] .chevron { transform: rotate(-90deg); }
:root[data-theme="sf"] .badge-meter, :root[data-theme="sf"] .more-toggle { border-radius: 0; }
:root[data-theme="mc"] .badge-meter { border-radius: 0; height: 10px; background: #000; box-shadow: 0 0 0 2px #000; }
:root[data-theme="mc"] .badge-meter span { background: #80ff20; }
:root[data-theme="mc"] .more-toggle { border: 0; border-radius: 0; background: #4a4a52; color: #fff; box-shadow: 0 0 0 3px #000, inset 3px 3px 0 #75757f, inset -3px -3px 0 #202024; }

/* 칭호 */
.title-badge.rarity-2 { border-color: color-mix(in srgb, #8fd3ff 70%, var(--accent)); }
.title-badge.rarity-3 { border-color: #d9a943; background: linear-gradient(180deg, color-mix(in srgb, #ffd56a 26%, var(--card)), var(--card-2)); }
.title-badge.rarity-3 .icon { color: #d9a943; }
.title-badge.more { text-decoration: none; padding: 3px 12px; color: var(--muted); border-color: var(--line); }
.title-badge.more:hover { color: var(--accent-ink); border-color: var(--accent); }
.title-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.title-grid.locked-grid { margin-top: 10px; }
.title-grid.collapsed { display: none; }
.title-card { --t-c: var(--accent); display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 6px; background: var(--card-2); border: 1px solid var(--line-soft); }
.title-card.rarity-2 { --t-c: #4fb3e8; }
.title-card.rarity-3 { --t-c: #d9a943; }
.title-card.earned { border-color: color-mix(in srgb, var(--t-c) 55%, var(--line-soft)); background: linear-gradient(135deg, color-mix(in srgb, var(--t-c) 14%, var(--card-2)), var(--card-2) 70%); }
.title-card.earned.rarity-3 { box-shadow: 0 0 18px -8px color-mix(in srgb, var(--t-c) 90%, transparent); }
.title-card.locked { opacity: .62; }
.t-mark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; color: var(--t-c); background: color-mix(in srgb, var(--t-c) 14%, transparent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.locked .t-mark { color: var(--muted); background: var(--cell-empty); }
.t-mark .icon { width: 16px; height: 16px; }
.t-body { min-width: 0; display: grid; gap: 1px; }
.t-rarity { font-family: var(--rune-font); font-size: 0.66rem; font-weight: 700; letter-spacing: .12em; color: var(--t-c); }
.locked .t-rarity { color: var(--muted); }
.t-name { font-family: var(--title-font); font-size: 0.98rem; line-height: 1.3; }
.t-cond { font-size: 0.76rem; color: var(--muted); }
.panel-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.panel-foot .more-toggle { margin: 0; }
.panel-foot .more-link { margin: 0 0 0 auto; }
:root[data-theme="sf"] .title-card, :root[data-theme="sf"] .catalog-steps li { border-radius: 0; }
:root[data-theme="sf"] .title-card.rarity-2 { --t-c: #38dcff; }
:root[data-theme="sf"] .title-card.rarity-1 { --t-c: #b26bff; }
:root[data-theme="mc"] .title-card { border: 0; border-radius: 0; background: #2a2a30; box-shadow: 0 0 0 3px #000, inset 3px 3px 0 #3c3c44, inset -3px -3px 0 #1a1a1e; }
:root[data-theme="mc"] .title-card.earned { background: #34343c; }
:root[data-theme="mc"] .title-card.rarity-3.earned { box-shadow: 0 0 0 3px #ffe066, inset 3px 3px 0 #3c3c44, inset -3px -3px 0 #1a1a1e; }
:root[data-theme="mc"] .t-name, :root[data-theme="mc"] .t-rarity { font-family: "Galmuri11", monospace; }
:root[data-theme="mc"] .t-mark { clip-path: none; box-shadow: 0 0 0 2px #000; }
:root[data-theme="mc"] .title-badge.rarity-3 { color: #ffe066; box-shadow: 0 0 0 2px #c79a00; }

/* 배지·칭호 도감 */
.catalog-badges { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.catalog-badges .badge-card { align-items: flex-start; }
.catalog-steps { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.catalog-steps li { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; padding: 3px 8px; border-radius: 4px; background: color-mix(in srgb, var(--s-c) 12%, transparent); }
.catalog-steps .s-tier { font-family: var(--rune-font); font-size: 0.64rem; font-weight: 700; letter-spacing: .1em; color: var(--s-c); min-width: 3.2em; }
.catalog-steps .s-name { font-weight: 700; flex: 1; min-width: 0; }
.catalog-steps .s-goal { color: var(--muted); white-space: nowrap; }
.catalog-steps .step-1 { --s-c: #c47a43; }
.catalog-steps .step-2 { --s-c: #8b95a1; }
.catalog-steps .step-3 { --s-c: #c79a00; }
:root[data-theme="mc"] .catalog-steps .step-1 { --s-c: #d9955f; } /* 어두운 돌 바탕에서 글씨가 잘 보이게 */
.catalog-group + .catalog-group { margin-top: 18px; }
.catalog-group h3 { margin: 0 0 10px; font-family: var(--title-font); font-size: 1rem; }
.catalog-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.catalog-count { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.catalog-count .chip-stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-weight: 700; }
.catalog-count .chip-stat strong { font-size: 1.2rem; color: var(--accent-ink); }
:root[data-theme="mc"] .catalog-count .chip-stat { border: 0; border-radius: 0; background: #000; box-shadow: 0 0 0 2px #4a4a52; font-family: "Galmuri11", monospace; }
:root[data-theme="sf"] .catalog-count .chip-stat { border-radius: 0; }

/* 홈: 도감 미리보기 */
.codex-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.codex-copy p { margin: 6px 0 0; }
.codex-emblems { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.codex-emblems .badge-card { padding: 0; background: none; border: 0; box-shadow: none; }
.codex-emblems .emblem { width: 48px; height: 48px; }
.codex-titles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.codex-panel .button { white-space: nowrap; text-decoration: none; }
@media (max-width: 620px) {
  .codex-panel { grid-template-columns: 1fr; }
  .codex-emblems .badge-card:nth-child(n+7) { display: none; }
  .codex-panel .button { justify-self: stretch; text-align: center; justify-content: center; }
}
:root[data-theme="mc"] .codex-emblems .badge-card { box-shadow: none; background: none; }

/* 관련 쇼츠·클립 */
.clips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px 18px; }
.clip { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.clip-thumb { position: relative; display: block; color: inherit; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card-2); cursor: pointer; }
.clip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-play { position: absolute; left: 50%; top: 50%; width: 52px; height: 36px; margin: -18px 0 0 -26px; border-radius: 10px; background: rgba(0, 0, 0, 0.62); transition: background 0.15s; }
.clip-play::after { content: ""; position: absolute; left: 21px; top: 10px; border-style: solid; border-width: 8px 0 8px 14px; border-color: transparent transparent transparent #fff; }
.clip-thumb:hover .clip-play, .clip-thumb:focus-visible .clip-play { background: var(--live); }
.clip-title { color: inherit; text-decoration: none; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clip-title:hover { text-decoration: underline; }
.clip-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.clip-meta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root[data-theme="sf"] .clip-thumb, :root[data-theme="mc"] .clip-thumb { border-radius: 0; }
.clips-panel .rules { margin: 14px 0 0; }
.clip-meta .c-link { flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; }

/* 클립 크게 보기 */
.flip { display: inline-flex; transform: scaleX(-1); }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; }
.back-link:hover { color: var(--fg); }
.back-link .icon { width: 16px; height: 16px; }
.clip-stage { padding-top: 18px; }
.clip-player { width: 100%; max-width: 1040px; margin: 0 auto; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.clip-player iframe, .clip-player > div { display: block; width: 100%; height: 100%; border: 0; }
.clip-heading { font-size: clamp(1.15rem, 3vw, 1.5rem); line-height: 1.4; margin: 18px 0 6px; }
.clip-info { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.clip-controls { display: flex; gap: 12px; margin-top: 18px; }
.clip-nav { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--card-2); color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; }
.clip-nav:hover:not(:disabled) { border-color: var(--accent); }
.clip-nav:disabled { opacity: 0.4; cursor: default; }
.clip-nav .icon { width: 16px; height: 16px; }
.clip-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 16px 0 6px; }
.clip-tools .c-link { display: inline-flex; align-items: center; gap: 4px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9rem; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--line); transition: background .15s; flex-shrink: 0; }
.switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.clip-stage .keys { margin: 12px 0 0; }
@media (pointer: coarse) { .clip-stage .keys { display: none; } }
.clip-picks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.clip-pick { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.clip-pick-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card-2); }
.clip-pick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-pick.on .clip-pick-thumb { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.clip-pick .now-playing { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 4px; background: var(--accent); color: var(--on-accent); font-size: 0.75rem; font-weight: 700; }
.clip-pick-title { font-size: 0.9rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clip-pick:hover .clip-pick-title { text-decoration: underline; }
:root[data-theme="sf"] .clip-player, :root[data-theme="sf"] .clip-nav, :root[data-theme="sf"] .clip-pick-thumb,
:root[data-theme="mc"] .clip-player, :root[data-theme="mc"] .clip-nav, :root[data-theme="mc"] .clip-pick-thumb { border-radius: 0; }
@media (max-width: 680px) { .clip-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* 목록 찾기·정렬 (지금 방송, 게임) */
.list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.filter-row { flex: 1 1 260px; min-width: 0; }
.filter-row:empty { display: none; }
.filter-box { position: relative; display: block; }
.filter-box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.filter-input { width: 100%; box-sizing: border-box; padding: 11px 14px 11px 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--card-2); color: var(--fg); font: inherit; font-size: 0.95rem; }
.filter-input::placeholder { color: var(--muted); }
.filter-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
#lives-filter { margin-bottom: 16px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card-2); }
.seg button { padding: 9px 14px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
#games-sub { margin: 14px 0 16px; }
.panel-title .sub .link, .panel-title .sub.link { color: var(--accent-ink); }

/* 게임 카드 (포스터) */
.game-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 22px 18px; }
.game-card { display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; height: 100%; }
.game-cover { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--card-2); transition: transform .15s, border-color .15s, box-shadow .15s; }
.game-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-cover.no-poster { background: linear-gradient(150deg, hsl(var(--hue) 55% 38%), hsl(calc(var(--hue) + 40) 50% 18%)); display: grid; place-items: center; }
.game-cover .initial { font-family: var(--title-font); font-size: 2.6rem; font-weight: 700; color: rgba(255, 255, 255, .92); text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.game-card:hover .game-cover, .game-card:focus-visible .game-cover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 22%, transparent); }
.game-body { display: grid; gap: 3px; min-width: 0; }
.game-name { font-family: var(--title-font); font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.game-card:hover .game-name { color: var(--accent-ink); }
.game-meta { font-size: 0.8rem; color: var(--muted); }
.game-faces { display: flex; margin-top: 4px; }
.game-faces .avatar { width: 26px; height: 26px; border: 2px solid var(--card); }
.game-faces .avatar + .avatar { margin-left: -8px; }
@media (max-width: 560px) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 9px 6px; }
}

/* 지금 방송의 카테고리 막대 → 게임 페이지 링크 */
.bar-link { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; color: inherit; text-decoration: none; border-radius: 4px; }
.bar-link:hover .name { color: var(--accent-ink); text-decoration: underline; }
.bars li:has(> .bar-link) { display: block; }

/* 맨 위로 */
.to-top { position: fixed; right: 18px; bottom: 22px; z-index: 40; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--fg); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); cursor: pointer; }
.to-top[hidden] { display: none; }
.to-top:hover { border-color: var(--accent); color: var(--accent-ink); }
.to-top .icon { width: 18px; height: 18px; }
.flip-up { display: inline-flex; transform: rotate(-90deg); }

/* 게임 상세 */
.game-head { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: center; }
.game-cover.big { border-radius: 12px; }
.game-head-body h1 { margin: 6px 0 14px; font-size: clamp(1.6rem, 4.5vw, 2.3rem); line-height: 1.25; }
.game-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 18px; color: var(--muted); }
.game-stats strong { color: var(--accent-ink); font-size: 1.35rem; margin-right: 3px; }
@media (max-width: 560px) {
  .game-head { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .game-cover.big { width: 132px; }
  .game-stats strong { font-size: 1.1rem; }
}
.hours-chart { display: block; width: 100%; height: auto; }
.hours-chart .bar { fill: color-mix(in srgb, var(--accent) 42%, var(--card-2)); cursor: pointer; transition: fill .12s; }
.hours-chart .bar:hover { fill: var(--accent-hi, var(--accent)); }
.hours-chart .bar.peak { fill: var(--accent); }
.hours-chart .bar.now { stroke: var(--accent-2); stroke-width: 2; }
.hours-chart .axis { fill: var(--muted); font-size: 12px; }
.hours-chart + .readout { margin-top: 12px; }
.streamers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px 14px; }
.streamer { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card-2); color: inherit; text-decoration: none; transition: border-color .15s; }
.streamer:hover { border-color: var(--accent); }
.streamer .avatar { width: 42px; height: 42px; }
.streamer .info { display: grid; min-width: 0; }
.streamer .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.streamer .meta { font-size: 0.78rem; color: var(--muted); }

/* 주간 리포트 */
.week-nav { display: flex; align-items: stretch; gap: 10px; margin-top: 8px; }
.week-nav .clip-nav { flex: 0 0 auto; padding: 10px 16px; }
.week-select { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--card-2); color: var(--fg); font: inherit; font-weight: 700; text-align: center; cursor: pointer; }
.week-select:focus { outline: none; border-color: var(--accent); }
.week-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.week-stats .stat { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line-soft, var(--line)); border-radius: 8px; background: var(--card-2); }
.week-stats .stat strong { font-size: 1.6rem; }
.grid-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-even > * { margin-top: 0 !important; }
@media (max-width: 760px) { .grid-even { grid-template-columns: 1fr; } .grid-even > * + * { margin-top: 18px !important; } }
.game-rows { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 14px; }
.game-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card-2); color: inherit; text-decoration: none; transition: border-color .15s; }
.game-row:hover { border-color: var(--accent); }
.game-cover.mini { width: 42px; flex: none; border-radius: 5px; }
.game-cover.mini .initial { font-size: 1.1rem; }
.game-row .info { flex: 1; min-width: 0; display: grid; }
.game-row .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-row .meta { font-size: 0.78rem; color: var(--muted); }
.rank-list a.name { color: inherit; text-decoration: none; }
.rank-list a.name:hover { color: var(--accent-ink); text-decoration: underline; }
@media (max-width: 560px) { .week-nav .clip-nav { padding: 10px; font-size: 0.85rem; } .game-rows { grid-template-columns: 1fr; } }

:root[data-theme="sf"] .filter-input, :root[data-theme="sf"] .seg, :root[data-theme="sf"] .game-cover, :root[data-theme="sf"] .streamer, :root[data-theme="sf"] .week-select,
:root[data-theme="sf"] .week-stats .stat, :root[data-theme="sf"] .game-row, :root[data-theme="sf"] .to-top { border-radius: 0; }
:root[data-theme="sf"] .game-card:hover .game-cover { box-shadow: 0 0 0 1px var(--accent), 0 0 18px var(--glow); }
:root[data-theme="mc"] .filter-input, :root[data-theme="mc"] .seg, :root[data-theme="mc"] .game-cover, :root[data-theme="mc"] .streamer, :root[data-theme="mc"] .week-select,
:root[data-theme="mc"] .week-stats .stat, :root[data-theme="mc"] .game-row, :root[data-theme="mc"] .to-top, :root[data-theme="mc"] .bar-link { border-radius: 0; }
:root[data-theme="mc"] .game-cover { border: 0; box-shadow: 0 0 0 3px #000, inset 0 0 0 2px rgba(255, 255, 255, .15); }
:root[data-theme="mc"] .game-card:hover .game-cover { transform: none; box-shadow: 0 0 0 3px #ffe066; }
:root[data-theme="mc"] .streamer, :root[data-theme="mc"] .game-row, :root[data-theme="mc"] .week-stats .stat { border: 0; background: #4a4a52; box-shadow: inset 3px 3px 0 #202024, inset -3px -3px 0 #75757f; }
:root[data-theme="mc"] .streamer:hover, :root[data-theme="mc"] .game-row:hover { box-shadow: inset 3px 3px 0 #202024, inset -3px -3px 0 #75757f, 0 0 0 3px #ffe066; }
:root[data-theme="mc"] .game-name, :root[data-theme="mc"] .streamer .name, :root[data-theme="mc"] .game-row .name { font-family: "Galmuri11", monospace; font-weight: 400; }
:root[data-theme="mc"] .game-meta, :root[data-theme="mc"] .streamer .meta, :root[data-theme="mc"] .game-row .meta { font-family: "Galmuri11", monospace; font-size: 12px; }
:root[data-theme="mc"] .seg button[aria-pressed="true"] { background: #3c8527; color: #fff; }
:root[data-theme="mc"] .hours-chart .bar { fill: #5a5a62; }
:root[data-theme="mc"] .hours-chart .bar.peak { fill: #80ff20; }
:root[data-theme="mc"] .hours-chart .axis { font-family: "Galmuri11", monospace; }
.more-toggle[hidden] { display: none; }
.game-head .share-row { justify-content: flex-start; margin-top: 0; }
.game-head .share-row .muted { text-align: left; }
