:root {
  --bg: var(--tg-theme-secondary-bg-color, #0f1014);
  --card: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #1b1c22));
  --text: var(--tg-theme-text-color, #f3f4f6);
  --hint: var(--tg-theme-hint-color, #8c909a);
  --accent: var(--tg-theme-button-color, #3d8bfd);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --link: var(--tg-theme-link-color, var(--accent));
  --sep: var(--tg-theme-section-separator-color, rgba(140, 144, 154, .18));
  --head: var(--tg-theme-section-header-text-color, var(--hint));
  --danger: var(--tg-theme-destructive-text-color, #ff5b5b);
  --good: #2fbf71;
  --soft: rgba(61, 139, 253, .14);
  --soft-good: rgba(47, 191, 113, .14);
  --warn: #f2a33a;
  --soft-warn: rgba(242, 163, 58, .14);
  --soft-bad: rgba(255, 91, 91, .13);
  --radius: 16px;
  --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: 104px;
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', Roboto, 'Segoe UI', Inter, Arial, sans-serif;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
@supports (background: color-mix(in srgb, red 50%, blue)) {
  :root {
    --soft: color-mix(in srgb, var(--accent) 14%, transparent);
    --sep: var(--tg-theme-section-separator-color, color-mix(in srgb, var(--hint) 22%, transparent));
  }
}
html[data-scheme="light"] { color-scheme: light; }

* { 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; line-height: 1.45; }
button, input, textarea { font: inherit; color: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; font-weight: 600; touch-action: manipulation; }
button:disabled { cursor: progress; }
body:not(.busy) button:disabled { opacity: .5; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: var(--link); }
[hidden] { display: none !important; }
.icon { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ambient { display: none; }

.app {
  position: relative; width: 100%; max-width: 600px; margin: 0 auto;
  padding: calc(16px + var(--safe-top) + var(--app-content-safe-top, 0px)) calc(16px + var(--safe-right) + var(--app-content-safe-right, 0px)) var(--dock-clearance) calc(16px + var(--safe-left) + var(--app-content-safe-left, 0px));
}
.registration .app { padding-bottom: 32px; }
.screen-enter { animation: screen-enter .22s cubic-bezier(.2, .8, .2, 1); }

/* Loading */
.opening { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 120px 0; }
.opening h1 { font-size: 1.25rem; margin: 10px 0 0; }
.opening p, .muted { color: var(--hint); }
.opening p { margin: 0; }
.brand-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--accent); color: var(--accent-text); font-size: 1.6rem; font-weight: 800; animation: pulse 1.2s ease-in-out infinite; }

/* Typography */
h1 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -.4px; margin: 0 0 8px; font-weight: 750; }
h2 { font-size: 1.0625rem; line-height: 1.35; margin: 0; font-weight: 650; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; margin: 26px 4px 10px; }
.section-head h2 { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--head); }
.section-head small { font-size: .75rem; color: var(--hint); }

/* Home header */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.avatar { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); font-size: 1.2rem; font-weight: 700; object-fit: cover; }
.identity { flex: 1; min-width: 0; background: none; border: 0; text-align: left; padding: 2px 0; }
.identity strong { display: block; font-size: 1.25rem; letter-spacing: -.3px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity span { display: block; font-size: .8125rem; color: var(--hint); font-weight: 500; }
.verified-pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px 6px 8px; border-radius: 999px; background: var(--soft-good); color: var(--good); font-size: .75rem; font-weight: 700; }
.verified-pill .icon { width: 16px; height: 16px; }
.preview-label { font-size: .75rem; color: var(--accent); text-align: center; margin: -6px 0 14px; }

/* Balance */
.balance-card {
  position: relative; overflow: hidden; border-radius: 22px; padding: 20px 20px 18px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #000));
  color: var(--accent-text);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .balance-card { background: var(--accent); } }
.balance-card::after { content: ''; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%; background: rgba(255, 255, 255, .12); pointer-events: none; }
.balance-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .875rem; opacity: .85; }
.currency { flex-shrink: 0; background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 4px 10px; font-size: .75rem; font-weight: 700; }
.balance-number { font-size: clamp(2rem, 10vw, 2.75rem); line-height: 1.15; letter-spacing: -1px; font-weight: 800; overflow-wrap: anywhere; margin: 10px 0 2px; }
.pending { font-size: .8125rem; opacity: .85; margin-top: 6px; }
.balance-actions { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.balance-action { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; border-radius: 13px; background: rgba(255, 255, 255, .18); color: var(--accent-text); font-size: .9375rem; transition: transform .12s, filter .12s; }
.balance-action.main { background: #fff; color: #111; }
.balance-action:active { transform: scale(.97); }
.balance-action .icon { width: 19px; height: 19px; }

/* Active tasks reminder */
.active-card { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 13px 14px; border: 0; border-radius: var(--radius); background: var(--card); text-align: left; color: var(--text); }
.active-card:active { background: var(--soft); }
.active-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--accent); }
.active-card.attention .active-icon { background: var(--soft-bad); color: var(--danger); }
.active-text { flex: 1; min-width: 0; }
.active-text strong { display: block; font-size: .9375rem; }
.active-text small { display: block; color: var(--hint); font-size: .8125rem; font-weight: 500; margin-top: 1px; }

/* Trust */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); margin-top: 12px; background: var(--card); border-radius: var(--radius); padding: 12px 4px; }
.trust-item { min-width: 0; padding: 0 10px; text-align: center; }
.trust-item + .trust-item { border-left: 1px solid var(--sep); }
.trust-item strong { display: block; font-size: 1rem; font-weight: 750; letter-spacing: -.2px; overflow-wrap: anywhere; }
.trust-item span { display: block; font-size: .6875rem; color: var(--hint); margin-top: 2px; line-height: 1.3; }
.trust.note { display: flex; align-items: center; gap: 12px; padding: 12px 14px; font-size: .8125rem; color: var(--hint); line-height: 1.45; }
.trust.note .icon { color: var(--good); width: 24px; height: 24px; }

