:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #e8ede5;
  background: #0b100f;
  font-synthesis: none;
  --background: #0d1211;
  --surface: #19271e;
  --raised: #24342a;
  --border: #344438;
  --gold: #ddbc7c;
  --text: #e8ede5;
  --muted: #9baaa1;
  --positive: #83c99a;
  --error: #f08d91;
  --focus: #e9cc91;
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
  --safe-top: max(env(safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px));
  --layout-width: 538px;
  --edge: 20px;
  --heading-font: ui-rounded, 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, dialog { scrollbar-width: none; }
html::-webkit-scrollbar, dialog::-webkit-scrollbar { display: none; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(ellipse at 50% 5%, #222e21 0, #101713 52%, #0b100f 90%); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
button, input, select, textarea { color: inherit; }
a { color: var(--gold); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button { padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--heading-font); overflow-wrap: anywhere; }
small { font-size: .8rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.bc-icon { object-fit: contain; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.positive { color: var(--positive); }
.error-text { color: var(--error); }
.num { font-variant-numeric: tabular-nums; }
.wrap { overflow-wrap: anywhere; }

.frame { --header-bg: #18241e; --navigation-border: #344039; position: relative; width: min(100%, var(--layout-width)); min-height: 100vh; min-height: 100dvh; margin-inline: auto; border-inline: 1px solid #303c30; background: radial-gradient(ellipse at 44% -10%, #28352a 0, #141d18 46%, var(--background) 76%); }
.app-header { position: sticky; top: 0; z-index: 3; padding: calc(5px + var(--safe-top)) var(--edge) 4px; background: var(--header-bg); border-bottom: 1px solid var(--navigation-border); }
.brand-row, .boot-head { display: flex; align-items: center; gap: 11px; }
.brand-row { justify-content: space-between; }
.brand { display: inline-flex; align-items: center; min-width: 0; color: var(--text); text-decoration: none; min-height: 44px; }
.brand img, .boot-head img { display: block; width: min(200px, 61vw); height: auto; }
.store-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: none; min-height: 44px; padding: 0 12px; border: 1px solid #9c7942; border-radius: 12px; color: #ffe1a4; background: #392b1e; font-size: .84rem; font-weight: 700; }
.store-link .icon { width: 17px; height: 17px; }
.store-link:not(:disabled):hover, .store-link[aria-current] { background: #513c25; }
.icon-button, .back-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 44px; min-height: 44px; padding: 0 11px; border: 1px solid var(--border); border-radius: 12px; color: var(--gold); background: #1d2920; }
.icon-button:hover, .back-button:hover { background: #2b382a; }
.icon-button .icon { width: 19px; height: 19px; }
.rate-text { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 2px 0 8px; border: 0; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 500; }
.rate-text .icon { width: 13px; height: 13px; }
.rate-text:hover { text-decoration: underline; color: var(--gold); }
.wallet-line { display: grid; grid-template-columns: 1fr 1fr; margin: 9px var(--edge) 0; border: 1px solid var(--border); border-radius: 14px; background: #1b2821; }
.wallet-metric { display: flex; align-items: center; min-width: 0; gap: 9px; padding: 8px 10px; }
.wallet-metric + .wallet-metric { border-left: 1px solid var(--border); }
.metric-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; color: var(--gold); background: #302e22; border: 1px solid #574a33; border-radius: 9px; }
.metric-icon .icon { width: 17px; height: 17px; }
.metric-icon .bc-icon { width: 22px; height: 22px; }
.metric-icon.income { color: var(--positive); background: #22352a; border-color: #3e5646; }
.wallet-metric span:not(.metric-icon) { display: grid; gap: 2px; min-width: 0; }
.wallet-metric small { color: var(--muted); font-size: .74rem; }
.wallet-metric strong { font-size: .92rem; line-height: 1.1; color: var(--text); overflow-wrap: anywhere; }

.workspace { padding: 16px var(--edge) calc(90px + var(--safe-bottom)); }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-height: 44px; }
.page-title h1 { font-size: clamp(1.45rem, 6vw, 2rem); letter-spacing: -.025em; font-weight: 650; line-height: 1.12; }
.page-title.sub-title { flex-wrap: wrap; }
.page-title.sub-title > div { display: flex; align-items: center; gap: 10px; }
.page-title.sub-title h1 { font-size: clamp(1.3rem, 5vw, 1.75rem); }
.back-button { padding: 0; background: transparent; }
.back-button .icon { width: 18px; height: 18px; }
.currency-row { display: flex; gap: 7px; margin-bottom: 12px; }
.currency-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); flex: 1; min-width: 0; gap: 7px; }
.currency-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; flex: 0 0 auto; padding: 0 9px; border: 1px solid #39483c; border-radius: 11px; color: #c6d0c7; background: #1b271f; font-size: .8rem; font-weight: 650; letter-spacing: .035em; }
.currency-chip:hover { border-color: #788269; }
.currency-chip[aria-pressed='true'] { border-color: #ab905c; color: #f7dba4; background: #352f22; }
.flag { display: inline-block; width: 19px; height: 13px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px #fff2; }
.currency-list .currency-chip { min-width: 0; padding-inline: 2px; gap: clamp(3px, 1vw, 6px); font-size: clamp(.7rem, 2.9vw, .8rem); }
.currency-list .flag { width: clamp(12px, 3.4vw, 19px); height: auto; aspect-ratio: 20 / 14; }
.currency-more { flex: none; padding: 0; color: var(--muted); }

.note-card { --rarity: #aab5af; position: relative; display: grid; gap: 10px; border: 1px solid #495640; border-radius: 17px; padding: 12px; background: linear-gradient(155deg, #243528, #19261e 52%, #263127); }
.note-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; border-top: 1px solid #a28c5c45; pointer-events: none; }
.rarity-uncommon { --rarity: #8fc9a4; }
.rarity-rare { --rarity: #91b5ed; }
.rarity-epic { --rarity: #c39ceb; }
.rarity-legendary { --rarity: #e7bd70; }
.rarity-mythic { --rarity: #f08d91; }
.rarity-unique { --rarity: #70d8d1; }
.card-kicker { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: .75rem; }
.card-kicker { color: var(--rarity); font-weight: 650; }
.card-kicker .icon { width: 14px; height: 14px; }
.note-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 19px; overflow: hidden; }
.note-art { position: relative; display: grid; align-items: center; overflow: hidden; border-radius: 9px; isolation: isolate; aspect-ratio: 800 / 354; width: 100%; background: #26372a; }
.note-art::after { content: ''; position: absolute; z-index: -1; inset: 3px; border: 1px solid #a7a37c90; border-radius: 8px; }
.note-art > img { width: 100%; height: 100%; object-fit: contain; }
.note-art .neutral-art { object-fit: cover; }
.note-art.photo-art { background: transparent; border-radius: 0; }
body { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
input, textarea { user-select: text; -webkit-user-select: text; }
.saved-note.rarity-epic { --note-texture: url('/art/note-backgrounds/epic.webp'); }
.saved-note.rarity-legendary { --note-texture: url('/art/note-backgrounds/legendary.webp'); }
.saved-note.rarity-mythic { --note-texture: url('/art/note-backgrounds/mythic.webp'); }
.saved-note.rarity-unique { --note-texture: url('/art/note-backgrounds/unique.webp'); }
.saved-note:is(.rarity-epic,.rarity-legendary,.rarity-mythic,.rarity-unique) { background-image: linear-gradient(#10171455,#10171499), var(--note-texture, none); background-size: cover; background-position: center; }
.profile-avatar { position: relative; display: inline-grid; flex: none; }
.profile-avatar:has(.profile-frame) { padding: 5px; }
.profile-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.note-art.photo-art::after { content: none; }
.note-art .real-art { position: absolute; inset: 0; }
.art-usd .real-art { width: min(100%, 420px); margin-inline: auto; }
.note-art .real-art[hidden] { display: none; }
.note-mark { position: absolute; bottom: 24%; left: 8%; width: 13%; display: grid; place-items: center; color: #354a36; font: 700 clamp(.68rem, 3vw, 1.1rem)/1 Georgia, serif; letter-spacing: .04em; text-align: center; }
.note-mark-right { right: 8%; left: auto; }
.art-eur .neutral-art, .art-czk .neutral-art { filter: hue-rotate(43deg) saturate(.72); }
.art-uah .neutral-art, .art-uzs .neutral-art { filter: hue-rotate(348deg) saturate(.76); }
.art-pln .neutral-art, .art-rub .neutral-art, .art-byn .neutral-art { filter: hue-rotate(295deg) saturate(.52); }
.art-kzt .neutral-art, .art-huf .neutral-art, .art-ron .neutral-art { filter: hue-rotate(12deg) saturate(.83); }
.serial-area { display: grid; place-items: center; gap: 3px; min-width: 0; padding: 6px 4px 3px; border: 1px solid #3e4a39; border-radius: 10px; background: #111b15; }
.generator-card .serial-area { min-height: 48px; padding: 4px; }
.serial { display: block; font: 600 clamp(1.12rem, 5.05vw, 1.75rem)/1.2 'Cascadia Mono', Consolas, ui-monospace, monospace; letter-spacing: .12em; font-variant-numeric: tabular-nums; min-height: 1.2em; text-align: center; white-space: nowrap; }
.serial[aria-hidden='true'] { color: #dabc80; }
.serial mark { color: var(--rarity); background: #ffffff0d; border-radius: 2px; }
.serial-gap { display: inline-block; width: .44em; }
.serial-reel { display: inline-block; overflow: hidden; vertical-align: bottom; width: calc(1ch + .12em); height: 1.2em; }
.reel-strip { display: flex; flex-direction: column; animation: serial-roll 1.45s linear infinite; }
.serial-reel:nth-child(even) .reel-strip { animation-duration: 1.22s; }
.serial-reel:nth-child(n+4) .reel-strip { animation-duration: .63s; }
.serial-reel:nth-child(3n+1) .reel-strip { animation-delay: -.24s; }
.reel-strip > span { height: 1.2em; flex: 0 0 1.2em; }
.reel-strip.is-stopping { animation: none; }
@keyframes serial-roll { to { transform: translateY(calc(-100% + 1.2em)); } }
@media (prefers-reduced-motion: reduce) { .reel-strip { animation: none; } }
.reduce-motion .reel-strip { animation: none; }
.generated-label { font-size: .75rem; color: var(--positive); }

.quota { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 8px; margin: 10px 0; padding: 9px 12px 10px; border: 1px solid #464835; border-radius: 12px; background: #222b20; }
.quota-count, .countdown { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .78rem; }
.quota-count strong { color: var(--gold); font: 700 .85rem/1.2 Inter, 'Segoe UI', sans-serif; white-space: nowrap; }
.quota-count .icon, .countdown .icon { width: 14px; height: 14px; color: var(--gold); }
.quota-progress { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); grid-column: 1 / -1; gap: 3px; }
.quota-progress i { display: block; height: 3px; border-radius: 3px; background: #424a37; }
.quota-progress .available { background: #c9a967; }
.countdown { white-space: nowrap; min-height: 1rem; font-variant-numeric: tabular-nums; }
.analytics-table-wrap { overflow-x: auto; }
.analytics-table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.analytics-table th, .analytics-table td { padding: 7px 6px; border-bottom: 1px solid var(--border); text-align: right; }
.analytics-table th:first-child { text-align: left; }
.analytics-table thead { color: var(--muted); }
.analytics-table tbody th { font-weight: 600; min-width: 45px; }
.spin-actions { display: grid; grid-template-columns: minmax(5.4rem, 1fr) 3fr; gap: 9px; }
.spin-actions.single-action { grid-template-columns: 1fr; }
.premium-spin-controls { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.premium-spin-controls button { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 5px 9px; border: 1px solid #6b5939; border-radius: 9px; background: #2d2b20; color: var(--gold); font: inherit; font-size: .76rem; }
.premium-spin-controls button[aria-pressed='true'] { background: #493a23; border-color: #ad894e; }
.premium-spin-controls button span { color: var(--muted); }
.premium-spin-controls .icon { width: 14px; height: 14px; }
.premium-spin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.premium-spin-grid > div { display: grid; gap: 5px; align-content: start; min-width: 0; }
.premium-spin-grid .note-card { padding: 5px; gap: 4px; }
.premium-spin-grid .card-kicker { font-size: .63rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.premium-spin-grid .card-kicker .icon { display: none; }
.premium-spin-grid .serial-area { min-height: 29px; padding: 2px; }
.premium-spin-grid .serial { font-size: clamp(.54rem, 2.25vw, .86rem); letter-spacing: .04em; }
.premium-spin-grid .long-serial { font-size: clamp(.47rem, 1.9vw, .74rem); letter-spacing: 0; }
.premium-spin-grid .serial-reel { width: calc(1ch + .04em); }
.premium-spin-grid .long-serial .serial-reel { width: 1ch; }
.premium-spin-grid .button { min-height: 42px; padding: 3px; font-size: .68rem; }
.spin-actions [data-action='save'] { font-size: .8rem; }
.balance-notice { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 9px; margin-bottom: 9px; padding: 8px 11px; border: 1px solid #975648; border-radius: 12px; background: #35241f; }
.balance-notice strong { display: block; color: #ffbda9; font-size: .91rem; }
.balance-notice small { display: block; color: #efcbba; margin-top: 5px; font-size: .75rem; }
.balance-notice button { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 8px; border: 0; border-radius: 9px; color: #ffe1a4; background: transparent; font-size: .82rem; font-weight: 700; }
.balance-notice button:hover { background: #4b3026; }
.balance-notice .icon { width: 15px; height: 15px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; min-width: 0; padding: 7px 13px; border: 1px solid #53604c; border-radius: 12px; background: #253326; color: var(--text); font-size: .9rem; font-weight: 700; line-height: 1.15; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
.button .icon { width: 18px; height: 18px; }
.button:hover:not(:disabled) { background: #31412f; }
.button:disabled { opacity: .62; }
.button.primary { background: linear-gradient(120deg, #eace91, #d7b477); border-color: #e4c68b; color: #231d13; box-shadow: 0 2px 14px #d0a45620; }
.button.primary:hover:not(:disabled) { background: #f2d396; }
.button.danger { border-color: #80504f; color: #f2aaac; background: #392b29; }
.spin-actions .button { height: 56px; padding: 5px 8px; }
.spin-actions .button span { display: grid; gap: 1px; }
.button small { font-size: .74rem; font-weight: 600; }
.spin-status { min-height: 28px; display: flex; align-items: center; gap: 6px; padding: 4px 1px 0; font-size: .74rem; color: var(--muted); }
.spin-status .icon { width: 14px; height: 14px; }
.spin-status .inline-button { min-height: 30px; }
.spin-status .error-text { display: contents; }
.inline-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 3px; border: 0; background: transparent; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }

.tabbar { position: fixed; z-index: 4; bottom: 0; left: 50%; width: min(100%, var(--layout-width)); transform: translateX(-50%); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; border: 1px solid var(--navigation-border); border-bottom: 0; padding: 5px 7px calc(5px + var(--safe-bottom)); background: #161f1af7; backdrop-filter: blur(10px); }
.tabbar button { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px 1px; color: var(--muted); border: 1px solid transparent; border-radius: 10px; background: transparent; font-size: calc(.7rem - 1px); font-weight: 600; }
.tabbar button .icon { width: 19px; height: 19px; }
.tabbar button:hover { background: #242f25; }
.tabbar button[aria-current='page'] { color: var(--gold); background: #312c20; border-color: #594b34; }

.stack { display: grid; gap: 13px; }
.panel { min-width: 0; padding: 13px; border: 1px solid var(--border); border-radius: 14px; background: #19271f; }
.panel h2, .panel h3 { margin-bottom: 7px; }
.panel h2 { font-size: 1.06rem; }
.panel h3 { font-size: .92rem; }
.panel p + p { margin-top: 8px; }
.panel p, .section-text { color: var(--muted); line-height: 1.47; font-size: .9rem; }
.panel .button, .panel-action { margin-top: 10px; }
.panel-head, .record, .section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.section-head { align-items: baseline; }
.section-head h2 { font-size: 1.02rem; }
.panel-title { display: flex; align-items: center; gap: 8px; }
.panel-title .icon { color: var(--gold); }
.empty { padding: 22px 14px; text-align: center; }
.empty .icon { width: 30px; height: 30px; color: var(--gold); }
.empty h2 { margin-top: 9px; }
.surface-card { padding: 15px; background: linear-gradient(145deg, #253b29, #19271e 72%); border-color: #495640; }
.bank-gold { background: radial-gradient(ellipse at 100% 0%, #60503244, transparent 62%), linear-gradient(145deg, #3b3526, #211f18 75%); border-color: #9f8350; }
.frame.theme-premium { --header-bg: #241d1d; --navigation-border: #5e4a3c; background: radial-gradient(ellipse at 44% -10%, #3e3228 0, #211c1d 47%, #100f11 76%); border-inline-color: #544336; }
.theme-premium .tabbar { background: #241d1df7; }
.theme-premium .wallet-line { background: #2a2421; border-color: #5e4a3c; }
.profile-avatar:has(.profile-frame[src$="animated_frame.png"]) { border-radius: 14px; animation: frame-glow 7s ease-in-out infinite alternate; }
@keyframes frame-glow { from { box-shadow: 0 0 5px #b4896133, inset 0 0 6px #d0a6701a; } to { box-shadow: 0 0 14px #d0a67055, inset 0 0 8px #d0a67026; } }
@media (prefers-reduced-motion: reduce) { .profile-avatar:has(.profile-frame[src$="animated_frame.png"]) { animation: none; } }
.reduce-motion .profile-avatar:has(.profile-frame[src$="animated_frame.png"]) { animation: none; }
.big-number { color: var(--gold); font-family: var(--heading-font); font-size: clamp(1.65rem, 7vw, 2.25rem); margin: 2px 0 6px; display: block; }
.meter { width: 100%; display: block; height: 8px; accent-color: var(--gold); border: 0; border-radius: 10px; background: #334438; margin: 10px 0; }
.meter::-webkit-progress-bar { background: #334438; border-radius: 10px; }
.meter::-webkit-progress-value { background: var(--gold); border-radius: 10px; }
.meter::-moz-progress-bar { background: var(--gold); border-radius: 10px; }
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.data-grid > div { min-width: 0; border: 1px solid var(--border); border-radius: 11px; padding: 9px; background: #1a271e; }
.data-grid small { display: block; color: var(--muted); margin-bottom: 4px; }
.data-grid strong { overflow-wrap: anywhere; }
.item-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; align-items: stretch; }
.item-grid > button { width: 100%; min-width: 0; padding: 8px; text-align: left; color: var(--text); }
.item-grid > button:hover { border-color: #a28c5c; }
.item-grid .note-card { gap: 6px; }
.item-grid .serial { font-size: clamp(.65rem, 2.7vw, 1.05rem); letter-spacing: .06em; }
.item-grid .note-mark { font-size: clamp(.42rem, 1.45vw, .62rem); }
.item-grid .note-meta { flex-wrap: wrap; gap: 2px 6px; }
.item-grid .item-price { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--border); padding-top: 6px; color: var(--gold); font-size: .83rem; font-weight: 700; }
.item-price .icon { width: 15px; height: 15px; }
.item-grid .art-caption { font-size: .72rem; color: var(--muted); }
.segmented { display: flex; gap: 4px; min-width: 0; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: #19251d; }
.segmented button { display: grid; place-items: center; flex: 1; min-width: 0; min-height: 44px; padding: 3px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: none; font-size: .84rem; line-height: 1.15; overflow-wrap: anywhere; }
.segmented button:is([aria-pressed='true'], [aria-selected='true']) { color: var(--gold); border-color: #655436; background: #312e22; }
.field-grid, .action-row { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 8px; }
.field-grid .wide { grid-column: 1 / -1; }
.field { display: grid; align-content: start; gap: 5px; min-width: 0; color: var(--muted); font-size: .82rem; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid #4a604f; border-radius: 9px; color: var(--text); background: #131f17; }
.field textarea { min-height: 88px; resize: vertical; }
.field select { appearance: none; padding-right: 24px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m4 7 5 5 5-5' fill='none' stroke='%23ddbc7c' stroke-width='1.4'/%3E%3C/svg%3E"); background-position: right 6px center; background-size: 14px; background-repeat: no-repeat; }
.field-check { display: flex; align-items: center; min-height: 44px; gap: 8px; color: var(--text); font-size: .9rem; }
.field-check + .field-check { border-top: 1px solid var(--border); }
.field-check input { width: 18px; height: 18px; flex: none; margin: 0 2px 0 0; accent-color: var(--gold); }
.filter-box { border: 1px solid var(--border); border-radius: 12px; padding: 0 11px 9px; }
.filter-box:not([open]) { padding-bottom: 0; }
.filter-box summary { display: flex; min-height: 44px; align-items: center; gap: 7px; cursor: pointer; color: var(--gold); font-size: .88rem; list-style: none; }
.filter-box summary::-webkit-details-marker { display: none; }
.filter-box summary .chevron { margin-left: auto; }
.filter-box[open] summary .chevron { transform: rotate(180deg); }
.filter-box .action-row { margin-top: 9px; }

.collection-link { display: flex; align-items: center; min-height: 48px; width: 100%; padding: 7px 10px; gap: 9px; border: 1px solid var(--border); border-radius: 11px; text-align: left; color: var(--text); background: #1c2a21; font-size: .9rem; }
.collection-link .icon { color: var(--gold); }
.collection-link span { flex: 1; }
.collection-link small { color: var(--muted); }
.collection-link:hover { border-color: #69755e; }
.avatar { position: relative; overflow: hidden; width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid #766544; color: var(--gold); background: #342f22; border-radius: 14px; flex: none; }
.avatar .icon { width: 25px; height: 25px; }
.telegram-avatar { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-head { display: flex; align-items: center; gap: 10px; }
.profile-head h2 { margin-bottom: 2px; }
.daily-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 8px 0; }
.daily-home { margin-top: 22px; }
.rare-home { margin-top: 12px; }
.rare-podium, .rare-list { display: grid; gap: 7px; list-style: none; margin: 8px 0 0; padding: 0; }
.rare-podium { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) minmax(0, 1fr); align-items: end; gap: clamp(5px, 1.65vw, 9px); margin-top: 14px; }
.rare-podium li { --podium-trim: #8f634a; --podium-glow: #482d21; --podium-ink: #f1cab2; --step-height: 33px; grid-area: 1 / 3; display: grid; gap: 5px; min-width: 0; text-align: center; }
.rare-podium li:first-child { --podium-trim: #b38b49; --podium-glow: #554023; --podium-ink: #ffe0a1; --step-height: 60px; grid-column: 2; }
.rare-podium li:nth-child(2) { --podium-trim: #75898a; --podium-glow: #324247; --podium-ink: #d9e7eb; --step-height: 45px; grid-column: 1; }
.rare-podium-card { display: grid; align-content: center; justify-items: center; gap: 4px; min-width: 0; min-height: 94px; padding: 8px 4px; border: 1px solid color-mix(in srgb, var(--podium-trim) 69%, #26362c); border-radius: 10px; background: linear-gradient(160deg, color-mix(in srgb, var(--podium-glow) 52%, #19271f), #14221a 75%); }
.rare-podium-card > * { min-width: 0; max-width: 100%; }
.rare-podium-card.has-podium-art { position: relative; isolation: isolate; overflow: hidden; }
.rare-podium-art { position: absolute; z-index: -2; right: 0; bottom: 0; width: 100%; height: 100%; object-fit: cover; object-position: right bottom; }
.rare-podium-card.has-podium-art::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #101913dd 3%, #101913a8 48%, #10191326 100%); }
.has-podium-art .rare-currency { color: #cad8cf; }
.has-podium-art .rare-player { text-shadow: 0 1px 3px #000; }
.rare-podium-step { display: grid; place-items: center; min-height: var(--step-height); border: 1px solid var(--podium-trim); border-radius: 7px 7px 4px 4px; background: linear-gradient(180deg, color-mix(in srgb, var(--podium-trim) 36%, var(--podium-glow)), var(--podium-glow)); box-shadow: inset 0 2px 0 #ffffff24, inset 0 -2px 0 #0004; }
.rare-podium-step .rare-place { color: var(--podium-ink); font-size: 1.22rem; font-weight: 800; line-height: 1; }
.rare-podium li:first-child .rare-place { font-size: 1.55rem; }
.rare-place { color: var(--gold); font-variant-numeric: tabular-nums; }
.rare-currency, .rare-serial, .rare-tier, .rare-player { font-size: clamp(.68rem, 2.6vw, .83rem); overflow-wrap: anywhere; }
.rare-currency { display: flex; gap: 4px; justify-content: center; align-items: center; color: var(--muted); }
.rare-currency .flag { width: 13px; height: 9px; }
.rare-tier { color: var(--rarity, var(--muted)); }
.rare-podium .rare-serial { font-size: clamp(.64rem, 2.3vw, .84rem); }
.rare-podium .rare-player { color: var(--podium-ink); }
.rare-list { gap: 0; font-size: clamp(.68rem, 2.6vw, .83rem); }
.rare-list li { display: grid; grid-template-columns: 2.2ch minmax(6.5ch, .6fr) minmax(15ch, 1fr) minmax(10ch, .8fr) minmax(0, 1fr); column-gap: clamp(4px, 1.5vw, 9px); align-items: center; min-height: 42px; padding-block: 6px; }
.rare-list li + li { border-top: 1px solid var(--border); }
.rare-list li > * { min-width: 0; font-size: inherit; }
.rare-list .rare-currency { justify-content: flex-start; gap: 3px; }
.rare-list .rare-serial { font-family: 'Cascadia Mono', Consolas, ui-monospace, monospace; font-size: .94em; }
.rare-list .rare-serial, .rare-list .rare-tier { white-space: nowrap; }
.rare-list .rare-player { overflow: hidden; white-space: nowrap; text-align: right; text-overflow: ellipsis; }
button.rare-player { display: block; border: 0; border-radius: 5px; background: transparent; color: var(--gold); text-decoration: underline; }
.day { display: grid; place-items: center; gap: 3px; min-height: 47px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); font-size: .67rem; text-align: center; }
.day strong { font-size: .75rem; }
.day.claimed { color: var(--positive); border-color: #50725a; }
.day.current { color: var(--gold); border-color: #9f8956; background: #2e2c20; }
.record { min-height: 44px; padding-block: 7px; font-size: .87rem; overflow-wrap: anywhere; }
.record + .record { border-top: 1px solid var(--border); }
.record small { display: block; margin-top: 3px; color: var(--muted); }
.record > :last-child { text-align: right; }
.upper { text-transform: uppercase; letter-spacing: .07em; }
.shop-stack { gap: 12px; }
#shop-panel { gap: 10px; }
.shop-tabs { gap: 3px; }
.shop-tabs button { font-size: clamp(.7rem, 2.9vw, .84rem); }
.coin-pack { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 9px; }
.coin-pack-mark { display: grid; place-items: center; min-height: 42px; border: 1px solid #735c36; border-radius: 12px; background: radial-gradient(circle at 35% 24%, #645135, #302b20 75%); color: #f4ca7e; }
.coin-pack-mark .icon { width: 24px; height: 24px; }
.coin-pack-info h2 { margin-bottom: 2px; font-size: 1.14rem; }
.coin-pack .button { grid-column: 1 / -1; width: 100%; margin-top: 0; }
.featured-coin-pack { border-color: #b89350; background: linear-gradient(140deg,#3c3425,#192a21 74%); }
.featured-coin-pack .coin-pack-info h2 { color: #fee0a5; }
.shop-payment-note { color: var(--muted); font-size: .78rem; line-height: 1.4; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: #19271f; }
.shop-product { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 10px; }
.shop-product h2 { font-size: 1rem; margin-bottom: 4px; }
.shop-product p { font-size: .81rem; }
.shop-product .button { width: 100%; }
.shop-profile-product, .shop-art-product { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; }
.shop-profile-product .shop-product-copy, .shop-art-product .shop-product-copy { padding: 11px 13px 13px; }
.shop-frame-art { width: min(140px, 55%); height: auto; aspect-ratio: 1; object-fit: contain; justify-self: center; margin-block: 10px; }
.shop-premium { border-color: #8b7045; background: linear-gradient(135deg,#392c20,#232723 80%); }
.product-preview { display: grid; place-items: center; min-height: 50px; border: 1px solid #746144; border-radius: 10px; color: var(--gold); background: repeating-linear-gradient(135deg, transparent 0 5px, #d4ad6d14 5px 6px), #302b20; }
.product-preview .icon { width: 25px; height: 25px; }
.panel .owned-status { color: var(--positive); margin-top: 8px; }
.album-cover, .showcase-ornament { border-color: #a38650; }
.profile-copy { min-width: 0; overflow-wrap: anywhere; }
.profile-skin { position: relative; isolation: isolate; min-height: 110px; overflow: hidden; border-color: var(--skin-border); background: var(--skin-base); }
.profile-skin-amber { --skin-base: #21180e; --skin-border: #a17946; --skin-accent: #f5d398; }
.profile-skin-jade { --skin-base: #0b2823; --skin-border: #4f8c7c; --skin-accent: #b7ebd7; }
.profile-skin-obsidian { --skin-base: #101316; --skin-border: #626d75; --skin-accent: #e3ebef; }
.profile-skin-cobalt { --skin-base: #101a36; --skin-border: #5e7aa8; --skin-accent: #c1d8ff; }
.profile-skin-ruby { --skin-base: #2e121a; --skin-border: #985667; --skin-accent: #ffd0d9; }
.profile-skin-ivory { --skin-base: #241e1b; --skin-border: #a19178; --skin-accent: #fff0da; }
.profile-skin-copper { --skin-base: #2b1b15; --skin-border: #a36d53; --skin-accent: #ffd4b9; }
.profile-skin-amethyst { --skin-base: #22172e; --skin-border: #8664a4; --skin-accent: #eed7ff; }
.profile-skin-titanium { --skin-base: #161f27; --skin-border: #697d89; --skin-accent: #daedf4; }
.profile-skin-lagoon { --skin-base: #0b282a; --skin-border: #4f949d; --skin-accent: #c0f2ef; }
.profile-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.profile-skin::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, var(--skin-base) 1%, color-mix(in srgb, var(--skin-base) 75%, transparent) 42%, transparent 84%); }
.profile-skin .avatar { color: var(--skin-accent); border-color: var(--skin-border); background: color-mix(in srgb, var(--skin-base) 85%, var(--skin-accent)); }
.profile-skin h2, .profile-skin .profile-copy strong { color: var(--skin-accent); }
.profile-skin .profile-copy p { color: var(--text); font-size: .8rem; }
.profile-preview { min-height: 98px; padding: 13px; border-bottom: 1px solid var(--skin-border); }
.profile-preview .avatar { width: 40px; height: 40px; border-radius: 12px; }
.profile-preview .avatar .icon { width: 21px; height: 21px; }
.profile-preview strong { display: block; max-width: min(100%, 26ch); font-size: 1.02rem; }
.referral-url { margin-block: 14px; }
.album-cover { display: grid; justify-items: center; gap: 8px; padding: 22px; text-align: center; background: repeating-linear-gradient(120deg, transparent 0 9px, #cfad6b20 9px 10px), #2e2a21; }
.album-cover > .icon { width: 42px; height: 42px; color: var(--gold); }
.album-cover h2 { font: 400 1.4rem Georgia, serif; color: var(--gold); }
.showcase .item-grid { margin-top: 8px; }
.showcase-ornament { background: linear-gradient(140deg, #433528, #252920 60%); }
.panel .collection-link + .collection-link { margin-top: 4px; }
.capsule { display: inline-flex; align-items: center; padding: 3px 7px; border: 1px solid #687157; border-radius: 999px; font-size: .72rem; color: var(--gold); }
.requirement-grid { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.requirement-grid span { padding: 4px 6px; border: 1px dashed var(--border); border-radius: 7px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .78rem; }
.requirement-grid .owned { color: var(--positive); border: 1px solid #4c6c55; }

.boot-head { padding: calc(18px + var(--safe-top)) var(--edge) 12px; }
.boot-main, .entry { padding: 18px var(--edge); }
.entry p { margin-block: 10px; }
.skeleton { border-radius: 12px; border: 1px solid #2e4133; background: linear-gradient(105deg, #1c2a21, #28372a, #1c2a21); }
.skeleton-heading { width: 48%; height: 40px; margin: 0 0 14px; }
.skeleton-card { min-height: 260px; margin: 0 0 14px; }
.skeleton-button { height: 54px; }
.loading-panel { display: grid; gap: 10px; }
.loading-panel .skeleton { height: 68px; }
.offline { min-height: 38px; display: flex; justify-content: center; align-items: center; gap: 8px; margin: 8px var(--edge) 0; padding: 3px 5px; border: 1px solid #6b4a43; border-radius: 10px; background: #332825; color: #f0aaaa; font-size: .82rem; }
.offline .icon { width: 16px; height: 16px; }
.toast { position: fixed; z-index: 6; left: 50%; bottom: calc(72px + var(--safe-bottom)); transform: translateX(-50%); max-width: calc(min(100%, var(--layout-width)) - 32px); display: flex; align-items: center; min-height: 39px; padding: 7px 11px; border: 1px solid #587463; border-radius: 9px; background: #24382b; color: var(--text); box-shadow: 0 7px 24px #0008; font-size: .84rem; pointer-events: none; }
.toast:empty { display: none; }
dialog { width: min(calc(100% - 24px), calc(var(--layout-width) - 20px)); color: var(--text); border: 1px solid #53644f; border-radius: 17px 17px 12px 12px; padding: 14px 15px calc(14px + var(--safe-bottom)); background: #1c2b21; margin: auto auto max(6px, env(safe-area-inset-bottom, 0px)); max-height: min(82vh, 82dvh); overflow: auto; }
dialog::backdrop { background: #080d0acf; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 8px; }
.sheet-head h2 { font-size: 1.35rem; font-weight: 650; }
.falling-coin { --coin-size: 44.8px; position: fixed; z-index: 5; left: calc(50% - var(--coin-size) / 2); top: 0; width: var(--coin-size); height: var(--coin-size); border: 0; border-radius: 50%; background: transparent; animation: coin-fall var(--flight) linear var(--elapsed) both, coin-sway var(--flight) ease-in-out var(--elapsed) both; }
.falling-coin img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 5px #000b); pointer-events: none; }
.falling-coin:disabled { opacity: .65; }
.falling-coin.still-coin { animation: none; top: max(92px, calc(72px + var(--safe-top))); left: auto; right: max(16px, calc((100vw - var(--layout-width)) / 2 + 16px)); }
@keyframes coin-fall {
  from { transform: translateY(-100%); }
  to { transform: translateY(100dvh); }
}
@keyframes coin-sway {
  0%, 100% { translate: -12px; }
  16%, 50%, 84% { translate: 45px; }
  33%, 67% { translate: -45px; }
}
.sheet-head .icon-button { padding: 0; }
.sheet-copy { margin-bottom: 11px; font-size: .92rem; color: var(--muted); line-height: 1.45; }
.sheet-body { display: grid; gap: 7px; }
.sheet-body .collection-link { background: #223328; }
.sheet-body .field-check { margin: 3px 0; }
.dialog-error { color: var(--error); font-size: .82rem; min-height: 1em; }
.guide { display: grid; gap: 10px; margin: 3px 0 10px; padding-left: 21px; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.sheet-currency { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sheet-currency button { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding-block: 7px; text-align: left; }
.sheet-currency button > span { display: inline-flex; align-items: center; gap: 6px; }
.sheet-currency button small { color: var(--muted); font-size: .72rem; font-weight: 400; letter-spacing: normal; }
.rules-chances { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; margin-bottom: 4px; }
.rules-chances .record { min-height: 29px; }
.rules-chances .record:nth-child(2) { border-top: 0; }
.sr-label { color: var(--rarity); }

@media (min-width: 510px) {
  :root { --edge: 24px; }
}
@media (max-width: 420px) {
  :root { --edge: 16px; }
  .workspace { padding-top: 12px; }
  .currency-chip { padding-inline: 8px; }
}
@media (max-width: 350px) {
  :root { --edge: 12px; }
  .wallet-metric { gap: 5px; padding-inline: 6px; }
  .wallet-metric small { font-size: .7rem; }
  .metric-icon { width: 28px; height: 28px; }
  .currency-chip { padding-inline: 7px; }
  .currency-list, .currency-row { gap: 5px; }
  .quota { padding-inline: 8px; }
  .tabbar { gap: 2px; padding-inline: 4px; }
  .tabbar button { font-size: calc(.63rem - 1px); }
  .field-grid > .field select { font-size: .8rem; }
}
