:root {
  --bg0: #070b1a; --bg1: #0d1330; --ink: #f4f6ff; --mute: #9aa3c7; --faint: #6a7399;
  --glass: rgba(255, 255, 255, .07); --glass2: rgba(255, 255, 255, .12); --edge: rgba(255, 255, 255, .16);
  --aqua: #35d6ff; --blue: #3b7cff; --violet: #8b5cff; --gold: #ffcf4a; --green: #3fe08a; --red: #ff5470;
  --r: 22px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg0); color: var(--ink);
  font: 15px/1.35 -apple-system, "SF Pro Text", "Segoe UI", Roboto, Inter, sans-serif; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
b { font-weight: 700; }

/* ─── фон: мягкие цветные пятна, медленно плывут ─── */
.bg { position: fixed; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 50% 0%, #17204d 0%, var(--bg1) 45%, var(--bg0) 100%); overflow: hidden; }
.bg i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(70px); opacity: .34; animation: drift 26s ease-in-out infinite alternate; }
.bg i:nth-child(1) { background: #2a6bff; left: -30vmax; top: -34vmax; }
.bg i:nth-child(2) { background: #8b3dff; right: -36vmax; top: 10vmax; animation-duration: 32s; animation-delay: -8s; }
.bg i:nth-child(3) { background: #18c8d8; left: -10vmax; bottom: -44vmax; opacity: .22; animation-duration: 38s; animation-delay: -14s; }
@keyframes drift { to { transform: translate3d(9vmax, 6vmax, 0) scale(1.15); } }

/* ─── стекло ─── */
.glass { background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.04)); border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 12px 34px rgba(0, 0, 0, .34); border-radius: var(--r); }

/* ─── шапка ─── */
#top { position: fixed; left: 0; right: 0; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: linear-gradient(#070b1acc, #070b1a00); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ava { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 17px;
  background: linear-gradient(135deg, var(--aqua), var(--violet)); box-shadow: 0 6px 18px rgba(59,124,255,.45), inset 0 1px 0 rgba(255,255,255,.5); }
.name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.sub { color: var(--mute); font-size: 12px; }
.cash { display: flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 16px; font-size: 15px; color: var(--gold); }
.cash svg { width: 18px; height: 18px; }
.cash b { color: var(--ink); font-variant-numeric: tabular-nums; }
.cash.bump { animation: bump .5s; }
@keyframes bump { 30% { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(255,207,74,.18); } }

/* ─── экран ─── */
#view { position: fixed; inset: 0; padding: calc(70px + var(--safe-t)) 14px calc(96px + var(--safe-b)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
#view.full { padding: 0; overflow: hidden; }
.page { animation: page .38s cubic-bezier(.2,.8,.2,1); }
@keyframes page { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.h { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin: 18px 4px 9px; font-weight: 700; }
.card { padding: 15px; margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.mut { color: var(--mute); font-size: 13px; }
.big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, rgba(255,255,255,.2), rgba(255,255,255,.05)); border: 1px solid var(--edge); }
.ico.aqua { color: var(--aqua); } .ico.gold { color: var(--gold); } .ico.green { color: var(--green); }
.ico.violet { color: #b79bff; } .ico.red { color: var(--red); }
.stat { padding: 13px; }
.stat .v { font-size: 18px; font-weight: 800; margin-top: 7px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .k { color: var(--mute); font-size: 12px; margin-top: 1px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,.1); border: 1px solid var(--edge); }
.chip.gold { color: var(--gold); border-color: rgba(255,207,74,.4); background: rgba(255,207,74,.12); }
.chip.red { color: var(--red); border-color: rgba(255,84,112,.4); background: rgba(255,84,112,.12); }
.chip.green { color: var(--green); border-color: rgba(63,224,138,.4); background: rgba(63,224,138,.12); }
.bar { height: 9px; border-radius: 9px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 9px; }
.bar i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--aqua), var(--violet)); transition: width .8s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 14px rgba(53,214,255,.7); }
.bar.gold i { background: linear-gradient(90deg, #ffb53a, var(--gold)); box-shadow: 0 0 14px rgba(255,207,74,.6); }

/* ─── водяная кнопка: жидкое стекло с бликом и волной при нажатии ─── */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: 18px; font-weight: 700; font-size: 16px; color: #fff; width: 100%;
  background: linear-gradient(160deg, rgba(86, 196, 255, .95), rgba(59, 124, 255, .95) 55%, rgba(110, 86, 255, .95));
  border: 1px solid rgba(255,255,255,.42);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.65), inset 0 -10px 18px rgba(20, 40, 160, .45), 0 10px 26px rgba(40, 110, 255, .45);
  transition: transform .16s cubic-bezier(.2,.8,.2,1), box-shadow .2s, filter .2s; }
