:root {
  color-scheme: dark;
  font-family: "Inter", "Geist", system-ui, sans-serif;
  background: #090a0b;
  color: #f5f5f5;
  --muted: #aaaeb3;
  --line: #ffffff25;
  --bottom: max(14px, env(safe-area-inset-bottom), var(--tg-content-safe-area-inset-bottom, 0px));
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
h1, h2, p, ul { margin: 0; }
h1 { font-weight: 720; font-size: clamp(2.45rem, 8vw, 4.1rem); line-height: .99; letter-spacing: -.075em; }
h2 { font-size: 1.2rem; letter-spacing: -.035em; }
p { line-height: 1.55; }

.backdrop, #snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.backdrop {
  background:
    radial-gradient(ellipse at 72% -12%, #6c727b57, transparent 51%),
    radial-gradient(ellipse at 10% 64%, #43495430, transparent 48%),
    linear-gradient(#e0e6ef0a 1px, transparent 1px) 50% 0 / 38px 38px,
    linear-gradient(90deg, #e0e6ef0a 1px, transparent 1px) 50% 0 / 38px 38px, #090a0b;
}
#snow { z-index: 1; }
.shell { position: relative; max-width: 950px; margin: auto; padding: max(16px, var(--tg-content-safe-area-inset-top, 0px)) clamp(14px, 4vw, 32px) calc(var(--bottom) + 98px); }
.header { position: relative; z-index: 2; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 1.18rem; font-weight: 760; letter-spacing: -.045em; }
.emblem, .icon {
  display: inline-grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px;
  border: 1px solid #ffffff4b; border-radius: 13px; background: linear-gradient(155deg,#f7f7f7,#a9acb1);
  box-shadow: inset 0 1px 4px #fff, inset 0 -5px 9px #646b7550, 0 3px 12px #0006;
  color: #141518; font-size: 1.23rem; font-weight: 700;
}
.header-tools { display: flex; gap: 8px; align-items: center; }
.demo-tag { font-size: .72rem; border: 1px solid var(--line); border-radius: 99px; padding: 5px 8px; color: var(--muted); }
.tool {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: linear-gradient(#ffffff18,#ffffff08);
  box-shadow: inset 0 1px 3px #ffffff24; font-size: 1.25rem;
}
#snow-toggle { filter: grayscale(1); }
.tool[aria-pressed="false"] { color: #888b90; }
.tool[aria-busy="true"] { animation: turn .8s linear infinite; }
@keyframes turn { to { transform: rotate(1turn); } }
.heading { margin: clamp(28px, 5vh, 53px) 0 22px; }
.heading p { color: var(--muted); margin-top: 12px; font-size: .93rem; }
.screen { position: relative; z-index: 2; animation: reveal .23s ease-out; }
@keyframes reveal { from { opacity: .5; transform: translateY(5px); } }
.layout { display: grid; gap: 12px; }
.wallet-art i:nth-child(2) { width: 93%; height: 60%; right: -22%; top: 17%; }
.glass {
  border: 1px solid var(--line); border-radius: 26px;
  background: linear-gradient(158deg, #ffffff15, #ffffff05 56%, #ffffff0c), #10111460;
  box-shadow: inset 0 1px 0 #ffffff27, inset 0 -1px 0 #ffffff0a, 0 12px 28px #0003;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.wallet { position: relative; isolation: isolate; overflow: hidden; padding: clamp(20px, 5vw, 32px); min-height: 245px; }
.wallet-content { position: relative; z-index: 1; }
.wallet-art { position: absolute; inset: 0; overflow: hidden; pointer-events: none; background: radial-gradient(ellipse at 80% 30%, #9a9ea750 0, transparent 62%); }
.wallet-art em {
  position: absolute; top: -19%; right: -1%; font-style: normal; font-size: clamp(11rem, 55vw, 21rem);
  letter-spacing: -.1em; line-height: 1; transform: rotate(-13deg);
  background: linear-gradient(160deg,#ffffff5a,#9da7b124 54%,#cad4e53b);
  color: transparent; -webkit-background-clip: text; background-clip: text; opacity: .8;
}
.wallet-art i {
  position: absolute; width: 78%; height: 48%; top: 23%; right: -14%;
  border: 1px solid #ffffff35; box-shadow: 0 3px 16px #ffffff0b; border-radius: 50%; transform: rotate(-26deg);
}
.label { color: #c3c5ca; font-size: .77rem; font-weight: 550; }
.balance-line { display: flex; align-items: center; gap: 11px; margin-top: 7px; min-height: 70px; }
.balance-line strong { font-size: clamp(2rem, 10vw, 5.25rem); font-weight: 730; letter-spacing: -.09em; line-height: 1.05; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.balance-line > span { color: #e1e3e7; font-size: clamp(1.5rem, 5vw, 2.6rem); }
.muted { color: var(--muted); font-size: .85rem; }
.rate { margin-top: 3px; }
.primary, .secondary {
  min-height: 48px; border-radius: 16px; border: 1px solid #ffffff40;
  padding: 11px 16px; font-size: .9rem; font-weight: 720;
}
.primary { color: #111216; background: linear-gradient(175deg,#fff,#d0d2d6); box-shadow: inset 0 2px 1px #fff, 0 5px 18px #eef3ff19; }
.secondary { background: #ffffff0c; }
.withdraw { margin-top: 23px; display: flex; align-items: center; justify-content: space-between; gap: 20px; width: min(100%, 310px); }
button:active:not(:disabled), .dock a:active { transform: scale(.97); }
button, .dock a { transition: transform .14s ease, background-color .14s ease; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { display: grid; align-content: start; gap: 8px; padding: clamp(10px, 2.9vw, 20px); border-radius: 20px; }
.tile .icon { width: 31px; height: 31px; border-radius: 11px; font-size: 1rem; }
.tile .label { line-height: 1.2; }
.tile strong { font-size: clamp(.9rem, 3.8vw, 1.35rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wallet-stats {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  margin: 19px 0 0; padding-top: 14px; border-top: 1px solid #ffffff32;
}
.wallet-stats div { padding: 0 9px; border-left: 1px solid #ffffff24; }
.wallet-stats div:first-child { padding-left: 0; border-left: 0; }
.wallet-stats dt { color: #bec2c9; font-size: .73rem; line-height: 1.3; }
.wallet-stats dd { margin: 4px 0 0; font-size: .94rem; font-weight: 720; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.history { padding: 16px; }
.history .icon { width: 32px; height: 32px; border-radius: 11px; }
.card-heading { display: flex; gap: 11px; align-items: center; }
.history ul { margin-top: 10px; padding: 0; list-style: none; }
.history li { padding: 11px 0; border-top: 1px solid #ffffff18; }
.history li:last-child { padding-bottom: 1px; }
.history-entry { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.history-entry strong { font-size: .86rem; display: block; overflow-wrap: anywhere; }
.history-entry div:last-child { text-align: right; }
.history-entry small { color: var(--muted); font-size: .72rem; }
.arrow { position: relative; display: inline-block; width: 14px; height: 14px; flex: 0 0 14px; }
.arrow::before { content: ""; position: absolute; top: 1px; right: 1px; width: 8px; height: 8px; border-top: 1.5px solid; border-right: 1.5px solid; }
.arrow::after { content: ""; position: absolute; top: 6px; left: 0; width: 14px; height: 1.5px; transform: rotate(-45deg); background: currentColor; }

.friend-card, .notice { padding: clamp(16px, 4vw, 29px); }
.friend-card { background: radial-gradient(ellipse at 92% 0,#71798541,transparent 65%),#14151ad1; }
.friend-card h2 { font-size: clamp(1.5rem, 5vw, 2.2rem); margin-top: 14px; }
.friend-card p { margin: 7px 0 22px; }
.friend-card label { display: block; margin-bottom: 7px; }
.friend-card input {
  width: 100%; min-height: 50px; border-radius: 14px; border: 1px solid var(--line);
  background: #0004; color: #e5e5e5; padding: 11px; font: .83rem ui-monospace, monospace;
}
.actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.friends-stats { grid-template-columns: 1fr 1fr; margin-top: 12px; }
.large { width: 48px; height: 48px; border-radius: 16px; }
.notice { position: relative; z-index: 2; margin-top: 30px; }
.notice h1 { font-size: 2rem; }
.notice p { margin: 12px 0; color: var(--muted); }

.toast { position: fixed; z-index: 5; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom) + 70px); width: max-content; max-width: calc(100% - 28px); padding: 10px 16px; border-radius: 16px; background: #e7e7e7; color: #171719; box-shadow: 0 2px 24px #0008; font-size: .84rem; text-align: center; }
@media (min-width: 700px) {
  .layout { grid-template-columns: 1.4fr 1fr; gap: 14px; }
  .history { align-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.dock {
  --active: 0;
  --dock-inset: 5px;
  --slot: calc((100% - 2 * var(--dock-inset)) / 3);
  position: fixed; z-index: 4; left: 50%; bottom: var(--bottom); transform: translateX(-50%);
  width: min(calc(100% - 18px), 510px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: var(--dock-inset); border-radius: 23px; isolation: isolate;
  background: linear-gradient(156deg,#ffffff19,#ffffff02),#14151880;
  box-shadow: inset 0 1px 1px #ffffff30,0 6px 26px #0007;
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.dock-highlight {
  position: absolute; z-index: -1; top: var(--dock-inset); bottom: var(--dock-inset);
  left: var(--dock-inset); width: var(--slot); border-radius: 18px;
  transform: translateX(calc(100% * var(--active)));
  transition: transform .37s cubic-bezier(.22, .85, .29, 1.12);
  background: linear-gradient(153deg, #f5f6f7e8, #b8bac0c7);
  box-shadow: inset 0 1px 4px #fff9, 0 2px 13px #ffffff18;
  pointer-events: none;
}
.dock a {
  min-width: 0; min-height: 52px; display: grid; place-content: center; text-align: center;
  gap: 3px; border-radius: 18px; font-size: .72rem; color: #d0d2d8;
  transition: color .25s ease, transform .14s ease;
}
.dock a span { font-size: 1.16rem; }
.dock a[aria-current] { color: #141518; font-weight: 750; }
.pack-emoji { display: inline-grid; place-items: center; line-height: 1; filter: grayscale(1); }
.pack-emoji img { display: block; width: 1.25em; height: 1.25em; object-fit: contain; }
.dock .pack-emoji { min-height: 23px; }
.icon .pack-emoji { font-size: .95rem; }

.arcade-heading { display: flex; align-items: center; gap: 11px; }
.arcade-heading h2 { font-size: clamp(1.7rem, 7vw, 3rem); }
.arcade-heading .tool { flex-shrink: 0; font-size: 1.8rem; }
.arcade-lobby-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.credits-card {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border: 1px solid #ffffff26; border-radius: 14px;
  background: linear-gradient(156deg,#ffffff16,#ffffff08); min-width: 0;
  box-shadow: inset 0 1px 1px #ffffff16;
}
.credits-card .label { display: block; font-size: .65rem; }
.credits-card strong { display: block; font-size: .98rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.arcade-modes { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.arcade-card {
  position: relative; display: flex; align-items: flex-end; min-height: 143px; padding: 13px;
  text-align: left; border-radius: 20px; isolation: isolate; overflow: hidden;
  background: linear-gradient(152deg,#282b32,#101116 80%);
  box-shadow: inset 0 1px 0 #ffffff21,0 5px 13px #0003;
  transition: transform .17s ease,border-color .23s ease;
}
.arcade-card:hover { border-color: #ffffff65; }
.arcade-card:first-child {
  grid-column: 1 / -1; min-height: 159px; padding: 16px;
  background: linear-gradient(117deg,#212329 8%, #14151b 46%, #373c46);
}
.arcade-card .arrow { position: absolute; right: 13px; top: 14px; z-index: 2; opacity: .65; }
.arcade-card-copy { position: relative; z-index: 1; display: grid; gap: 4px; }
.arcade-card strong { font-size: clamp(.95rem,4vw,1.18rem); line-height: 1.15; letter-spacing: -.035em; }
.arcade-card:first-child strong { font-size: clamp(1.65rem,6vw,2.25rem); }
.arcade-card small { font-size: .73rem; color: #c4c6cd; }
.arcade-card-art {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(ellipse at 71% 13%,#bac1ce34,transparent 51%),
    linear-gradient(#ffffff0c 1px,transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg,#ffffff0c 1px,transparent 1px) 0 0 / 16px 16px;
  -webkit-mask-image: linear-gradient(#000 45%,transparent 100%);
  mask-image: linear-gradient(#000 45%,transparent 100%);
}
.arcade-card-art > .pack-emoji {
  position: absolute; top: 11px; left: 13px; font-size: clamp(2.15rem,9vw,3.1rem);
  transform: rotate(-11deg);
  filter: grayscale(1) drop-shadow(3px 8px 7px #0008);
}
.arcade-card[data-mode="dice"] .arcade-card-art > .pack-emoji { transform: rotate(14deg); }
.arcade-card[data-mode="mines"] .arcade-card-art { background: radial-gradient(ellipse at 20% 23%,#a0aabf54,transparent 57%); }
.arcade-card[data-mode="wheel"] .arcade-card-art > .pack-emoji { transform: rotate(10deg); }
.arcade-stage { padding: clamp(12px, 3vw, 21px); }
.arcade-result { min-height: 1.45em; margin: 10px 0 6px; font-weight: 650; text-align: center; }
.choice-row, .wheel-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice { min-height: 54px; padding: 8px; border: 1px solid #ffffff39; border-radius: 15px; background: linear-gradient(#ffffff15,#ffffff09); }
.choice strong, .choice small { display: block; }
.choice small { margin-top: 4px; color: #cdd0d5; font-size: .73rem; }
.full { width: 100%; margin-top: 10px; }
.game-medallion {
  display: grid; place-items: center; width: min(38vw, 144px); aspect-ratio: 1; margin: 20px auto;
  border: 2px solid #e9ebef88; border-radius: 50%; font-size: clamp(2.6rem, 13vw, 4.3rem);
  font-weight: 740; font-variant-numeric: tabular-nums;
  background: radial-gradient(circle at 35% 21%, #adb0b9 0, #666a74 52%, #313438 84%);
  box-shadow: inset 0 0 0 7px #ffffff29, 0 13px 26px #0007;
}
.flip { animation: coin-flip .46s ease-in-out; }
@keyframes coin-flip { 50% { transform: rotateY(270deg) translateY(-14px); } 100% { transform: rotateY(540deg); } }
.threshold-label { display: flex; justify-content: space-between; margin: 4px 0; font-size: .86rem; }
#threshold { width: 100%; margin: 8px 0 15px; accent-color: #d8d9dd; }
.stake-panel {
  margin-bottom: 12px; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 15px; background: linear-gradient(145deg,#ffffff0d,#05050965);
}
.stake-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stake-row label { display: block; font-size: .9rem; font-weight: 700; }
.stake-hint, .game-rules { font-size: .75rem; color: var(--muted); }
.stake-hint { margin-top: 3px; line-height: 1.3; }
.stake-hint[data-invalid="true"] { color: #f1f1f2; }
.stake-actions input[aria-invalid="true"] { border-style: dashed; }
.stake-actions input:disabled { color: #adafb7; opacity: 1; }
.stake-actions { display: flex; gap: 4px; }
.stake-actions button, .stake-actions input, .mine-meta select {
  min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #15171ccc; color: #f5f5f5;
}
.stake-actions button { min-width: 38px; }
.stake-actions input { width: 65px; text-align: center; appearance: textfield; }
.stake-actions input::-webkit-inner-spin-button { appearance: none; }
.case-table {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 20px 8px;
  border-radius: 21px; background: repeating-linear-gradient(115deg,#fff0 0 9px,#fff1 10px 11px),#17191d88;
  box-shadow: inset 0 1px 1px #ffffff36; overflow: hidden; text-align: center;
}
.case-place { display: grid; place-items: center; gap: 8px; }
.case-place strong { font-size: .83rem; }
.case-hand { font: 1.65rem system-ui, sans-serif; color: #e0e0e0; }
.case-box {
  display: grid; place-items: center; width: min(100%,115px); aspect-ratio: 1.38;
  border-radius: 13px; border: 1px solid #ffffff75; font-size: 2.1rem;
  background: repeating-linear-gradient(90deg, #ffffff12 0 1px, transparent 1px 8px), linear-gradient(150deg,#646872,#222428);
  box-shadow: inset 0 2px 5px #ffffff3a, 0 9px 13px #0006;
}
.peek .case-box { animation: peek .5s ease-in-out; }
.swap .case-place:first-child .case-box { animation: swap-left .58s ease-in-out; }
.swap .case-place:last-child .case-box { animation: swap-right .58s ease-in-out; }
.reveal-cases .case-box { animation: case-reveal .36s ease-out; }
@keyframes peek { 50% { transform: rotateX(31deg) translateY(-8px); } }
@keyframes swap-left { 50% { transform: translate(85%, -17px) rotate(8deg); } }
@keyframes swap-right { 50% { transform: translate(-85%, 17px) rotate(-8deg); } }
@keyframes case-reveal { from { transform: scale(.82); opacity: .55; } }
.game-rules { margin: 10px 0; text-align: center; }
.mine-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; font-size: .77rem; color: #cdd0d5; }
.mine-meta select { margin-left: 4px; padding: 4px; }
.mine-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; }
.mine-tile {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; border: 1px solid #ffffff27;
  background: linear-gradient(155deg,#ffffff16,#ffffff05); font-size: clamp(1rem,5vw,1.7rem);
}
.mine-tile:disabled { opacity: .76; }
.mine-tile.is-gem { background: linear-gradient(150deg,#e5e9f054,#a3acbf26); opacity: 1; }
.mine-tile.is-mine { border-style: dashed; background: #0b0b0d; opacity: 1; }
.wheel-frame { position: relative; width: min(69vw, 270px); aspect-ratio: 1; margin: 19px auto 13px; }
.wheel-disc {
  width: 100%; height: 100%; border-radius: 50%; border: 5px solid #373a41;
  background: repeating-conic-gradient(transparent 0deg 16deg,#131417 16deg 18deg),
    conic-gradient(#34363d 0deg 18deg,#d5d7dc 18deg 36deg,#838d9c 36deg 54deg,#34363d 54deg 72deg,
       #d5d7dc 72deg 90deg,#34363d 90deg 108deg,#d5d7dc 108deg 126deg,#fff 126deg 144deg,
       #34363d 144deg 162deg,#d5d7dc 162deg 180deg,#34363d 180deg 198deg,#d5d7dc 198deg 216deg,
       #838d9c 216deg 234deg,#34363d 234deg 252deg,#d5d7dc 252deg 270deg,#34363d 270deg 288deg,
       #d5d7dc 288deg 306deg,#34363d 306deg 324deg,#d5d7dc 324deg 342deg,#34363d 342deg);
  box-shadow: 0 9px 25px #0009, inset 0 0 15px #0008;
}
.wheel-marker { position: absolute; z-index: 1; left: calc(50% - 9px); top: -10px; border: 9px solid transparent; border-top: 17px solid #fff; }
.wheel-center {
  position: absolute; inset: 19%; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 25%,#33363f,#15161a); border: 1px solid #000a;
  box-shadow: 0 0 12px #000b; font-size: 2rem;
}
.wheel-selected { outline: 1px solid #fff; }
.sector { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1px solid #fff9; }
.black { background: #34363d; }.silver { background: #d5d7dc; }.crystal { background: #838d9c; }.star { background: #fff; }
@media (min-width: 700px) {
  .arcade-modes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .arcade-stage { max-width: 575px; }
}
.case-burst .case-place:first-child .case-box { animation: burst .4s ease-out; }
@keyframes burst {
  20% { transform: translateX(-5px) rotate(-4deg); box-shadow: 0 0 30px #fff9; }
  40% { transform: translateX(5px) rotate(4deg); }
  70% { transform: translateX(-3px); }
}
.arcade-balance { margin-left: auto; padding: 7px 10px; border-radius: 99px; border: 1px solid var(--line); font-size: .78rem; font-weight: 650; white-space: nowrap; }

/* Arcade lobby and round feedback */
#arcade .heading { margin-bottom: 17px; }
.coin-art {
  position: absolute; right: clamp(12px, 8vw, 105px); top: -16px; width: 164px; height: 164px;
  display: grid; place-items: center; transform: rotate(-16deg) scaleX(.8);
  border: 1px solid #c0c5cd; border-radius: 50%; color: #fbfcfd;
  background: repeating-linear-gradient(90deg,#bbbfc6 0 1px,#777d87 1px 3px);
  box-shadow: 6px 15px 0 #434750, 10px 20px 27px #0009;
  pointer-events: none;
}
.coin-art i {
  position: absolute; inset: 8px; border-radius: 50%; border: 3px double #eceef2;
  background: radial-gradient(circle at 29% 19%,#d1d4db,#858b96 52%,#525763 84%);
}
.coin-art b { position: relative; font-size: 4.2rem; text-shadow: 1px 3px 0 #545861, 0 -1px 0 #fff; }
.arcade-stage { background: linear-gradient(170deg,#202127e8,#101115f2 64%); }
.choice-scene {
  display: grid; place-items: center; min-height: 170px; perspective: 650px;
  border: 1px solid #ffffff19; border-radius: 17px; overflow: hidden; margin-bottom: 11px;
  background: radial-gradient(ellipse at 50% 70%,#c3cadb23,transparent 54%),
    linear-gradient(#ffffff08 1px,transparent 1px) 0 0 / 19px 19px,
    linear-gradient(90deg,#ffffff08 1px,transparent 1px) 0 0 / 19px 19px,#111217;
}
.choice-scene .game-medallion { width: min(28vw,126px); margin: 20px auto; }
.medallion-coin { border: 4px double #e2e4e8de; box-shadow: inset 0 0 0 5px #ffffff38,inset 0 -9px 18px #222b,0 10px 23px #0007; }
.medallion-dice { border-radius: 25%; color: #272832; background: linear-gradient(145deg,#e0e1e7,#9498a1); }
.coin-face { font-size: clamp(2.3rem,12vw,4rem); line-height: 1; text-shadow: 0 3px 0 #1118; }
.choice-scene .flip { animation: coin-toss .78s cubic-bezier(.28,.62,.63,1); }
.dice-roll { animation: dice-roll .63s cubic-bezier(.25,.66,.37,1); }
.land { animation: land .28s ease-out; }
@keyframes coin-toss {
  0% { transform: translateY(8px) rotateX(0); }
  42% { transform: translateY(-42px) rotateX(440deg); }
  82% { transform: translateY(5px) rotateX(670deg); }
  100% { transform: translateY(0) rotateX(720deg); }
}
@keyframes dice-roll {
  0% { transform: translate(-34px,8px) rotate(-14deg); }
  43% { transform: translate(14px,-28px) rotate(228deg) rotateY(180deg); }
  82% { transform: translate(7px,4px) rotate(372deg); }
  100% { transform: translate(0,0) rotate(360deg); }
}
@keyframes land { 0% { transform: scale(.88); } 62% { transform: scale(1.06); } }
.arcade-result { min-height: 0; margin: 0; text-align: left; }
.round-progress { margin-top: 10px; color: #bfc1c8; font-size: .79rem; text-align: center; }
.round-outcome {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px;
  margin: 11px 0 0; padding: 12px; border: 1px solid #ffffff35; border-radius: 15px;
  background: #17181e; min-height: 62px; box-shadow: 0 5px 14px #0005;
  animation: outcome-in .32s cubic-bezier(.22,.8,.29,1);
  scroll-margin-bottom: 90px;
}
.round-outcome[data-state="win"] { background: linear-gradient(145deg,#e4e6eb,#bfc3cc); color: #17191e; border-color: #d8dce5; }
.round-outcome[data-state="loss"] { border-color: #ffffff38; color: #f1f1f1; }
.round-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #ffffff23; font-size: 1.2rem; }
.round-outcome[data-state="win"] .round-icon { background: #292c371c; }
.round-outcome strong, .round-outcome small { display: block; }
.round-outcome strong { font-size: .94rem; }
.round-outcome small { margin-top: 3px; font-size: .71rem; font-weight: 480; opacity: .82; }
.round-totals {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  margin: 0; padding-top: 9px; border-top: 1px solid currentColor;
  border-top-color: color-mix(in srgb,currentColor 22%,transparent);
}
.round-totals div { padding-inline: 8px; }
.round-totals div:first-child { padding-left: 0; }
.round-totals div:last-child { padding-right: 0; text-align: right; }
.round-totals dt { font-size: .69rem; font-weight: 500; opacity: .77; }
.round-totals dd {
  margin: 3px 0 0; font-size: .87rem; font-weight: 700;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
@keyframes outcome-in { from { opacity: .4; transform: translateY(8px) scale(.985); } }
.case-gem { box-shadow: inset 0 0 16px #fff5,0 0 32px #dee7ff46; }
.case-mine { border-color: #ffffff5c; background: linear-gradient(145deg,#343640,#15161b); }
@media (max-width: 350px) {
  .coin-art { right: -16px; }
  .round-outcome { gap: 7px; padding: 8px; }
}
