/* IdleNest — design system
   Tight type scale, quiet surfaces, one accent. */

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #efece4;
  --ink: #15140f;
  --ink-2: #4a473f;
  --ink-3: #7a766b;
  --line: #e2ded3;
  --accent: #d8461f;
  --accent-ink: #ffffff;
  --accent-soft: #fbe6de;
  --good: #1f7a4d;
  --good-soft: #dff1e6;
  --warn: #b7791f;
  --warn-soft: #f8edd6;
  --bad: #c0392b;
  --bad-soft: #f8e0dd;
  --focus: #1d4ed8;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow: 0 1px 2px rgba(20, 18, 12, .06), 0 4px 16px rgba(20, 18, 12, .05);
  --shadow-lift: 0 2px 4px rgba(20, 18, 12, .06), 0 12px 28px rgba(20, 18, 12, .09);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --t-xs: .75rem;
  --t-sm: .875rem;
  --t-base: 1rem;
  --t-md: 1.125rem;
  --t-lg: 1.375rem;
  --t-xl: 1.75rem;
  --t-2xl: 2.25rem;
  --t-3xl: clamp(2.25rem, 5vw, 3.25rem);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11110f; --surface: #1a1916; --surface-2: #24231f; --ink: #f2efe8; --ink-2: #c9c5ba;
    --ink-3: #8f8b80; --line: #2f2d28; --accent: #f06a43; --accent-ink: #160b07; --accent-soft: #3a1d14;
    --good: #4cc38a; --good-soft: #15301f; --warn: #e3b25a; --warn-soft: #33270f; --bad: #ef6b5e; --bad-soft: #3a1915;
    --focus: #8ab4ff; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lift: 0 10px 28px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11110f; --surface: #1a1916; --surface-2: #24231f; --ink: #f2efe8; --ink-2: #c9c5ba;
  --ink-3: #8f8b80; --line: #2f2d28; --accent: #f06a43; --accent-ink: #160b07; --accent-soft: #3a1d14;
  --good: #4cc38a; --good-soft: #15301f; --warn: #e3b25a; --warn-soft: #33270f; --bad: #ef6b5e; --bad-soft: #3a1915;
  --focus: #8ab4ff; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lift: 0 10px 28px rgba(0,0,0,.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: var(--t-base); line-height: 1.55; -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: var(--t-3xl); letter-spacing: -0.03em; }