.btn::before { content: ""; position: absolute; left: 8%; right: 8%; top: 3px; height: 44%; border-radius: 16px 16px 40px 40px;
  background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,0)); pointer-events: none; }
.btn::after { content: ""; position: absolute; left: var(--x, 50%); top: var(--y, 50%); width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.55); transform: translate(-50%, -50%) scale(0); opacity: 0; pointer-events: none; }
.btn.rip::after { animation: rip .6s ease-out; }
@keyframes rip { 0% { transform: translate(-50%,-50%) scale(0); opacity: .7; } 100% { transform: translate(-50%,-50%) scale(34); opacity: 0; } }
.btn:active { transform: scale(.955); filter: brightness(1.08); box-shadow: inset 0 1.5px 0 rgba(255,255,255,.65), inset 0 -6px 14px rgba(20,40,160,.45), 0 4px 12px rgba(40,110,255,.4); }
.btn[disabled] { filter: grayscale(.7) brightness(.7); pointer-events: none; }
.btn.gold { background: linear-gradient(160deg, #ffe07a, #ffb02e 55%, #ff8a2a); color: #3a2300;
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.75), inset 0 -10px 18px rgba(190, 90, 0, .4), 0 10px 26px rgba(255, 170, 40, .4); }
.btn.green { background: linear-gradient(160deg, #7dffb4, #23c877 55%, #0fa37a);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.7), inset 0 -10px 18px rgba(0, 90, 70, .45), 0 10px 26px rgba(35, 200, 120, .4); }
.btn.red { background: linear-gradient(160deg, #ff93a6, #ff4d6d 55%, #d92e63);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.65), inset 0 -10px 18px rgba(140, 0, 50, .45), 0 10px 26px rgba(255, 70, 110, .4); }
.btn.ghost { background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.05)); border-color: var(--edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 8px 20px rgba(0,0,0,.25); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.btn.sm { min-height: 40px; font-size: 14px; border-radius: 14px; padding: 0 14px; width: auto; }
.btn svg { width: 19px; height: 19px; }

/* ─── нижнее меню ─── */
#nav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); z-index: 30; display: flex; padding: 6px; border-radius: 26px; }
#nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; border-radius: 20px;
  color: var(--faint); font-size: 10.5px; font-weight: 600; transition: color .25s, background .3s, transform .2s; }
#nav button svg { width: 23px; height: 23px; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
#nav button.on { color: #fff; background: linear-gradient(160deg, rgba(86,196,255,.45), rgba(110,86,255,.35));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 6px 18px rgba(59,124,255,.35); }
#nav button.on svg { transform: translateY(-1px) scale(1.12); }
#nav button:active { transform: scale(.92); }
#nav.hide { transform: translateY(140%); transition: transform .35s; }
#nav { transition: transform .35s cubic-bezier(.2,.8,.2,1); }

/* ─── шторка снизу ─── */
.sheet { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(3, 6, 18, .6); opacity: 0; transition: opacity .3s; }
.sheet-body { position: absolute; left: 8px; right: 8px; bottom: 8px; max-height: 82vh; overflow-y: auto; padding: 10px 16px calc(18px + var(--safe-b));
  border-radius: 28px; transform: translateY(110%); transition: transform .42s cubic-bezier(.2,.9,.2,1); background: linear-gradient(160deg, rgba(40,52,110,.92), rgba(16,22,56,.96)); }
.sheet.on { pointer-events: auto; }
.sheet.on .sheet-bg { opacity: 1; }
.sheet.on .sheet-body { transform: none; }
.grip { width: 42px; height: 5px; border-radius: 5px; background: rgba(255,255,255,.28); margin: 2px auto 12px; }
.sheet h3 { font-size: 20px; font-weight: 800; margin-bottom: 3px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; margin-top: 8px; background: rgba(255,255,255,.07); border: 1px solid var(--edge); transition: transform .15s, background .2s; }
.opt:active { transform: scale(.975); background: rgba(255,255,255,.14); }
.opt.off { opacity: .45; }

/* ─── всплывашки ─── */
#toasts { position: fixed; left: 0; right: 0; top: calc(64px + var(--safe-t)); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 11px 17px; border-radius: 16px; font-weight: 600; font-size: 14px; max-width: 86vw; text-align: center;
  background: rgba(20, 28, 66, .92); border: 1px solid var(--edge); box-shadow: 0 12px 30px rgba(0,0,0,.45); animation: toast 2.6s forwards; }
.toast.ok { border-color: rgba(63,224,138,.6); } .toast.bad { border-color: rgba(255,84,112,.65); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-14px) scale(.9); } 8%, 86% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }

