/* Khel ON wave 2 — shared look (navy desk, brand gradient, sheets, chips, badges). */
:root {
  --desk: #141721; --panel: #20253a; --panel-2: #2a3049; --line: #363d5c; --ink: #f5f3ff; --muted: #a9abc6;
  --orange: #ff9a3c; --pink: #f04fa8; --violet: #8b5cf6; --teal: #2fd4c8; --gold: #ffc23d; --acc: #f04fa8;
  --grad: linear-gradient(100deg, var(--orange), var(--pink) 50%, var(--violet));
  --display: "Outfit", "Trebuchet MS", system-ui, sans-serif; --body: "Nunito", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: radial-gradient(90% 50% at 50% 0%, color-mix(in srgb, var(--acc) 12%, transparent), transparent 70%), var(--desk); color: var(--ink); font-family: var(--body); font-size: 16px; -webkit-tap-highlight-color: transparent; min-height: 100vh; -webkit-user-select: none; user-select: none; overflow-x: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; }
svg { display: block; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 999px; font-family: var(--display); font-weight: 800; font-size: 17px; color: var(--ink); white-space: nowrap; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(240, 79, 168, .28); }
.btn.teal { background: var(--teal); color: #08221f; }
.btn.ghost { border: 2px solid var(--line); }
.btn.big { min-height: 60px; font-size: 20px; }
.btn:disabled { opacity: .45; cursor: default; }
.play { max-width: 760px; margin: 0 auto; padding: 8px 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bar-t { display: flex; flex-direction: column; min-width: 0; }
.bar-t b { font-family: var(--display); font-size: 22px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bar-t span { color: var(--muted); font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.msg { text-align: center; color: #d2d1e8; font-weight: 800; min-height: 24px; }
.scrim { position: fixed; inset: 0; z-index: 2147483000; background: rgba(8,10,18,.72); display: grid; place-items: center; padding: 14px; }
.box { width: min(480px, 100%); max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.box > * { flex-shrink: 0; }
.box h2 { font-size: 25px; font-weight: 800; }
.box p { color: #d2d1e8; line-height: 1.5; }
.small { font-size: 13px; color: var(--muted); }
.kick { color: var(--acc); font-weight: 800; font-size: 14px; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 4px; }
.btns.col { flex-direction: column; align-items: stretch; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; line-height: 1.45; color: #d2d1e8; }
.lab { font-weight: 800; font-size: 14px; color: var(--muted); margin-top: 4px; }
.chips { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 8px; }
.chip { min-height: 52px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel-2); font-weight: 800; font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; padding: 4px; text-align: center; }
.chip small { font-size: 11.5px; color: var(--muted); font-weight: 800; }
.chip small.st { color: var(--gold); letter-spacing: 1px; }
.chip[aria-pressed="true"] { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 18%, var(--panel-2)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 25%, transparent); }
.win-stars { display: flex; justify-content: center; gap: 8px; font-size: 54px; line-height: 1; }
.win-stars span { color: #3a3f5e; }
.win-stars span.on { color: var(--gold); animation: star .5s cubic-bezier(.3, 1.6, .5, 1) both; text-shadow: 0 0 18px rgba(255, 194, 61, .6); }
@keyframes star { from { transform: scale(.2) rotate(-40deg); opacity: 0; } }
.final { display: flex; flex-direction: column; gap: 6px; }
.final div { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: var(--panel-2); font-weight: 800; }
.final div b { margin-left: auto; font-family: var(--display); font-size: 22px; }
.final div.top { box-shadow: 0 0 0 2px var(--gold) inset; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 8px; border-radius: 16px; background: var(--panel-2); border: 2px solid var(--line); }
.badge svg { width: 46px; height: 46px; }
.badge b { font-size: 14px; line-height: 1.2; }
.badge small { font-size: 12px; color: var(--muted); font-weight: 700; line-height: 1.3; }
.badge.off { opacity: .45; filter: grayscale(1); }
.badge.new { border-color: var(--gold); animation: star .5s both; }
.starrow { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 8px; }
.starrow div { background: var(--panel-2); border-radius: 14px; padding: 8px; text-align: center; font-weight: 800; font-size: 14px; }
.starrow div span { display: block; color: var(--gold); letter-spacing: 2px; font-size: 18px; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 2147483100; background: #f5f3ff; color: #141721; font-weight: 800; padding: 10px 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: calc(100vw - 32px); text-align: center; pointer-events: none; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 2147482000; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.2s ease-in forwards; }
@keyframes fall { to { top: 105%; transform: translateX(40px) rotate(540deg); } }
.av { flex: none; }
.scores { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 8px; }
.sc { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 8px; border-radius: 16px; background: var(--panel); border: 2px solid var(--line); min-width: 0; transition: border-color .2s, box-shadow .2s, transform .2s; }
.sc .nm { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.sc .nm b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc .nm small { font-size: 11.5px; color: var(--muted); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc .pts { margin-left: auto; font-family: var(--display); font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.sc.turn { border-color: var(--pc, var(--acc)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc, var(--acc)) 35%, transparent); transform: translateY(-1px); }
.scores.many .sc { flex-direction: column; align-items: center; padding: 6px 4px; gap: 2px; text-align: center; }
.scores.many .sc .pts { margin: 0; font-size: 20px; }
.scores.many .sc .nm { align-items: center; width: 100%; }
@media (max-width: 380px) { .play { padding: 6px 8px 12px; gap: 8px; } .chip { font-size: 14px; } .box { padding: 16px; } }
@media (min-width: 900px) { .play { padding-top: 16px; } .bar-t b { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- Raja Mantri: chits on a durbar carpet ---------- */
:root { --acc: #ffc23d; }
.table { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; border-radius: 24px; background: radial-gradient(circle at 50% 50%, rgba(255,194,61,.14), transparent 60%), repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 10px, transparent 10px 20px), #2a1f3a; border: 2px solid #4a3a5e; }
.seat { background: rgba(20,23,33,.55); border: 2px solid var(--line); border-radius: 18px; padding: 8px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 0; transition: border-color .2s, transform .2s; }
.seat .who { display: flex; align-items: center; gap: 7px; min-width: 0; }
.seat .who > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.seat .who b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .who small { font-size: 11.5px; color: var(--muted); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .pts { margin-left: auto; font-family: var(--display); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.seat .slot { position: relative; display: grid; place-items: center; min-height: 104px; }
.seat.can { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(255,194,61,.25); animation: hint 1.6s ease-in-out infinite; }
@keyframes hint { 50% { box-shadow: 0 0 0 6px rgba(255,194,61,.12); } }
.seat.caught.right { border-color: #7bd389; box-shadow: 0 0 0 3px rgba(123,211,137,.35); }
.seat.caught.wrong { border-color: #ff6b81; box-shadow: 0 0 0 3px rgba(255,107,129,.35); }
.chit { width: 84px; height: 100px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #3a2a14; background: linear-gradient(160deg, #fff8e6, #f1dfb8); box-shadow: 0 8px 18px -8px #000; position: relative; }
.chit.folded { background: linear-gradient(135deg, #f6e7c4 0 50%, #e9d3a3 50%); transform: rotate(-4deg); }
.chit.folded span { font-family: var(--display); font-weight: 800; font-size: 30px; color: rgba(90,60,20,.35); }
.chit .ic { font-size: 36px; line-height: 1; }
.chit b { font-family: var(--display); font-size: 17px; }
.chit small { font-weight: 800; font-size: 12px; color: #7a5a24; }
.chit.raja { background: linear-gradient(160deg, #fff4c2, #ffd76a); }
.chit.chor { background: linear-gradient(160deg, #e9e6ff, #c9c2f5); }
.chit.mantri { background: linear-gradient(160deg, #e6fff8, #b6efe2); }
.chit.big { width: 130px; height: 156px; } .chit.big .ic { font-size: 58px; } .chit.big b { font-size: 24px; } .chit.big small { font-size: 15px; }
.chit.fresh { animation: unfold .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes unfold { from { transform: rotateY(90deg) scale(.8); } }
.face { position: absolute; right: 6%; top: -4px; font-size: 34px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.4)); animation: bang .35s cubic-bezier(.3, 1.6, .5, 1); }
.gain { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); background: #7bd389; color: #0d2a14; font-weight: 800; border-radius: 999px; padding: 2px 10px; font-size: 14px; animation: bang .4s cubic-bezier(.3, 1.6, .5, 1); }
.gain.zero { background: #4a4f6e; color: #d2d1e8; }
@keyframes bang { from { transform: translateX(-50%) scale(.3); opacity: 0; } }
.face { animation-name: pop2; } @keyframes pop2 { from { transform: scale(.3); opacity: 0; } }
.btn.accuse { min-height: 42px; font-size: 15px; background: var(--acc); color: #2a1d00; padding: 6px 10px; white-space: normal; line-height: 1.1; }
.btn.peek { min-height: 40px; font-size: 15px; }
.msg { font-size: 17px; line-height: 1.35; } .msg.good { color: #9ff0ab; } .msg.bad { color: #ffb4c0; }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 70px; }
.ctl .btn.big { width: min(100%, 420px); }
.mine { display: flex; justify-content: center; }
.faces { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; width: min(100%, 420px); }
.fc { font-size: 30px; min-height: 52px; border-radius: 14px; background: var(--panel); border: 2px solid var(--line); }
.fc.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 20%, var(--panel)); }
.cover { position: fixed; inset: 0; z-index: 2147482500; background: radial-gradient(circle at 50% 30%, #3a2b52, #141221); display: grid; place-items: center; padding: 24px; text-align: center; }
.cover > div { display: flex; flex-direction: column; gap: 14px; align-items: center; max-width: 420px; }
.cover h2 { font-size: 28px; } .cover p { color: #d2d1e8; line-height: 1.45; }
.cup { font-size: 60px; text-align: center; animation: star .6s both; }
@media (max-width: 380px) { .chit { width: 70px; height: 84px; } .chit .ic { font-size: 30px; } .chit b { font-size: 14px; } .seat .slot { min-height: 90px; } .table { gap: 6px; padding: 6px; } }
@media (min-width: 900px) { .play { max-width: 820px; } .seat .slot { min-height: 130px; } .chit { width: 100px; height: 120px; } }
@media (max-height: 520px) and (orientation: landscape) {
  .play { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-areas: "bar bar" "table msg" "table ctl"; gap: 8px 14px; max-width: 980px; align-items: start; }
  .bar { grid-area: bar; } .table { grid-area: table; } .msg { grid-area: msg; } .ctl { grid-area: ctl; }
  .table { grid-template-columns: repeat(4, 1fr); } .seat .slot { min-height: 80px; } .chit { width: 62px; height: 76px; } .chit .ic { font-size: 26px; } .chit b { font-size: 13px; }
  .chit.big { width: 90px; height: 110px; } .chit.big .ic { font-size: 40px; }
}
