:root {
  color-scheme: dark;
  --bg: #090909;
  --panel: #161617;
  --panel2: #202022;
  --text: #f5f5f6;
  --muted: #a5a5ae;
  --orange: #ff9908;
  --line: #2b2b2e;
  --good: #93d8af;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--app-safe-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--app-safe-bottom, 0px));
  --safe-left: max(env(safe-area-inset-left, 0px), var(--app-safe-left, 0px));
  --safe-right: max(env(safe-area-inset-right, 0px), var(--app-safe-right, 0px));
  --dock-clearance: 124px;
  --dock-circle: clamp(44px, calc((100vw - 64px - var(--safe-left) - var(--safe-right)) / 5), 72px);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html { scroll-padding-bottom: var(--dock-clearance); }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; min-height: 100dvh; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; font-weight: 650; touch-action: manipulation; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
a { color: var(--orange); }
[hidden] { display: none !important; }
.icon { width: 24px; height: 24px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ambient { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse 70% 30% at 100% 0%, #ff99080c, transparent); }
.app { position: relative; width: 100%; max-width: 600px; margin: auto; padding: calc(24px + var(--safe-top) + var(--app-content-safe-top, 0px)) calc(clamp(16px, 4.7vw, 26px) + var(--safe-right) + var(--app-content-safe-right, 0px)) var(--dock-clearance) calc(clamp(16px, 4.7vw, 26px) + var(--safe-left) + var(--app-content-safe-left, 0px)); }
.registration .app { padding-bottom: 40px; }
.screen-enter { animation: screen-enter .18s ease-out; }
.opening { text-align: center; padding: 100px 0; }
.opening h1 { font-size: 1.5rem; margin-top: 20px; }
.opening p, .muted { color: var(--muted); }
.brand-mark { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 17px; background: var(--orange); color: #121212; font-size: 1.75rem; font-weight: 800; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.avatar { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #282218; color: var(--orange); font-size: 1.25rem; font-weight: 750; object-fit: cover; }
.identity { flex: 1; min-width: 0; background: none; border: 0; text-align: left; padding: 4px 0; }
.identity strong { display: block; font-size: 1.0625rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity span { display: block; margin-top: 5px; font-size: .8125rem; color: var(--muted); font-weight: 500; }
.service-word { max-width: 112px; text-align: right; font-size: .8125rem; font-weight: 750; color: var(--orange); overflow-wrap: anywhere; }
.balance-card { border: 1px solid #353027; border-radius: 24px; padding: clamp(18px, 4.6vw, 26px); background: linear-gradient(130deg, #1b1915, #141414 75%); }
.balance-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #b9b5ae; font-size: .875rem; line-height: 1.5; }
.currency { flex-shrink: 0; background: #25221c; border: 1px solid #3a3326; border-radius: 12px; padding: 7px 10px; color: #d6c4a6; font-size: .75rem; font-weight: 700; }
.balance-number { font-size: clamp(2rem, 9.4vw, 3.25rem); line-height: 1.18; letter-spacing: -1.4px; font-weight: 800; overflow-wrap: anywhere; margin: 18px 0 6px; }
.pending { font-size: .8125rem; line-height: 1.5; color: var(--muted); margin-top: 12px; }
.quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 26px 0 30px; align-items: start; }
.quick { min-width: 0; background: none; border: 0; padding: 0 2px; display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: .875rem; font-weight: 700; line-height: 1.35; }
.quick-label { width: 100%; overflow-wrap: anywhere; }
.action-circle { flex: 0 0 auto; width: clamp(56px, 15vw, 72px); height: clamp(56px, 15vw, 72px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: #202022; border: 1px solid #323234; color: var(--orange); }
.action-circle .icon { width: 27px; height: 27px; }
.quick.primary .action-circle { background: var(--orange); color: #19130b; border-color: #ffb849; box-shadow: 0 5px 18px #ff990817; }
.banner { position: relative; width: 100%; min-height: 106px; aspect-ratio: 10 / 3; border: 1px solid #30281e; border-radius: 22px; overflow: hidden; background: linear-gradient(115deg, #171717, #241b0f); margin-bottom: 28px; display: flex; align-items: center; padding: 22px; color: var(--text); text-decoration: none; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-copy { z-index: 1; max-width: 75%; overflow-wrap: anywhere; }
.banner-copy strong { font-size: 1.5rem; display: block; letter-spacing: -.6px; font-weight: 800; }
.banner-copy span { font-size: .8125rem; color: #baa992; display: block; margin-top: 8px; line-height: 1.4; }
.banner:not(:has(img))::after { content: '✓'; position: absolute; right: 22px; font-size: 4.5rem; color: var(--orange); font-weight: 700; opacity: .75; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 28px 0 16px; overflow-wrap: anywhere; }
h1 { font-size: 1.625rem; line-height: 1.25; letter-spacing: -.6px; margin: 0 0 8px; font-weight: 800; }
h2 { font-size: 1.125rem; line-height: 1.4; letter-spacing: -.2px; margin: 0; font-weight: 750; }
.section-head small { font-size: .75rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.metric { min-width: 0; border: 1px solid var(--line); background: #151515; border-radius: 20px; padding: 20px 16px; }
.metric.wide { grid-column: 1 / -1; }
.metric strong { display: block; font-size: 1.375rem; line-height: 1.3; letter-spacing: -.4px; font-weight: 750; overflow-wrap: anywhere; }
.metric span { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.45; margin-top: 10px; overflow-wrap: anywhere; }
.menu-list { display: flex; flex-direction: column; gap: 12px; }
.menu-item, .task-card { display: flex; align-items: center; gap: 14px; width: 100%; min-width: 0; min-height: 68px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 17px 18px; text-align: left; font-size: .9375rem; font-weight: 650; line-height: 1.45; text-decoration: none; color: var(--text); transition: background .15s, border-color .15s; }
.menu-item:active, .task-card:active { background: #262018; border-color: #826033; }
.menu-item .menu-icon { width: 36px; height: 36px; border-radius: 11px; background: #29231b; display: grid; place-items: center; color: var(--orange); flex: 0 0 36px; }
.menu-item .menu-icon .icon { width: 23px; height: 23px; }
.menu-item .label, .task-card .label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chevron { flex: 0 0 6px; width: 6px; height: 6px; border-top: 1.5px solid #89898f; border-right: 1.5px solid #89898f; transform: rotate(45deg); margin: 0 3px; }
.menu-item.primary { background: var(--orange); border-color: var(--orange); color: #16100a; font-weight: 750; }
.menu-item.primary .menu-icon { background: #ed8a03; color: #1e180d; }
.menu-item.primary .chevron { border-color: #342512; }
.screen-header { display: flex; align-items: center; gap: 14px; margin: 0 0 28px; }
.back-control { border: 1px solid var(--line); background: #1a1a1a; border-radius: 14px; width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 44px; }
.screen-header h1 { min-width: 0; overflow-wrap: anywhere; margin: 0; font-size: 1.5rem; }
.rich { font-size: .9375rem; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.rich b, .rich strong { font-weight: 750; }
.rich .tg-spoiler { background: #303033; color: transparent; border-radius: 4px; }
.rich .tg-spoiler:hover, .rich .tg-spoiler:focus { color: var(--text); }
.rich blockquote { padding: 12px 16px; border-left: 3px solid var(--orange); margin: 16px 0; background: #191715; border-radius: 0 14px 14px 0; }
.rich code { font-family: ui-monospace, Consolas, monospace; font-size: .875rem; background: #252528; padding: 2px 5px; border-radius: 5px; white-space: pre-wrap; }
.rich pre { background: #1a1a1c; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 16px 0; white-space: pre-wrap; word-break: break-word; font: .875rem/1.6 ui-monospace, Consolas, monospace; }
.message-block { margin-bottom: 26px; }
.message-block > .rich + .menu-list, .message-block > .message-media + .menu-list { margin-top: 24px; }
.message-block > .rich + .rich { margin-top: 20px; }
.message-media { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 20px; margin: 20px 0; background: #151515; }
.media-loader { height: 90px; display: grid; place-items: center; color: var(--muted); border-radius: 20px; background: #171717; margin: 16px 0; }
.task-card { min-height: 76px; }
.task-dot { background: #28231d; color: var(--orange); border-radius: 13px; width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 40px; }
.pagination { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 12px; padding: 8px 0; }
.page-control { background: #1b1b1d; border: 1px solid var(--line); border-radius: 14px; width: 48px; min-height: 46px; font-size: 1.125rem; }
.page-control.previous { grid-column: 1; grid-row: 1; }
.page-control.next { grid-column: 3; grid-row: 1; }
.pager-count { grid-column: 2; grid-row: 1; text-align: center; color: var(--muted); font-size: .8125rem; padding: 7px 0; }
.list-nav { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.quiet { width: 100%; background: #111; border: 1px solid var(--line); border-radius: 14px; padding: 15px; color: #b0b0b8; font-size: .875rem; min-height: 48px; line-height: 1.4; }
.feature-card { border: 1px solid var(--line); background: linear-gradient(130deg, #1d1913, #151515 65%); border-radius: 24px; padding: 24px; margin-bottom: 24px; }
.feature-card, .info-card, .error-card { min-width: 0; overflow-wrap: anywhere; }
.feature-icon { width: 56px; height: 56px; display: grid; place-items: center; color: var(--orange); background: #322516; border: 1px solid #493019; border-radius: 18px; margin-bottom: 20px; }
.feature-icon .icon { width: 28px; height: 28px; }
.feature-card h2 { font-size: 1.25rem; }
.feature-card p, .info-card p { font-size: .9375rem; line-height: 1.65; margin: 12px 0 0; }
.feature-card .rich { margin-top: 22px; }
.field-label { display: block; font-size: .8125rem; line-height: 1.4; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.feature-card > .field-label { margin-top: 26px; }
.referral-url { display: block; width: 100%; min-width: 0; background: #0e0e0f; color: #d6d0c7; border: 1px solid #39352e; border-radius: 13px; padding: 15px; font: .8125rem/1.5 ui-monospace, Consolas, monospace; }
.send-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; border: 1px solid #ffad2c; padding: 16px 18px; min-height: 52px; border-radius: 14px; background: var(--orange); color: #14100b; font-size: .9375rem; line-height: 1.45; font-weight: 750; }
.send-button span { min-width: 0; overflow-wrap: anywhere; }
.contact-button { margin-top: 26px; }
.copy-button { margin-top: 16px; }
.clipboard-buffer { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.info-card { background: #151515; border: 1px solid var(--line); border-radius: 20px; padding: 22px; margin-top: 22px; }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: #151515; }
.profile-card .avatar { flex-basis: 52px; width: 52px; height: 52px; }
.profile-identity { min-width: 0; overflow-wrap: anywhere; }
.profile-identity strong { display: block; font-size: 1.125rem; line-height: 1.4; }
.profile-identity > span { display: block; margin-top: 6px; font-size: .8125rem; line-height: 1.4; }
.verification-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; margin: 14px 0 24px; background: #131313; border: 1px solid var(--line); border-radius: 18px; }
.verification-card > div { min-width: 0; overflow-wrap: anywhere; }
.verification-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; background: #25221d; border-radius: 13px; color: #b8a17c; }
.verification-icon.verified { background: #172b20; color: var(--good); }
.status-label { display: block; font-size: .9375rem; line-height: 1.5; }
.composer { padding: 20px; background: #181818; border: 1px solid #32302b; border-radius: 22px; margin-top: 28px; }
.composer label { display: block; font-size: .875rem; margin-bottom: 12px; color: #bcbcc3; }
.composer textarea { resize: vertical; min-height: 114px; width: 100%; background: #111; border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 14px; font-size: 1rem; line-height: 1.55; }
.composer-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0; }
.composer-tools label { margin: 0; cursor: pointer; }
.file-picker { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; display: flex !important; gap: 8px; align-items: center; color: var(--text) !important; }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-picker:focus-within { outline: 2px solid var(--orange); outline-offset: 4px; }
.file-info { min-width: 0; font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
.format-tip { font-size: .8125rem; line-height: 1.5; color: var(--muted); margin-bottom: 16px; }
.composer .format-switch { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--muted); margin: 18px 0; }
.composer-cancel { margin-top: 12px; }
.composer > .send-button { margin-top: 18px; }
.history-row { padding: 20px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.history-icon { width: 40px; height: 40px; flex: 0 0 40px; background: #222; border-radius: 13px; display: grid; place-items: center; color: var(--orange); }
.history-info { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .9375rem; line-height: 1.45; }
.history-row small { display: block; margin-top: 6px; color: var(--muted); font-size: .75rem; }
.history-amount { max-width: 40%; min-width: 0; overflow-wrap: anywhere; font-size: .9375rem; font-weight: 700; text-align: right; }
.positive { color: var(--good); }
.empty { border: 1px dashed #323235; border-radius: 22px; padding: 30px 20px; text-align: center; color: var(--muted); line-height: 1.6; }
.dock { position: fixed; z-index: 5; left: calc(12px + var(--safe-left) + var(--app-content-safe-left, 0px)); right: calc(12px + var(--safe-right) + var(--app-content-safe-right, 0px)); bottom: calc(12px + var(--safe-bottom) + var(--app-content-safe-bottom, 0px)); max-width: 560px; margin: 0 auto; background: #202022f5; backdrop-filter: blur(12px); border: 1px solid #363639; border-radius: 28px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; align-items: center; padding: 8px 5px; box-shadow: 0 8px 30px #0008; }
.dock-item { min-width: 0; background: none; border: 0; border-radius: 19px; min-height: 62px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-direction: column; font-size: .6875rem; line-height: 1.2; color: #a5a5ae; padding: 8px 2px; }
.dock-item > span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.dock-item.active { background: #ffffff08; color: var(--text); }
.dock-item.center { justify-self: center; width: var(--dock-circle); height: var(--dock-circle); min-height: 0; aspect-ratio: 1; padding: 0; margin: 0; transform: translateY(-9px); border-radius: 50%; background: var(--orange); box-shadow: 0 6px 18px #ff99081c; color: #1d160b; gap: 4px; }
.dock-item.center .icon { width: 24px; height: 24px; }
.dock-item.center span { font-size: .625rem; line-height: 1.05; }
.keyboard-open .dock { visibility: hidden; pointer-events: none; }
.toast { position: fixed; z-index: 20; bottom: calc(var(--dock-clearance) - 10px); left: 50%; transform: translateX(-50%) translateY(12px); width: calc(100% - 40px); max-width: 520px; padding: 16px 20px; border-radius: 18px; background: #353437; border: 1px solid #4a4741; color: white; font-size: .9375rem; line-height: 1.5; box-shadow: 0 8px 28px #0008; opacity: 0; pointer-events: none; transition: .15s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.keyboard-open .toast { bottom: calc(var(--keyboard-offset, 0px) + 20px); }
.preview-label { font-size: .75rem; color: var(--orange); text-align: center; margin: 5px 0 20px; }
.busy-bar { position: fixed; z-index: 30; top: 0; left: 0; width: 100%; height: 3px; background: var(--orange); animation: pulse 1s infinite; }
.error-card { border: 1px solid #3e3223; padding: 26px; border-radius: 24px; background: #18140e; line-height: 1.6; }
.error-card > .send-button { margin-top: 24px; }
.backup-status { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; margin: 0 0 24px; border: 1px solid #665030; border-radius: 16px; background: #241c11; color: #ffd698; text-align: left; font-size: .875rem; line-height: 1.5; }
.backup-status span { min-width: 0; overflow-wrap: anywhere; }
.file-download { width: 100%; min-width: 0; background: #1d1c1a; border: 1px solid #353029; border-radius: 16px; padding: 16px; display: flex; gap: 12px; align-items: center; margin-bottom: 18px; text-align: left; }
.file-download span { min-width: 0; overflow-wrap: anywhere; }
.screen-tag { display: inline-block; color: var(--orange); font-size: .75rem; background: #291e10; padding: 8px 11px; border-radius: 10px; margin-bottom: 20px; }
.premium-icon { width: 26px; height: 26px; object-fit: contain; }
.premium-inline { display: inline-block; width: 1.3em; height: 1.3em; object-fit: contain; vertical-align: -.25em; }
@keyframes pulse { 50% { opacity: .4; } }
@keyframes screen-enter { from { opacity: .6; } to { opacity: 1; } }
@media (hover: hover) {
  .menu-item:hover, .task-card:hover, .quiet:hover, .file-download:hover { background: #262018; border-color: #665030; }
  .send-button:hover { background: #ffaa24; }
  .menu-item.primary:hover { background: #ffaa24; border-color: #ffb849; }
  .quick:hover .action-circle { border-color: #b17b31; }
}
@media (min-width: 800px) {
  body { background: #050505; }
  .app { min-height: 100vh; background: #090909; border-left: 1px solid #151515; border-right: 1px solid #151515; }
  .ambient { display: none; }
}
@media (max-width: 360px) {
  .feature-card { padding: 20px; }
  .service-word { max-width: 80px; }
  .menu-item, .task-card { padding: 16px 14px; gap: 12px; }
  .metric { padding: 18px 14px; }
  .quick { font-size: .8125rem; }
  .dock-item { font-size: .625rem; }
  .banner { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
