/* The switch lives in the empty left side of the home header. */
.home-view .theme-toggle{display:grid;place-items:center;flex:none;width:clamp(44px,calc(73 * var(--home-u)),52px);height:clamp(44px,calc(73 * var(--home-u)),52px);margin-right:auto;padding:0;border:1px solid #c8dfff;border-radius:17px;background:linear-gradient(145deg,#fff,#e9f3ff);color:#3568c7;box-shadow:0 9px 22px -13px rgba(32,83,166,.6),inset 0 1px 0 #fff;cursor:pointer}
.theme-toggle svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .moon-shape,.theme-toggle .moon-spark,.theme-toggle .sun-core{fill:currentColor;stroke:none}
.theme-toggle .sun-rays{stroke-width:2.4}
.theme-toggle .theme-sun{display:none}
.theme-toggle:focus-visible{outline:3px solid var(--accent);outline-offset:3px}

html[data-theme="dark"]{--ink:#eaf2ff;--ink2:#c9ddfa;--accent:#67b5ff;--accent-light:#1c3854;--paper:#101827;--line:#30415c;--sub:#a4b5cc;--ok:#72d8ad;--soft-blue:linear-gradient(145deg,#1b3555,#233f60);--surface:#1b2940;--surface-high:#22334e;--surface-soft:#16243a;--surface-border:#344965;--muted-panel:#203149;color-scheme:dark}
html[data-theme="dark"] body{background:radial-gradient(ellipse 90% 38% at 85% 0,rgba(39,91,163,.24),transparent 73%),radial-gradient(ellipse 80% 45% at 0 100%,rgba(55,41,121,.16),transparent 70%),var(--paper);color:var(--ink)}
html[data-theme="dark"] body.home-view{background:radial-gradient(ellipse 80% 32% at 80% 2%,rgba(29,110,205,.32),transparent 72%),radial-gradient(ellipse 75% 30% at 95% 90%,rgba(19,128,156,.18),transparent 72%),linear-gradient(180deg,#101d33,#11182b 55%,#17192d);color:var(--ink)}
html[data-theme="dark"] body.support-view{background:radial-gradient(ellipse at 0 0,rgba(40,97,161,.22),transparent 50%),linear-gradient(180deg,#111d31,#101827 75%)}
html[data-theme="dark"] .theme-toggle{background:linear-gradient(145deg,#304461,#20334f);border-color:#526c93;color:#ffd46d;box-shadow:0 12px 26px -14px #000,inset 0 1px 0 rgba(255,255,255,.1)}
html[data-theme="dark"] .theme-toggle .theme-moon{display:none}
html[data-theme="dark"] .theme-toggle .theme-sun{display:block}
html[data-theme="dark"] .home-view .brand .mono{background:linear-gradient(#15253e,#15253e) padding-box,linear-gradient(145deg,#2f94fa,#25d4db,#ad70f5) border-box;color:#b8ddff}
html[data-theme="dark"] .home-view .brand b,html[data-theme="dark"] .home-view .feat b,html[data-theme="dark"] .home-view .tile b,html[data-theme="dark"] .home-view .row b,html[data-theme="dark"] .home-view .sec{color:var(--ink)}
html[data-theme="dark"] .home-view .brand small,html[data-theme="dark"] .home-view .tile small,html[data-theme="dark"] .home-view .row .ch{color:var(--sub)}
html[data-theme="dark"] .home-view .tile:first-child b,html[data-theme="dark"] .home-view .tile:first-child small{color:#fff}
html[data-theme="dark"] .home-view .feat>span,html[data-theme="dark"] .home-view .tile:not(:first-child),html[data-theme="dark"] .home-view .list{background:rgba(29,43,67,.92);border-color:rgba(99,139,192,.26);box-shadow:0 19px 32px -25px rgba(0,0,0,.75),inset 0 1px 0 rgba(187,217,255,.08)}
html[data-theme="dark"] .home-view .feat>span+span{border-color:rgba(99,139,192,.26)}
html[data-theme="dark"] .home-view .row{border-color:var(--line)}
html[data-theme="dark"] .home-view .row-icon{background:#534326;color:#ffce72}
html[data-theme="dark"] .home-view .row:nth-child(2) .row-icon{background:#16465a;color:#79dcee}
html[data-theme="dark"] .home-view .row:nth-child(3) .row-icon{background:#432a61;color:#d4a9ff}
html[data-theme="dark"] .home-view .sec:after{background:linear-gradient(to left,rgba(141,175,221,.32),transparent)}
html[data-theme="dark"] body nav,html[data-theme="dark"] .support-view nav{background:rgba(27,39,60,.94);border-color:rgba(114,153,204,.27);box-shadow:0 20px 40px -16px rgba(0,0,0,.7)}
html[data-theme="dark"] body nav a:not(.on),html[data-theme="dark"] .support-view nav a:not(.on){color:#b1c2db}

/* Shared cards, choices, lists and form fields. */
html[data-theme="dark"] .back,html[data-theme="dark"] .tile:not(:first-child),html[data-theme="dark"] .svc,html[data-theme="dark"] .box,html[data-theme="dark"] .list,html[data-theme="dark"] .plan,html[data-theme="dark"] .chip,html[data-theme="dark"] .connection-device,html[data-theme="dark"] .checkout-card,html[data-theme="dark"] .checkout-wallet,html[data-theme="dark"] .payment-card,html[data-theme="dark"] .payment-amount,html[data-theme="dark"] .purchase-help,html[data-theme="dark"] .service-sort,html[data-theme="dark"] .wallet-page .wallet-transactions,html[data-theme="dark"] .wallet-page .topup-choices .chip,html[data-theme="dark"] .telegram-only{background:var(--surface);border-color:var(--surface-border);color:var(--ink);box-shadow:0 15px 35px -26px rgba(0,0,0,.85)}
html[data-theme="dark"] .plan.on{background:linear-gradient(var(--surface-high),var(--surface-high)) padding-box,var(--primary-gradient) border-box;border-color:transparent}
html[data-theme="dark"] .seg,html[data-theme="dark"] .purchase-page .seg{background:#1b2a40}
html[data-theme="dark"] .seg button.on{background:#314764;color:#f2f7ff}
html[data-theme="dark"] .feat{background:rgba(27,42,64,.65)}
html[data-theme="dark"] .feat>span{background:var(--surface);border-color:var(--surface-border)}
html[data-theme="dark"] .feat b,html[data-theme="dark"] .feat span{color:var(--ink)}
html[data-theme="dark"] .custom-topup,html[data-theme="dark"] .wallet-invoice,html[data-theme="dark"] .checkout-total,html[data-theme="dark"] .checkout-page .checkout-total,html[data-theme="dark"] .service-usage,html[data-theme="dark"] .service-card .subscription-panel,html[data-theme="dark"] .subscription-panel,html[data-theme="dark"] .manual-link-card,html[data-theme="dark"] .receipt-picker,html[data-theme="dark"] .payment-page .receipt-picker,html[data-theme="dark"] .receipt-preview,html[data-theme="dark"] .payment-page .receipt-preview{background:var(--surface-soft);border-color:var(--surface-border);color:var(--ink)}
html[data-theme="dark"] .custom-topup input,html[data-theme="dark"] .service-link-text,html[data-theme="dark"] .subscription-panel .service-link-text{background:#101c2e;border-color:var(--surface-border);color:var(--ink)}
html[data-theme="dark"] .subscription-panel .subscription-label{color:var(--sub)}
html[data-theme="dark"] .checkout-total strong,html[data-theme="dark"] .checkout-page .checkout-total strong,html[data-theme="dark"] .payment-amount strong{color:#91caff}
html[data-theme="dark"] .checkout-page .checkout-total small,html[data-theme="dark"] .payment-card-number{color:#c9e0ff}
html[data-theme="dark"] .checkout-wallet>.checkout-icon,html[data-theme="dark"] .plan .gb{background:var(--surface-high);border-color:var(--surface-border);color:#8bc7ff;box-shadow:none}
html[data-theme="dark"] .home-view .tile:not(:first-child) .ic{border-color:rgba(255,255,255,.2)}
html[data-theme="dark"] .purchase-guide{background:var(--surface);border-color:var(--surface-border);color:var(--ink)}
html[data-theme="dark"] .purchase-guide-header{background:var(--surface-high);border-color:var(--surface-border)}
html[data-theme="dark"] .purchase-guide-footer,html[data-theme="dark"] .guide-close{background:var(--surface);border-color:var(--surface-border);color:var(--ink)}
html[data-theme="dark"] .guide-steps li>span,html[data-theme="dark"] .guide-faq details[open],html[data-theme="dark"] .guide-close:active{background:var(--surface-high)}
html[data-theme="dark"] .service-actions button,html[data-theme="dark"] .service-card.is-new .service-actions button:not(.copy-success),html[data-theme="dark"] .service-card.is-renewed .service-actions button:not(.copy-success),html[data-theme="dark"] .service-card.is-test-new .service-actions button:not(.copy-success),html[data-theme="dark"] .link-copy,html[data-theme="dark"] .service-card.is-new .service-usage,html[data-theme="dark"] .service-card.is-renewed .service-usage,html[data-theme="dark"] .service-card.is-test-new .service-usage{background:var(--muted-panel);border-color:var(--surface-border);color:var(--ink2)}
html[data-theme="dark"] .service-actions button>span[aria-hidden],html[data-theme="dark"] .services-top .service-sort{color:var(--accent)}
html[data-theme="dark"] .svc.service-card.is-new{background:linear-gradient(145deg,#193b38,#1a2d37);border-color:#326a61}
html[data-theme="dark"] .svc.service-card.is-renewed{background:linear-gradient(145deg,#443821,#302e2a);border-color:#6e5933}
html[data-theme="dark"] .svc.service-card.is-test-new{background:linear-gradient(145deg,#473224,#332b2d);border-color:#77533c}
html[data-theme="dark"] .service-status.active,html[data-theme="dark"] .wallet-transaction.credit .wallet-transaction-icon,html[data-theme="dark"] .receipt-success-icon{background:#1d493f;color:#88e3b7}
html[data-theme="dark"] .service-status.inactive,html[data-theme="dark"] .wallet-transaction.debit .wallet-transaction-icon,html[data-theme="dark"] .receipt-error,html[data-theme="dark"] .payment-page .receipt-error{background:#4a292f;color:#ffaaa2}
html[data-theme="dark"] .service-status.unknown{background:#30415b;color:#c4d3e8}
html[data-theme="dark"] .service-card .service-progress{background:#3a4d68}
html[data-theme="dark"] .service-progress-dot{box-shadow:0 0 0 2px var(--surface)}
html[data-theme="dark"] .sort-menu{background:var(--surface-high);border-color:var(--surface-border)}
html[data-theme="dark"] .sort-menu button{color:var(--ink)}
html[data-theme="dark"] .wallet-page .topup-choices .chip.on,html[data-theme="dark"] .wallet-page .topup-choices .custom-choice.on,html[data-theme="dark"] .chip.on{background:#24476c;border-color:#5ca7f2;color:#e7f3ff;box-shadow:inset 0 0 0 1px #5ca7f2}
html[data-theme="dark"] .wallet-page .topup-choices .chip small{color:var(--sub)}
html[data-theme="dark"] .wallet-page .topup-choices .custom-choice{background:var(--surface-soft);border-color:var(--surface-border)}
html[data-theme="dark"] .wallet-page .wallet-transactions{background:var(--surface)}
html[data-theme="dark"] .wallet-transaction.credit>b{color:#83e1b2}
html[data-theme="dark"] .wallet-transaction.debit>b{color:#ffaaa2}
html[data-theme="dark"] .checkout-shortfall{background:#423722;border-color:#7e6637;color:#ffe2a6}
html[data-theme="dark"] .checkout-shortfall p,html[data-theme="dark"] .receipt-pending,html[data-theme="dark"] .payment-page .receipt-pending{color:#ffdda0}
html[data-theme="dark"] .renewal-note{background:#20453d;border-color:#437761;color:#abedcb}
html[data-theme="dark"] .support-top h1.t,html[data-theme="dark"] .support-card h2{color:var(--ink)}
html[data-theme="dark"] .support-top small,html[data-theme="dark"] .support-description,html[data-theme="dark"] .support-footer{color:var(--sub)}
html[data-theme="dark"] .support-top .back,html[data-theme="dark"] .support-card{background:var(--surface);color:var(--ink);border-color:var(--surface-border)}
html[data-theme="dark"] .support-emblem{border-color:var(--surface)}
html[data-theme="dark"] .support-topics span{background:#244364;color:#b9ddff}
html[data-theme="dark"] .telegram-only{background:var(--surface)}
