/* Marmos Casino 1.1 — restrained Material-inspired surfaces.
   Assets are extracted from the approved concepts; all UI is real HTML.
   System fonts only. No CSS frameworks, remote fonts or decorative glow. */
:root {
  color-scheme: dark;
  --bg: #10131c; --rail: #141823; --surface: #191e2c; --raised: #202637;
  --input: #121722; --hover: #262d40; --purple: #b99aed; --purple-strong: #a77de5;
  --purple-container: #302743; --text: #f2f1f8; --muted: #a0a7bc; --faint: #7f89a2;
  --green: #83d2b0; --red: #f39fae; --radius: 20px; --rail-width: 228px;
  --ease: cubic-bezier(.2,.8,.2,1); --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 14px; line-height: 1.5; font-synthesis: none; text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: 96px; }
body { margin: 0; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; text-decoration: none; }
button, a, summary { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--purple); outline-offset: 4px;
}
input, select, textarea { min-width: 0; width: 100%; border: 0; border-radius: 12px; background: var(--input); padding: 13px 15px; }
input, select { min-height: 48px; }
input:disabled, select:disabled { opacity: .55; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; min-height: 90px; }
input[type=number] { appearance: textfield; }
input::-webkit-inner-spin-button { appearance: none; }
select { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 3vw, 40px); line-height: 1.2; font-weight: 650; letter-spacing: -.035em; }
h2 { font-size: 19px; font-weight: 620; letter-spacing: -.018em; }
h3 { font-size: 15px; font-weight: 600; }
p { color: var(--muted); }
strong { font-weight: 620; }
small { color: var(--muted); }
.icon { width: 22px; height: 22px; flex-shrink: 0; vertical-align: middle; }
.marmos-mark { width: 38px; height: 38px; flex-shrink: 0; }
.brand-name { font-size: 19px; letter-spacing: -.035em; font-weight: 640; white-space: nowrap; }
.brand-name b { color: var(--purple); font-weight: inherit; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 7px; height: 80px; }
.layout { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--rail-width); background: var(--rail); padding: 0 14px 20px; display: flex; flex-direction: column; z-index: 40; }
.sidebar nav { margin-top: 29px; display: grid; gap: 7px; }
.nav-item { min-height: 49px; border-radius: 13px; display: flex; align-items: center; gap: 15px; padding: 11px 15px; color: var(--muted); transition: background .18s, color .18s; }
.nav-item:hover { background: #1e2332; color: var(--text); }
.nav-item .icon { width: 22px; height: 22px; }
.nav-item.active { color: #e0cdfb; background: var(--purple-container); font-weight: 580; }
.nav-divider { height: 1px; margin: 21px 14px; background: #272d3c; }
.sidebar-bottom { margin-top: auto; padding-top: 28px; }
.sidebar-key { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; color: var(--purple); padding: 14px 9px; font-size: 12px; border-radius: 12px; }
.sidebar-key:hover { background: #1e2332; }
.sidebar-key > .icon:last-child { width: 14px; margin-left: auto; }
.sidebar-footer { display: flex; gap: 7px; align-items: center; font-size: 10px; color: var(--faint); padding: 18px 9px 0; }
.sidebar-footer > span:last-child { margin-left: auto; }
.live-dot { display: inline-block; width: 6px; height: 6px; background: var(--green); border-radius: 50%; vertical-align: middle; margin-right: 3px; }
.live-dot.offline { background: var(--red); }
.workspace { margin-left: var(--rail-width); min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 clamp(24px, 3vw, 46px); background: var(--bg); flex-shrink: 0; }
.breadcrumb { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.demo-label { font-size: 10px; color: var(--faint); background: #1b202d; padding: 3px 7px; border-radius: 5px; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.header-wallet { display: flex; align-items: center; gap: 23px; background: var(--surface); border-radius: 14px; padding: 7px 8px 7px 17px; min-height: 55px; }
.header-wallet small { display: block; font-size: 11px; line-height: 1.3; }
.header-wallet strong { display: block; font-size: 19px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.key-small { width: 36px; height: 36px; border-radius: 11px; background: var(--purple); color: #231633; display: grid; place-items: center; }
.key-small:hover { background: #cdb3f7; }
.profile { display: flex; gap: 11px; align-items: center; padding: 0; min-height: 44px; }
.avatar { width: 39px; height: 39px; display: grid; place-items: center; background: #353045; color: #e5d4fd; border-radius: 13px; font-size: 17px; font-weight: 600; flex-shrink: 0; }
.avatar.large { width: 56px; height: 56px; font-size: 25px; border-radius: 17px; }
.profile-name { display: flex; align-items: center; gap: 12px; max-width: 170px; font-size: 13px; }
.profile-name .icon { width: 13px; color: var(--muted); transform: rotate(90deg); }
.mobile-brand, .mobile-nav { display: none; }
.main-content { width: 100%; max-width: 1392px; margin: 0 auto; padding: 34px clamp(24px, 3vw, 46px) 50px; flex: 1; }
.page-footer { display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 3vw, 46px) 24px; color: var(--faint); font-size: 11px; }
.page-footer > span:first-child { font-weight: 600; color: var(--muted); }
.page-footer a:hover { color: var(--purple); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 12px 18px; border-radius: 13px; font-size: 13px; font-weight: 590; line-height: 1.3; transition: background .18s, transform .18s var(--ease); }
.button .icon { width: 19px; height: 19px; }
.button:active:not(:disabled) { transform: scale(.98); }
.primary { background: var(--purple); color: #241731; }
.primary:hover:not(:disabled) { background: #cbb0f6; }
.secondary { background: var(--raised); color: #d8cbed; }
.secondary:hover:not(:disabled) { background: #2c3347; }
.ghost { background: none; color: var(--muted); }
.ghost:hover:not(:disabled) { background: var(--surface); color: var(--purple); }
.compact { min-height: 42px; padding: 9px 14px; }
.small { min-height: 37px; padding: 8px 12px; font-size: 12px; }
.full { width: 100%; }
.icon-button { min-width: 40px; height: 40px; display: inline-grid; place-items: center; color: var(--muted); border-radius: 10px; }
.icon-button:hover { color: var(--purple); background: var(--raised); }
.icon-button .icon { width: 18px; height: 18px; }
.icon-button.danger { color: var(--red); }
.text-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--purple); }
.text-link .icon { width: 17px; height: 17px; }
.panel { background: var(--surface); border-radius: var(--radius); }
.padded { padding: 27px; }
.home-heading { margin: 1px 0 27px; }
.home-heading h1 { font-size: clamp(32px, 3.3vw, 44px); }
.home-heading p { margin-top: 11px; font-size: 15px; }
.game-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.game-card { min-width: 0; position: relative; overflow: hidden; background: var(--surface); border-radius: 20px; display: flex; flex-direction: column; transition: transform .25s var(--ease), background .25s; }
.game-card:hover { transform: translateY(-4px); background: #202636; }
.card-art { aspect-ratio: 1.52; position: relative; overflow: hidden; }
.game-art-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-art img { transition: transform .5s var(--ease); }
.game-card:hover .card-art img { transform: scale(1.035); }
.card-art::after { content: ''; position: absolute; inset: auto 0 0; height: 35%; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 23px 27px; }
.card-bottom h2 { font-size: 25px; letter-spacing: -.03em; }
.card-bottom p { font-size: 13px; margin-top: 4px; }
.circle-arrow { border-radius: 50%; width: 43px; height: 43px; display: grid; place-items: center; flex-shrink: 0; color: #e2d6fa; background: #39304f; }
.circle-arrow .icon { width: 21px; }
.home-utilities { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-top: 18px; }
.utility-card { min-width: 0; display: flex; align-items: center; gap: 13px; background: var(--surface); border-radius: 17px; padding: 20px 17px; text-align: left; transition: background .18s; }
.utility-card:hover { background: #22293a; }
.utility-card > span:nth-child(2) { min-width: 0; }
.utility-card strong { display: block; font-size: 13px; }
.utility-card small { display: block; font-size: 11px; margin-top: 4px; }
.utility-card > .icon:last-child { width: 16px; height: 16px; margin-left: auto; color: var(--purple); }
.feature-icon { width: 44px; height: 46px; border-radius: 12px; display: inline-grid; place-items: center; background: #29283c; color: var(--purple); flex-shrink: 0; }
.feature-icon .icon { width: 23px; height: 23px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0 15px; }
.section-heading h2 { font-size: 18px; }
.recent-section { margin-top: 34px; }
.recent-section .section-heading { margin-top: 0; }
.recent-list { background: var(--surface); border-radius: 17px; padding: 6px 18px; }
.recent-row { display: flex; align-items: center; gap: 15px; width: 100%; padding: 13px 3px; text-align: left; border-radius: 9px; }
.recent-row + .recent-row { border-top: 1px solid #252c3c; }
.recent-row:hover { background: #202738; }
.recent-symbol { width: 35px; height: 35px; border-radius: 10px; background: #28293e; color: var(--purple); display: grid; place-items: center; }
.recent-symbol .icon { width: 20px; height: 20px; }
.recent-game { display: grid; gap: 2px; }
.recent-game strong { font-size: 13px; }
.recent-game small { font-size: 11px; }
.recent-time { margin-left: auto; font-size: 12px; color: var(--faint); }
.recent-result { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 105px; text-align: right; }
.recent-row > .icon:last-child { color: var(--faint); width: 15px; height: 15px; }
.recent-caption { text-align: right; margin-top: 8px!important; font-size: 10px!important; }
.empty-inline { min-height: 66px; display: flex; gap: 13px; align-items: center; background: var(--surface); color: var(--muted); border-radius: 15px; padding: 18px 22px; font-size: 13px; }
.empty-inline > .icon:last-child { margin-left: auto; width: 16px; }
.welcome-foot { display: flex; align-items: center; gap: 15px; margin-top: 28px; padding: 20px; background: var(--surface); border-radius: 17px; }
.welcome-foot > .icon { color: var(--purple); }
.welcome-foot p { flex: 1; font-size: 13px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 0 27px; }
.page-heading p { font-size: 14px; margin-top: 9px; }
.game-title { display: flex; align-items: center; gap: 15px; }
.title-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: var(--purple); background: #29283c; flex-shrink: 0; }
.title-icon .icon { width: 27px; height: 27px; }
.rules-button { font-size: 12px; min-height: 43px; }
.rules-button .icon { width: 19px; }
.game-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 22px; align-items: stretch; }
.game-stage { order: 1; min-width: 0; background: var(--surface); border-radius: var(--radius); padding: 23px 30px; overflow: hidden; }
.game-controls { order: 2; min-width: 0; padding: 27px 24px; border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 500; margin: 20px 0 9px; color: #d7dbea; }
.game-controls > .field-label:first-child { margin-top: 0; }
.field-label > span { font-size: 11px; color: var(--muted); font-weight: 400; }
.stake-input { display: flex; gap: 8px; align-items: center; background: var(--input); padding: 5px 6px 5px 13px; border-radius: 13px; }
.stake-input > .icon { width: 18px; color: var(--faint); }
.stake-input input { width: 100%; min-height: 42px; padding: 4px; font-size: 18px; font-weight: 600; text-align: center; background: none; }
.stake-input > div { display: flex; gap: 4px; }
.stake-input button { width: 37px; height: 37px; background: var(--raised); border-radius: 9px; color: #cabbde; font-size: 12px; }
.stake-input button:hover:not(:disabled) { background: var(--hover); }
.stake-presets { display: grid; grid-template-columns: repeat(5,1fr); gap: 5px; margin-top: 8px; }
.stake-presets button { min-height: 31px; background: #222839; border-radius: 7px; color: var(--muted); font-size: 11px; }
.stake-presets button:hover:not(:disabled) { background: var(--hover); color: var(--purple); }
.control-divider { height: 0; margin-top: 5px; }
.range { appearance: none; padding: 0; min-height: 6px; height: 6px; border-radius: 9px; background: linear-gradient(to right,var(--purple) 0%,var(--purple) var(--range),#35394d var(--range),#35394d 100%); width: 100%; cursor: pointer; margin: 14px 0 10px; }
.range::-webkit-slider-thumb { appearance: none; height: 22px; width: 22px; border-radius: 50%; background: #e8dafa; box-shadow: 0 2px 6px #080b1440; }
.range::-moz-range-thumb { height: 22px; width: 22px; border: 0; border-radius: 50%; background: #e8dafa; }
.range-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); margin: 0 0 5px; }
.segmented { display: flex; gap: 4px; border-radius: 12px; padding: 4px; background: var(--input); }
.segmented button { flex: 1; padding: 10px 7px; min-height: 41px; border-radius: 9px; color: var(--muted); font-size: 12px; line-height: 1.3; }
.segmented button.selected { color: #f0e5ff; background: #413355; }
.segmented button:hover:not(:disabled):not(.selected) { color: var(--text); background: #252b3c; }
.mines-preset { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
.mines-preset button { min-height: 45px; border-radius: 10px; background: var(--raised); color: var(--muted); display: flex; justify-content: center; gap: 5px; align-items: center; }
.mines-preset button .icon { width: 14px; height: 14px; }
.mines-preset button.selected { color: #eddcfc; background: #423356; }
.mines-preset select { padding: 8px 7px; min-height: 45px; font-size: 13px; text-align: center; }
.control-facts { margin: 25px 0; display: grid; gap: 12px; padding: 17px; border-radius: 13px; background: #141a26; }
.control-facts > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.control-facts span { font-size: 11px; color: var(--muted); }
.control-facts strong { font-size: 14px; color: #e1cffb; font-variant-numeric: tabular-nums; }
.control-facts .icon { width: 14px; height: 14px; margin-right: 3px; }
#diceMultiplier { font-size: 24px; }
.play-button { width: 100%; min-height: 51px; margin-top: auto; font-size: 14px; }
.control-foot { margin: 11px 0 0; color: var(--faint); font-size: 11px; text-align: center; }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-height: 24px; }
.stage-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.stage-label .icon { width: 16px; height: 16px; color: var(--purple); }
.stage-mode { font-size: 11px; color: var(--faint); }
.dice-stage { padding-top: 0; position: relative; display: flex; flex-direction: column; }
.dice-stage .stage-top { display: none; }
.dice-scene { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.play-dice { height: 236px; width: min(100%,330px); object-fit: cover; object-position: center; mask-image: linear-gradient(transparent,black 12%,black 75%,transparent); -webkit-mask-image: linear-gradient(transparent,black 12%,black 75%,transparent); }
.dice-number { font-size: clamp(38px,4vw,58px); letter-spacing: -.045em; line-height: 1.1; font-weight: 630; font-variant-numeric: tabular-nums; margin-top: -2px; }
.dice-number-label { font-size: 11px; color: var(--muted); margin-top: 7px; }
.dice-target { display: flex; align-items: center; justify-content: space-between; margin: 25px 0 12px; color: var(--muted); font-size: 10px; }
.dice-target b { color: var(--purple); font-size: 13px; }
.dice-track { height: 7px; position: relative; border-radius: 9px; background: #34394a; }
.win-zone { display: block; background: var(--purple-strong); height: 100%; border-radius: inherit; }
.win-zone.over { margin-left: auto; }
.roll-marker { position: absolute; width: 16px; height: 16px; background: #f1e4ff; border-radius: 50%; top: -4.5px; transform: translateX(-50%); }
.track-labels { display: flex; justify-content: space-between; color: var(--faint); font-size: 10px; margin-top: 10px; }
.stage-hint { text-align: center; color: var(--faint); font-size: 11px; padding: 19px 0 0; }
.dice-stage > .stage-hint, .dice-stage > .result-strip { margin-top: auto; }
.result-strip { display: flex; align-items: center; gap: 8px; margin-top: 17px; min-height: 43px; padding: 8px 11px; background: #202435; color: #b9bed0; border-radius: 10px; font-size: 11px; }
.result-strip.win { color: var(--green); background: #1c2b2c; }
.result-strip > .icon { width: 15px; height: 15px; }
.result-strip strong { margin-left: auto; font-size: 12px; }
.result-strip button { margin-left: auto; min-width: 32px; min-height: 28px; color: inherit; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; }
.result-strip button .icon { width: 16px; height: 16px; }
.game-bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 15px; }
.seed-details { min-width: 0; flex: 1; color: var(--muted); }
.seed-details summary { display: inline-flex; align-items: center; gap: 8px; padding: 10px 2px; cursor: pointer; list-style: none; font-size: 12px; }
summary::-webkit-details-marker { display: none; }
.seed-details summary .icon { width: 16px; height: 16px; }
.seed-details[open] summary > .icon:last-child { transform: rotate(90deg); }
.seed-detail-body { max-width: 670px; padding: 15px 18px; border-radius: 13px; background: var(--surface); }
.seed-detail-body > span { font-size: 11px; display: block; }
.seed-detail-body code { display: block; overflow-wrap: anywhere; margin: 10px 0; color: var(--text); font-size: 12px; }
.sound-toggle { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; min-height: 40px; }
.sound-toggle .icon { width: 18px; height: 18px; }
.mine-board { width: 100%; max-width: 397px; margin: 14px auto 19px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
.mine-cell { width: 100%; aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; background: #282e40; position: relative; transition: background .18s, transform .18s var(--ease); }
.mine-cell:disabled { opacity: 1; cursor: default; }
.mine-cell:hover:not(:disabled) { background: #39344e; transform: translateY(-2px); }
.mine-cell.safe { background: #3d3057; }
.mine-cell.bomb { background: #302b3c; }
.mine-cell.hit { background: #4b2b3b; }
.mine-cell .tile-art { width: 88%; height: 88%; object-fit: contain; }
.cell-mark { width: 8px; height: 8px; background: #42495e; border-radius: 2px; transform: rotate(45deg); opacity: .8; }
.mines-progress { display: flex; justify-content: space-around; gap: 12px; align-items: center; padding: 14px; background: #151b27; border-radius: 12px; text-align: center; }
.mines-progress > div > span { display: block; color: var(--muted); font-size: 9px; letter-spacing: .07em; }
.mines-progress strong { display: block; font-size: 23px; color: #dcc3ff; margin-top: 3px; font-variant-numeric: tabular-nums; }
.mines-progress small { font-size: 15px; color: var(--faint); }
.next-step .icon { width: 17px; color: #675580; }
.plinko-stage { display: flex; flex-direction: column; }
.plinko-board { width: 100%; display: block; margin: 8px auto 0; flex: 1; min-height: 325px; }
.plinko-pin { fill: #d2c9e6; }
.plinko-bucket { fill: #9474c5; opacity: var(--bucket-opacity); }
.plinko-bucket.landed { fill: #d2b5fc; opacity: 1; }
.bucket-text { fill: #f9f2ff; font-family: inherit; font-weight: 600; }
.table-link { display: flex; align-items: center; gap: 7px; justify-content: center; margin-top: 16px; padding: 9px; color: var(--purple); font-size: 11px; }
.table-link .icon { width: 15px; height: 15px; }
.eyebrow { display: block; font-size: 10px; color: var(--faint); letter-spacing: .08em; margin-bottom: 8px; }
.quiet-tag { display: none; }
.stats-row { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin: 0 0 22px; }
.stat-card { padding: 20px; background: var(--surface); border-radius: 16px; }
.stat-card > span { color: var(--muted); font-size: 12px; display: block; }
.stat-card > strong { display: block; margin-top: 10px; font-size: 25px; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 12px; }
th { color: var(--muted); font-weight: 450; font-size: 11px; padding: 15px 18px; background: #1d2332; white-space: nowrap; }
td { padding: 14px 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
tbody tr + tr { border-top: 1px solid #252c3c; }
.table-game { display: flex; align-items: center; gap: 9px; }
.table-game .icon { width: 19px; height: 19px; color: var(--purple); }
.cell-sub { display: block; font-size: 10px; margin-top: 3px; }
.positive { color: var(--green)!important; }
.negative { color: var(--red)!important; }
.muted { color: var(--muted); }
.mono, code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.load-more { display: flex; margin: 20px auto 0; }
.fine-print { margin: 17px 0 0; color: var(--faint); font-size: 11px; line-height: 1.7; }
.empty { padding: 42px 22px; display: flex; align-items: center; flex-direction: column; text-align: center; gap: 10px; }
.empty > .icon { width: 27px; height: 27px; color: var(--purple); margin-bottom: 5px; }
.empty p { font-size: 12px; max-width: 460px; }
.wallet-summary { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.wallet-main { padding: 29px; border-radius: 20px; background: var(--surface); }
.wallet-main > strong { display: flex; align-items: center; gap: 15px; font-size: clamp(30px,4vw,45px); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.wallet-main > strong > .icon { width: 30px; height: 30px; color: var(--purple); }
.wallet-main > span:not(.eyebrow) { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.wallet-main > div { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.wallet-reserved { background: var(--surface); padding: 26px; border-radius: 20px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 13px; }
.wallet-reserved > .feature-icon { width: 39px; height: 40px; }
.wallet-reserved > span:not(.feature-icon) { color: var(--muted); font-size: 13px; }
.wallet-reserved > strong { font-size: 27px; width: 100%; margin: 10px 0; }
.wallet-reserved p { font-size: 11px; }
.notice { display: flex; align-items: center; gap: 12px; padding: 15px 18px; background: #1a2331; color: #bdc5d8; border-radius: 12px; font-size: 12px; margin: 18px 0; }
.notice .icon { width: 19px; height: 19px; }
.notice p { color: inherit; }
.notice strong { display: block; margin-bottom: 3px; }
.notice.warning { background: #322b27; color: #e7c59b; }
.notice.success { background: #19332e; color: #9dd4b6; }
.request-list { display: grid; gap: 12px; }
.request-row { padding: 20px; display: flex; align-items: center; gap: 17px; }
.request-icon { width: 39px; height: 39px; border-radius: 11px; display: grid; place-items: center; background: #28283c; color: var(--purple); flex-shrink: 0; }
.request-info { flex: 1; min-width: 0; }
.request-info > strong { display: block; font-size: 13px; }
.request-info > span { color: var(--muted); font-size: 11px; display: block; margin-top: 3px; overflow-wrap: anywhere; }
.request-info p { font-size: 12px; margin-top: 7px; overflow-wrap: anywhere; }
.request-info small { display: block; margin-top: 7px; font-size: 10px; }
.request-amount { text-align: right; display: flex; flex-direction: column; gap: 6px; }
.request-amount strong { font-size: 18px; white-space: nowrap; }
.status { display: inline-flex; align-items: center; justify-content: center; padding: 3px 8px; border-radius: 6px; background: #242d3c; color: #a9b3c8; font-size: 10px; white-space: nowrap; }
.status.approved, .status.won { color: var(--green); background: #1f3531; }
.status.pending, .status.active { color: #d8b991; background: #342d29; }
.status.rejected { color: var(--red); background: #3b2931; }
.request-actions { display: flex; align-items: center; gap: 5px; }
.fair-stamp { color: var(--purple); display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.fairness-intro { display: flex; gap: 20px; padding: 27px; margin-bottom: 21px; align-items: flex-start; }
.fairness-intro p { font-size: 13px; line-height: 1.85; margin-top: 10px; }
.fairness-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 21px; }
.hash-box { position: relative; background: var(--input); border-radius: 11px; padding: 14px; overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; color: #d2c2eb; font-size: 11px; }
.hash-box:has(button) { padding-right: 48px; }
.hash-box .icon-button { position: absolute; right: 3px; top: 3px; }
.inline-facts { display: grid; grid-template-columns: 1fr auto; gap: 13px; margin: 18px 0; font-size: 12px; color: var(--muted); }
.inline-facts strong { color: var(--text); }
.input-with-button { display: flex; align-items: center; gap: 5px; }
.input-with-button input { flex: 1; width: 0; font-size: 12px; }
.fairness-columns form > .button { margin-top: 15px; }
.algorithm-list { margin: 16px 0; padding-left: 19px; display: grid; gap: 16px; color: var(--muted); font-size: 13px; }
.algorithm-list strong { display: block; color: var(--text); margin-bottom: 4px; }
.algorithm-list li::marker { color: var(--purple); }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 20px 0; background: var(--surface); border-radius: 13px; padding: 5px; }
.admin-tabs button { min-height: 42px; flex: 1; color: var(--muted); padding: 8px 15px; border-radius: 10px; white-space: nowrap; }
.admin-tabs button.active, .admin-tabs button.selected { background: var(--purple-container); color: #e5d3fe; }
.login-required { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding: 55px 25px; }
.login-required > .icon { width: 38px; height: 38px; color: var(--purple); }
/* Dialogs retain real forms, focus management and semantic labels. */
.modal-backdrop { position: fixed; inset: 0; z-index: 120; background: #05070cbc; display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.modal { width: 100%; max-width: 475px; max-height: calc(100dvh - 48px); overflow-y: auto; padding: 25px; border-radius: 23px; background: #1b2130; box-shadow: 0 16px 72px #03060b80; }
.modal.wide { max-width: 655px; }
.modal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-top h2 { font-size: 21px; }
.modal-top .icon-button { margin-right: -8px; margin-top: -5px; }
.modal-description { font-size: 13px; line-height: 1.8; margin-bottom: 20px; }
.modal .button.full { margin-top: 12px; }
.modal-hero-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; background: #342c47; color: var(--purple); margin: 5px 0 20px; }
.modal-hero-icon > .icon { width: 28px; height: 28px; }
.modal-divider { display: flex; align-items: center; gap: 15px; color: var(--faint); font-size: 9px; margin: 23px 0 7px; }
.modal-divider::before, .modal-divider::after { content: ''; height: 1px; flex: 1; background: #343a4a; }
.profile-detail { display: flex; align-items: center; gap: 14px; padding: 7px 0 20px; }
.profile-detail p { font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.profile-links { display: grid; gap: 5px; }
.profile-links a { display: flex; align-items: center; gap: 12px; padding: 13px; border-radius: 12px; background: #222a3a; }
.profile-links a > .icon { width: 19px; color: var(--purple); }
.profile-links a > .icon:last-child { margin-left: auto; width: 14px; }
.key-code-input { letter-spacing: .05em; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.created-keys { display: grid; gap: 7px; max-height: 330px; overflow: auto; margin: 15px 0; }
.created-keys > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 14px; border-radius: 10px; background: var(--input); }
.created-keys code { overflow-wrap: anywhere; font-size: 11px; }
.created-keys span { font-size: 11px; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; font-size: 13px; }
.detail-grid > span { color: var(--muted); }
.detail-grid > strong { text-align: right; overflow-wrap: anywhere; }
.proof-heading { display: flex; align-items: center; gap: 12px; }
.proof-heading small { display: block; margin-top: 3px; font-size: 10px; }
.proof-heading > strong:last-child { margin-left: auto; font-size: 14px; }
.proof-heading + .field-label { margin-top: 24px; }
.verification { border-radius: 13px; padding: 17px; margin-top: 20px; background: #1a332e; font-size: 12px; }
.verification.invalid { background: #39252e; }
.verification h3 { margin-bottom: 12px; }
.verification > div { margin: 7px 0; display: flex; gap: 8px; align-items: center; color: #aecdc0; }
.verification .icon { width: 17px; height: 17px; }
.rules-list { display: grid; gap: 21px; margin: 20px 0; }
.rules-list > div { display: flex; gap: 14px; }
.rules-list > div > span { display: grid; place-items: center; width: 31px; height: 31px; flex-shrink: 0; border-radius: 10px; background: #332b46; color: var(--purple); font-size: 13px; }
.rules-list h3 { margin: 3px 0 7px; }
.rules-list p { font-size: 13px; line-height: 1.8; }
#toasts { position: fixed; right: 25px; bottom: 26px; z-index: 160; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; max-width: min(450px,calc(100vw - 30px)); }
.toast { display: flex; align-items: center; gap: 11px; padding: 16px 19px; border-radius: 15px; background: #293443; color: #f0f4f8; box-shadow: 0 7px 30px #0005; font-size: 13px; animation: toast-in .22s var(--ease); }
.toast .icon { color: var(--green); width: 20px; }
.toast.error { background: #3d2934; }
.toast.error .icon { color: var(--red); }
.loading-panel { padding: 40px; display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--muted); }
.spinner { display: inline-block; width: 17px; height: 17px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .6s linear infinite; }
.boot { min-height: 100dvh; display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 18px; padding: 25px; text-align: center; }
.boot .marmos-mark { width: 50px; height: 50px; }
.boot-mark { color: var(--purple); font-size: 42px; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes dice-roll { 0%,100% { transform: rotate(-3deg) translateY(1px); } 50% { transform: rotate(3deg) translateY(-6px); } }
.rolling .play-dice { animation: dice-roll .25s ease-in-out infinite; }
@media (min-width: 1600px) { .card-art { aspect-ratio: 1.4; } .main-content { padding-top: 45px; } .game-layout { grid-template-columns: minmax(0,1fr) 360px; } }
@media (max-width: 1190px) and (min-width: 901px) {
  :root { --rail-width: 200px; }
  .brand-name { font-size: 16px; }
  .brand { gap: 6px; padding: 0; }
  .marmos-mark { width: 32px; height: 32px; }
  .main-content { padding: 25px 24px 40px; }
  .card-bottom { padding: 10px 16px 22px; }
  .card-bottom h2 { font-size: 23px; }
  .card-bottom p { font-size: 11px; }
  .circle-arrow { width: 34px; height: 34px; }
  .home-utilities { gap: 12px; }
  .utility-card { padding: 15px 12px; gap: 9px; }
  .utility-card .feature-icon { width: 33px; height: 36px; }
  .utility-card strong { font-size: 11px; }
  .utility-card small { font-size: 10px; }
  .utility-card > .icon:last-child { display: none; }
  .game-layout { grid-template-columns: minmax(0,1fr) 285px; gap: 16px; }
  .game-controls { padding: 22px 18px; }
  .game-stage { padding-left: 22px; padding-right: 22px; }
  .request-row { flex-wrap: wrap; }
  .request-actions { margin-left: auto; }
}
@media (max-width: 900px) {
  :root { --rail-width: 0px; }
  .sidebar, .breadcrumb { display: none; }
  .workspace { margin-left: 0; }
  .mobile-brand { display: flex; gap: 8px; align-items: center; }
  .topbar { position: sticky; top: 0; z-index: 45; padding: max(var(--tg-content-safe-area-inset-top, 0px), env(safe-area-inset-top, 0px)) 24px 0; height: calc(78px + max(var(--tg-content-safe-area-inset-top, 0px), env(safe-area-inset-top, 0px))); background: var(--bg); }
  .header-actions { gap: 15px; }
  .main-content { padding: 28px 24px calc(38px + var(--safe-bottom)); }
  .page-footer { margin-bottom: calc(75px + var(--safe-bottom)); padding: 0 24px 25px; }
  .mobile-nav { position: fixed; z-index: 60; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5,1fr); background: #191e2c; padding: 8px 12px calc(8px + var(--safe-bottom)); min-height: calc(66px + var(--safe-bottom)); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #8e98b0; font-size: 10px; min-height: 47px; position: relative; border-radius: 11px; }
  .mobile-nav a .icon { width: 21px; height: 21px; }
  .mobile-nav a.active { color: #d5b9fc; }
  .mobile-nav a.active::before { content: ''; position: absolute; width: 42px; height: 28px; border-radius: 9px; top: 0px; background: #383049; z-index: -1; }
  .game-cards { gap: 14px; }
  .card-bottom { padding: 12px 15px 22px; gap: 8px; }
  .card-bottom h2 { font-size: 23px; }
  .card-bottom p { font-size: 11px; }
  .circle-arrow { width: 34px; height: 34px; }
  .home-utilities { gap: 12px; }
  .utility-card { padding: 17px 13px; gap: 9px; }
  .utility-card small { font-size: 10px; }
  .utility-card strong { font-size: 12px; }
  .utility-card > .icon:last-child { display: none; }
  .feature-icon { width: 36px; height: 39px; }
  .game-layout { grid-template-columns: minmax(0,1fr) 280px; gap: 18px; }
  .game-controls { padding: 22px 18px; }
  .game-stage { padding-left: 20px; padding-right: 20px; }
  .fairness-columns { gap: 16px; }
  .padded { padding: 22px; }
  .request-row { flex-wrap: wrap; }
  .request-actions { margin-left: auto; }
  #toasts { bottom: calc(82px + var(--safe-bottom)); }
}
@media (max-width: 620px) {
  :root { --radius: 17px; font-size: 14px; }
  .topbar { height: calc(70px + max(var(--tg-content-safe-area-inset-top, 0px), env(safe-area-inset-top, 0px))); padding-left: max(16px, var(--tg-content-safe-area-inset-left, 0px)); padding-right: max(16px, var(--tg-content-safe-area-inset-right, 0px)); gap: 10px; }
  .marmos-mark { width: 30px; height: 32px; }
  .mobile-brand { gap: 6px; }
  .brand-name { font-size: 15px; line-height: 1.15; }
  .mobile-brand .brand-name b { display: block; font-size: 12px; margin-top: 2px; }
  .header-actions { gap: 9px; }
  .header-wallet { gap: 10px; padding: 6px 6px 6px 11px; min-height: 45px; border-radius: 12px; }
  .header-wallet small { font-size: 9px; }
  .header-wallet strong { font-size: 15px; white-space: nowrap; }
  .key-small { width: 30px; height: 32px; border-radius: 9px; }
  .key-small .icon { width: 19px; height: 19px; }
  .avatar { width: 32px; height: 34px; border-radius: 10px; font-size: 14px; }
  .profile-name, .desktop-only { display: none!important; }
  .main-content { padding: 22px max(16px, var(--tg-content-safe-area-inset-right, 0px)) 27px max(16px, var(--tg-content-safe-area-inset-left, 0px)); }
  .home-heading { margin: 2px 0 23px; }
  .home-heading h1 { font-size: 31px; }
  .home-heading p { font-size: 13px; margin-top: 7px; }
  .game-cards { grid-template-columns: 1fr; gap: 12px; }
  .game-card { flex-direction: row; align-items: stretch; border-radius: 17px; min-height: 130px; }
  .card-art { flex: 0 0 43%; min-width: 0; aspect-ratio: auto; }
  .card-art .game-art-image { object-fit: cover; object-position: 46% center; }
  .card-art::after { inset: 0 0 0 auto; width: 28%; height: 100%; background: linear-gradient(to right, transparent,var(--surface)); }
  .card-bottom { flex: 1; padding: 20px 13px 20px 12px; gap: 8px; align-items: center; }
  .card-bottom h2 { font-size: 24px; }
  .card-bottom p { font-size: 11px; margin-top: 7px; max-width: 97px; line-height: 1.5; }
  .circle-arrow { width: 30px; height: 32px; border-radius: 10px; margin-left: auto; }
  .circle-arrow .icon { width: 17px; }
  .home-utilities { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
  .utility-card { padding: 15px 12px; flex-wrap: wrap; column-gap: 10px; row-gap: 12px; border-radius: 15px; }
  .utility-card .feature-icon { width: 33px; height: 34px; border-radius: 10px; }
  .utility-card .feature-icon .icon { width: 20px; height: 20px; }
  .utility-card > span:nth-child(2) { width: 100%; }
  .utility-card strong { font-size: 12px; }
  .utility-card small { font-size: 10px; margin-top: 3px; }
  .utility-card:last-child { grid-column: 1/-1; flex-wrap: nowrap; padding: 12px; }
  .utility-card:last-child > span:nth-child(2) { width: auto; }
  .utility-card:last-child > .icon:last-child { display: block; }
  .recent-section { margin-top: 26px; }
  .section-heading { margin: 23px 0 13px; }
  .section-heading h2 { font-size: 17px; }
  .text-link { font-size: 12px; }
  .recent-list { padding: 4px 13px; }
  .recent-row { gap: 11px; padding: 12px 0; }
  .recent-time { display: none; }
  .recent-result { margin-left: auto; min-width: 60px; font-size: 13px; }
  .recent-caption { text-align: left; }
  .empty-inline { padding: 16px; gap: 10px; font-size: 12px; }
  .empty-inline > .icon { width: 19px; }
  .welcome-foot { flex-wrap: wrap; padding: 16px; gap: 11px; }
  .welcome-foot p { font-size: 12px; }
  .welcome-foot .button { width: 100%; }
  .page-footer { margin-bottom: calc(69px + var(--safe-bottom)); padding: 0 16px 22px; gap: 8px; flex-wrap: wrap; font-size: 9px; }
  .page-footer > span:nth-child(2) { width: 100%; order: 3; }
  .page-footer a { margin-left: auto; }
  .page-heading { margin: 0 0 19px; gap: 12px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading p { font-size: 12px; margin-top: 6px; }
  .game-title { gap: 10px; }
  .title-icon { width: 36px; height: 38px; border-radius: 11px; }
  .title-icon .icon { width: 23px; height: 23px; }
  .rules-button { padding: 9px 10px; gap: 6px; min-height: 37px; font-size: 11px; }
  .rules-button .icon { width: 17px; height: 17px; }
  .game-layout { display: flex; flex-direction: column; gap: 13px; }
  .game-controls { order: 1; padding: 15px; display: block; }
  .game-stage { order: 2; padding: 16px; }
  .field-label { font-size: 11px; margin-top: 13px; margin-bottom: 7px; }
  .field-label span { font-size: 10px; }
  .game-controls .field-label:first-child { margin-top: 0; }
  .stake-input { padding: 4px 5px 4px 11px; }
  .stake-input input { font-size: 17px; min-height: 36px; }
  .stake-input button { height: 34px; width: 36px; }
  .stake-presets { display: none; }
  .control-divider { display: none; }
  .control-facts { margin: 14px 0 0; padding: 10px 12px; display: flex; gap: 12px; flex-wrap: wrap; }
  .control-facts > div { flex: 1; display: block; }
  .control-facts > div > span { font-size: 10px; display: block; }
  .control-facts strong { display: block; margin-top: 3px; font-size: 15px; }
  #diceMultiplier { font-size: 19px; }
  .mines-layout .control-facts { display: none; }
  .segmented { padding: 3px; }
  .segmented button { padding: 8px 9px; min-height: 34px; font-size: 11px; }
  .mines-preset { gap: 6px; }
  .mines-preset button, .mines-preset select { min-height: 36px; padding-top: 5px; padding-bottom: 5px; }
  .play-button { position: fixed; left: max(16px, var(--tg-content-safe-area-inset-left, 0px)); right: max(16px, var(--tg-content-safe-area-inset-right, 0px)); width: auto; bottom: calc(77px + var(--safe-bottom)); z-index: 65; min-height: 49px; box-shadow: 0 5px 20px #070a1460; border-radius: 14px; font-size: 14px; }
  .play-button:disabled { opacity: 1; background: #50435f; color: #ae9bbc; }
  .control-foot { display: none; }
  .route-dice, .route-mines, .route-plinko { padding-bottom: 76px; }
  .route-dice + .page-footer, .route-mines + .page-footer, .route-plinko + .page-footer { margin-bottom: calc(135px + var(--safe-bottom)); }
  .stage-top { margin-bottom: 5px; min-height: 20px; }
  .stage-label { font-size: 11px; }
  .stage-mode { font-size: 10px; }
  .mines-stage .stage-label { display: none; }
  .mines-stage .stage-top { justify-content: flex-end; margin-bottom: 8px; }
  .mine-board { gap: 7px; margin: 0 auto 12px; max-width: 380px; }
  .mine-cell { border-radius: 10px; }
  .cell-mark { width: 6px; height: 6px; }
  .mines-progress { padding: 10px 9px; gap: 9px; border-radius: 10px; }
  .mines-progress strong { font-size: 21px; margin-top: 2px; }
  .mines-progress > div > span { font-size: 8px; }
  .mines-progress small { font-size: 13px; }
  .mines-stage .stage-hint { display: none; }
  .game-bottom { margin-top: 8px; }
  .seed-details summary { font-size: 11px; }
  .sound-toggle { font-size: 11px; gap: 6px; }
  .result-strip { margin-top: 12px; font-size: 10px; padding: 6px 10px; }
  .result-strip strong { font-size: 11px; }
  .dice-stage { padding-top: 0; }
  .play-dice { height: 159px; width: 235px; }
  .dice-number { font-size: 40px; margin-top: -6px; }
  .dice-number-label { font-size: 10px; }
  .dice-target { margin-top: 19px; }
  .dice-stage > .result-strip { margin-top: 15px; }
  .dice-stage > .stage-hint { margin-top: 4px; }
  .plinko-board { min-height: auto; margin-top: 0; }
  .plinko-stage .stage-label { display: none; }
  .plinko-stage .stage-top { justify-content: flex-end; }
  .plinko-stage .table-link { font-size: 10px; padding: 7px 0; }
  .stats-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
  .stat-card { padding: 17px; border-radius: 14px; }
  .stat-card > span { font-size: 11px; }
  .stat-card > strong { font-size: 22px; margin-top: 7px; }
  th { padding: 13px 10px; font-size: 10px; }
  td { padding: 12px 10px; font-size: 11px; }
  .history-table .table-game { gap: 6px; }
  .history-table .table-game .icon { width: 15px; height: 15px; }
  .history-table .icon-button { min-width: 29px; width: 29px; height: 32px; }
  .history-table th:nth-child(3), .history-table td:nth-child(3) { display: none; }
  .wallet-summary { grid-template-columns: 1fr; gap: 12px; }
  .wallet-main { padding: 23px; }
  .wallet-main > strong { font-size: 36px; }
  .wallet-main > div { flex-direction: column; gap: 9px; margin-top: 21px; }
  .wallet-main .button { width: 100%; }
  .wallet-reserved { padding: 17px; column-gap: 12px; }
  .wallet-reserved > strong { width: auto; font-size: 22px; margin: 0 0 0 auto; }
  .wallet-reserved p { width: 100%; margin-top: 11px; font-size: 11px; }
  .wallet-reserved p br { display: none; }
  .notice { padding: 13px; font-size: 11px; gap: 9px; }
  .notice.warning { flex-wrap: wrap; }
  .notice.warning .button { margin-left: auto; }
  .request-row { padding: 15px; gap: 12px; }
  .request-icon { display: none; }
  .request-info { min-width: 120px; }
  .request-info > strong { font-size: 12px; }
  .request-info p { font-size: 11px; }
  .request-amount strong { font-size: 16px; }
  .status { font-size: 9px; }
  .request-actions { width: 100%; justify-content: flex-end; }
  .fair-stamp { display: none; }
  .fairness-intro { gap: 12px; padding: 20px; }
  .fairness-intro h2 { font-size: 16px; }
  .fairness-intro p { font-size: 12px; }
  .fairness-intro .feature-icon { display: none; }
  .fairness-columns { grid-template-columns: 1fr; }
  .padded { padding: 20px; }
  .admin-tabs { flex-wrap: nowrap; gap: 3px; overflow-x: auto; }
  .admin-tabs button { padding: 9px 10px; font-size: 11px; min-height: 39px; }
  .route-admin .page-heading { flex-wrap: wrap; }
  .route-admin .page-heading .button { width: 100%; }
  .empty { padding: 30px 20px; }
  .empty p { font-size: 11px; }
  .modal-backdrop { padding: 10px; align-items: center; }
  .modal { padding: 22px; border-radius: 22px; max-height: calc(100dvh - 30px - var(--safe-bottom)); }
  .modal-top h2 { font-size: 20px; }
  .modal input, .modal textarea, .modal select { font-size: 16px; }
  .modal .key-code-input { font-size: 13px; }
  .created-keys > div { flex-direction: column; align-items: flex-start; }
  .form-columns { gap: 10px; }
  .form-columns .button { font-size: 12px; padding: 12px; }
  .detail-grid { font-size: 12px; gap: 12px; }
  .proof-heading > strong:last-child { font-size: 11px; }
  .proof-heading .title-icon { width: 33px; height: 35px; }
  #toasts { right: 15px; left: 15px; max-width: none; bottom: calc(140px + var(--safe-bottom)); }
  .toast { width: 100%; padding: 13px 15px; font-size: 12px; }
}
@media (max-width: 359px) {
  .topbar { padding-left: 12px; padding-right: 12px; gap: 5px; }
  .brand-name { font-size: 13px; }
  .mobile-brand .brand-name b { font-size: 10px; }
  .mobile-brand { gap: 4px; }
  .marmos-mark { width: 26px; }
  .header-actions { gap: 6px; }
  .header-wallet { gap: 6px; padding-left: 8px; }
  .header-wallet strong { font-size: 13px; }
  .avatar { width: 28px; }
  .key-small { width: 27px; }
  .main-content { padding-left: 12px; padding-right: 12px; }
  .home-heading h1 { font-size: 28px; }
  .card-bottom { padding-left: 8px; padding-right: 10px; }
  .card-bottom h2 { font-size: 21px; }
  .card-bottom p { max-width: 90px; font-size: 10px; }
  .circle-arrow { width: 26px; height: 29px; }
  .game-card { min-height: 119px; }
  .rules-button > span { display: none; }
  .game-controls { padding: 13px; }
  .game-stage { padding: 13px; }
  .mine-board { gap: 6px; }
  .utility-card strong { font-size: 11px; }
  .utility-card small { font-size: 9px; }
  .play-button { left: 12px; right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms!important; animation-iteration-count: 1!important; transition-duration: .01ms!important; scroll-behavior: auto!important; }
}
/* Visual QA refinements: dense game setup, complete mobile board and clear math. */
.mobile-stake-label { display: none; }
.dice-scene { flex: 1; justify-content: center; }
.play-dice { width: min(100%,365px); height: 267px; mask-image: none; -webkit-mask-image: none; object-fit: contain; }
.dice-stage > .stage-hint { margin-top: 9px; }
.fairness-rules > div { display: flex; gap: 14px; margin-top: 22px; }
.fairness-rules > div > span { color: var(--purple); font-size: 12px; padding-top: 2px; }
.fairness-rules p { font-size: 12px; line-height: 1.85; }
.fairness-rules strong { display: block; color: var(--text); margin-bottom: 5px; }
.fairness-columns + .panel { margin-top: 22px; }
.rules-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin-top: 20px; }
.rules-grid p { font-size: 12px; line-height: 1.8; margin-top: 7px; }
.admin-tabs .tab-refresh { flex: 0; min-width: 43px; }
.admin-tabs .tab-refresh .icon { width: 18px; height: 18px; }
@media (max-width: 620px) {
  .mobile-stake-label { display: inline; font-size: 11px; color: inherit; opacity: .85; }
  .header-actions { flex: 1; min-width: 0; justify-content: flex-end; }
  .header-wallet { min-width: 0; }
  .header-wallet > div { min-width: 0; }
  .header-wallet strong { overflow: hidden; text-overflow: ellipsis; max-width: 107px; }
  .header-wallet .key-small, .profile { flex-shrink: 0; }
  .utility-card { row-gap: 9px; padding-top: 12px; padding-bottom: 12px; }
  .route-mines { padding-top: 16px; }
  .route-mines .page-heading { margin-bottom: 14px; }
  .mines-layout { gap: 10px; }
  .mines-layout .game-controls { padding: 12px 15px; }
  .mines-layout .field-label { margin-top: 11px; }
  .mines-layout .field-label:first-child { margin-top: 0; }
  .mines-stage .stage-top { display: none; }
  .mines-stage { padding: 14px 16px; }
  .mine-board { max-width: 288px; }
  .mines-progress { padding: 8px; }
  .mines-progress strong { font-size: 20px; }
  .play-dice { height: 153px; width: 235px; }
  .rules-grid { grid-template-columns: 1fr; gap: 17px; }
  .rules-grid p { margin-top: 5px; }
}
/* Small screens keep the actual result/board in view, not a decorative hero. */
@media (max-width: 620px) {
  .route-dice, .route-plinko { padding-top: 16px; }
  .route-dice .page-heading, .route-plinko .page-heading { margin-bottom: 14px; }
  .dice-layout, .plinko-layout { gap: 10px; }
  .dice-layout .game-controls, .plinko-layout .game-controls { padding: 12px 15px; }
  .plinko-layout .control-facts { display: none; }
  .plinko-stage .stage-top, .plinko-stage .stage-hint { display: none; }
  .plinko-stage { padding-top: 10px; padding-bottom: 10px; }
  .plinko-stage .table-link { min-height: 36px; }
  .dice-stage { padding: 10px 16px 14px; }
  .dice-scene { display: grid; grid-template-columns: 128px minmax(0,1fr); grid-template-rows: 1fr 1fr; column-gap: 10px; text-align: center; }
  .play-dice { grid-column: 1; grid-row: 1/3; width: 128px; height: 98px; }
  .dice-number { grid-column: 2; align-self: end; font-size: 30px; margin: 0; }
  .dice-number-label { grid-column: 2; align-self: start; margin-top: 5px; font-size: 9px; }
  .dice-target { margin-top: 7px; margin-bottom: 8px; }
  .dice-stage > .stage-hint { display: none; }
  .dice-stage > .result-strip { margin-top: 9px; }
}
@media (max-width: 620px) {
  .plinko-board { height: 218px; flex: none; }
  .plinko-stage { padding-top: 7px; }
}
