:root { color-scheme: dark; --safe-top: 0px; --safe-right: 0px; --safe-bottom: 0px; --safe-left: 0px; --app-height: 100dvh; }
* { box-sizing: border-box; }
/* Keep one-finger scrolling in menus and wallet panels, without page zoom. */
html, body, #orientation, #wallet-screen, #app-tabs, #wallet-details, #deposit-screen { touch-action: pan-x pan-y; }
#game { touch-action: none; }
html, body { margin: 0; padding: 0; border: 0; width: 100%; height: 100%; background: var(--shell-bg, #041b33); color: #f2f7ff; overflow: hidden; overscroll-behavior: none; font-family: system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
#viewport { position: absolute; top: var(--safe-top); left: var(--safe-left); width: calc(100% - var(--safe-left) - var(--safe-right)); height: calc(var(--app-height) - var(--safe-top) - var(--safe-bottom)); overflow: hidden; }
#game-content { position: relative; margin-inline: auto; width: 932px; height: 430px; background: #020f1b; }
#game-content::after { content: ''; position: absolute; inset: 0; pointer-events: none; border: solid #020f1b; border-width: var(--match-margin-y, 0px) var(--match-margin-x, 0px); }
#game-content[inert] { pointer-events: none; }
#game { border: 0; display: block; width: 100%; height: 100%; background: #020f1b; }
/* The canvas owns keyboard focus styling. A second frame-wide focus ring or
   iOS tap overlay appears as a gray rectangle around the entire game. */
#game:focus { outline: none; }
#loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #020f1b; gap: 12px; text-align: center; padding: 24px; }
#loading[hidden] { display: none; }
h1 { margin: 6px 0 0; font-size: clamp(24px, 4vw, 36px); letter-spacing: -.04em; }
p { margin: 0; color: #a4b8d2; font-size: 15px; }
.ball { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 22%, #788a83, #17231e 27%, #030806 72%); box-shadow: 6px 8px 14px #0008; }
.ball span { display: grid; place-items: center; background: #f2f7ff; color: #111a16; width: 34px; height: 34px; border-radius: 50%; font-size: 27px; font-weight: 700; }
progress { width: min(240px, 70vw); height: 6px; margin-top: 8px; accent-color: #35d5f5; }
#retry, #orientation-back { margin-top: 12px; min-height: 44px; border: 0; border-radius: 12px; padding: 12px 24px; background: #35d5f5; color: #042234; font: inherit; font-weight: 600; cursor: pointer; }
#orientation-back { margin-top: 24px; background: #10243a; color: #f2f7ff; border: 1px solid #36516f; }
#orientation-back:hover { background: #17334f; border-color: #35d5f5; }
:root[data-input-mode="keyboard"] button:focus-visible { outline: 3px solid white; outline-offset: 4px; }
#orientation { position: fixed; inset: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left); width: auto; height: calc(var(--app-height) - var(--safe-top) - var(--safe-bottom)); max-width: none; max-height: none; margin: 0; border: 0; color: #f2f7ff; z-index: 3; display: grid; overflow-y: auto; padding: 32px 24px; background: radial-gradient(ellipse at 50% 40%, #102d48 0%, #020f1b 68%); text-align: center; }
#orientation[hidden], #orientation-back[hidden] { display: none; }
#orientation::backdrop { background: var(--shell-bg, #041b33); }
#orientation[data-direction="portrait"] { background: radial-gradient(ellipse at 50% 40%, #06315b, #041b33 68%); }
#orientation[data-direction="portrait"] .rotate-phone { transform: rotate(-90deg); width: 130px; margin: 12px auto; }
#orientation[data-direction="portrait"] .rotation-arrow { stroke: #00c5ed; }
#orientation[data-direction="portrait"] .wordmark { display: none; }
.orientation-card { width: min(100%, 340px); margin: auto; }
.wordmark { color: #c9def5; font-size: .75rem; font-weight: 700; letter-spacing: .22em; }
.rotate-phone { display: block; width: min(200px, 65%); height: auto; margin: 32px auto 24px; }
.rotation-arrow { stroke: #35d5f5; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.phone-frame { fill: #10243a; stroke: #c9def5; stroke-width: 3; }
.phone-table { fill: #125bad; stroke: #358cd1; stroke-width: 1.5; }
.phone-speaker { stroke: #c9def5; stroke-width: 2; stroke-linecap: round; }
.phone-ball { fill: #f2f7ff; }
.phone-aim { stroke: #f2f7ff; stroke-width: 1.5; stroke-dasharray: 3 4; }
#orientation-title { font-size: clamp(1.5rem, 7vw, 2rem); line-height: 1.15; text-wrap: balance; }
.orientation-copy { margin-top: 16px; color: #c9def5; font-size: 1rem; line-height: 1.5; text-wrap: balance; }
.orientation-hint { max-width: 260px; margin: 32px auto 0; color: #a4b8d2; font-size: .875rem; line-height: 1.5; }
#orientation:focus { outline: none; }
/* Multiplayer reuses the navy shell; the only navigation tab remains Wallet. */
#online-panel { --online-muted: #afc9e7; color: #f7fbff; background: #06213c; border: 1px solid #3c6b91; border-radius: 22px; padding: 24px; width: min(460px, calc(100vw - 32px)); max-height: calc(var(--app-height) - var(--safe-top) - var(--safe-bottom) - 32px); overflow: auto; overscroll-behavior: contain; }
#online-panel::backdrop { background: #001020dc; }
#online-panel [hidden], #online-connection[hidden] { display: none !important; }
.online-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
#online-panel .online-eyebrow { color: #7ddcff; font-size: 11px; letter-spacing: .08em; }
#online-title { font-size: 30px; margin: 5px 0 0; }
#online-panel .online-intro { color: var(--online-muted); margin: 8px 0 18px; font-size: 16px; }
#online-status { color: #bdedff; min-height: 44px; font-size: 14px; line-height: 1.5; margin-bottom: 14px; }
#online-panel button, #online-panel input { font: inherit; min-height: 48px; border: 1px solid #507795; border-radius: 12px; padding: 12px 14px; }
#online-panel button { color: #eff8ff; background: #0c314f; cursor: pointer; width: 100%; font-weight: 650; }
#online-panel button:hover { border-color: #5bceff; background: #144261; }
#online-panel button:active { filter: brightness(.88); }
#online-panel button:disabled { opacity: .5; cursor: default; }
#online-panel #online-close { width: 48px; flex: 0 0 48px; font-size: 20px; padding: 8px; }
#online-panel .online-primary { color: white; background: #0073d3; border-color: #32c5ff; }
#online-panel label { display: block; margin: 14px 0 8px; font-size: 14px; font-weight: 600; }
#online-panel input { width: 100%; background: #02172b; color: white; font-size: 16px; }
#online-panel input:focus { outline: 2px solid #7ddcff; outline-offset: 2px; }
#online-panel input::placeholder { color: #91b1cc; }
#online-panel .online-note { color: var(--online-muted); font-size: 12px; line-height: 1.5; margin: 16px 0; }
#online-actions > button { margin-bottom: 12px; text-align: left; }
#online-actions button span { display: block; font-size: 13px; font-weight: 400; margin-top: 4px; }
.online-join-row { display: flex; gap: 8px; }
#online-panel .online-join-row input { min-width: 0; flex: 1; }
#online-panel .online-join-row button { width: 80px; }
#online-room-code { display: block; color: white; font-size: clamp(24px, 7vw, 34px); letter-spacing: .12em; text-align: center; padding: 20px 0; user-select: all; }
#online-waiting button { margin-bottom: 12px; }
#online-connection { position: fixed; z-index: 4; top: calc(var(--safe-top) + 6px); left: 50%; transform: translateX(-50%); max-width: calc(100vw - var(--safe-left) - var(--safe-right) - 24px); min-height: 44px; padding: 8px 18px; border: 1px solid #7ddcff; border-radius: 12px; background: #06213cf5; color: white; font: 13px system-ui; cursor: pointer; }
/* The SDK picker is outside the game viewport; respect Telegram's safe areas. */
[data-tc-wallets-modal-container="true"] { top: var(--safe-top) !important; left: var(--safe-left) !important; right: auto !important; bottom: auto !important; width: calc(100% - var(--safe-left) - var(--safe-right)) !important; height: calc(var(--app-height) - var(--safe-top) - var(--safe-bottom)) !important; }

/* Wallet is a native web panel above the existing Godot lobby. */
#wallet-screen {
  --wallet-bg: #031d2e; --wallet-text: #f7fbff; --wallet-muted: #a7c5e9;
  --wallet-accent: #00baff; --wallet-border: #234561;
  position: absolute; inset: 0 0 72px; z-index: 2; overflow: hidden;
  color: var(--wallet-text); background: radial-gradient(ellipse at 55% 35%, #08334855, transparent 65%), var(--wallet-bg);
  scrollbar-width: thin; scrollbar-color: #285780 transparent; overscroll-behavior: contain;
}
#wallet-screen[hidden], #app-tabs[hidden], #wallet-screen [hidden] { display: none !important; }
.wallet-layout { height: 100%; max-width: 560px; margin: auto; padding: 26px 18px 0; display: flex; flex-direction: column; }
.wallet-heading { position: relative; z-index: 2; min-height: 48px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
#wallet-title { margin: 0; font-size: 2.25rem; line-height: 1.2; letter-spacing: -.035em; }
#wallet-state-title:focus, #wallet-screen:focus { outline: none; }
/* Independent, overlapping panels prevent one state's height/scroll from moving the other. */
.wallet-panels { flex: 1; min-height: 0; position: relative; margin: 20px 0 0; }
.wallet-panel { position: absolute; inset: 0; padding: 2px 0 28px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-gutter: auto; overscroll-behavior: contain; opacity: 1; visibility: visible; transition: opacity 180ms ease, visibility 0s; }
.wallet-panel[aria-hidden="true"] { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 180ms ease, visibility 0s 180ms; }
.wallet-hero { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 16px 0 8px; }
.wallet-art { width: clamp(150px, 46vw, 240px); height: auto; flex-shrink: 0; }
.wallet-content { width: 100%; max-width: 430px; text-align: center; }
#wallet-state-title { font-size: clamp(27px, 7vw, 36px); line-height: 1.15; letter-spacing: -.035em; margin: 0 0 16px; text-wrap: balance; }
#wallet-description { color: var(--wallet-muted); font-size: 18px; line-height: 1.45; text-wrap: balance; }
.wallet-note { color: #8cafd7; font-size: 14px; line-height: 1.5; margin: 18px 0 32px; }
#wallet-screen button { cursor: pointer; font: inherit; border-radius: 12px; min-height: 48px; transition: background-color .15s, border-color .15s; }
#wallet-screen button:disabled { cursor: wait; opacity: .65; }
#wallet-screen button:active { filter: brightness(.88); }
:root[data-input-mode="keyboard"] #wallet-screen button:focus-visible, :root[data-input-mode="keyboard"] #app-tabs button:focus-visible { outline: 3px solid #d9f6ff; outline-offset: 4px; }
#wallet-screen #wallet-open-telegram { width: 100%; min-height: 56px; border: 1px solid #00c0ff; display: flex; align-items: center; justify-content: center; gap: 14px; color: white; background: linear-gradient(120deg, #008ce9, #0068ef); box-shadow: 0 8px 30px #0075ff22; font-size: 20px; font-weight: 700; }
#wallet-open-telegram:hover { background: linear-gradient(120deg, #008fee, #0879ff); }
#wallet-open-telegram svg { width: 27px; height: 27px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wallet-browse { display: inline-flex; align-items: center; justify-content: center; gap: 12px; margin: 20px auto 0; padding: 10px 16px; color: var(--wallet-accent); background: transparent; border: 1px solid transparent; font-weight: 600; }
.wallet-browse:hover { background: #0873b51c; border-color: #0873b550; }
.wallet-browse svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Telegram account dashboard. Amounts and statuses come from the confirmed ledger. */
.wallet-status { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 9px 12px; border-radius: 24px; background: #003b36; color: #69f5db; font-size: .8125rem; font-weight: 650; white-space: nowrap; }
.wallet-status-symbol { width: 17px; height: 17px; display: inline-flex; flex-shrink: 0; }
.wallet-status-symbol svg { width: 100%; height: 100%; display: none; }
.wallet-status[data-state="ready"] .wallet-verified-mark, .wallet-status[data-state="error"] .wallet-unavailable-mark { display: block; }
.wallet-status[data-state="loading"] .wallet-status-symbol { border: 2px solid #416d88; border-top-color: #a7c5e9; border-radius: 50%; animation: ui-loading-spin .8s linear infinite; }
#wallet-details { width: 100%; }
.wallet-dashboard-grid { margin-top: 0; }
.wallet-balance { padding: 20px 16px 18px; border: 1px solid #204b63; border-radius: 16px; background: linear-gradient(130deg, #0a2b4199, #0b2a3d66); }
#wallet-balance-title { color: var(--wallet-muted); font-size: 1rem; line-height: 1.4; letter-spacing: -.015em; font-weight: 600; margin: 0; }
.wallet-balance-value { color: var(--wallet-text); font-size: clamp(2.75rem, 12vw, 3.5rem); line-height: 1.18; font-weight: 800; letter-spacing: -.045em; margin: 10px 0 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wallet-balance-value[data-long="true"] { font-size: 2rem; }
.wallet-balance-value span { white-space: nowrap; font-size: .43em; letter-spacing: -.015em; color: #a7c9f2; }
#wallet-balance-status { margin: 12px 0 0; color: var(--wallet-muted); font-size: .8125rem; line-height: 1.5; }
#wallet-screen #wallet-retry { padding: 8px 16px; margin-top: 10px; color: white; border: 1px solid #25bdff; background: #095184; }
#wallet-payments-note { display: flex; align-items: center; gap: 10px; color: var(--wallet-muted); font-size: .875rem; line-height: 1.5; }
#wallet-payments-note svg { width: 26px; height: 26px; flex-shrink: 0; }
.wallet-payment-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 20px; }
#wallet-screen .wallet-payment-actions button { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; min-height: 56px; padding: 12px 8px; border: 1px solid #416d88; color: var(--wallet-text); background: #0e3248aa; font-size: 1rem; font-weight: 700; }
#wallet-screen .wallet-payment-actions button:disabled { cursor: not-allowed; opacity: .58; }
#wallet-screen #wallet-deposit { color: #002238; border-color: #16d1fb; background: #00bfee; }
.wallet-payment-actions svg { width: 22px; height: 22px; flex: 0 0 22px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wallet-activity { margin-top: 28px; }
#wallet-activity-title { font-size: 1.375rem; letter-spacing: -.025em; margin: 0; }
#wallet-transactions { padding: 0; margin: 14px 0 0; list-style: none; display: grid; gap: 10px; }
#wallet-transactions li { min-width: 0; border: 1px solid #204b63; border-radius: 14px; background: #0a2b4170; }
.wallet-transaction-body { min-height: 84px; display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1.35fr); align-items: center; gap: 6px 10px; padding: 16px; color: inherit; text-decoration: none; border-radius: inherit; }
a.wallet-transaction-body { grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1.35fr) 14px; }
a.wallet-transaction-body:hover { background: #12435b66; }
a.wallet-transaction-body:active { background: #12435b99; }
:root[data-input-mode="keyboard"] #wallet-transactions a:focus-visible { outline: 2px solid #35d6ff; outline-offset: -3px; }
.wallet-transaction-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #70efd9; background: #003c3c; }
.wallet-transaction-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wallet-transaction-title { display: block; color: var(--wallet-text); font-size: 1rem; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.wallet-transaction-date { display: block; margin-top: 5px; color: #8cafd0; font-size: .8125rem; }
.wallet-transaction-summary { text-align: right; min-width: 0; }
.wallet-transaction-amount { display: block; color: #70efd9; font-size: .9375rem; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.wallet-transaction-status { display: inline-block; margin-top: 4px; padding: 4px 9px; color: #79f0db; background: #003d38; border-radius: 18px; font-size: .6875rem; font-weight: 600; line-height: 1.4; max-width: 100%; }
.wallet-transaction-chevron { width: 18px; height: 24px; fill: none; stroke: #6f98bc; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wallet-transaction-note { grid-column: 2 / -1; color: #8cafd0; font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
#wallet-transactions [data-direction="out"] .wallet-transaction-amount { color: var(--wallet-text); }
#wallet-transactions [data-direction="out"] .wallet-transaction-icon { color: #afcdef; background: #163b55; }
#wallet-transactions [data-state="pending"] .wallet-transaction-status { color: #ffd18b; background: #44371f; }
#wallet-transactions [data-state="pending"] .wallet-transaction-amount { color: var(--wallet-muted); }
#wallet-transactions [data-state="uncredited"] .wallet-transaction-status { color: #f8b9bb; background: #452c38; }
#wallet-transactions [data-state="uncredited"] .wallet-transaction-amount { color: var(--wallet-muted); }
.wallet-activity-loading, .wallet-empty { margin-top: 14px; border: 1px solid #204b63; border-radius: 14px; background: #0a2b4170; }
.wallet-activity-loading { display: grid; place-items: center; min-height: 90px; }
.wallet-empty { padding: 26px 16px; text-align: center; }
.wallet-empty svg { width: 40px; height: 40px; stroke: #87b2ea; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.wallet-empty h3 { font-size: 1.0625rem; letter-spacing: -.02em; margin: 12px 0 8px; }
.wallet-empty p { color: var(--wallet-muted); font-size: .875rem; line-height: 1.5; max-width: 340px; margin: auto; }
.wallet-footer { text-align: center; }

#deposit-screen { position: absolute; inset: 0; z-index: 3; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; color: #f7fbff; background: radial-gradient(ellipse at 50% 35%, #06315b88, transparent 60%), linear-gradient(145deg, #06213c, #041b33 55%, #03172c); }
#deposit-screen[hidden], #deposit-screen [hidden] { display: none !important; }
.deposit-layout { width: 100%; max-width: 600px; margin: 0 auto; padding: 28px 24px 30px; }
.deposit-heading { margin-bottom: 30px; }
.deposit-heading h1 { margin: 0 0 8px; color: #f7fbff; font-size: clamp(36px, 9vw, 46px); letter-spacing: -.04em; line-height: 1.15; }
#deposit-title:focus { outline: none; }
.deposit-heading p { color: #a7c5ec; font-size: 17px; line-height: 1.5; }
#deposit-screen h2, #deposit-amount-label { margin: 0 0 14px; font-size: 21px; font-weight: 750; line-height: 1.3; letter-spacing: -.025em; }
#deposit-screen button { cursor: pointer; font-family: inherit; min-height: 48px; transition: background-color .15s, border-color .15s; }
#deposit-screen button:disabled { cursor: wait; opacity: .65; }
#deposit-screen button:active { filter: brightness(.9); }
:root[data-input-mode="keyboard"] #deposit-screen :focus-visible { outline: 3px solid #86e9ff; outline-offset: 3px; }
#deposit-back { display: inline-flex; align-items: center; gap: 4px; margin: -12px 0 16px -12px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: #b1cff1; font-size: 16px; }
#deposit-back svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.deposit-method-card { display: flex; align-items: center; gap: 16px; min-height: 86px; padding: 16px; border: 1px solid #00baff; border-radius: 14px; background: #07314a66; }
.deposit-method-card img { flex: 0 0 48px; width: 48px; height: 48px; }
.deposit-method-card strong { display: block; margin-bottom: 3px; font-size: 21px; }
.deposit-method-card div > span { color: #a7c5ec; font-size: 16px; }
.deposit-method-check { display: grid; place-items: center; width: 30px; height: 30px; margin-left: auto; flex-shrink: 0; border-radius: 50%; background: #00c2ef; color: #002238; }
.deposit-method-check svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.deposit-amount-section { margin-top: 28px; }
.deposit-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.deposit-section-heading > span { color: #a7c5ec; font-size: 15px; }
.deposit-amount-entry { display: flex; align-items: center; gap: 8px; min-height: 80px; padding: 12px; margin: 0 0 14px; border: 1px solid #4587b3; border-radius: 14px; background: #092b45; }
.deposit-amount-entry:focus-within { border-color: #00d1ff; box-shadow: 0 0 0 2px #00c2ef40; }
.deposit-amount-entry:has([aria-invalid="true"]) { border-color: #ffc2b1; }
#deposit-amount { flex: 1; width: 0; min-width: 0; border: 0; border-radius: 4px; margin: 0; padding: 4px 0; background: transparent; color: #f7fbff; caret-color: #00d1ff; font: 750 40px/1.2 system-ui, sans-serif; letter-spacing: -.035em; }
#deposit-amount[data-long="true"] { font-size: 24px; letter-spacing: -.045em; }
.deposit-currency { color: #a7c5ec; font-size: 28px; font-weight: 650; }
#deposit-amount-done { visibility: hidden; flex-shrink: 0; padding: 8px; border: 1px solid #326482; border-radius: 9px; background: #103b56; color: #81e5ff; font-size: 14px; font-weight: 700; }
#deposit-amount:focus + #deposit-amount-done, #deposit-amount-done:focus { visibility: visible; }
#deposit-presets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
#deposit-presets button { grid-column: span 2; display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 48px; padding: 8px 2px; border: 1px solid #21638b; border-radius: 11px; background: #0b2e49; color: #f7fbff; font-size: 17px; font-weight: 750; }
#deposit-presets button[data-amount="25"], #deposit-presets button[data-amount="100"] { grid-column: span 3; }
#deposit-presets button[aria-pressed="true"] { border-color: #0ad5ff; background: #00c2ef; color: #002238; }
#deposit-presets button > svg { display: none; width: 13px; height: 13px; flex-shrink: 0; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
#deposit-presets button[aria-pressed="true"] > svg { display: block; }
#deposit-amount-help { margin-top: 10px; color: #95b9e2; font-size: 12px; line-height: 1.5; }
.deposit-summary { margin-top: 22px; padding: 18px 16px; border: 1px solid #155476; border-radius: 14px; background: #062b4266; }
#deposit-screen .deposit-summary h2 { margin-bottom: 12px; }
.deposit-breakdown { margin: 0; }
.deposit-breakdown > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; }
.deposit-breakdown dt { font-size: 14px; color: #a7c5ec; flex: 1; }
.deposit-breakdown dd { margin: 0; text-align: right; max-width: 57%; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.deposit-breakdown .deposit-total { padding-top: 12px; }
.deposit-total dt, .deposit-total dd { color: #f7fbff; font-weight: 700; }
.deposit-fee-note { display: flex; gap: 12px; padding-top: 14px; margin-top: 14px; border-top: 1px solid #214d68; }
.deposit-fee-note svg { flex: 0 0 22px; width: 22px; height: 22px; stroke: #00c4ed; stroke-width: 1.8; stroke-linecap: round; }
#deposit-fees { color: #a7c5ec; font-size: 13px; line-height: 1.5; }
#deposit-screen #deposit-submit { display: flex; width: 100%; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 12px; margin-top: 24px; border: 1px solid #16d1fb; border-radius: 13px; color: #002238; background: #00c2ef; font-size: 19px; font-weight: 750; }
#deposit-submit svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
#deposit-next-note { margin: 12px 0 0; text-align: center; color: #a7c5ec; font-size: 13px; line-height: 1.5; }
#deposit-error { color: #ffc2b1; font-size: 14px; line-height: 1.5; margin: 14px 0; }
#deposit-amount-error { color: #ffc2b1; font-size: 14px; line-height: 1.5; margin: -6px 0 14px; }
#deposit-review { margin-top: 24px; }
#deposit-qr { display: block; width: min(200px, 100%); height: auto; margin: 20px auto; border-radius: 12px; background: white; }
#deposit-receiver { font: 13px/1.5 ui-monospace, monospace; overflow-wrap: anywhere; color: #e3f1ff; padding: 12px; margin: 0 0 12px; background: #031a30; border: 1px solid #214d68; border-radius: 8px; user-select: text; }
.deposit-secondary { width: 100%; border: 1px solid #43769e; border-radius: 10px; padding: 10px; color: #c4ddff; background: #0c304b; font-size: 15px; font-weight: 600; }
#deposit-address-help { color: #a7c5ec; font-size: 14px; line-height: 1.5; margin: 12px 0; }
#deposit-copy-address { position: relative; }
.deposit-copy-check { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
#deposit-copy-address[data-state="copied"] { color: #9bffdc; background: #0b4a46; border-color: #42d8af; }
#deposit-copy-address[data-state="copied"] .deposit-copy-check { visibility: visible; }
#deposit-copy-address[data-state="failed"] { border-color: #ffc2b1; }
#deposit-copy-status { min-height: 21px; margin: 8px 0 0; color: #9bffdc; font-size: 14px; line-height: 1.5; }
#deposit-copy-address[data-state="failed"] + #deposit-copy-status { color: #ffc2b1; }
@media (max-width: 359px) { .deposit-layout { padding: 22px 16px; } #deposit-presets button { font-size: 15px; } }
@media (prefers-reduced-motion: reduce) { #deposit-screen button { transition: none; } }

#app-tabs { position: absolute; inset: auto 0 0; height: 72px; z-index: 2; background: #041b33; border-top: 1px solid #234561; }
#app-tabs [role="tablist"] { height: 100%; max-width: 560px; margin: auto; padding-inline: 8px; display: flex; justify-content: center; align-items: center; gap: 8px; }
#app-tabs button { flex: 1; min-width: 0; min-height: 60px; padding: 6px 4px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; border: 1px solid transparent; border-radius: 12px; color: #aac7eb; background: transparent; font: 500 13px/1.2 system-ui, sans-serif; cursor: pointer; }
#app-tabs button[aria-selected="true"] { color: #00baff; background: #047dc017; border-color: #1373a844; }
#app-tabs button:hover { background: #0873b52a; }
#app-tabs svg { width: 27px; height: 27px; }
@media (max-height: 640px) and (max-width: 639px) {
  .wallet-art { width: 136px; }
  .wallet-hero { padding-top: 20px; gap: 16px; }
}

@media (max-width: 359px) {
  .wallet-layout { padding-left: 16px; padding-right: 16px; }
  .wallet-payment-actions { gap: 8px; }
  #wallet-screen .wallet-payment-actions button { font-size: .9375rem; gap: 6px; }
  .wallet-transaction-body { padding: 12px; gap: 6px 8px; }
}
@media (max-width: 399px) {
  .wallet-heading { gap: 8px; }
  .wallet-status { font-size: .75rem; padding: 8px 10px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  #wallet-screen button, .wallet-panel, .wallet-panel[aria-hidden="true"] { transition: none; }
}

#wallet-open-telegram { text-decoration: none; border-radius: 12px; padding: 12px; }
:root[data-input-mode="keyboard"] #wallet-open-telegram:focus-visible { outline: 3px solid #d9f6ff; outline-offset: 4px; }
.wallet-status[data-state="loading"], .wallet-status[data-state="error"] { background: #143550; color: #d3e3f6; }
@media (prefers-reduced-motion: reduce) { .wallet-status[data-state="loading"] .wallet-status-symbol { animation: none; } }

/* Native Back and scripted focus can inherit WebKit's keyboard-focus heuristic.
   Keep focus for screen readers, but never outline a screen or its title. */
:root [tabindex="-1"]:not(button):not(a):focus { outline: none !important; }
:root:not([data-input-mode="keyboard"]) :where(button, a, select, [tabindex]):focus { outline: none; }

/* Keep asynchronous balance slots the same height as their loaded amounts. */
.balance-loader { position: relative; }
.balance-loader[data-loading="true"]::after, .ui-spinner { content: ''; display: block; width: var(--spinner-size, 22px); height: var(--spinner-size, 22px); border: 2px solid #1b5872; border-top-color: #00c5ed; border-radius: 50%; animation: ui-loading-spin .8s linear infinite; }
.balance-loader[data-loading="true"]::after { position: absolute; top: 50%; left: 0; margin-top: calc(var(--spinner-size, 22px) / -2); }
.wallet-balance-value { min-height: 1.18em; --spinner-size: 32px; }
@keyframes ui-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .balance-loader[data-loading="true"]::after, .ui-spinner { animation: none; } }