/* Banner */
.banner { position: relative; width: 100%; min-height: 96px; aspect-ratio: 10 / 3; border-radius: 20px; overflow: hidden; background: var(--card); margin-top: 12px; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Task feed */
.link-button { border: 0; background: none; color: var(--link); font-size: .875rem; padding: 0; text-transform: none; letter-spacing: 0; }
.task-feed { display: flex; flex-direction: column; gap: 10px; }
.task-tile { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; padding: 14px 16px; border: 0; border-radius: 18px; background: var(--card); color: var(--text); text-align: left; font-weight: 500; transition: transform .12s, background .12s; }
.task-tile:active { transform: scale(.985); }
.task-tile.skeleton { height: 128px; background: linear-gradient(100deg, var(--card) 40%, color-mix(in srgb, var(--card) 86%, var(--text)) 50%, var(--card) 60%) 0 0 / 300% 100%; animation: shimmer 1.3s linear infinite; }
.tile-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.tile-cat { font-size: .75rem; font-weight: 600; color: var(--hint); margin-right: auto; }
.tile-title { font-size: 1.0625rem; line-height: 1.3; font-weight: 700; letter-spacing: -.2px; overflow-wrap: anywhere; }
.tile-excerpt { margin: 0; font-size: .875rem; line-height: 1.45; color: var(--hint); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-reason { margin: 0; font-size: .8125rem; color: var(--danger); overflow-wrap: anywhere; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.tile-meta { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: var(--hint); font-size: .8125rem; }
.tile-meta .icon { width: 16px; height: 16px; }
.reward { flex-shrink: 0; padding: 5px 11px; border-radius: 999px; background: var(--soft-good); color: var(--good); font-size: .9375rem; font-weight: 800; }
.status { flex-shrink: 0; padding: 3px 9px; border-radius: 999px; font-size: .6875rem; font-weight: 700; letter-spacing: .2px; }
.status.info { background: var(--soft); color: var(--accent); }
.status.warn { background: var(--soft-warn); color: var(--warn); }
.status.bad { background: var(--soft-bad); color: var(--danger); }
.status.good { background: var(--soft-good); color: var(--good); }
.status.off { background: color-mix(in srgb, var(--hint) 16%, transparent); color: var(--hint); }
.status.hot { background: linear-gradient(90deg, #ff8a3d, #ff4f6d); color: #fff; }
.more-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 0; border-radius: 14px; background: var(--soft); color: var(--accent); font-size: .9375rem; }
.more-button .icon { width: 18px; height: 18px; }

/* Category chips */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: -4px -16px 14px; padding: 4px 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--card); color: var(--text); font-size: .875rem; transition: background .15s, color .15s; }
.chip small { color: var(--hint); font-weight: 600; }
.chip.active { background: var(--accent); color: var(--accent-text); }
.chip.active small { color: inherit; opacity: .75; }

/* Task details */
.task-hero { background: var(--card); border-radius: 20px; padding: 16px; }
.hero-title { font-size: 1.375rem; line-height: 1.25; letter-spacing: -.4px; font-weight: 750; margin: 8px 0 14px; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--bg); }
.fact-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--accent); }
.fact.good .fact-icon { background: var(--soft-good); color: var(--good); }
.fact-icon .icon { width: 19px; height: 19px; }
.fact-text { min-width: 0; }
.fact-text small { display: block; font-size: .75rem; color: var(--hint); }
.fact-text strong { display: block; font-size: 1rem; font-weight: 800; overflow-wrap: anywhere; }
.fact.good strong { color: var(--good); }
.status-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; padding: 13px 14px; border-radius: var(--radius); background: var(--soft); }
.status-note strong { display: block; font-size: .9375rem; }
.status-note span { display: block; font-size: .8125rem; color: var(--hint); margin-top: 2px; overflow-wrap: anywhere; }
.note-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: var(--card); color: var(--accent); }
.note-icon .icon { width: 19px; height: 19px; }
.status-note.warn { background: var(--soft-warn); } .status-note.warn .note-icon { color: var(--warn); }
.status-note.bad { background: var(--soft-bad); } .status-note.bad .note-icon { color: var(--danger); }
.status-note.off { background: var(--card); } .status-note.off .note-icon { color: var(--hint); background: var(--bg); }
.rich-card { background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
.rich-card .rich { font-size: .9375rem; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 6px 16px; background: var(--card); border-radius: var(--radius); }
.steps li { counter-increment: step; position: relative; padding: 10px 0 10px 42px; }
.steps li + li { border-top: 1px solid var(--sep); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 11px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); font-size: .8125rem; font-weight: 800; }
.steps strong { display: block; font-size: .9375rem; }
.steps span { display: block; font-size: .8125rem; color: var(--hint); margin-top: 1px; }
.cta-bar { position: fixed; z-index: 6; left: 0; right: 0; bottom: calc(var(--dock-clearance) - 30px); max-width: 600px; margin: 0 auto; padding: 10px 16px 12px; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.has-cta .app { padding-bottom: calc(var(--dock-clearance) + 66px); }
.cta { justify-content: space-between; min-height: 54px; border-radius: 16px; font-size: 1rem; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.cta:only-child span:only-child { margin: 0 auto; }
.cta-sum { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-weight: 800; }
.keyboard-open .cta-bar { display: none; }

/* Withdraw */
.balance-card.compact { padding: 18px 20px 16px; }
.balance-card.compact .balance-number { font-size: clamp(1.75rem, 9vw, 2.25rem); }
.wd-form { margin-top: 12px; padding: 14px 16px 16px; background: var(--card); border-radius: 20px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 13px; background: var(--bg); margin-bottom: 16px; }
.segmented button { min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--hint); font-size: .875rem; transition: background .15s, color .15s; }
.segmented button.active { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.wd-form .field-label { margin: 0 2px 6px; }
.field { display: block; width: 100%; min-width: 0; height: 50px; padding: 0 14px; border: 1px solid transparent; border-radius: 13px; background: var(--bg); color: var(--text); font-size: 1.0625rem; font-variant-numeric: tabular-nums; transition: border-color .12s; }
.field:focus { outline: none; border-color: var(--accent); }
.field::placeholder { color: var(--hint); opacity: .6; }
#wd-details { margin-bottom: 14px; letter-spacing: .3px; }
.amount-wrap { position: relative; display: flex; align-items: center; }
.amount-field { padding-right: 96px; font-size: 1.375rem; font-weight: 700; }
.amount-suffix { position: absolute; right: 70px; color: var(--hint); font-weight: 700; font-size: 1.125rem; pointer-events: none; }
.all-chip { position: absolute; right: 7px; min-height: 36px; padding: 0 12px; background: var(--soft); color: var(--accent); }
.field-hint { min-height: 20px; margin: 6px 2px 0; font-size: .8125rem; color: var(--hint); }
.field-hint.bad { color: var(--danger); }
.wd-submit { margin-top: 10px; min-height: 52px; font-size: 1rem; }
.wd-submit:disabled { opacity: .45; }
.wd-note { margin: 12px 2px 0; font-size: .8125rem; color: var(--hint); text-align: center; }
.wd-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 45%; }
.wd-right .history-amount { max-width: 100%; }

/* Empty states */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 22px 22px; background: var(--card); border-radius: 20px; }
.empty-icon { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; background: var(--soft); color: var(--accent); margin-bottom: 12px; }
.empty-icon .icon { width: 28px; height: 28px; }
.empty-state strong { font-size: 1.0625rem; }
.empty-state p { margin: 6px 0 0; color: var(--hint); font-size: .875rem; line-height: 1.5; max-width: 320px; }
.empty-state .send-button { margin-top: 18px; }

