/* Uzbek Heritage — the approved concept, adapted to live game data. */
:root {
  color-scheme: dark;
  --bg: #00292c;
  --card: #073438;
  --text: #fff7e7;
  --muted: #a3bec0;
  --accent: #00bbca;
  --accent-text: #fff;
  --gold: #dbad65;
  --line: #b9905366;
  --win: #69dbc2;
  --lose: #e77e6b;
}
body { background: #001f22; font-family: "Segoe UI", Arial, sans-serif; }
button { touch-action: manipulation; }
button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
button { transition: filter .16s, background .16s; }
button:hover:not(:disabled) { filter: brightness(1.1); }
button:active:not(:disabled) { filter: brightness(.92); }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
main { position: relative; min-height: 100dvh; max-width: 520px; padding: max(18px, env(safe-area-inset-top)) 16px calc(108px + env(safe-area-inset-bottom)); background: radial-gradient(ellipse at 45% 20%, #05404670, transparent 55%), var(--bg); border-inline: 1px solid #d6ac6722; }
main::before, main::after { content: ""; pointer-events: none; position: absolute; width: 45px; height: 45px; background: url("assets/ornament.svg") center / contain no-repeat; z-index: 1; }
main::before { top: 12px; left: 8px; }
main::after { top: auto; bottom: 90px; right: 8px; transform: rotate(180deg); }
.app-header { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 2px 16px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0; min-width: 0; background: none; color: #f0d6a3; font: 700 clamp(24px, 6.8vw, 33px)/1.15 Georgia, "Times New Roman", serif; text-align: left; }
.brand-doppi { display: block; width: 55px; height: 43px; flex: none; border-radius: 9px; }
.brand-doppi.app-logo { width: 43px; height: 43px; object-fit: contain; border-radius: 12px; }
.menu-button { width: 42px; height: 42px; display: grid; place-items: center; color: #c4dedc; background: none; }
.back-button { width: 42px; height: 42px; display: grid; place-items: center; background: none; color: #fff8e9; }
.case-header .brand { margin-inline: auto; color: #fff8e9; }
.case-header .brand-doppi { display: none; }
main[data-section="cases"]::before { display: none; }
.account-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.account-person { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--text); background: transparent; padding: 0; font-size: 13px; }
#header-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 43px; height: 43px; border: 1px solid var(--gold); background: linear-gradient(135deg, #277779, #00292c); color: #f5d6a2; font-family: Georgia, serif; }
.balance-pill { display: inline-grid; grid-template-columns: 22px auto 30px; flex: none; gap: 8px; align-items: center; min-height: 42px; border: 1px solid var(--gold); border-radius: 25px; padding: 5px 6px 5px 9px; background: #003337; color: #fff8ea; white-space: nowrap; font-size: 13px; }
.ton-icon { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: #079dd3; color: white; }
.balance-pill b { font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.plus { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #80f2ed; border-radius: 50%; background: linear-gradient(#1bd7d9, #0096a8); box-shadow: inset 0 1px 2px #ffffff33; }
.plus svg { display: block; width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.game-tabs { display: flex; gap: 5px; margin: 0 0 15px; }
.game-tabs button { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 42px; flex: 1; min-width: 0; border: 1px solid #5f9c9f66; border-radius: 18px; color: #d1e2df; background: linear-gradient(180deg, #0c3c40, #00292c); font-size: 12px; padding: 4px 3px; }
.mode-art { display: block; width: 29px; height: 29px; flex: none; background: url("assets/game-mode-icons.png") no-repeat; background-size: 200% 200%; filter: drop-shadow(0 2px 2px #001a2066); }
.mode-art-pvp { background-position: 0 0; }
.mode-art-crash { background-position: 100% 0; }
.mode-art-mines { background-position: 0 100%; }
.mode-art-upgrade { background-position: 100% 100%; }
.game-tabs button.active { background: linear-gradient(#05c9d0, #009eaf); color: #002d33; border-color: #79eef1; box-shadow: inset 0 0 0 2px #00e4e72b; }
.wheel-wrap { width: min(100%, 440px); height: auto; aspect-ratio: 1; margin: 4px auto 0; padding: 5px; border: 2px solid var(--gold); border-radius: 50%; box-shadow: 0 0 0 2px #002326, inset 0 0 0 2px #e9ca8d, 0 0 0 4px #b38b4d; }
.wheel { position: relative; overflow: hidden; border: 1px solid #704c25; background: conic-gradient(#f4e5bd 0deg 45deg, #bd6954 45deg 90deg, #f4e5bd 90deg 135deg, #10a6b1 135deg 180deg, #f4e5bd 180deg 225deg, #10a6b1 225deg 270deg, #f4e5bd 270deg 315deg, #10a6b1 315deg 360deg); }
.wheel::after { inset: 25%; border: 2px solid var(--gold); box-shadow: 0 0 0 4px #003235, 0 0 0 5px #ba9456; background: radial-gradient(circle at 50% 20%, #0b4548, #00292c 70%); z-index: 2; }
.wheel-center { pointer-events: none; z-index: 3; }
.wheel-wrap > .wheel-center::after { content: ""; width: 22%; aspect-ratio: 1; background: url("assets/tile.svg") center / contain no-repeat; opacity: .45; }
.wheel-wrap > .wheel-center:has(.round-timer:not([hidden]))::after { display: none; }
.round-timer { max-width: 45%; color: #efd39c; font: 700 clamp(28px, 9vw, 45px)/1.15 Georgia, serif; font-variant-numeric: tabular-nums; text-shadow: 0 2px 14px #001b20; }
.pointer { top: 5px; z-index: 5; border-top: 13px solid #eac889; border-left-width: 8px; border-right-width: 8px; filter: drop-shadow(0 1px 1px #37220d); }
.wheel-jewel { position: absolute; z-index: 6; color: #f2d097; font-size: 25px; line-height: 1; text-shadow: 0 1px #00282d, 1px 0 #00282d; pointer-events: none; }
.jewel-top { left: 50%; top: -14px; transform: translateX(-50%); }
.jewel-left { left: -14px; top: 50%; transform: translateY(-50%); }
.jewel-right { right: -14px; top: 50%; transform: translateY(-50%); }
.wheel-art { position: absolute; inset: 0; }
.wheel-gift { position: absolute; left: var(--x); top: var(--y); width: 17%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 20%; object-fit: contain; filter: drop-shadow(0 3px 3px #00232640); }
.wheel-gift.art { border-radius: 28%; }
.wheel-profile { display: grid; place-items: center; overflow: hidden; border-radius: 50%; border: 2px solid var(--gold); background: #164f53; color: #ffe6b5; font: 600 clamp(12px, 5vw, 24px) Georgia, serif; visibility: hidden; }
.wheel-profile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.wheel.is-spinning .wheel-profile { visibility: visible; }
.wheel-division { position: absolute; left: 50%; top: 0; width: 1px; height: 50%; transform-origin: bottom; background: #725a35; }
button.primary { display: flex; justify-content: center; align-items: center; gap: 10px; min-height: 47px; border: 1px solid #72f2ec; background: linear-gradient(180deg, #03c9cf, #009bad); color: white; box-shadow: inset 0 0 0 2px #00d8df35, 0 4px 12px #00141633; border-radius: 14px; font-weight: 500; margin: 12px 0 9px; }
button.primary:disabled { opacity: .45; cursor: not-allowed; }
.share-card { display: flex; align-items: center; gap: 10px; min-height: 41px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(115deg, #17494a66, #002629); margin-bottom: 8px; font-size: 13px; }
.share-card .icon { color: var(--gold); width: 20px; }
.share-card b { margin-left: auto; font-weight: 500; font-size: 16px; }
.card { border: 1px solid #b9905344; background: linear-gradient(120deg, #12414488, #00282b); border-radius: 15px; }
.player { padding: 9px; gap: 9px; }
.player-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fce5b9; border: 1px solid var(--gold); background: #23575a; font: 22px Georgia, serif; }
.player .info { display: flex; align-items: center; gap: 7px; }
.player .info b { max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 500; }
.player .thumbs { margin: 0; overflow: hidden; max-width: 100px; }
.player .thumbs img { width: 27px; height: 31px; object-fit: contain; background: #fff1; }
.player-result { text-align: right; flex: none; }
.player .chance { display: block; font-size: 14px; font-weight: 500; }
.player-result small { display: block; color: #5de0df; font-size: 11px; }
.empty-state { text-align: center; color: var(--muted); padding: 22px 14px; border: 1px dashed #ba98584d; border-radius: 15px; font-size: 13px; }
.fair { margin: 13px 3px 0; font-size: 12px; }
.fair summary { display: flex; align-items: center; gap: 7px; color: #66dbdf; list-style: none; min-height: 32px; }
.fair summary::-webkit-details-marker { display: none; }
.fair summary::before { content: ""; display: inline-block; width: 17px; height: 19px; background: url("assets/shield.svg") center/contain no-repeat; }
.fair summary::after { content: "›"; font-size: 23px; margin-left: 4px; }
.fair[open] summary::after { transform: rotate(90deg); }
.bottom-nav { left: 50%; right: auto; transform: translateX(-50%); width: min(100%, 520px); z-index: 8; background: #00282cf5; backdrop-filter: blur(16px); border: 1px solid var(--gold); border-bottom: 0; border-radius: 29px 29px 0 0; padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 25px #00141644; }
.bottom-nav button { position: relative; color: #b5c9c6; gap: 2px; padding: 5px 6px 4px; min-height: 60px; margin-inline: 2px; border: 1px solid transparent; border-radius: 17px; }
.bottom-nav .icon { width: 26px; height: 26px; }
.bottom-nav button .nav-label { font-size: 11px; line-height: 1.25; font-weight: 500; }
.bottom-nav button.active { color: #71f0e5; border-color: #64d5cc44; background: linear-gradient(180deg, #12626966, #05424744); box-shadow: inset 0 1px #94e7d91a; }
.nav-art { display: block; width: 33px; height: 33px; flex: none; background: url("assets/bottom-nav-icons.png") no-repeat; background-size: 200% 200%; filter: saturate(.8) brightness(.9) drop-shadow(0 2px 3px #001a2080); }
.bottom-nav button.active .nav-art { filter: saturate(1.1) brightness(1.12) drop-shadow(0 0 5px #20c5c74d); }
.nav-art-games { background-position: 0 0; }
.nav-art-cases { background-position: 100% 0; }
.nav-art-profile { background-position: 0 100%; }
.nav-art-admin { background-position: 100% 100%; }
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.case-grid > .empty-state { grid-column: 1 / -1; }
.heritage-case { position: relative; display: flex; flex-direction: column; overflow: hidden; min-height: 225px; text-align: left; border: 1px solid var(--gold); border-radius: 18px; background: #003034; color: var(--text); padding: 0; isolation: isolate; }
.heritage-case::after, .heritage-case::before { content: ""; width: 28px; height: 28px; position: absolute; z-index: 3; top: 5px; background: url("assets/ornament.svg") center / contain; pointer-events: none; }
.heritage-case::before { left: 5px; }
.heritage-case::after { right: 5px; transform: scaleX(-1); }
.case-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.heritage-case > .art { position: absolute; width: 100%; height: auto; aspect-ratio: 1; left: 0; bottom: 0; z-index: -2; }
.heritage-case { background: #002b2d; }
.heritage-case .case-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #00272bef, #00292c11 48%, #00282b22 65%, #00272ba6); }
.case-copy { padding: 13px 11px 5px; width: 100%; min-width: 0; max-width: 100%; }
.case-title { display: block; font: 400 25px/1.15 Georgia, serif; overflow-wrap: normal; word-break: normal; hyphens: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-description { display: block; font-size: 11px; line-height: 1.35; margin-top: 5px; color: #e8f0e6; }
.case-price { display: flex; align-items: center; justify-content: center; width: max-content; max-width: calc(100% - 20px); gap: 5px; min-height: 34px; border: 1px solid #73f3ea; border-radius: 22px; background: linear-gradient(#04c8cf, #009ba8); margin: auto 10px 10px; padding: 7px 11px; font-size: 12px; color: #fff; }
.case-price .star { font-size: 18px; line-height: 1; }
.case-featured { grid-column: 1 / -1; min-height: 265px; }
.case-featured > .art { width: 76%; right: -2%; left: auto; bottom: -5%; }
.case-featured .case-copy { padding: 22px 18px 15px; width: 100%; max-width: 100%; }
.case-featured .case-title { font-size: clamp(27px, 7.5vw, 37px); }
.case-featured .case-description { font-size: 13px; max-width: 62%; overflow-wrap: normal; word-break: normal; hyphens: none; }
.case-featured .case-shade { background: linear-gradient(180deg, #00272bf5, #00292c44 38%, transparent 65%), linear-gradient(90deg, #00292cf0, #00292c99 32%, transparent 72%); }
.case-featured .case-price { margin: auto 16px 16px; min-height: 40px; padding-inline: 17px; font-size: 14px; }
.case-unavailable .case-price { background: #214b4f; border-color: #809796; color: #cfdddd; }
.case-unavailable .case-art, .case-unavailable > .art { opacity: .65; }
.case-preview-art { display: block; width: min(260px, 100%); aspect-ratio: 1; margin: auto; border-radius: 18px; }
#cases-hash { opacity: .7; }
.cases-intro { margin: -3px 2px 18px; color: var(--muted); font-size: 13px; }
.heritage-case { min-height: 0; background: radial-gradient(ellipse at 60% 38%, #12626766, transparent 65%), #002c30; }
.heritage-case::before, .heritage-case::after { opacity: .65; width: 24px; height: 24px; }
.heritage-case .case-copy { padding: 18px 13px 0; width: 100%; max-width: 100%; }
.case-eyebrow { display: block; color: #d3b781; font-size: 8px; letter-spacing: .16em; margin-bottom: 7px; }
.heritage-case .case-title { font-size: 24px; color: #fff4dd; }
.case-count { display: block; width: max-content; max-width: 100%; color: #b6cdca; font-size: 11px; margin-top: 7px; }
.case-visual { display: block; position: relative; width: 100%; height: 155px; overflow: hidden; isolation: isolate; }
.case-visual .case-art { z-index: 1; }
.case-visual .art { width: min(100%, 290px); height: auto; aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.case-visual img { object-fit: contain; padding: 8px; }
.case-plinth { position: absolute; width: 65%; height: 12%; border-radius: 50%; background: #0c8c8c33; border-bottom: 1px solid #d0ad5d44; bottom: 10%; left: 17.5%; box-shadow: 0 0 24px #1cc7bd22; z-index: 0; }
.case-footer { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border-top: 1px solid #c2a36233; background: #00272c99; margin-top: auto; }
.case-cost { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.case-cost-label { color: var(--muted); font-size: 9px; }
.case-cost-value { color: #fff0ce; font-size: 17px; font-weight: 600; white-space: nowrap; }
.case-cost-value .star { color: #efc579; }
.case-cta { display: flex; justify-content: center; align-items: center; gap: 7px; min-height: 34px; padding: 7px 9px; border-radius: 11px; background: linear-gradient(#0ac5c8, #0099a5); border: 1px solid #71e9dc99; color: #fff; font-size: 10px; font-weight: 600; }
.case-cta > span { font-size: 16px; font-weight: 400; }
.case-featured .case-copy { padding: 20px 20px 0; }
.case-featured .case-title { font-size: clamp(28px, 7.5vw, 36px); }
.case-featured .case-eyebrow { font-size: 9px; }
.case-featured .case-count { position: absolute; top: 22px; right: 18px; padding: 5px 9px; border: 1px solid #c2a36255; border-radius: 20px; margin: 0; background: #00383a; font-size: 10px; }
.case-featured .case-eyebrow { padding-right: 112px; min-height: 15px; }
.case-featured .case-visual { height: 205px; }
.case-featured .case-footer { padding: 14px 18px; }
.case-featured .case-cost-value { font-size: 23px; }
.case-featured .case-cost-label { font-size: 11px; }
.case-featured .case-cta { font-size: 13px; padding: 10px 17px; min-height: 42px; }
.case-unavailable .case-cta { background: #17474a; border-color: #45686a; color: #b7c9c7; }
.case-unavailable .case-visual { opacity: .6; }
.cases-fair { border: 1px solid #bb97504d; padding: 7px 12px; border-radius: 14px; margin: 16px 0 0; background: #00282c77; }
.cases-fair summary { font-size: 12px; }
.cases-fair code { display: block; padding: 10px; margin-top: 6px; background: #001e23; border-radius: 8px; }
.case-detail-hero { position: relative; border-radius: 16px; background: radial-gradient(ellipse at center, #13585a77, #00282c); margin-bottom: 18px; overflow: hidden; }
.case-detail-hero .case-preview-art { width: 190px; }
.case-detail-count { display: block; text-align: center; color: #d9c294; font-size: 11px; padding-bottom: 14px; }
.case-content-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.case-content-heading h3 { font-size: 21px; margin: 0; }
.case-content-heading > span { font-size: 11px; color: var(--muted); }
.case-prizes { display: grid; gap: 7px; }
.case-prize-row { display: flex; align-items: center; gap: 10px; border: 1px solid #8da19033; background: #0a3b3e; border-radius: 12px; padding: 11px; }
.case-prize-mark { color: var(--gold); width: 28px; height: 32px; border-radius: 9px; background: #d4b46514; display: grid; place-items: center; font-size: 23px; flex: none; }
.case-prize-info { flex: 1; min-width: 0; }
.case-prize-info b { display: block; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.case-prize-info small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.case-probability { width: 68px; text-align: right; flex: none; }
.case-probability > b { display: block; color: #7ce6da; font-size: 12px; font-weight: 500; }
.probability-track { display: block; height: 3px; border-radius: 3px; background: #001e23; margin-top: 7px; overflow: hidden; }
.probability-track > span { display: block; height: 100%; border-radius: 3px; background: #52cabb; }
.case-odds-note { font-size: 11px; line-height: 1.5; color: var(--muted); margin: 13px 0; }
.art { background-image: url("assets/uzbek-collectibles.png"); background-repeat: no-repeat; background-size: 300% 200%; }
.art-0 { background-position: 0% 0%; }
.art-1 { background-position: 50% 0%; }
.art-2 { background-position: 100% 0%; }
.art-3 { background-position: 0% 100%; }
.art-4 { background-position: 50% 100%; }
.art-5 { background-position: 100% 100%; }
.sheet { border: 1px solid var(--gold); border-bottom: 0; max-width: 520px; margin: 0 auto; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.sheet-head { color: #edd3a5; font: 23px Georgia, serif; }
.modal { z-index: 20; backdrop-filter: blur(5px); }
body.modal-open { overflow: hidden; }
.toast { z-index: 30; width: calc(100% - 32px); max-width: 488px; left: 50%; right: auto; transform: translateX(-50%); border: 1px solid var(--line); }
h3 { color: #e9d2a7; font: 21px Georgia, serif; }
.gift { border: 1px solid #c49e5555; }
.gift.selected { border: 1px solid var(--accent); box-shadow: 0 0 0 2px #00c8c740; }
.gift img { background: #002629; }
input[type="number"], input[type="text"], input[type="search"] { border-color: #b9905366; min-height: 42px; }
.field-row > * { min-width: 0; }
.subtabs button { border: 1px solid #7a9c9244; }
.subtabs button.active { background: #009ba8; color: #fff; border-color: #55ddd4; }
button.small { border: 1px solid #8f9c7255; }
.crash-stage, .upgrade-ring { border: 1px solid var(--gold); box-shadow: inset 0 0 25px #17606344; }
.crash-stage { background: radial-gradient(ellipse at 20% 90%, #167e8066, transparent 70%), #043034; }
.upgrade-ring { border-radius: 50%; margin: 18px auto; }
.ring-bg { stroke: #175256; }
.ring-arc { stroke: var(--gold); }
.up-slot { border: 1px solid var(--line); }
.cell, .cell.idle:not(:disabled) { border: 1px solid #b9905355; background: url("assets/tile.svg") center / 60% no-repeat, linear-gradient(#10484b, #053338); }
.cell.gem { background: #096965; border-color: #71d6ba; }
.menu-links { display: grid; gap: 9px; }
.menu-links button { min-height: 48px; text-align: left; padding: 10px 14px; }
@media (max-width: 360px) {
  main { padding-inline: 12px; }
  .brand { font-size: 25px; gap: 5px; }
  .brand-doppi { width: 43px; height: 36px; }
  .game-tabs button { font-size: 10px; gap: 2px; padding-inline: 2px; }
  .mode-art { width: 22px; height: 22px; }
  .balance-pill { font-size: 11px; gap: 4px; }
  .player .info { flex-direction: column; align-items: flex-start; gap: 3px; }
  .case-title { font-size: 22px; }
  .heritage-case { min-height: 205px; }
  .case-featured { min-height: 245px; }
  .case-featured .case-title { font-size: 30px; }
}
@media (min-width: 700px) {
  body { background: radial-gradient(ellipse at 15% 45%, #16525588, transparent 55%), #001c20; }
  main { margin-block: 24px; min-height: calc(100dvh - 48px); border: 1px solid var(--gold); border-radius: 28px; box-shadow: 0 25px 90px #0006; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; }
  button, .ring-arc { transition: none; }
}

/* Case opening: prize tiers, test Stars, reel */
.tier-0 { --tier: #8da190; }
.tier-1 { --tier: #4aa8ff; }
.tier-2 { --tier: #a36bff; }
.tier-3 { --tier: #ff5fa8; }
.tier-4 { --tier: #f2c055; }
.case-prize-row[class*="tier-"] { border-left: 3px solid var(--tier); }
.case-prize-img { width: 36px; height: 36px; border-radius: 9px; flex: none; object-fit: cover; background: #00000033; }
.test-stars { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; border: 1px dashed #dbad6588; background: #dbad6510; font-size: 12px; color: #d9c294; }
.test-stars b { color: var(--gold); font-size: 15px; white-space: nowrap; }
.reel { position: relative; overflow: hidden; border-radius: 14px; padding: 12px 0; background: radial-gradient(ellipse at center, #13585a66, #00282c); border: 1px solid var(--line); }
.reel::before, .reel::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 2; pointer-events: none; }
.reel::before { left: 0; background: linear-gradient(90deg, #00282c, transparent); }
.reel::after { right: 0; background: linear-gradient(-90deg, #00282c, transparent); }
.reel-track { display: flex; gap: 8px; padding-left: 8px; will-change: transform; }
.reel-cell { flex: none; width: 92px; height: 112px; border-radius: 12px; background: #0a3b3e; border-bottom: 3px solid var(--tier); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px; text-align: center; transition: transform .3s, box-shadow .3s; }
.reel-cell img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.reel-cell span { font-size: 10px; color: var(--muted); line-height: 1.2; max-height: 2.4em; overflow: hidden; }
.reel-cell.won { transform: scale(1.06); box-shadow: 0 0 0 2px var(--tier), 0 0 22px var(--tier); }
.reel-marker { position: absolute; top: 4px; bottom: 4px; left: 50%; width: 2px; margin-left: -1px; background: var(--gold); box-shadow: 0 0 10px var(--gold); z-index: 3; }
.reel-marker::before, .reel-marker::after { content: ""; position: absolute; left: -6px; border: 7px solid transparent; }
.reel-marker::before { top: -4px; border-top-color: var(--gold); }
.reel-marker::after { bottom: -4px; border-bottom-color: var(--gold); }
.reel-result:empty { min-height: 40px; }
.reel-result .prize { margin-top: 14px; }
.reel-result .prize img { width: 140px; }
.case-econ { margin-top: 6px; } .case-econ .pos { color: var(--win); } .case-econ .neg { color: var(--lose); }
.prize-emoji { display: grid; place-items: center; line-height: 1; }
.case-prize-img.prize-emoji { font-size: 24px; }
.reel-cell .prize-emoji { width: 64px; height: 64px; font-size: 44px; border-radius: 10px; background: #00000026; }
.prize .prize-emoji { width: 140px; height: 140px; margin: 0 auto; font-size: 96px; border-radius: 16px; background: #00000026; }
.prize img.prize-img { width: 140px; border-radius: 16px; }

/* Original Telegram gift images: one renderer for the list, reel and result. */
.gift-art { position: relative; display: block; flex: none; overflow: hidden; background: radial-gradient(circle, #4b8d8d22, transparent 72%); }
.gift-art img, .prize .gift-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 3px; border-radius: 0; }
.gift-art-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #b2cec480; }
.gift-art-placeholder .icon { width: 45%; height: 45%; }
.gift-art.is-loaded .gift-art-placeholder { display: none; }
.gift-art.is-unavailable { background: #123f42; }
.case-prize-img.gift-art { width: 60px; height: 60px; border-radius: 12px; background-color: #13474a; }
.case-prize-row { padding: 10px; gap: 12px; }
.case-prize-info b { font-size: 14px; line-height: 1.3; }
.case-prize-info small { line-height: 1.4; }
.case-opening-heading { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 15px; color: #eddbb7; margin: 13px 0 18px; }
.case-opening-heading > span:last-child:not(.opening-pulse) { flex-basis: 100%; text-align: center; color: var(--muted); font-size: 11px; }
.opening-pulse { width: 7px; height: 7px; background: #65e4cf; border-radius: 50%; box-shadow: 0 0 0 5px #65e4cf13; animation: opening-pulse 1.3s ease-in-out infinite; }
@keyframes opening-pulse { 50% { opacity: .4; transform: scale(.8); } }
.reel { padding: 24px 0; border-color: #ddbd7580; background: radial-gradient(ellipse at 50% 50%, #0d676570, #00282c); }
.reel-cell { width: 112px; height: 145px; padding: 8px; border: 1px solid #679a9455; border-bottom: 3px solid var(--tier); background: linear-gradient(#135155, #07383c); }
.reel-cell .reel-img { width: 92px; height: 92px; max-height: none; background-color: transparent; }
.reel-cell .gift-art img { width: 100%; height: 100%; object-fit: contain; }
.reel-cell .gift-art-placeholder { max-height: none; }
.reel-cell .reel-caption { font-size: 11px; color: #e4eeea; }
.reel-cell.won { box-shadow: 0 0 0 1px var(--tier), 0 0 22px #d2b36b55; }
.reel-hint { color: var(--muted); font-size: 11px; text-align: center; margin: 14px 0; }
.case-won-prize { padding: 18px 14px; border: 1px solid #d5b97866; border-radius: 18px; background: radial-gradient(ellipse at 50% 30%, #1a726b55, #003034); }
.case-won-prize .prize-img { display: block; width: 168px; height: 168px; margin: 0 auto; max-height: none; }
.case-won-prize h3 { margin: 10px 0 8px; font-size: 27px; }
.case-won-prize p { font-size: 12px; line-height: 1.5; }
.prize-value { display: inline-block; padding: 5px 12px; border: 1px solid #d8b66c55; border-radius: 20px; color: #f2d08a; font-size: 13px; }
.case-payment-pending { text-align: center; color: var(--muted); padding: 24px 12px; }
.case-payment-pending > .icon { color: #65e4cf; width: 40px; height: 40px; }
.case-payment-pending p { font-size: 13px; line-height: 1.5; }
@media (max-width: 360px) { .case-prize-img.gift-art { width: 50px; height: 50px; } .case-prize-row { gap: 8px; padding: 8px; } .case-prize-info b { font-size: 12px; } .case-probability { width: 59px; } }

/* TON deposit */
.deposit-choice { display: grid; gap: 8px; }
.testnet-note { display: block; text-align: center; padding: 6px; margin-bottom: 10px; }
#ton-tonkeeper { margin-top: 14px; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; margin-top: 10px; }
.copy-row > span { grid-column: 1 / -1; }
.copy-row code { overflow-wrap: anywhere; font-size: 12px; background: #00000033; padding: 6px 8px; border-radius: 8px; }
.copy-row code.deposit-code { font-size: 20px; letter-spacing: 3px; color: var(--gold); text-align: center; }

/* Withdraw / sell under an own gift */
.gift-actions { display: grid; gap: 4px; margin-top: 6px; }
.gift-actions .small { width: 100%; }
#admin-full-panel { margin-bottom: 6px; }

/* Friends: referral link, tickets, giveaways */
.ref-card .ticket-count { font: 700 26px Georgia, serif; color: var(--gold); }
.ref-card .copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 10px 0; }
.ref-card code { overflow-wrap: anywhere; font-size: 12px; background: #00000033; padding: 6px 8px; border-radius: 8px; }
.giveaway { display: grid; gap: 8px; }
.giveaway.done { opacity: .85; }
.gw-prizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.gw-prize { text-align: center; border: 1px solid #c49e5555; border-radius: 12px; padding: 6px; }
.gw-prize.won { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.gw-prize img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; }
.gw-enter input { width: 80px; }
.giveaway code { overflow-wrap: anywhere; }

/* Giveaways carousel on the main screen */
.gw-strip { margin: 0 0 12px; }
.gw-track { overflow: hidden; border-radius: 18px; touch-action: pan-y; }
.gw-rail { display: flex; will-change: transform; }
.gw-slide { box-sizing: border-box; flex: 0 0 100%; min-width: 0; max-width: 100%; display: grid;
  grid-template-columns: 88px minmax(0, 1fr); grid-template-rows: 1fr auto; align-items: center; gap: 10px 14px;
  min-height: 146px; padding: 16px; border: 1px solid #d8b67370; border-radius: 18px; text-align: left; color: var(--text);
  background: radial-gradient(ellipse at 0 100%, #08bdbe26, transparent 65%), linear-gradient(120deg, #154448, #052e32);
  box-shadow: inset 0 1px 0 #ffffff0c; }
.gw-pics { grid-row: 1 / 3; position: relative; width: 88px; height: 98px; display: block; }
.gw-pics img { position: absolute; width: 72px; height: 80px; left: 8px; top: 9px; border-radius: 15px; object-fit: cover;
  border: 1px solid #d8b67380; background: #0b3a3d; box-shadow: 0 7px 16px #001c2480; z-index: 3; }
.gw-pics img:nth-child(2) { transform: rotate(-12deg) translate(-7px, -3px); z-index: 2; opacity: .85; }
.gw-pics img:nth-child(3) { transform: rotate(12deg) translate(7px, -3px); z-index: 1; opacity: .65; }
.gw-info { display: grid; gap: 5px; min-width: 0; }
.gw-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font: 600 10px/1.3 system-ui, sans-serif; color: var(--gold); letter-spacing: .35px; text-transform: uppercase; }
.gw-time { padding: 3px 6px; border-radius: 6px; background: #00292c80; color: #b0d4d2; font-size: 10px; letter-spacing: 0; text-transform: none; }
.gw-title { font: 600 20px/1.18 Georgia, serif; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.gw-sub { font: 11px/1.4 system-ui, sans-serif; color: #a4c4c5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-cta { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; padding: 6px 11px;
  border: 1px solid #efd3a0; border-radius: 10px; background: linear-gradient(110deg, #f1d49a, #d8ad62); color: #243536;
  font: 700 12px/1.3 system-ui, sans-serif; }
.gw-cta > span { font-size: 18px; line-height: 1; }
.gw-slide:focus-visible { outline: 2px solid var(--turquoise, #06bfc9); outline-offset: -4px; }
@media (max-width: 350px) { .gw-slide { padding: 13px; gap: 9px 10px; grid-template-columns: 76px minmax(0, 1fr); } .gw-pics { width: 76px; } .gw-pics img { width: 64px; height: 74px; left: 6px; } .gw-title { font-size: 18px; } }
.gw-dots { display: flex; justify-content: center; gap: 6px; margin-top: 7px; }
.gw-dots:empty { display: none; }
.gw-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 3px; background: #dbad6555; transition: width .2s, background .2s; }
.gw-dots button.active { width: 18px; background: var(--gold); }

/* PvP: TON in the stake */
.pvp-ton { display: grid; gap: 8px; margin-bottom: 10px; }
.ton-stake { display: inline-flex; align-items: center; padding: 2px 7px; border: 1px solid #5f9c9f66; border-radius: 10px; color: #bfe9ee; font-size: 12px; white-space: nowrap; }