/* ─── сцена мини-игр ─── */
.stage { position: fixed; inset: 0; z-index: 70; display: none; flex-direction: column; background: radial-gradient(120% 80% at 50% 0%, #1a2560, #080c20 70%); }
.stage.on { display: flex; animation: page .3s; }
.stage-top { display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--safe-t)) 14px 10px; }
.stage-top .t { font-weight: 800; font-size: 17px; }
.stage-top .x { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 1px solid var(--edge); }
.hud { display: flex; gap: 8px; padding: 0 14px 8px; }
.hud .pill { flex: 1; padding: 8px 10px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid var(--edge); text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.hud .pill small { display: block; color: var(--mute); font-weight: 600; font-size: 11px; }
.timebar { height: 6px; margin: 0 14px 8px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; }
.timebar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--green), var(--aqua)); transform-origin: left; }
.play { flex: 1; position: relative; overflow: hidden; margin: 0 10px calc(12px + var(--safe-b)); border-radius: 24px; background: rgba(0,0,0,.22); border: 1px solid var(--edge); touch-action: none; }
.play canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 22px; text-align: center; }
.result .score { font-size: 64px; font-weight: 900; letter-spacing: -.03em; background: linear-gradient(120deg, var(--aqua), #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pop .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.float { position: absolute; font-weight: 900; font-size: 20px; pointer-events: none; animation: floatUp .8s ease-out forwards; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
@keyframes floatUp { to { transform: translateY(-46px); opacity: 0; } }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }

/* ─── игры из кнопок: заказ, касса, сортировка, память, провода ─── */
.q { font-size: 21px; font-weight: 800; line-height: 1.25; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.tile { min-height: 62px; border-radius: 18px; font-weight: 800; font-size: 17px; padding: 8px; background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.06)); border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 8px 18px rgba(0,0,0,.3); transition: transform .12s, background .2s, border-color .2s; }
.tile:active { transform: scale(.94); }
.tile.ok { background: linear-gradient(145deg, rgba(63,224,138,.6), rgba(35,200,119,.3)); border-color: var(--green); }
.tile.no { background: linear-gradient(145deg, rgba(255,84,112,.6), rgba(217,46,99,.3)); border-color: var(--red); }
.tile.done { opacity: .28; transform: scale(.9); }
.seq { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 34px; }
.seq span { padding: 5px 11px; border-radius: 12px; background: rgba(53,214,255,.18); border: 1px solid rgba(53,214,255,.5); font-weight: 700; font-size: 14px; animation: pop .3s; }
.mem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; width: 100%; max-width: 380px; }
.mem button { aspect-ratio: 1; border-radius: 16px; font-size: 13px; font-weight: 800; position: relative; transform-style: preserve-3d; transition: transform .4s cubic-bezier(.3,1.3,.5,1);
  background: linear-gradient(145deg, #3d58c8, #24306f); border: 1px solid rgba(255,255,255,.3); box-shadow: 0 8px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.3); color: transparent; }
.mem button.open { transform: rotateY(180deg); background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(214,226,255,.95)); color: #1a2152; }
.mem button.open span { display: block; transform: rotateY(180deg); }
.mem button.got { background: linear-gradient(145deg, #7dffb4, #23c877); color: #063; opacity: .75; }

/* ─── карта ─── */
.mapwrap { position: absolute; inset: 0; background: #0b1024; touch-action: none; }
.mapwrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.maphud { position: absolute; left: 12px; right: 12px; top: calc(70px + var(--safe-t)); display: flex; gap: 8px; pointer-events: none; }
.maphud > * { pointer-events: auto; }
.maphud .chip { padding: 8px 13px; font-size: 13px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); background: rgba(14,20,50,.7); }
.zoom { position: absolute; right: 12px; bottom: calc(104px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; }
.zoom button { width: 46px; height: 46px; border-radius: 16px; font-size: 24px; font-weight: 700; background: rgba(14,20,50,.78); border: 1px solid var(--edge); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.zoom button:active { transform: scale(.9); }
.legend { position: absolute; left: 12px; bottom: calc(104px + var(--safe-b)); padding: 9px 12px; border-radius: 16px; font-size: 12px; background: rgba(14,20,50,.78); border: 1px solid var(--edge); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); display: grid; gap: 4px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 4px; margin-right: 7px; vertical-align: -1px; }

/* ─── работа ─── */
.job { display: flex; align-items: center; gap: 12px; padding: 13px; margin-bottom: 10px; transition: transform .15s; }
.job:active { transform: scale(.975); }
.job.lock { opacity: .5; }
.job .n { font-weight: 800; font-size: 16px; }
.job .pay { color: var(--gold); font-weight: 800; white-space: nowrap; }
.job.best { border-color: rgba(255,207,74,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 0 0 1px rgba(255,207,74,.25), 0 14px 34px rgba(255,180,40,.18); }

/* ─── казино ─── */
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gcard { padding: 16px 14px; min-height: 128px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; transition: transform .16s; }
.gcard:active { transform: scale(.955); }
.gcard::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--c, var(--aqua)); filter: blur(34px); opacity: .5; }
.gcard .ico { width: 48px; height: 48px; border-radius: 16px; color: var(--c, var(--aqua)); position: relative; z-index: 1; }
.gcard .ico svg { width: 26px; height: 26px; }
.gcard b { font-size: 17px; position: relative; z-index: 1; }
.gcard small { color: var(--mute); position: relative; z-index: 1; }
.betbox { padding: 12px; margin: 0 12px calc(12px + var(--safe-b)); }
.betrow { display: flex; gap: 8px; margin-bottom: 10px; }
.betrow input { flex: 1; min-width: 0; height: 46px; border-radius: 15px; padding: 0 14px; font: inherit; font-weight: 800; font-size: 18px; color: #fff; background: rgba(0,0,0,.3); border: 1px solid var(--edge); outline: none; }
.quick { display: flex; gap: 7px; margin-bottom: 10px; }
.quick button { flex: 1; height: 36px; border-radius: 12px; font-weight: 700; font-size: 13px; background: rgba(255,255,255,.1); border: 1px solid var(--edge); }
.quick button:active { transform: scale(.93); background: rgba(255,255,255,.2); }
.table { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 14px; overflow: hidden; }
.win { color: var(--green); } .lose { color: var(--red); }
.outcome { font-size: 22px; font-weight: 900; min-height: 30px; text-align: center; }
.outcome.show { animation: pop .5s cubic-bezier(.3,1.6,.5,1); }

/* кости */
.dicerow { display: flex; gap: 16px; align-items: center; }
.die { width: 70px; height: 70px; border-radius: 18px; background: linear-gradient(145deg, #fff, #d6dcf5); box-shadow: 0 12px 26px rgba(0,0,0,.45), inset 0 -6px 10px rgba(80,90,150,.3);
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 11px; gap: 2px; }
.die i { border-radius: 50%; }
.die i.p { background: radial-gradient(circle at 35% 30%, #5b63a8, #171c40); }
.die.dark { background: linear-gradient(145deg, #3a4284, #1b2052); }
.die.dark i.p { background: radial-gradient(circle at 35% 30%, #fff, #b9c3f5); }
.die.roll { animation: roll .7s cubic-bezier(.3,.8,.3,1); }
@keyframes roll { 0% { transform: rotate(0) scale(.6) translateY(-60px); } 60% { transform: rotate(540deg) scale(1.1); } 100% { transform: rotate(720deg) scale(1); } }
.side { text-align: center; } .side small { color: var(--mute); display: block; margin-top: 8px; font-weight: 700; }

/* слоты */
.slots { display: flex; gap: 10px; padding: 14px; border-radius: 26px; background: linear-gradient(160deg, #2b1a5e, #120a30); border: 2px solid rgba(255,207,74,.55); box-shadow: 0 0 40px rgba(255,180,40,.25), inset 0 2px 0 rgba(255,255,255,.2); }
.reel { width: 84px; height: 96px; border-radius: 16px; overflow: hidden; background: linear-gradient(#fff, #e8ecff); position: relative; box-shadow: inset 0 10px 14px rgba(0,0,0,.28), inset 0 -10px 14px rgba(0,0,0,.28); }
.reel .strip { position: absolute; left: 0; right: 0; top: 0; }
.reel .sym { height: 96px; display: grid; place-items: center; font-weight: 900; font-size: 34px; }
.sym.s0 { color: #1a2152; font-size: 24px; letter-spacing: .04em; } .sym.s1 { color: #8b3dff; } .sym.s2 { color: #f0a800; } .sym.s3 { color: #ff2f55; font-size: 46px; }

/* рулетка */
.wheel { width: 250px; height: 250px; border-radius: 50%; position: relative; box-shadow: 0 0 0 8px #2a1d08, 0 0 0 11px var(--gold), 0 20px 50px rgba(0,0,0,.6); }
.wheel canvas { width: 100%; height: 100%; border-radius: 50%; display: block; transition: transform 4.2s cubic-bezier(.12,.72,.12,1); }
.wheel::after { content: ""; position: absolute; left: 50%; top: -16px; transform: translateX(-50%); border: 11px solid transparent; border-top: 22px solid #fff; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.pick { display: flex; gap: 8px; width: 100%; padding: 0 12px 8px; }
.pick button { flex: 1; height: 44px; border-radius: 14px; font-weight: 800; border: 2px solid transparent; }
.pick .r { background: linear-gradient(160deg, #ff6b83, #d92e52); } .pick .b { background: linear-gradient(160deg, #3b4270, #12152c); } .pick .n { background: linear-gradient(160deg, #35c988, #108058); }
.pick button.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }

/* монетка */
.coin { width: 150px; height: 150px; position: relative; transform-style: preserve-3d; transition: transform 2.2s cubic-bezier(.2,.7,.2,1); }
.coin div { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 30px; backface-visibility: hidden; color: #6b4300;
  background: radial-gradient(circle at 35% 30%, #fff3b8, #ffc531 55%, #c98a00); box-shadow: inset 0 0 0 8px rgba(160,100,0,.35), 0 16px 34px rgba(0,0,0,.5); }
.coin .t { transform: rotateY(180deg); }

/* апгрейд */
.dial { width: 240px; height: 240px; position: relative; }
.dial canvas { width: 100%; height: 100%; display: block; }
.dial .arrow { position: absolute; left: 50%; top: 50%; width: 4px; height: 112px; margin: -112px 0 0 -2px; transform-origin: 50% 100%; transition: transform 3.4s cubic-bezier(.15,.7,.1,1); }
.dial .arrow::before { content: ""; position: absolute; left: -8px; top: -4px; border: 10px solid transparent; border-bottom: 22px solid #fff; filter: drop-shadow(0 0 8px #fff); }
.dial .mid { position: absolute; inset: 62px; border-radius: 50%; display: grid; place-items: center; text-align: center; background: rgba(8,12,32,.9); border: 1px solid var(--edge); font-weight: 900; font-size: 28px; }
.dial .mid small { display: block; font-size: 12px; color: var(--mute); font-weight: 600; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; background: rgba(255,255,255,.16); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(160deg, #fff, var(--aqua)); box-shadow: 0 4px 14px rgba(53,214,255,.7); }

/* мины */
.mines { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; max-width: 360px; }
.mines button { aspect-ratio: 1; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(145deg, #3a4aa8, #222b68); border: 1px solid rgba(255,255,255,.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 14px rgba(0,0,0,.35); transition: transform .14s; }
.mines button:active { transform: scale(.9); }
.mines button svg { width: 26px; height: 26px; opacity: 0; }
.mines button.gem { background: linear-gradient(145deg, #2fe0a0, #0c8f6a); animation: pop .35s; } .mines button.gem svg { opacity: 1; color: #eafff6; }
.mines button.bomb { background: linear-gradient(145deg, #ff6b83, #a81a3c); animation: shake .35s; } .mines button.bomb svg { opacity: 1; }
.mines button.dim { opacity: .4; }

.skeleton { height: 92px; border-radius: var(--r); margin-bottom: 12px; background: linear-gradient(100deg, rgba(255,255,255,.05) 30%, rgba(255,255,255,.14) 50%, rgba(255,255,255,.05) 70%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.confetti { position: fixed; top: -12px; width: 9px; height: 14px; z-index: 95; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(112vh) rotate(720deg); } }
.toprow { display: flex; align-items: center; gap: 12px; padding: 11px 13px; margin-bottom: 8px; }
.toprow .pos { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; background: rgba(255,255,255,.1); }
.toprow.p1 .pos { background: linear-gradient(145deg, #ffe07a, #ff9d2a); color: #3a2300; }
.toprow.p2 .pos { background: linear-gradient(145deg, #f2f5ff, #9aa7d0); color: #1a2152; }
.toprow.p3 .pos { background: linear-gradient(145deg, #f0b98a, #b06a34); color: #2e1500; }
.seg { display: flex; padding: 4px; border-radius: 16px; margin-bottom: 12px; }
.seg button { flex: 1; height: 38px; border-radius: 12px; font-weight: 700; color: var(--mute); transition: all .25s; }
.seg button.on { color: #fff; background: linear-gradient(160deg, rgba(86,196,255,.5), rgba(110,86,255,.4)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