/* Metrics */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric { min-width: 0; background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
.metric.wide { grid-column: 1 / -1; }
.metric strong { display: block; font-size: 1.25rem; line-height: 1.25; font-weight: 750; overflow-wrap: anywhere; }
.metric span { display: block; color: var(--hint); font-size: .8125rem; margin-top: 4px; overflow-wrap: anywhere; }

/* Grouped list */
.menu-list { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.menu-item, .task-card {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 52px;
  background: transparent; border: 0; padding: 10px 14px; text-align: left; font-size: .9375rem; font-weight: 500; color: var(--text); transition: background .12s;
}
.menu-item + .menu-item::before, .task-card + .task-card::before, .menu-item + .task-card::before, .task-card + .menu-item::before, .pagination + .menu-item::before, .pagination + .task-card::before {
  content: ''; position: absolute; top: 0; left: 62px; right: 0; height: 1px; background: var(--sep);
}
.menu-item:active, .task-card:active { background: var(--soft); }
.menu-icon, .task-dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 34px; background: var(--soft); color: var(--accent); }
.menu-icon .icon, .task-dot .icon { width: 20px; height: 20px; }
.label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chevron { flex: 0 0 7px; width: 7px; height: 7px; border-top: 2px solid var(--hint); border-right: 2px solid var(--hint); transform: rotate(45deg); margin-right: 4px; opacity: .7; }
.menu-item.primary { background: var(--accent); color: var(--accent-text); font-weight: 650; }
.menu-item.primary .menu-icon { background: rgba(255, 255, 255, .2); color: var(--accent-text); }
.menu-item.primary .chevron { border-color: var(--accent-text); }
.message-block > .menu-list .menu-item.primary { margin: 0; }
.menu-item.note { justify-content: center; color: var(--hint); font-size: .875rem; cursor: default; }
.menu-item.note:active { background: transparent; }

/* Screen header */
.screen-header { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.back-control { border: 0; background: var(--card); border-radius: 12px; width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 40px; }
.screen-header h1 { min-width: 0; overflow-wrap: anywhere; margin: 0; font-size: 1.375rem; }
.screen-header.large { margin: 4px 4px 16px; }
.screen-header.large h1 { font-size: 1.875rem; letter-spacing: -.6px; font-weight: 800; }
.screen-tag { display: inline-block; color: var(--accent); font-size: .75rem; font-weight: 600; background: var(--soft); padding: 5px 10px; border-radius: 999px; margin-bottom: 14px; }

/* Rich text from the bot */
.message-block { margin-bottom: 18px; }
.message-block > .rich { background: var(--card); border-radius: var(--radius); padding: 16px; }
.message-block > .rich + .menu-list, .message-block > .message-media + .menu-list, .message-block > .media-loader + .menu-list { margin-top: 12px; }
.message-block > .rich + .rich { margin-top: 10px; }
.rich { font-size: .9375rem; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.rich b, .rich strong { font-weight: 700; }
.message-block > .rich > b:first-child, .message-block > .rich > strong:first-child { font-size: 1.125rem; letter-spacing: -.2px; }
.rich .tg-spoiler { background: var(--hint); color: transparent; border-radius: 4px; }
.rich .tg-spoiler:hover, .rich .tg-spoiler:focus { background: none; color: inherit; }
.rich blockquote { padding: 8px 12px; border-left: 3px solid var(--accent); margin: 10px 0; background: var(--soft); border-radius: 0 10px 10px 0; }
.rich code { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: .8125rem; background: var(--soft); padding: 2px 6px; border-radius: 6px; white-space: pre-wrap; word-break: break-all; }
.rich pre { background: var(--bg); border-radius: 12px; padding: 12px; margin: 10px 0; white-space: pre-wrap; word-break: break-word; font: .8125rem/1.55 ui-monospace, Consolas, monospace; }
.message-media { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin: 0 0 10px; background: var(--card); }
.media-loader { height: 120px; display: grid; place-items: center; color: var(--hint); border-radius: var(--radius); background: var(--card); margin: 0 0 10px; font-size: .875rem; animation: pulse 1.4s ease-in-out infinite; }

/* Pagination */
.pagination { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; padding: 6px 10px; }
.menu-list > .pagination::before { content: ''; position: absolute; top: 0; left: 14px; right: 14px; height: 1px; background: var(--sep); }
.page-control { background: var(--soft); color: var(--accent); border: 0; border-radius: 12px; width: 44px; height: 38px; font-size: 1rem; }
.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(--hint); font-size: .8125rem; }
.list-nav { display: flex; gap: 10px; margin-top: 14px; }
.quiet { flex: 1; width: 100%; background: var(--card); border: 0; border-radius: 14px; padding: 13px; color: var(--accent); font-size: .9375rem; min-height: 46px; }
.menu-list > .quiet { border-radius: 0; background: transparent; }

/* Cards */
.feature-card, .info-card, .profile-card, .verification-card, .error-card { background: var(--card); border-radius: 20px; min-width: 0; overflow-wrap: anywhere; }
.feature-card { padding: 22px 18px; margin-bottom: 14px; text-align: center; }
.feature-icon { width: 60px; height: 60px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--accent); background: var(--soft); border-radius: 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.55; margin: 8px 0 0; }
.feature-card .rich { margin-top: 14px; text-align: left; }
.info-card { padding: 16px; margin-top: 12px; }
.field-label { display: block; font-size: .8125rem; font-weight: 600; color: var(--hint); margin-bottom: 6px; text-align: left; }
.feature-card > .field-label { margin-top: 18px; }
.referral-url { display: block; width: 100%; min-width: 0; background: var(--bg); color: var(--text); border: 0; border-radius: 12px; padding: 13px; font: .8125rem/1.5 ui-monospace, Consolas, monospace; }
.send-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; padding: 14px 18px; min-height: 50px; border-radius: 14px; background: var(--accent); color: var(--accent-text); font-size: .9375rem; font-weight: 650; transition: transform .12s, filter .12s; }
.send-button:active { transform: scale(.98); filter: brightness(.95); }
.send-button span { min-width: 0; overflow-wrap: anywhere; }
.contact-button { margin-top: 18px; }
.copy-button { margin-top: 10px; }
.clipboard-buffer { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Profile */
.profile-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 18px; text-align: center; }
.profile-card .avatar { flex-basis: 76px; width: 76px; height: 76px; font-size: 1.9rem; }
.profile-identity { min-width: 0; }
.profile-identity strong { display: block; font-size: 1.25rem; }
.profile-identity > span { display: block; margin-top: 2px; font-size: .875rem; }
.verification-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 10px 0 14px; }
.verification-card > div { min-width: 0; }
.verification-card .field-label { margin: 0; }
.verification-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; background: var(--soft); border-radius: 11px; color: var(--hint); }
.verification-icon.verified { background: var(--soft-good); color: var(--good); }
.status-label { display: block; font-size: .9375rem; }

