:root {
  --bg: #f5f2fc;
  --surface: #fff;
  --surface-2: #ede7fa;
  --text: #25163c;
  --muted: #766884;
  --line: #e2d9ed;
  --accent: #6939d9;
  --accent-ink: #fff;
  --good: #18784e;
  --warning: #9b560d;
  --danger: #bd285d;
  --radius: 18px;
  --rail: #6535d0;
  --rail-ink: #ede3ff;
  --data-bg: #e8dcfb;
  --renew-bg: #f0dcf2;
  --renew-ink: #852579;
  --font: Vazirmatn, system-ui, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #1b1529;
  --surface: #292136;
  --surface-2: #382847;
  --text: #f7f1ff;
  --muted: #b9a8cb;
  --line: #473452;
  --accent: #c9a8ff;
  --accent-ink: #201134;
  --good: #87e7b5;
  --warning: #f2c080;
  --danger: #ff9eb7;
  --rail: #361963;
  --rail-ink: #f1e8ff;
  --data-bg: #3e2957;
  --renew-bg: #4b2848;
  --renew-ink: #f7b5e8;
}
body { font-size: 13px; }
button { transition: transform 160ms ease, background 160ms ease; }
button:active { transform: scale(.965); }
button:focus-visible { outline-offset: 3px; }
.prism-shell { --rail-width: 68px; max-width: 640px; display: grid; grid-template-columns: var(--rail-width) minmax(0,1fr); min-height: 100dvh; }
.prism-canvas { min-width: 0; grid-column: 2; }
.prism-rail.app-nav { position: sticky; top: 0; bottom: auto; inset-inline: auto; grid-column: 1; grid-row: 1; width: var(--rail-width); height: 100dvh; margin: 0; padding: calc(22px + max(env(safe-area-inset-top),var(--host-safe-top,0px))) 6px calc(15px + max(env(safe-area-inset-bottom),var(--host-safe-bottom,0px))); display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; background: var(--rail); border: none; color: var(--rail-ink); gap: 0; z-index: 10; }
.prism-rail-mark { color: #f2d8ff; width: 29px; height: 35px; margin: 0 auto 51px; }
.prism-rail-mark svg { width: 100%; height: 100%; }
.prism-destinations { display: flex; flex-direction: column; gap: 12px; }
.prism-rail.app-nav button { width: 100%; flex: none; min-height: 63px; padding: 8px 2px; border-radius: 16px; color: var(--rail-ink); gap: 5px; font-size: 10px; line-height: 1.4; font-weight: 500; }
.prism-rail.app-nav button .icon { width: 21px; height: 21px; }
.prism-rail.app-nav button[aria-current="page"] { color: #5526c3; background: #f6f0ff; font-weight: 800; box-shadow: 0 6px 15px #21044830; }
.prism-rail.app-nav button:focus-visible { outline-color: #fff; outline-offset: 0; }
.prism-rail-bottom { margin-top: auto; padding-top: 40px; display: grid; gap: 8px; }
.prism-rail.app-nav .prism-rail-control { min-height: 56px; }
.app-header { min-width: 0; padding: calc(25px + max(env(safe-area-inset-top),var(--host-safe-top,0px))) 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prism-brand { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 750; }
.prism-brand-note { color: var(--muted); font-weight: 450; font-size: 10px; }
.prism-refresh { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; flex-shrink: 0; }
.prism-refresh span { display: none; }
.app-main { padding: 0 18px calc(25px + max(env(safe-area-inset-bottom),var(--host-safe-bottom,0px))); min-height: 0; }
.prism-intro { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 24px; }
.prism-intro h1 { font-size: clamp(28px,8vw,38px); font-weight: 750; letter-spacing: -1.3px; line-height: 1.2; }
[dir="rtl"] .prism-intro h1 { letter-spacing: -1.2px; font-weight: 850; }
.prism-intro p { font-size: 11px; margin-top: 8px; color: var(--muted); }
.prism-count { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 35px; gap: 0; padding-inline-start: 9px; border-inline-start: 1px solid var(--line); }
.prism-count bdi { font-size: 24px; font-weight: 650; line-height: 1.2; }
.prism-count small { font-size: 10px; color: var(--muted); }
.prism-picker-wrap { position: relative; }
.prism-picker { width: 100%; min-height: 67px; display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-align: start; }
.prism-account-symbol { display: grid; place-items: center; width: 32px; height: 36px; color: var(--accent); background: var(--surface-2); border-radius: 9px; flex: none; }
.prism-account-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.prism-account-name strong { font-size: 13px; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.prism-account-name > span { color: var(--muted); font-size: 10px; }
.prism-account-name i { font-style: normal; margin: 0 5px; }
.prism-picker > .icon { flex-shrink: 0; color: var(--muted); width: 16px; }
.prism-accounts { margin-top: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 16px 30px #4723670c; }
.prism-accounts .list-controls { gap: 9px; margin-bottom: 10px; }
.prism-accounts .control-row { flex-wrap: wrap; gap: 3px; }
.prism-accounts .segmented { gap: 0; }
.prism-accounts .segmented button { padding: 7px 8px; min-height: 44px; font-size: 11px; }
.prism-accounts .search-box { padding-inline: 10px; }
.prism-accounts .search-box input { font-size: 11px; }
.prism-accounts .sort-select { min-height: 44px; }
.prism-account-options { max-height: 390px; overflow-y: auto; overscroll-behavior: contain; }
.prism-account-option { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 8px; text-align: start; background: transparent; border: 0; border-top: 1px solid var(--line); min-height: 62px; border-radius: 0; }
.prism-account-option > span { display: flex; flex-direction: column; min-width: 0; }
.prism-account-option strong { font-size: 12px; overflow-wrap: anywhere; }
.prism-account-option bdi { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.prism-account-option small { font-size: 10px; color: var(--muted); }
.prism-account-option[aria-pressed="true"] { color: var(--accent); }
.prism-context { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; }
.prism-status { font-size: 11px; display: flex; align-items: center; gap: 6px; line-height: 1.5; }
.prism-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.prism-status.good { color: var(--good); }
.prism-status.warning { color: var(--warning); }
.prism-status.critical { color: var(--danger); }
.prism-text-button { display: flex; align-items: center; gap: 4px; min-height: 44px; border: 0; padding: 4px 0; background: transparent; font-size: 11px; color: var(--muted); flex-shrink: 0; }
.prism-text-button .icon { width: 14px; }
.prism-mosaic { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); grid-template-rows: 171px 163px; gap: 10px; }
.prism-tile { border-radius: 19px; min-width: 0; overflow: hidden; }
.prism-data { grid-row: 1 / span 2; padding: 18px 14px 17px; background: var(--data-bg); display: flex; flex-direction: column; position: relative; }
.prism-tile-heading { font-size: 11px; line-height: 1.4; display: flex; align-items: center; gap: 5px; font-weight: 550; }
.prism-data-number { display: flex; flex-direction: column; gap: 0; margin-top: 14px; position: relative; z-index: 1; }
.prism-data-number strong { font-size: clamp(33px,10.5vw,47px); line-height: 1.05; font-weight: 700; letter-spacing: -1.8px; white-space: nowrap; align-self: start; }
.prism-data-number span { font-size: 12px; color: var(--muted); margin-top: 4px; }
.prism-volume { flex: 1; min-height: 0; margin: -4px -4px -6px; }
.prism-volume svg { height: 100%; width: 100%; max-height: 203px; overflow: visible; }
.prism-shadow { fill: #4b208a; opacity: .12; }
.prism-vessel-left { fill: #cfc0ed; opacity: .75; }
.prism-vessel-right { fill: #b49edc; opacity: .65; }
.prism-vessel-top { fill: #fbf2ff; opacity: .52; }
.prism-graduations { stroke: #6948a6; opacity: .13; stroke-width: 1; fill: none; }
.prism-vessel-outline { stroke: #865bb3; fill: none; opacity: .12; }
.prism-fill { transform-box: view-box; transform-origin: 69px 220px; }
.prism-data-note { font-size: 10px; line-height: 1.6; color: var(--muted); margin-top: 2px; position: relative; z-index: 1; }
.prism-usage-percent { font-size: 10px; margin-top: 1px; font-weight: 550; color: var(--muted); }
.prism-time { background: var(--surface); padding: 17px 13px 13px; display: flex; flex-direction: column; align-items: start; }
.prism-time .prism-tile-heading { color: var(--muted); font-size: 11px; }
.prism-time-number { font-size: 47px; font-weight: 550; letter-spacing: -2px; margin: 12px 0 1px; line-height: 1; }
.prism-time-label { font-size: 11px; }
.prism-time time { color: var(--muted); font-size: 10px; margin-top: auto; padding-top: 7px; }
.prism-time.is-expired .prism-time-number,.prism-time.is-expired .prism-time-label { color: var(--danger); }
.prism-renew { padding: 16px 13px; border: 0; display: flex; flex-direction: column; align-items: start; justify-content: space-between; text-align: start; background: var(--renew-bg); color: var(--renew-ink); }
.prism-renew-glyph { width: 43px; height: 45px; display: grid; place-items: center; transform: rotate(-20deg); }
.prism-renew strong { font-size: 17px; line-height: 1.4; margin-top: auto; letter-spacing: -.4px; }
.prism-renew > span:last-child { font-size: 10px; display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 4px; margin-top: 5px; }
.prism-connect { display: grid; grid-template-columns: minmax(0,1fr) 65px; gap: 9px; margin-top: 10px; }
.prism-copy { border: 0; background: var(--accent); color: var(--accent-ink); border-radius: 17px; display: flex; align-items: center; gap: 10px; text-align: start; min-height: 74px; padding: 14px 13px; }
.prism-copy > span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.prism-copy strong { font-size: 12px; font-weight: 700; line-height: 1.6; }
.prism-copy small { font-size: 9px; opacity: .84; line-height: 1.6; }
.prism-copy > .icon:last-child { width: 15px; }
.prism-qr { border: 1px solid var(--line); border-radius: 17px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: 10px; }
.prism-qr .icon { width: 23px; height: 23px; }
.prism-service-meta { display: grid; gap: 10px; margin: 21px 0 15px; }
.prism-service-meta > div { display: flex; justify-content: space-between; align-items: start; gap: 10px; font-size: 10px; }
.prism-service-meta > div > span { color: var(--muted); flex-shrink: 0; }
.prism-service-meta bdi { overflow-wrap: anywhere; font-size: 11px; }
.prism-service-meta strong { font-size: 11px; font-weight: 500; text-align: end; overflow-wrap: anywhere; }
.prism-auto { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 52px; gap: 8px; background: transparent; padding: 11px 0; border: 0; border-block: 1px solid var(--line); }
.prism-auto > span:first-child { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.prism-auto-state { font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.prism-auto-state i { width: 28px; height: 17px; border-radius: 20px; background: var(--line); position: relative; }
.prism-auto-state i:after { content: ''; position: absolute; width: 11px; height: 11px; background: var(--surface); border-radius: 50%; top: 3px; inset-inline-start: 3px; }
.prism-auto-state.enabled i { background: var(--accent); }
.prism-auto-state.enabled i:after { inset-inline-start: auto; inset-inline-end: 3px; }
.prism-auto-plan { font-size: 10px; color: var(--muted); padding-top: 7px; }
.prism-manage { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; width: 100%; padding: 9px 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.prism-no-sub { margin-top: 18px; }
.prism-no-sub .empty { padding-inline: 0; }
.prism-section-kicker { color: var(--accent); font-size: 10px; font-weight: 650; letter-spacing: .6px; display: flex; align-items: center; gap: 7px; margin: 1px 0 14px; }
[dir="rtl"] .prism-section-kicker { letter-spacing: 0; }
.prism-secondary .page-title { margin-bottom: 24px; }
.prism-secondary .page-title h1 { font-size: 30px; letter-spacing: -1px; line-height: 1.3; }
.prism-secondary .page-title p { font-size: 11px; }
.prism-wallet .wallet-card { background: var(--data-bg); color: var(--text); padding: 21px 18px; border-radius: 22px; min-height: 229px; gap: 20px; position: relative; overflow: hidden; }
.prism-wallet .wallet-card:before { content: ''; position: absolute; pointer-events: none; width: 150px; height: 150px; border: 25px solid #9e6ee222; transform: rotate(30deg); inset-inline-end: -65px; top: -70px; }
.prism-wallet .balance-caption { font-size: 12px; }
.prism-wallet .wallet-card .balance { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; font-size: clamp(26px,8vw,36px); letter-spacing: -1.3px; font-weight: 650; position: relative; }
.prism-wallet .wallet-card .balance small { font-size: 10px; }
.prism-wallet .wallet-card > .row:last-child { align-items: start; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.prism-wallet .wallet-card .btn { background: var(--accent); color: var(--accent-ink); width: 100%; min-height: 44px; font-size: 12px; }
.prism-wallet .small.muted { font-size: 10px; }
.prism-wallet .section-title { margin-top: 27px; }
.prism-wallet .section-title h2 { font-size: 18px; }
.prism-wallet .section-title .btn { min-height: 44px; padding: 8px 10px; font-size: 11px; }
.prism-wallet .list-controls { gap: 10px; }
.prism-wallet .search-box { font-size: 11px; }
.prism-wallet .segmented { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.prism-wallet .segmented button { min-height: 44px; font-size: 10px; padding: 6px 3px; border-radius: 8px; }
.prism-wallet .segmented button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 2px 5px #3120400a; }
.prism-wallet .transaction-list { border-top: 0; display: grid; gap: 9px; }
.prism-wallet .transaction { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); padding: 13px 11px; gap: 9px; grid-template-columns: 29px minmax(0,1fr); }
.prism-wallet .tx-icon { width: 29px; height: 31px; border-radius: 9px; }
.prism-wallet .tx-title { font-size: 11px; }
.prism-wallet .tx-meta { font-size: 10px; overflow-wrap: anywhere; }
.prism-wallet .tx-amount { grid-column: 2; display: flex; align-items: baseline; gap: 4px; justify-content: flex-end; font-size: 15px; text-align: end; color: var(--danger); }
.prism-wallet .tx-amount.good { color: var(--good); }
.prism-wallet .tx-amount small { font-size: 9px; }
.prism-wallet .wallet-tabs .btn { min-height: 44px; font-size: 11px; padding-inline: 10px; }
.prism-shop .category-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prism-shop .category-card { min-height: 171px; display: flex; flex-direction: column; align-items: start; justify-content: flex-start; gap: 10px; padding: 17px 13px; border: 0; border-radius: 19px; background: var(--surface); }
.prism-shop .category-card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 48px minmax(0,1fr) 18px; min-height: 128px; align-items: center; gap: 12px; background: var(--data-bg); }
.prism-shop .category-card:nth-child(3n) { background: var(--renew-bg); }
.prism-shop .category-symbol { width: 43px; height: 43px; border-radius: 12px; background: var(--surface-2); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.prism-shop .category-card:nth-child(3n) .category-symbol { background: color-mix(in srgb,var(--renew-ink) 12%,transparent); color: var(--renew-ink); }
.prism-shop .category-card > span:nth-child(2) { flex: 1; }
.prism-shop .category-card h3 { font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.prism-shop .category-card p { font-size: 10px; line-height: 1.7; margin-top: 4px; color: var(--muted); }
.prism-shop .category-card > .icon { align-self: end; margin-top: auto; width: 16px; height: 16px; }
.prism-shop .category-card:first-child > .icon { align-self: center; margin: 0; }
.prism-shop .notice { padding: 15px 12px; font-size: 11px; }
.sheet { --radius: 24px; border-color: var(--line); }
.sheet-header { background: var(--surface); }
.sheet-header h2 { font-size: 18px; }
.sheet-body .plan-card { border-radius: 17px; background: var(--surface); }
.sheet-body .plan-card.selected { background: var(--surface-2); }
.sheet-body .detail-usage { background: var(--data-bg); border-radius: 17px; }
.sheet-body .summary-amount { color: var(--accent); }
.btn.primary { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.sheet-actions .btn { border-radius: 13px; }
.toast { background: var(--text); color: var(--bg); }
.prism-rail.app-nav button { font-size: 10.5px; }
.prism-account-name > span,.prism-time time,.prism-data-note,.prism-usage-percent,.prism-renew > span:last-child,.prism-service-meta > div,.prism-auto-state { font-size: 11px; }
.prism-copy small { font-size: 10px; }
.prism-accounts .prism-account-option small { font-size: 11px; }
@media (max-width: 374px) {
  .prism-shell { --rail-width: 62px; }
  .prism-rail.app-nav { padding-inline: 4px; }
  .app-header { padding-inline: 14px; }
  .app-main { padding-inline: 14px; }
  .prism-brand { font-size: 12px; }
  .prism-intro h1 { font-size: 29px; }
  .prism-intro p { font-size: 10px; }
  .prism-mosaic { gap: 8px; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); }
  .prism-data { padding-inline: 12px; }
  .prism-data-number strong { font-size: 35px; }
  .prism-time,.prism-renew { padding-inline: 11px; }
  .prism-renew strong { font-size: 16px; }
  .prism-connect { grid-template-columns: minmax(0,1fr) 59px; gap: 8px; }
  .prism-copy { padding-inline: 10px; gap: 8px; }
  .prism-copy > .icon:first-child { width: 18px; }
  .prism-copy > .icon:last-child { display: none; }
  .prism-copy strong { font-size: 11px; }
}
@media (min-width: 500px) {
  .prism-shell { --rail-width: 78px; }
  .app-header { padding: 32px 28px; }
  .app-main { padding-inline: 28px; }
  .prism-intro { margin-bottom: 30px; }
  .prism-intro h1 { font-size: 42px; }
  .prism-mosaic { grid-template-rows: 190px 185px; gap: 14px; }
  .prism-data { padding: 23px; }
  .prism-data-number strong { font-size: 56px; }
  .prism-volume svg { max-height: 220px; }
  .prism-time,.prism-renew { padding: 21px; }
  .prism-time-number { font-size: 56px; }
  .prism-copy { padding: 18px; }
  .prism-copy strong { font-size: 14px; }
  .prism-copy small { font-size: 11px; }
  .prism-service-meta > div { font-size: 12px; }
  .prism-service-meta bdi,.prism-service-meta strong { font-size: 12px; }
  .prism-intro p,.prism-tile-heading,.prism-time-label { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