h2 { font-size: var(--t-xl); letter-spacing: -0.02em; }
h3 { font-size: var(--t-md); }
p { margin: 0 0 1em; }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand svg { width: 28px; height: 28px; }
.nav { display: none; gap: 4px; margin-left: 12px; }
.nav a { text-decoration: none; padding: 7px 12px; border-radius: 999px; color: var(--ink-2); font-size: var(--t-sm); font-weight: 600; transition: background .2s var(--ease), color .2s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.header-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.96); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: inline-grid; }
@media (min-width: 860px) { .nav { display: flex; } .menu-btn { display: none; } }
.site-header .mobile-nav { display: none; height: auto; border-top: 1px solid var(--line); padding: 8px 16px 14px; }
.site-header .mobile-nav.open { display: block; }
@media (min-width: 860px) { .site-header .mobile-nav.open { display: none; } }
.mobile-nav a { display: block; padding: 10px 16px; text-decoration: none; font-weight: 600; border-radius: var(--r-sm); }
.mobile-nav a:hover { background: var(--surface-2); }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--surface); --c: var(--ink); --bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--bd); background: var(--b); color: var(--c); font-weight: 650; font-size: var(--t-sm);
  cursor: pointer; text-decoration: none; user-select: none; -webkit-user-select: none;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-primary { --b: var(--ink); --c: var(--bg); --bd: var(--ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn-accent { --b: var(--accent); --c: var(--accent-ink); --bd: var(--accent); }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { --b: transparent; --bd: transparent; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: var(--t-xs); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: var(--t-base); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-row.center { justify-content: center; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); cursor: pointer; text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.chip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.chip[aria-pressed="true"], .chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 14px; border-radius: 999px; font-size: var(--t-sm); font-weight: 650; color: var(--ink-2); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

input[type="text"], input[type="email"], input[type="search"], input[type="number"], input[type="password"], textarea, select {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }
label { font-weight: 600; font-size: var(--t-sm); display: block; margin-bottom: 6px; }

/* ---------- Home ---------- */
.hero { padding: 48px 0 28px; }
.hero h1 { max-width: 15ch; margin-bottom: 14px; }
.hero p { font-size: var(--t-md); color: var(--ink-2); max-width: 52ch; }
.search { position: relative; max-width: 460px; margin-top: 20px; }
.search input { padding-left: 42px; border-radius: 999px; height: 48px; }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.section { padding: 28px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: var(--t-lg); }
.section-head a { font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); text-decoration: none; }
.section-head a:hover { color: var(--ink); }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid.wide { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--ink) 14%, var(--line)); }
.card .thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--tile, var(--surface-2)); font-size: clamp(2.2rem, 7vw, 3rem); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.card:hover .thumb img { transform: scale(1.04); }
.card .meta { padding: 10px 12px 12px; }
.card .title { font-weight: 700; font-size: var(--t-sm); line-height: 1.3; }
.card .sub { font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; line-height: 1.35; }
.card .badge { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.card.feature { flex-direction: row; align-items: center; gap: 14px; padding: 14px; }
.card.feature .thumb { width: 64px; height: 64px; aspect-ratio: 1; border-radius: var(--r-sm); font-size: 1.9rem; flex: none; }
.card.feature .meta { padding: 0; }
.card[hidden] { display: none; }

/* ---------- Game page ---------- */
.crumbs { font-size: var(--t-xs); color: var(--ink-3); padding-top: 20px; }
.crumbs a { text-decoration: none; color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); }
.game-head { padding: 10px 0 18px; }
.game-head h1 { font-size: var(--t-2xl); margin-bottom: 6px; }
.game-head p { color: var(--ink-2); margin: 0; max-width: 62ch; }
.stage {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px;
  min-height: 360px; box-shadow: var(--shadow);
}
@media (min-width: 720px) { .stage { padding: 28px; } }
.stage:fullscreen { border-radius: 0; overflow: auto; display: flex; flex-direction: column; justify-content: center; }
.game-tools { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.hud { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.stat { background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 14px; min-width: 84px; }
.stat b { display: block; font-size: var(--t-lg); line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat span { font-size: var(--t-xs); color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.big-num { font-size: clamp(2.6rem, 9vw, 4.25rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.result { text-align: center; padding: 24px 8px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.result h2 { margin: 0; }
.result .lead { color: var(--ink-2); max-width: 44ch; margin: 0; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: var(--t-xs); font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.note { font-size: var(--t-sm); color: var(--ink-3); }
.kbd { font-family: var(--mono); font-size: .8em; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); }
.no-select { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }

.options { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .options { grid-template-columns: 1fr 1fr; } }
.option {
  text-align: left; min-height: 54px; padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; cursor: pointer; transition: background .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease);
}
.option:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); background: var(--surface-2); }
.option:active { transform: scale(.99); }
.option.correct { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.option.wrong { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.option[disabled] { cursor: default; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: inherit; transition: width .35s var(--ease); }

.prose { max-width: 70ch; padding: 32px 0 8px; color: var(--ink-2); }
.prose h2 { color: var(--ink); font-size: var(--t-lg); margin-top: 1.4em; }
.prose h3 { color: var(--ink); margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 650; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 8px 0 0; }

/* Embed player */
.player { position: relative; width: 100%; background: #000; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: var(--ar, 4 / 3); max-height: 78vh; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .cover { position: absolute; inset: 0; display: grid; place-items: center; background: #0d0d0b; color: #fff; cursor: pointer; }
.player .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; filter: blur(2px); }
.player .cover .btn { position: relative; }
.player:fullscreen { border-radius: 0; max-height: none; aspect-ratio: auto; }

/* Ads */
.ad-slot { margin: 22px 0; min-height: 0; text-align: center; }
.ad-slot:empty { display: none; }
.ad-label { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }

/* Footer */
.site-footer { margin-top: 56px; border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: var(--t-sm); color: var(--ink-3); }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) { .site-footer .cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h4 { color: var(--ink); font-size: var(--t-sm); margin-bottom: 10px; }
.site-footer a { display: block; text-decoration: none; padding: 3px 0; color: var(--ink-3); transition: color .2s var(--ease); }
.site-footer a:hover { color: var(--ink); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; z-index: 100; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: var(--t-sm);
  transition: opacity .25s var(--ease), transform .25s var(--ease); box-shadow: var(--shadow-lift); max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--ink-3); font-weight: 650; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .05em; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* Animations */
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .35s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* Category tiles */
.tile-tests { --tile: #ebe7f6; } .tile-daily { --tile: #fbe6de; } .tile-quizzes { --tile: #e1edf6; }
.tile-classics { --tile: #e3efe2; } .tile-african { --tile: #f5e8cc; } .tile-toys { --tile: #f4e2ea; }
:root[data-theme="dark"] .tile-tests { --tile: #26223a; } :root[data-theme="dark"] .tile-daily { --tile: #3a2219; }
:root[data-theme="dark"] .tile-quizzes { --tile: #1b2b38; } :root[data-theme="dark"] .tile-classics { --tile: #1d2e1d; }
:root[data-theme="dark"] .tile-african { --tile: #362a14; } :root[data-theme="dark"] .tile-toys { --tile: #36202b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tile-tests { --tile: #26223a; } :root:not([data-theme="light"]) .tile-daily { --tile: #3a2219; }
  :root:not([data-theme="light"]) .tile-quizzes { --tile: #1b2b38; } :root:not([data-theme="light"]) .tile-classics { --tile: #1d2e1d; }
  :root:not([data-theme="light"]) .tile-african { --tile: #362a14; } :root:not([data-theme="light"]) .tile-toys { --tile: #36202b; }
}

/* Profile chip */
.me-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 650; font-size: var(--t-sm); transition: background .2s var(--ease), border-color .2s var(--ease); }
.me-chip:hover { background: var(--surface-2); }
.me-av { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 1.05rem; }
.me-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) { .me-chip { padding-right: 4px; } .me-name { display: none; } }
.code-box { font-family: var(--mono); font-size: clamp(1.05rem, 4vw, 1.4rem); font-weight: 700; letter-spacing: .06em; background: var(--surface-2); border-radius: var(--r-sm); padding: 12px 14px; text-align: center; user-select: all; word-break: break-all; }
.banner { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: var(--r); padding: 14px 16px; }
.av-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.av-pick button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; background: var(--surface-2); font-size: 1.4rem; cursor: pointer; transition: transform .15s var(--ease), border-color .2s; }
.av-pick button[aria-pressed="true"] { border-color: var(--ink); transform: scale(1.08); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.panel h2 { font-size: var(--t-lg); }
.cols-2 { display: grid; gap: 16px; grid-template-columns: 1fr; } @media (min-width: 820px) { .cols-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Platform: profile, dialogs, leaderboards ---------- */
#profile-btn { text-decoration: none; }
#profile-btn.has-avatar { font-size: 1.15rem; line-height: 1; }
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
.dlg { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); padding: 22px; width: min(92vw, 480px); box-shadow: var(--shadow-lift); }
.dlg::backdrop { background: rgba(10, 10, 8, .45); }
.dlg h2 { font-size: var(--t-lg); }
.dlg-row, .pf-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.lb { width: min(100%, 420px); margin: 8px auto 0; text-align: left; background: var(--surface-2); border-radius: var(--r); padding: 14px; }
.lb-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.lb-list { list-style: none; margin: 0; padding: 0; }
.lb-list li { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.lb-list li:last-child { border-bottom: 0; }
.lb-list .rk { width: 22px; color: var(--ink-3); font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-list .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-list b { font-variant-numeric: tabular-nums; }
.lb-list li.me { color: var(--accent); font-weight: 700; }
.lb-foot { font-size: var(--t-xs); color: var(--ink-3); margin-top: 6px; }
.pf-hero { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; padding: 8px 0 18px; }
.pf-hero h1 { font-size: var(--t-2xl); margin-bottom: 10px; overflow-wrap: anywhere; }
.pf-av { width: 84px; height: 84px; flex: none; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); font-size: 2.8rem; display: grid; place-items: center; cursor: pointer; transition: transform .15s var(--ease); }
.pf-av:hover { transform: scale(1.04); }
.pf-avs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.pf-avbtn { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 1.5rem; cursor: pointer; }
.pf-avbtn.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.pf-sec { border-top: 1px solid var(--line); padding: 22px 0 6px; }
.pf-sec h2 { font-size: var(--t-lg); }
.pf-code { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.pf-code code { font-family: var(--mono); font-size: 1.25rem; letter-spacing: .06em; background: var(--surface-2); padding: 10px 14px; border-radius: var(--r-sm); }
.pf-google { min-height: 44px; }
.online-box { width: min(100%, 720px); background: var(--surface-2); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.online-box .invite { display: flex; gap: 8px; width: 100%; max-width: 520px; }
.online-box .invite input { flex: 1; font-size: var(--t-sm); }
[hidden] { display: none !important; }