/* Composer */
.composer { padding: 16px; background: var(--card); border-radius: 20px; margin-top: 14px; }
.composer label { display: block; font-size: .8125rem; font-weight: 600; margin-bottom: 8px; color: var(--hint); }
.composer textarea { resize: vertical; min-height: 104px; width: 100%; background: var(--bg); border: 1px solid transparent; color: var(--text); border-radius: 12px; padding: 12px; font-size: 1rem; line-height: 1.5; transition: border-color .12s; }
.composer textarea:focus { outline: none; border-color: var(--accent); }
.composer-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; }
.composer-tools label { margin: 0; cursor: pointer; }
.file-picker { background: var(--soft); border-radius: 12px; padding: 9px 12px; display: flex !important; gap: 8px; align-items: center; color: var(--accent) !important; }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-picker:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.file-info { min-width: 0; font-size: .8125rem; color: var(--hint); overflow-wrap: anywhere; }
.format-tip { font-size: .8125rem; line-height: 1.5; color: var(--hint); margin: 0 0 12px; }
.composer .format-switch { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--hint); margin: 12px 0; }
.composer > .send-button { margin-top: 12px; }
.composer-cancel { margin-top: 8px; background: transparent; }

/* History */
.history-list { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.history-row { position: relative; padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.history-row + .history-row::before { content: ''; position: absolute; top: 0; left: 62px; right: 0; height: 1px; background: var(--sep); }
.history-icon { width: 36px; height: 36px; flex: 0 0 36px; background: var(--soft); border-radius: 11px; display: grid; place-items: center; color: var(--accent); }
.history-icon.positive { background: var(--soft-good); color: var(--good); }
.history-info { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .9375rem; }
.history-row small { display: block; margin-top: 2px; color: var(--hint); 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 { background: var(--card); border-radius: var(--radius); padding: 28px 20px; text-align: center; color: var(--hint); }

/* Tab bar */
.dock {
  position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 600px;
  padding: 6px calc(8px + var(--safe-right)) calc(6px + var(--safe-bottom) + var(--app-content-safe-bottom, 0px)) calc(8px + var(--safe-left));
  background: var(--tg-theme-bottom-bar-bg-color, var(--card)); border-top: 1px solid var(--sep);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
}
@supports (backdrop-filter: blur(10px)) {
  .dock { background: color-mix(in srgb, var(--tg-theme-bottom-bar-bg-color, var(--card)) 88%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); }
}
.dock-item { min-width: 0; background: none; border: 0; border-radius: 12px; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .6875rem; font-weight: 600; color: var(--hint); padding: 4px 2px; transition: color .12s; }
.dock-item > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-item .icon { width: 24px; height: 24px; }
.dock-item.active { color: var(--accent); }
.keyboard-open .dock { visibility: hidden; pointer-events: none; }

/* Toast and progress */
.toast { position: fixed; z-index: 20; bottom: calc(var(--dock-clearance) - 24px); left: 50%; transform: translateX(-50%) translateY(10px); width: calc(100% - 32px); max-width: 520px; padding: 13px 16px; border-radius: 14px; background: rgba(28, 29, 34, .96); color: #fff; font-size: .9375rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #c93a3a; }
.keyboard-open .toast { bottom: calc(var(--keyboard-offset, 0px) + 16px); }
.busy-bar { position: fixed; z-index: 30; top: 0; left: 0; width: 100%; height: 3px; overflow: hidden; }
.busy-bar::before { content: ''; position: absolute; inset: 0; width: 40%; background: var(--accent); border-radius: 3px; animation: progress 1s ease-in-out infinite; }

.error-card { padding: 24px 20px; text-align: center; margin-top: 60px; }
.error-card > .send-button { margin-top: 18px; }
.backup-status { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; margin: 0 0 14px; border: 0; border-radius: 14px; background: var(--soft); color: var(--accent); text-align: left; font-size: .875rem; }
.backup-status span { min-width: 0; overflow-wrap: anywhere; }
.file-download { width: 100%; min-width: 0; background: var(--card); border: 0; border-radius: 14px; padding: 13px 14px; display: flex; gap: 10px; align-items: center; margin-bottom: 8px; text-align: left; color: var(--accent); }
.file-download span { min-width: 0; overflow-wrap: anywhere; color: var(--text); }
.premium-icon { width: 24px; height: 24px; object-fit: contain; }
.premium-inline { display: inline-block; width: 1.25em; height: 1.25em; object-fit: contain; vertical-align: -.25em; }

@keyframes pulse { 50% { opacity: .55; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes progress { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes screen-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (hover: hover) {
  .menu-item:hover, .task-card:hover { background: var(--soft); }
  .menu-item.primary:hover { filter: brightness(1.06); background: var(--accent); }
  .send-button:hover, .chip:hover, .task-tile:hover { filter: brightness(1.06); }
}
@media (max-width: 360px) {
  .app { padding-left: calc(12px + var(--safe-left)); padding-right: calc(12px + var(--safe-right)); }
  .facts { grid-template-columns: 1fr; }
  .dock-item { font-size: .625rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
