/* =====================================================================
   SĂN QUÀ TRI THỨC – giao diện chung (cute · minimal · tông kem ấm)
   ===================================================================== */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(/fonts/nunito-vietnamese-wght-normal.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(/fonts/nunito-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(/fonts/nunito-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fff8f1;
  --dot: #f4e5d7;
  --card: #ffffff;
  --ink: #3d3030;
  --ink-2: #7d6b66;
  --ink-3: #ad9c96;
  --line: #f1e2d5;
  --shadow: #ecd9c8;
  --coral: #ff8a7a;
  --coral-d: #e46a5b;
  --peach: #ffdccb;
  --peach-d: #f0b499;
  --butter: #ffeaa6;
  --butter-d: #e8c869;
  --mint: #d3eedb;
  --mint-d: #9bd0aa;
  --rose: #fad6e1;
  --rose-d: #e6a7ba;
  --good: #44a866;
  --good-bg: #e5f6ea;
  --bad: #e0605a;
  --bad-bg: #fde8e6;
  --ice: #e2f4f8;
  --ice-d: #8fcfdf;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Nunito', ui-rounded, 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.4px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; color: inherit; }
img { -webkit-user-drag: none; user-select: none; }
.hidden { display: none !important; }
.muted { color: var(--ink-2); }
.tiny { font-size: 13px; }

/* ------------------------------------------------------------- building blocks */
.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 6px 0 var(--shadow);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 900; font-size: 18px; letter-spacing: .2px;
  background: var(--coral); color: #fff;
  box-shadow: 0 5px 0 var(--coral-d);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s;
}
.btn:hover { filter: brightness(1.03); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--coral-d); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.soft { background: #fff; color: var(--ink); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--shadow); }
.btn.soft:active { box-shadow: 0 1px 0 var(--shadow); }
.btn.small { padding: 9px 16px; font-size: 15px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 2px solid var(--line);
  font-weight: 900; font-size: 16px; white-space: nowrap;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 1000; letter-spacing: -.3px; }
.logo .gift-mini { width: 38px; height: 38px; flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 2px solid var(--line);
  font-weight: 800;
  animation: pop .35s cubic-bezier(.2, 1.6, .4, 1) both;
}

@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dots { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* ===================================================================== PLAYER */
body.player {
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: manipulation;
  overscroll-behavior: none;
  min-height: 100dvh;
}
#app { min-height: 100dvh; display: flex; flex-direction: column; transition: filter .15s; }
.screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; animation: rise .3s ease both; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; }

/* join */
.join-card { width: 100%; max-width: 420px; padding: 30px 26px 26px; text-align: center; }
.join-card .logo { flex-direction: column; justify-content: center; gap: 6px; font-size: 30px; margin-bottom: 4px; }
.join-card .logo .gift-mini { width: 46px; height: 46px; animation: wobble 2.4s ease-in-out infinite; }
.join-card .sub { color: var(--ink-2); font-size: 15px; margin: 0 0 22px; }
.field {
  width: 100%; padding: 15px 18px; border-radius: var(--r-md);
  border: 2px solid var(--line); background: var(--bg);
  font-size: 19px; font-weight: 800; text-align: center; outline: none;
  user-select: text; -webkit-user-select: text;
}
.field:focus { border-color: var(--coral); background: #fff; }
.join-card .btn { width: 100%; margin-top: 14px; }
.err { min-height: 22px; margin-top: 10px; color: var(--bad); font-size: 15px; }
.rules { margin-top: 18px; text-align: left; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.rules li { margin: 3px 0; }

/* lobby */
.lobby-card { width: 100%; max-width: 460px; padding: 28px 24px; text-align: center; }
.big-emoji { font-size: 58px; line-height: 1; animation: bob 2s ease-in-out infinite; }
.lobby-card h2 { margin: 12px 0 6px; font-size: 26px; font-weight: 1000; }
.name-chip { font-size: 20px; padding: 9px 20px; background: var(--butter); border-color: var(--butter-d); margin: 6px 0 14px; }
.waiting { display: inline-flex; gap: 6px; margin-left: 4px; }
.waiting i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); display: inline-block; animation: dots 1.2s infinite; }
.waiting i:nth-child(2) { animation-delay: .15s; }
.waiting i:nth-child(3) { animation-delay: .3s; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; text-align: left; }
.legend div { background: var(--bg); border: 2px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; font-size: 14px; }
.legend b { font-weight: 1000; }

/* countdown */
.count-num { font-size: min(42vw, 220px); font-weight: 1000; color: var(--coral); text-shadow: 0 8px 0 var(--shadow); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }

/* game top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 12px 6px;
}
.pill.timer.low { background: var(--bad-bg); border-color: #f5b9b4; color: var(--bad); }
.pill .score-val { min-width: 2ch; display: inline-block; }
.pill.bump { animation: pop .35s ease; }

/* question */
.game { flex: 1; display: flex; flex-direction: column; padding: 6px 14px 20px; }
.qcard { padding: 20px 22px; text-align: center; position: relative; margin-top: 6px; }
.qno { font-size: 13px; font-weight: 900; color: var(--ink-3); letter-spacing: 1px; text-transform: uppercase; }
.qtext { font-size: clamp(20px, 4.6vw, 28px); font-weight: 900; line-height: 1.32; margin-top: 6px; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
@media (max-width: 560px) { .answers { grid-template-columns: 1fr; gap: 10px; } }
.ans {
  position: relative;
  min-height: 74px; padding: 14px 16px 14px 56px;
  border-radius: var(--r-md);
  font-size: clamp(17px, 3.6vw, 21px); font-weight: 900; line-height: 1.25; text-align: left;
  transition: transform .08s ease, box-shadow .08s ease, opacity .2s, filter .2s;
  animation: rise .25s ease both;
}
.ans:nth-child(2) { animation-delay: .04s; }
.ans:nth-child(3) { animation-delay: .08s; }
.ans:nth-child(4) { animation-delay: .12s; }
.ans .k {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .7); font-size: 16px; font-weight: 1000;
}
.ans.c0 { background: var(--peach); box-shadow: 0 5px 0 var(--peach-d); }
.ans.c1 { background: var(--butter); box-shadow: 0 5px 0 var(--butter-d); }
.ans.c2 { background: var(--mint); box-shadow: 0 5px 0 var(--mint-d); }
.ans.c3 { background: var(--rose); box-shadow: 0 5px 0 var(--rose-d); }
.ans:hover { filter: brightness(1.02); transform: translateY(-1px); }
.ans:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .08); }
.answers.locked .ans { pointer-events: none; }
.answers.locked .ans:not(.right):not(.wrong) { opacity: .45; }
.ans.right { background: var(--good-bg); box-shadow: 0 5px 0 #9fd6b0; outline: 3px solid var(--good); }
.ans.right .k { background: var(--good); color: #fff; }
.ans.wrong { background: var(--bad-bg); box-shadow: 0 5px 0 #f1b2ad; outline: 3px solid var(--bad); animation: shake .4s ease; }
.ans.wrong .k { background: var(--bad); color: #fff; }
.verdict {
  position: absolute; left: 50%; top: -18px; transform: translateX(-50%);
  padding: 6px 18px; border-radius: 999px; font-weight: 1000; font-size: 17px; white-space: nowrap;
  animation: pop .35s cubic-bezier(.2, 1.6, .4, 1) both;
}
.verdict.ok { background: var(--good); color: #fff; }
.verdict.no { background: var(--bad); color: #fff; }

/* màn hình rộng (laptop): to hơn, canh giữa theo chiều dọc */
@media (min-width: 900px) and (min-height: 600px) {
  .wrap { max-width: 920px; }
  .game { justify-content: center; padding-bottom: 8vh; }
  #v-chest, #v-target { margin-top: 0; }
  .qcard { padding: 28px 34px; }
  .qtext { font-size: 32px; }
  .answers { gap: 16px; margin-top: 20px; }
  .ans { min-height: 100px; font-size: 24px; padding-left: 66px; }
  .ans .k { width: 38px; height: 38px; font-size: 18px; left: 16px; }
  .chests { max-width: 780px; gap: 20px; }
  .topbar .pill { font-size: 18px; padding: 8px 18px; }
}

/* chests */
#v-chest, #v-target { margin-top: 4vh; }
.chest-title { text-align: center; font-size: clamp(22px, 5vw, 30px); font-weight: 1000; margin: 10px 0 2px; }
.chest-sub { text-align: center; color: var(--ink-2); margin-bottom: 14px; }
.chests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 640px; margin: 0 auto; width: 100%; }
.chest {
  position: relative; aspect-ratio: 1 / 1.1;
  border-radius: var(--r-lg); background: #fff; border: 2px solid var(--line); box-shadow: 0 6px 0 var(--shadow);
  display: grid; place-items: center; padding: 10px;
  transition: transform .15s;
  animation: pop .4s cubic-bezier(.2, 1.6, .4, 1) both;
}
.chest:nth-child(2) { animation-delay: .07s; }
.chest:nth-child(3) { animation-delay: .14s; }
.chest:hover .gift { animation: wobble .6s ease-in-out infinite; }
.chest:active { transform: translateY(3px); }
.chests.locked .chest { pointer-events: none; }
.gift { width: 100%; height: auto; overflow: visible; }
.gift .lid { transform-origin: 60px 52px; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), opacity .4s; }
.chest.open .gift .lid { transform: translateY(-34px) rotate(-14deg); opacity: 0; }
.chest.open .gift { opacity: .0; transition: opacity .35s .2s; }
.chest .prize {
  position: absolute; inset: 10px; display: none; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; border-radius: var(--r-md);
}
.chest.open .prize, .chest.peek .prize { display: flex; animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.chest.peek { opacity: .5; }
.chest.peek .gift { opacity: 0; }
.prize .ic { font-size: clamp(30px, 8vw, 46px); line-height: 1; }
.prize .tt { font-size: clamp(20px, 5vw, 30px); font-weight: 1000; margin-top: 4px; }
.prize .ss { font-size: 13px; color: var(--ink-2); }
.prize.good { background: var(--good-bg); }
.prize.bad { background: var(--bad-bg); }
.prize.power { background: var(--butter); }
.chest.picked { outline: 4px solid var(--coral); }
.result-line { text-align: center; font-size: clamp(18px, 4.4vw, 24px); font-weight: 1000; margin-top: 18px; min-height: 32px; }
.result-line.good { color: var(--good); }
.result-line.bad { color: var(--bad); }

/* target picker */
.target-card { width: 100%; max-width: 520px; margin: 8px auto 0; padding: 18px; }
.target-card h3 { margin: 0 0 4px; font-size: 24px; font-weight: 1000; text-align: center; }
.target-card .hint { text-align: center; color: var(--ink-2); font-size: 14px; margin-bottom: 10px; }
.tbar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 12px; }
.tbar i { display: block; height: 100%; background: var(--coral); width: 100%; transition: width .2s linear; }
.tlist { display: flex; flex-direction: column; gap: 8px; max-height: 52dvh; overflow: auto; padding: 2px; }
.trow {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--bg); border: 2px solid var(--line); text-align: left; font-weight: 900;
}
.trow:hover { border-color: var(--coral); background: #fff; }
.trow .rk { width: 30px; color: var(--ink-3); }
.trow .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .sc { font-variant-numeric: tabular-nums; }
.trow .fz { font-size: 12px; background: var(--ice); border-radius: 99px; padding: 2px 8px; color: #2f7f92; }
.skip { display: block; margin: 12px auto 0; }

/* over */
.over-card { width: 100%; max-width: 480px; padding: 26px 22px; text-align: center; }
.over-card h2 { margin: 6px 0 0; font-size: 30px; font-weight: 1000; }
.rank-big { font-size: 64px; font-weight: 1000; color: var(--coral); line-height: 1.05; }
.rank-big small { font-size: 24px; color: var(--ink-3); }
.stats { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.top5 { text-align: left; margin-top: 10px; }
.top5 .row { display: flex; gap: 10px; padding: 8px 12px; border-radius: 12px; }
.top5 .row:nth-child(odd) { background: var(--bg); }
.top5 .row span:first-child { width: 26px; }
.top5 .row span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.last-meme { margin: 12px auto 4px; max-width: 230px; transform: rotate(-2deg); }
.last-meme img { max-height: 30dvh; }
.last-meme .cap { font-size: 17px; }

/* overlays */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 22px;
  animation: rise .2s ease both;
}
.ov-frozen { background: rgba(226, 244, 248, .93); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 60; }
.ov-frozen .box { text-align: center; }
.ov-frozen .flake { font-size: 92px; display: inline-block; animation: spin 6s linear infinite; }
.ov-frozen h2 { font-size: 28px; font-weight: 1000; margin: 8px 0 4px; color: #2f6f80; }
.ov-frozen .left { font-size: 76px; font-weight: 1000; color: #2f7f92; }
.ov-meme { background: rgba(61, 48, 48, .42); z-index: 55; }
.polaroid {
  background: #fff; padding: 12px 12px 16px; border-radius: 18px; box-shadow: 0 10px 0 rgba(0, 0, 0, .12);
  max-width: min(92vw, 420px); text-align: center;
  animation: pop .4s cubic-bezier(.2, 1.6, .4, 1) both;
}
.tilt { transition: transform .3s; }
.polaroid img { display: block; width: 100%; max-height: 58dvh; object-fit: contain; border-radius: 10px; background: var(--bg); }
.polaroid .cap { font-size: 20px; font-weight: 1000; margin-top: 10px; }
.polaroid .mbar { height: 5px; border-radius: 9px; background: var(--line); margin-top: 10px; overflow: hidden; }
.polaroid .mbar i { display: block; height: 100%; width: 100%; background: var(--coral); transform-origin: left; }
.ov-block { background: rgba(255, 248, 241, .97); z-index: 80; text-align: center; }
.ov-block .box { max-width: 420px; }
.ov-block .em { font-size: 64px; }
.ov-block h2 { font-size: 26px; font-weight: 1000; margin: 8px 0; }
.ov-block p { color: var(--ink-2); margin: 0 0 16px; }
body.is-away #app, body.is-away .ov-meme, body.is-away .ov-frozen { filter: blur(22px); }
body.is-shot #app { visibility: hidden; }

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-weight: 900; font-size: 15px; max-width: 92vw; text-align: center;
  animation: pop .35s cubic-bezier(.2, 1.6, .4, 1) both;
}

@media print { body { display: none !important; } }

/* ===================================================================== HOST */
body.host { min-height: 100vh; }
.h-wrap { max-width: 1400px; margin: 0 auto; padding: 22px 28px 30px; }
.h-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.h-head .logo { font-size: 28px; }
.h-head .tag { color: var(--ink-2); font-size: 14px; font-weight: 800; }
.h-login { max-width: 380px; margin: 14vh auto 0; padding: 30px; text-align: center; }
.h-login .logo { justify-content: center; font-size: 28px; margin-bottom: 14px; }
.h-login .field { margin-bottom: 12px; }

.h-lobby { display: grid; grid-template-columns: minmax(340px, 440px) 1fr; gap: 22px; align-items: start; }
.join-panel { padding: 24px; text-align: center; }
.join-panel .lbl { font-size: 15px; color: var(--ink-2); font-weight: 900; text-transform: uppercase; letter-spacing: 1px; }
.join-url { font-size: clamp(20px, 2.2vw, 30px); font-weight: 1000; word-break: break-all; margin: 6px 0 14px; color: var(--coral-d); user-select: all; }
.qr { width: 100%; max-width: 330px; aspect-ratio: 1; margin: 0 auto; border-radius: 18px; border: 2px solid var(--line); padding: 10px; background: #fff; }
.qr img { width: 100%; height: 100%; display: block; }
.alt-urls { font-size: 13px; color: var(--ink-2); margin-top: 10px; word-break: break-all; }
.players-panel { padding: 22px; min-height: 420px; display: flex; flex-direction: column; }
.players-panel h3 { margin: 0 0 12px; font-size: 22px; font-weight: 1000; display: flex; align-items: center; gap: 10px; }
.count-badge { background: var(--coral); color: #fff; border-radius: 999px; padding: 2px 12px; font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; flex: 1; }
.chips .chip { font-size: 18px; }
.chips .chip.kickable:hover { border-color: var(--bad); background: var(--bad-bg); text-decoration: line-through; }
.chips .chip.off { opacity: .45; }
.empty { color: var(--ink-3); font-size: 18px; margin: auto; text-align: center; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 2px dashed var(--line); }
.seg { display: inline-flex; background: var(--bg); border: 2px solid var(--line); border-radius: 999px; padding: 4px; }
.seg button { padding: 8px 14px; border-radius: 999px; font-weight: 900; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 0 var(--shadow); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; color: var(--ink-2); }
.toggle .sw { width: 46px; height: 26px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; }
.toggle .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.toggle.on .sw { background: var(--mint-d); }
.toggle.on .sw::after { transform: translateX(20px); }
.controls .grow { flex: 1; }
.btn.go { font-size: 22px; padding: 16px 34px; }

.h-play { display: grid; grid-template-columns: 1fr 380px; gap: 22px; }
.h-timer { text-align: center; font-size: clamp(56px, 8vw, 110px); font-weight: 1000; line-height: 1; font-variant-numeric: tabular-nums; }
.h-timer.low { color: var(--bad); animation: bob 1s ease-in-out infinite; }
.h-sub { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 18px; }
.board { padding: 18px 20px; }
.board h3, .feed h3 { margin: 0 0 12px; font-size: 20px; font-weight: 1000; }
.lb { position: relative; }
.lb-row {
  position: absolute; left: 0; right: 0; height: 52px;
  display: flex; align-items: center; gap: 12px; padding: 0 14px;
  border-radius: 14px; background: var(--bg); border: 2px solid var(--line);
  transition: transform .5s cubic-bezier(.3, 1.2, .5, 1);
}
.lb-row .rk { width: 34px; font-size: 20px; font-weight: 1000; color: var(--ink-3); text-align: center; }
.lb-row .nm { flex: 1; font-size: 21px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .badges { font-size: 15px; display: flex; gap: 4px; }
.lb-row .sc { font-size: 24px; font-weight: 1000; font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }
.lb-row.r1 { background: #fff3cc; border-color: var(--butter-d); }
.lb-row.r2 { background: #f6f1ee; }
.lb-row.r3 { background: #ffe8dc; border-color: var(--peach-d); }
.lb-row.flash { animation: pop .4s ease; }
.lb-more { color: var(--ink-2); text-align: center; margin-top: 8px; font-size: 15px; }
.feed { padding: 18px; max-height: calc(100vh - 230px); overflow: hidden; }
.feed ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.feed li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 12px; background: var(--bg); font-size: 16px; animation: rise .3s ease both; }
.feed li.swap { background: var(--butter); }
.feed li.freeze { background: var(--ice); }
.feed li.cheat { background: var(--bad-bg); }
.feed li.big { background: var(--mint); }
.feed li .i { font-size: 18px; }
.h-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

.h-end { text-align: center; }
.h-end h2 { font-size: 40px; font-weight: 1000; margin: 0 0 8px; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 18px; margin: 26px auto 22px; }
.pod { width: 210px; text-align: center; animation: rise .6s ease both; }
.pod .who { font-size: 24px; font-weight: 1000; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .pts { color: var(--ink-2); font-weight: 900; margin-bottom: 8px; }
.pod .stand { border-radius: 20px 20px 8px 8px; display: grid; place-items: center; font-size: 54px; font-weight: 1000; color: #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, .08); }
.pod.p1 .stand { height: 220px; background: var(--butter-d); }
.pod.p2 .stand { height: 160px; background: #cdbfb8; }
.pod.p3 .stand { height: 120px; background: var(--peach-d); }
.pod.p1 { animation-delay: .5s; }
.pod.p2 { animation-delay: .25s; }
.crown { font-size: 44px; animation: bob 1.6s ease-in-out infinite; }
.final-list { max-width: 820px; margin: 0 auto; padding: 16px 20px; text-align: left; columns: 2; column-gap: 26px; }
.final-list .row { display: flex; gap: 10px; padding: 6px 4px; border-bottom: 1px dashed var(--line); break-inside: avoid; font-size: 17px; }
.final-list .row span:first-child { width: 34px; color: var(--ink-3); }
.final-list .row span:nth-child(2) { flex: 1; }
@media (max-width: 1000px) {
  .h-lobby, .h-play { grid-template-columns: 1fr; }
  .final-list { columns: 1; }
}
