:root {
  color-scheme: light;
  --page: #fcf8ff;
  --ink: #201427;
  --muted: #635269;
  --surface: #fff;
  --soft: #f3e8fa;
  --line: #d8c6df;
  --accent: #ff563b;
  --action: #731bc0;
  --on-action: #fff;
  --link: #761da8;
  --error: #9c3139;
  --warn: #8e5917;
  --focus: #8622cf;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --night: #110c17;
  --inset: clamp(20px, 5vw, 88px);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
[data-theme="dark"] {
  color-scheme: dark;
  --page: #160e1c; --ink: #fff7ff; --muted: #cbbbce; --surface: #24182d;
  --soft: #34203e; --line: #60476b; --action: #a854ee; --on-action: #160523;
  --link: #eea1ff; --focus: #ff7bde; --error: #ff9a9e; --warn: #ffc07b;
}
* { box-sizing: border-box }
body { margin: 0; background: var(--page); color: var(--ink); line-height: 1.5 }
body { display:flex; flex-direction:column; min-height:100vh; min-height:100svh }
body:not(.profile-mode,.checkout-mode) {
  --home-ground:#181519; --home-panel:#221f23; --home-open:#2a2529;
  --home-rule:#484047; --home-ink:#fff8fa; --home-muted:#d1c5cb;
  background:var(--home-ground);
}
[data-theme="dark"] body:not(.profile-mode,.checkout-mode) {
  --home-ground:#121114; --home-panel:#1c1a1e; --home-open:#242125; --home-rule:#3c363d;
}
main { flex:1 }
h1,h2,h3,h4,p,dl,dd { margin: 0 }
h1,h2,h3,h4 { line-height: 1.09; text-wrap: balance }
a { color: inherit; text-underline-offset: .24em }
button,input,select,textarea { font: inherit }
button,summary { cursor: pointer }
button:disabled, select:disabled { cursor: default; opacity: .53 }
button, .button, .cabinet-link { transition: background-color .18s, transform .18s, border-color .18s }
button:active:not(:disabled), .button:active { transform: translateY(1px) }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px }
.top :focus-visible { outline-color: var(--accent) }
img { max-width: 100%; display: block }
.ui-icon { display: inline-block; flex: none; width: 20px; height: 20px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.6 }
.hidden,[hidden],body:is(.profile-mode,.checkout-mode) .home-page { display: none !important }
.frame, .checkout-page, .profile-page { width: min(100% - var(--inset) * 2, 1280px); margin-inline: auto }
.skip { position: fixed; z-index: 20; left: 1em; top: -6em; padding: 12px; background: var(--surface) }
.skip:focus { top: 1em }
.top, footer { background: var(--night); color: #faf3eb }
.bar,.bar-tools,.bar nav,.brand,.theme-options,.foot,.foot>div { display: flex; align-items: center }
.bar { justify-content: space-between; min-height: 76px; gap: 20px; border-bottom: 1px solid #37312c }
.brand,.cabinet-link,.bar nav a,.button,.foot a { text-decoration: none }
.brand { gap: 9px; white-space: nowrap; color: #fff7ec; width: fit-content }
.brand strong { font-family: Arial, sans-serif; font-size: 30px; letter-spacing: -.075em; line-height: 1; font-weight: 750 }
.brand-symbol { width:34px; height:34px; flex:none; background:url("/assets/kimicu-mark.svg") center/contain no-repeat }
.brand-vpn { font:600 10px var(--mono); letter-spacing:.08em; color:#d5c1ae; align-self:center; padding-top:4px }
.bar nav { gap: clamp(16px,2.4vw,36px) }
.bar nav a,.foot>div a { color: #cbbeb1; font-size: .94rem }
.bar nav a:hover,.foot a:hover { color: white; text-decoration: underline }
.bar-tools { gap: 12px }
.cabinet-link, .theme-menu summary { min-height: 42px; display: inline-flex; gap: 9px; align-items: center; justify-content: center; color: white }
.cabinet-link { padding: 0 16px; border-radius: 30px; border: 1px solid #51473f; font-size: .94rem }
.cabinet-link:hover { border-color: var(--accent) }
.theme-menu { position: relative }
.theme-menu summary { width: 42px; list-style: none }
.theme-menu summary::-webkit-details-marker { display:none }
.theme-options { position: absolute; z-index: 10; top: 100%; right: 0; align-items: stretch; flex-direction: column; min-width: 155px; padding: 5px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 12px 30px #0002 }
.theme-options button { background: none; color: var(--ink); text-align: left; min-height: 40px; padding: 6px 12px }
.theme-options button.active { background: var(--soft); color: var(--link) }
.trial-kicker { display: flex; align-items: center; gap: 10px; font: 600 .76rem/1.3 "Consolas", monospace; letter-spacing: .13em; text-transform: uppercase; color: var(--muted) }
button,.button,.trial-paid-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; background: var(--action); color: var(--on-action); padding: 11px 18px; font-weight: 600; text-decoration: none }
button:hover:not(:disabled),.button:hover,.trial-paid-link:hover { filter: brightness(.93) }
.button { min-height: 48px; padding-inline: 23px }
.bright { color: #2e2117; background: var(--accent) }
.ghost { border-color: #4f453d; background: #2b2520; color: #f7f0e9 }
.ghost:hover { border-color: #cdbbae }
.section { padding-block: clamp(48px,5.6vw,88px) }
.auth-copy p { color: var(--muted); max-width: 410px; line-height: 1.55 }
.section h2,.section-heading h1 { font-size: clamp(2.35rem,4vw,4rem); letter-spacing: -.059em; font-weight: 585; line-height: 1.02 }
.section-heading h1+p,.section-heading h2+p { margin-top: 16px }
.trial-emblem { width: 36px; height: 36px; display: grid; place-items: center; background: var(--soft); border-radius: 10px }
.outline,.secondary { border-color: var(--line); background: var(--surface); color: var(--ink) }
.trial-emblem { background: var(--surface); flex: none }
.text-link,.back,.form-link,.connect-guide a { color: var(--link) }
.text-link { display:inline-block; margin-top: 18px }
.faq-list { border-top: 1px solid var(--line) }
.faq-list details { border-bottom: 1px solid var(--line) }
.faq-list summary,.purchase-card summary { list-style: none; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 0; font-weight:600 }
summary::-webkit-details-marker { display:none }
.faq-list details[open] .faq-chevron { transform:rotate(180deg) }
.faq-list details p { padding-bottom:18px; color:var(--muted) }
.foot { padding: 34px 0; justify-content: space-between; gap: 18px; flex-wrap: wrap }
.foot>div { gap: clamp(12px,2.2vw,34px); flex-wrap:wrap }
.back { display:inline-block; margin-bottom: 22px }
.checkout-page,.profile-page { min-height: 68vh }
.checkout-page:not(.hidden),.profile-page:has(.auth-panel:not(.hidden)) { display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,1fr); align-content: start; align-items: start; gap: 18px clamp(24px,6vw,95px) }
.checkout-page .message { grid-column: 2 }
.checkout-form,.auth-panel,.dashboard-card,.purchase-card,.trial-panel,.telegram-link-panel { background: var(--surface); border: 1px solid var(--line); padding: clamp(20px,2.4vw,34px); border-radius: 16px; min-width:0 }
.checkout-form,.auth-form,.password-form,.subscription-form,.fallback-password-form { display: grid; gap: 16px }
.auth-copy { margin-bottom: 20px }
.auth-copy h3 { font-size:1.55rem; margin-bottom:9px }
.auth-tabs,.profile-tabs { display:flex; flex-wrap:wrap; gap:5px }
.auth-tabs,.profile-tabs { padding: 5px; background:var(--soft); border-radius:12px }
.auth-tabs button { flex:1 }
.auth-tabs button,.profile-tabs button { background:transparent; color:var(--muted) }
.auth-tabs .active,.profile-tabs .active { background:var(--surface); color:var(--ink); box-shadow:0 1px 3px #0001 }
label { display: grid; gap: 6px; font-weight: 550; min-width:0 }
input,select,textarea { min-width:0; max-width:100%; width:100%; padding:12px 14px; color:var(--ink); background:var(--page); border:1px solid var(--line); border-radius:9px }
select { appearance:none; padding-right:40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%); background-position:calc(100% - 19px) 50%,calc(100% - 14px) 50%; background-size:5px 5px; background-repeat:no-repeat }
input[type=checkbox] { width:18px; height:18px; accent-color:var(--link) }
.web-consent { display:flex; align-items:flex-start; gap:10px; font-size:.91rem; line-height:1.45; color:var(--muted); cursor:pointer }
.web-consent input[type=checkbox] { flex:0 0 18px; margin:2px 0 0; min-height:0; padding:0; cursor:pointer }
.web-consent a { color:var(--link); text-underline-offset:.18em }
.auth-divider,.form-link { text-align:center }
.auth-divider,.message,.history-meta,.dashboard-note,.empty-state,.purchase-meta,.metric-tile small,.balance-note,.referral-offer span { color:var(--muted) }
.message:empty,.payment-status:empty,.dashboard-tools:empty { display:none }
.message.err,.payment-status.err,.meta-warn,.err { color:var(--error) }
.message.ok,.payment-status.ok { color:var(--link) }
.telegram-auth-button,.profile-toolbar button { background:var(--soft); color:var(--ink) }
.profile-dashboard { margin-top:28px; overflow-wrap:anywhere }
.profile-dashboard,.profile-tab-panel,.dashboard-tools,.purchase-list,.purchase-body,.trial-panel,.key-box,.purchase-tools,.auto-topup-offer,.fallback-login-panel,.referral-offer,.offer-heading { display:grid; gap:14px }
.profile-toolbar,.trial-heading,.history-heading,.history-pagination,.balance-summary-row,.device-subscription-heading,.key-actions,.delete-confirm,.action-row,.trial-actions,.trial-limits,.purchase-meta,.inline-toggle { display:flex; align-items:center; gap:12px; flex-wrap:wrap }
.profile-toolbar,.trial-heading,.history-heading,.balance-summary-row,.device-subscription-heading,.history-pagination { justify-content:space-between }
.profile-toolbar>div,.metric-tile,.referral-offer,.fallback-login-panel>div,.offer-heading { display:grid }
.profile-toolbar strong { font-size:1.45rem }
.profile-toolbar small { color:var(--muted) }
.trial-state-used .trial-limits,.trial-state-used .trial-hwid-note,
.trial-state-blocked .trial-limits,.trial-state-blocked .trial-hwid-note { display:none }
.purchase-card summary { font-size:1.2rem }
.purchase-card summary::after { content:'+'; color:var(--muted) }
.purchase-card[open] summary::after { content:'−' }
.purchase-card summary .status-pill { margin-left:auto }
.profile-dashboard .profile-tabs { background:transparent; border-bottom:1px solid var(--line); border-radius:0; padding:0 0 8px }
.profile-tabs button.active { background:var(--action); color:var(--on-action) }
.profile-overview,.dashboard-grid,.amount-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(160px,100%),1fr)); gap:10px }
.metric-tile,.auto-topup-offer,.fallback-login-panel,.referral-offer,.delete-confirm { padding:16px; background:var(--soft); border-radius:10px }
.metric-tile strong { font-size:1.25rem }
.metric-tile span,.trial-limits span { color:var(--muted); font-size:.9rem }
.dashboard-card { display:grid; gap:14px }
.dashboard-card h3,.trial-panel h3 { font-size:1.35rem }
.dashboard-card>button,.dashboard-card>a { justify-self:start }
.history-row,.device-row,.referral-row { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:12px 0; border-bottom:1px solid var(--line) }
.history-row>div:first-child,.device-row>div:first-child,.referral-row>div:first-child { flex:1 1 200px; display:grid }
.status-pill { border-radius:30px; font-size:.84rem; padding:3px 10px; background:var(--soft); color:var(--link) }
.status-pill.warn,.inline-warning { color:var(--warn) }
.status-pill.err { color:var(--error) }
.danger,.danger-action { background:#96383d; color:#fff }
.danger-soft { background:var(--soft); color:var(--error) }
.inline-toggle { display:flex }
.amount-grid button { display:grid }
.amount-grid button span { font-size:.84rem; font-weight:400 }
.purchase-card summary { padding:0 }
.purchase-card[open] summary { margin-bottom:18px }
.purchase-meta span,.trial-limits span { background:var(--soft); padding:3px 9px; border-radius:5px }
.connect-guide { padding-left:22px; margin:0 }
.connect-guide li+li { margin-top:6px }
.vpn-link { justify-content:flex-start; flex-wrap:wrap; color:var(--ink); background:var(--soft); overflow-wrap:anywhere }
.toast-viewport { position:fixed; z-index:20; bottom:20px; right:20px; width:min(390px,calc(100vw - 40px)); display:grid; gap:8px; pointer-events:none }
.toast,.toast-notice { background:var(--surface); border:1px solid var(--line); box-shadow:0 6px 28px #0003; color:var(--ink); border-radius:12px; padding:16px; pointer-events:auto }
.trial-heading .trial-kicker { margin-bottom:8px }
.telegram-linked { display:none }
.telegram-actionable { display:grid; gap:12px }
.connection-guide-card { display:block }
.connection-guide-card summary { font-weight:600 }
.connection-guide-card[open] .connect-guide { margin-top:14px }
.toast,.payment-status:not(:empty) { display:flex; align-items:start; justify-content:space-between; gap:16px }
.payment-status:not(:empty) { padding:16px; margin-block:12px; border:1px solid var(--line); background:var(--surface); border-radius:12px }
.toast,.payment-status:not(:empty) { align-items:center; border-inline-start:4px solid var(--link); line-height:1.45 }
.toast.err,.payment-status.err:not(:empty) { border-inline-start-color:var(--error) }
.notice-content { display:flex; flex-wrap:wrap; align-items:center; gap:12px; min-width:0 }
.notice-content > span { flex:1 1 16rem }
.notice-content .inline-action { min-height:42px; border:1px solid var(--line); background:var(--soft); color:var(--ink) }
.notice-content .inline-action:is(:hover,:focus-visible):not(:disabled) { background:var(--surface); border-color:var(--link); color:var(--link) }
.toast-close,.notice-close { position:relative; flex:none; width:42px; height:42px; padding:0; border-radius:10px; color:var(--muted); background:var(--soft) }
.toast-close::before,.toast-close::after,.notice-close::before,.notice-close::after { content:""; position:absolute; top:50%; left:50%; width:15px; height:2px; border-radius:2px; background:currentColor; transform:translate(-50%,-50%) rotate(45deg) }
.toast-close::after,.notice-close::after { transform:translate(-50%,-50%) rotate(-45deg) }
:is(.toast-close,.notice-close):is(:hover,:focus-visible) { color:var(--link); border-color:var(--link) }
.catalog-empty { display:grid; justify-items:start; gap:12px }
.profile-page:has(.auth-panel:not(.hidden)) #paymentStatus:empty { display:none }
@media (max-width: 900px) {
  .bar nav { gap:14px }
  .bar-tools { gap:3px }
  .brand strong { font-size:27px }
}
@media (max-width: 720px) {
  :root { --inset: 20px }
  .bar { flex-wrap:wrap; gap:0; padding-top:9px; min-height:0 }
  .bar-tools { margin-left:auto }
  .bar-tools .cabinet-full { display:none }
  .cabinet-link>span { text-transform:capitalize }
  .bar nav { order:3; width:100%; justify-content:space-between; padding:9px 0 8px; gap:8px }
  .bar nav a { padding:4px 0; font-size:.9rem }
  .button { padding-inline:17px }
  .checkout-page:not(.hidden),.profile-page:has(.auth-panel:not(.hidden)) { grid-template-columns:1fr }
  .checkout-page .message { grid-column:auto }
  .foot { align-items:flex-start }
  .foot>div { gap:10px 18px }
}
@media (max-width: 390px) {
  :root { --inset:16px }
  .brand { gap:6px }
  .cabinet-link { padding:0 11px}
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation:none !important; scroll-behavior:auto !important; transition:none !important }
}

