:root {
  color-scheme: light;
  --paper: #f2f5f7;
  --surface: #ffffff;
  --ink: #11191f;
  --muted: #586873;
  --faint: #dce4e8;
  --signal: #0069ff;
  --signal-deep: #0047b3;
  --signal-pale: #dbeaff;
  --warning: #a94d00;
  --success: #087d55;
  --danger: #b3261e;
  --radius: 14px;
  font-family: "SF Pro Text", "PingFang SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { width: 100%; max-width: 100%; overflow-x: hidden; overscroll-behavior: none; touch-action: manipulation; }
body { width: 100%; max-width: 100%; min-width: 0; margin: 0; overflow-x: hidden; overscroll-behavior: none; background: var(--paper); color: var(--ink); }
html.sheet-open { overflow: hidden; overscroll-behavior: none; }
body.sheet-open { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; overscroll-behavior: none; }
html.confirmation-open, body.confirmation-open { overflow: hidden; overscroll-behavior: none; }
button, input, summary { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid rgba(0, 105, 255, .28); outline-offset: 2px; }

#app { width: 100%; max-width: 100%; min-height: 100vh; min-height: 100dvh; overflow-x: clip; padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
#app.edge-pulling { transform: translate3d(0, var(--edge-pull, 0), 0); transition: none; will-change: transform; }
#app.edge-releasing { transform: translate3d(0, var(--edge-pull, 0), 0); transition: transform .28s cubic-bezier(.16, 1, .3, 1); will-change: transform; }
.app-page, .app-page > *, .selector-copy { min-width: 0; max-width: 100%; }
.mast { display: flex; align-items: center; gap: 13px; padding: calc(18px + env(safe-area-inset-top)) 20px 14px; }
.mast h1 { margin: 0; font-size: 17px; line-height: 1.2; letter-spacing: -.015em; }
.mast p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.brand-mark { display: flex; gap: 2px; align-items: end; width: 28px; height: 25px; padding: 3px; background: var(--ink); border-radius: 7px; }
.brand-mark span { display: block; width: 4px; background: white; border-radius: 2px 2px 0 0; }
.brand-mark span:nth-child(1) { height: 5px; opacity: .4; }
.brand-mark span:nth-child(2) { height: 10px; opacity: .58; }
.brand-mark span:nth-child(3) { height: 15px; opacity: .76; }
.brand-mark span:nth-child(4) { height: 20px; }

.finder { padding: 15px 20px 20px; background: var(--surface); border-top: 1px solid var(--faint); border-bottom: 1px solid var(--faint); }
.finder h2 { margin: 0 0 18px; font-size: clamp(29px, 9vw, 42px); line-height: .98; letter-spacing: -.035em; }
.catalog-back { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; margin: 0 0 13px -8px; padding: 7px 9px 7px 6px; border: 0; border-radius: 10px; background: transparent; color: var(--signal-deep); font-size: 13px; font-weight: 700; cursor: pointer; }
.catalog-back:hover { background: var(--signal-pale); }
.catalog-back:active { background: #d8e7ff; }
.catalog-back svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.search-field { display: flex; align-items: center; min-height: 52px; border-bottom: 2px solid var(--ink); }
.search-field:focus-within { border-color: var(--signal); }
.search-field svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 13px 10px; color: var(--ink); background: transparent; font-size: 16px; }
.search-field input::placeholder { color: #5d6c75; }
.search-field button { border: 0; background: transparent; color: var(--signal-deep); padding: 10px 0 10px 10px; font-size: 13px; }
.destination-picker { margin-top: 14px; border: 1px solid var(--faint); border-radius: var(--radius); background: var(--paper); }
.destination-picker summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 18px; align-items: center; gap: 10px; min-height: 50px; padding: 10px 13px; border-radius: var(--radius); cursor: pointer; list-style: none; }
.destination-picker summary::-webkit-details-marker { display: none; }
.destination-picker summary::marker { display: none; content: ""; }
.destination-picker summary:hover { background: #e9eef1; }
.destination-picker[open] summary { border-bottom: 1px solid var(--faint); border-radius: var(--radius) var(--radius) 0 0; }
.destination-picker summary svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.destination-picker[open] summary svg { transform: rotate(180deg); }
.destination-label, .destination-total { color: var(--muted); font-size: 11px; font-weight: 600; }
.destination-picker summary strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.destination-total { font-variant-numeric: tabular-nums; white-space: nowrap; }
.destination-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 7px; padding: 9px; }
.destination-chip { display: inline-flex; min-width: 0; align-items: center; justify-content: flex-start; gap: 7px; min-height: 40px; padding: 8px 10px; border: 1px solid var(--faint); border-radius: 10px; background: var(--surface); font-size: 12px; font-weight: 650; text-align: left; }
.destination-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.destination-chip .flag { font-size: 13px; line-height: 1; }
.destination-chip.active { border-color: var(--signal); background: var(--signal); color: white; }
.destination-chip:hover:not(.active) { border-color: #aebbc3; }
.selector-panel { padding: 18px 20px 20px; background: var(--surface); border-top: 1px solid var(--faint); border-bottom: 1px solid var(--faint); }
.selector-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.selector-head h2 { margin: 0; font-size: 16px; }
.selector-head span { color: var(--muted); font-size: 11px; }
.selector-list { display: grid; gap: 10px; }
.selector-option { display: grid; grid-template-columns: 48px minmax(0, 1fr) 18px; align-items: center; gap: 13px; width: 100%; min-height: 94px; padding: 13px 14px; border: 1px solid var(--faint); border-radius: var(--radius); background: var(--paper); text-align: left; cursor: pointer; }
.selector-option:hover { border-color: #aebbc3; background: #edf1f3; }
.selector-option:active { border-color: var(--signal); background: var(--signal-pale); }
.selector-option:disabled { opacity: .48; cursor: not-allowed; }
.selector-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--signal); color: white; }
.selector-icon svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.premium-icon { background: #6f3aa8; }
.premium-icon svg { fill: currentColor; stroke: none; }
.registration-icon { background: var(--signal-deep); }
.renewal-icon { background: var(--ink); }
.selector-copy, .selector-copy > strong, .selector-copy > small, .selector-meta { display: block; min-width: 0; }
.selector-copy > strong { font-size: 16px; }
.selector-copy > small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.selector-meta { display: flex; align-items: center; gap: 9px; margin-top: 8px; }
.selector-meta b { padding: 3px 8px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 700; }
.selector-meta em { color: var(--signal-deep); font-size: 11px; font-style: normal; font-weight: 750; }
.selector-arrow { width: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lookup-entry { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 46px; margin-top: 12px; border: 1px dashed #aebbc3; border-radius: 12px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; }
.lookup-entry:hover { border-color: var(--signal); color: var(--signal-deep); }
.lookup-entry svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.catalog-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 11px 12px; border-radius: 12px; background: #fde7e5; color: #75211c; font-size: 12px; line-height: 1.45; }
.catalog-error button { flex: 0 0 auto; min-height: 34px; padding: 6px 10px; border: 1px solid #b96b65; border-radius: 9px; background: var(--surface); color: #75211c; font-size: 11px; font-weight: 700; }

.standalone-page { min-height: 430px; padding: 32px 20px 24px; border-top: 1px solid var(--faint); background: var(--surface); }
.page-symbol { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 21px; border-radius: 15px; background: var(--ink); color: white; }
.page-symbol svg { width: 31px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.recharge-symbol { background: var(--signal); }
.standalone-page > h2 { margin: 0 0 8px; font-size: 31px; line-height: 1.05; letter-spacing: -.035em; }
.standalone-page > p { max-width: 36em; margin: 0 0 25px; color: var(--muted); font-size: 13px; line-height: 1.6; }
#recharge-feedback { margin-top: 12px; }
.amount-fieldset { margin: 0 0 18px; padding: 0; border: 0; }
.amount-fieldset legend { margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.amount-input-wrap { position: relative; display: grid; align-items: center; min-height: 70px; padding: 8px 14px; border: 1px solid #9aabb5; border-radius: 14px; background: var(--surface); }
.amount-input-wrap:focus-within { border-color: var(--signal); box-shadow: 0 7px 22px rgba(0, 71, 179, .12); }
.amount-input-wrap span { position: absolute; inset-inline-end: 14px; color: var(--signal-deep); font-size: 13px; font-weight: 750; }
.amount-input-wrap input { box-sizing: border-box; min-width: 0; width: 100%; padding: 0 58px; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 31px; font-weight: 750; line-height: 1.65; letter-spacing: -.025em; text-align: center; font-variant-numeric: tabular-nums; }
.amount-input-wrap input::placeholder { color: #697985; }
.field-hint, .field-error { margin: 7px 1px 12px; font-size: 11px; line-height: 1.45; }
.field-hint { color: var(--muted); }
.field-error { color: var(--danger); }
.amount-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.amount-option { min-width: 0; min-height: 42px; padding: 7px 4px; border: 1px solid #bdc8cf; border-radius: 11px; background: var(--paper); font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; }
.amount-option:hover:not(.active) { border-color: var(--ink); }
.amount-option.active { border-color: var(--signal); background: var(--signal); color: white; }
.recharge-order { margin-top: 18px; }
.recharge-order h3 { margin: 0 0 5px; font-size: 18px; }
.recharge-order > p { margin: 0 0 17px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.payment-readout { margin: 0; border-top: 1px solid #9aabb5; }
.payment-readout > div { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--faint); }
.payment-readout dt, .payment-readout dd { margin: 0; }
.payment-readout dt { color: var(--muted); font-size: 11px; }
.payment-readout dd { min-width: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.payment-readout .exact-amount { color: var(--signal-deep); font-size: 19px; }
.inline-copy { min-height: 34px; padding: 5px 9px; border: 1px solid #aebbc3; border-radius: 9px; background: var(--surface); color: var(--signal-deep); font-size: 11px; font-weight: 700; }
.payment-warning { margin: 14px 0; padding: 12px 13px; border-radius: 12px; background: #fff0df; color: #713600; font-size: 12px; line-height: 1.55; }
.payment-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.payment-actions button { min-height: 45px; }
.account-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.account-page-head h2 { margin: 0; font-size: 31px; line-height: 1.05; letter-spacing: -.035em; }
.account-page-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.quiet-button { min-height: 38px; padding: 7px 12px; border: 1px solid #aebbc3; border-radius: 10px; background: transparent; color: var(--signal-deep); font-size: 12px; font-weight: 700; }
.account-loading { padding: 40px 0; color: var(--muted); font-size: 13px; text-align: center; }
.profile-readout { display: grid; grid-template-columns: 88px minmax(0, 1fr); border-top: 1px solid #9aabb5; }
.profile-readout dt, .profile-readout dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--faint); font-size: 13px; }
.profile-readout dt { color: var(--muted); }
.profile-readout dd { overflow-wrap: anywhere; font-weight: 650; }
.account-service-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: 100%; margin-top: 28px; padding: 15px 0; border: 0; border-top: 1px solid #aebbc3; border-bottom: 1px solid var(--faint); background: transparent; color: var(--ink); text-align: left; }
.service-row-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--signal-pale); color: var(--signal-deep); }
.service-row-icon svg, .service-row-arrow { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service-row-icon svg { width: 22px; }
.account-service-row > span:nth-child(2) { min-width: 0; }
.account-service-row strong, .account-service-row small { display: block; }
.account-service-row strong { font-size: 15px; }
.account-service-row small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.service-row-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.service-row-arrow { width: 19px; color: var(--muted); }
.account-service-row:hover { background: var(--signal-pale); }
.order-history-page { padding-top: 24px; }
.subpage-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 22px; }
.subpage-head h2 { margin: 0; font-size: 27px; line-height: 1.08; letter-spacing: -.03em; }
.subpage-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.subpage-back { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #aebbc3; border-radius: 12px; background: var(--surface); color: var(--ink); }
.subpage-back svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.history-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 14px; padding: 4px; border: 1px solid #c5cfd5; border-radius: 13px; background: var(--paper); }
.history-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 40px; padding: 7px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.history-tabs button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.history-tabs button.active { background: var(--signal-pale); color: var(--signal-deep); }
.order-search { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; min-height: 48px; margin-bottom: 16px; padding: 0 13px; border: 1px solid #aebbc3; border-radius: 12px; background: var(--paper); }
.order-search:focus-within { border-color: var(--signal); box-shadow: 0 7px 22px rgba(0, 71, 179, .1); }
.order-search svg { width: 21px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.order-search input { min-width: 0; width: 100%; min-height: 46px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; }
.order-search input::placeholder { color: #687984; }
.account-orders { display: grid; }
.account-order { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; width: 100%; padding: 15px 0; border: 0; border-bottom: 1px solid var(--faint); background: transparent; text-align: left; }
.account-order strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.account-order .order-status { color: var(--signal-deep); font-size: 11px; font-weight: 750; }
.account-order small { color: var(--muted); font-size: 11px; }
.account-order .order-id { grid-column: 1 / -1; overflow: hidden; color: #52636d; font-size: 10px; letter-spacing: .035em; text-overflow: ellipsis; white-space: nowrap; }
.history-record { min-width: 0; padding: 15px 0; border-bottom: 1px solid var(--faint); }
.history-record:first-child { border-top: 1px solid #aebbc3; }
.history-record > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.history-record strong { min-width: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.history-record small, .history-reference { display: block; overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.history-reference { color: #52636d; font-size: 10px; letter-spacing: .025em; }
.flow-amount { flex: 0 0 auto; font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; }
.flow-amount.negative { color: var(--danger); }
.flow-amount.positive { color: var(--success); }
.orders-empty { display: grid; justify-items: center; min-height: 278px; padding: 54px 18px; border-top: 1px solid #aebbc3; border-bottom: 1px solid var(--faint); text-align: center; }
.orders-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 20px; border-radius: 16px; background: var(--signal-pale); color: var(--signal-deep); }
.orders-empty-icon svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.orders-empty h3 { align-self: end; margin: 0 0 7px; font-size: 18px; }
.orders-empty p { align-self: start; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.orders-empty.compact { min-height: 180px; padding-top: 48px; }
.admin-page { padding-top: 24px; }
.admin-note { margin-bottom: 14px; padding: 12px 13px; border-radius: 12px; background: #edf4ff; color: #173b6c; font-size: 12px; line-height: 1.55; }
.admin-products { display: grid; }
.admin-product { padding: 17px 0; border-bottom: 1px solid #b8c4cb; }
.admin-product:first-child { border-top: 1px solid #9aabb5; }
.admin-product-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-product-head > span:first-child { min-width: 0; }
.admin-product-head strong, .admin-product-head small { display: block; }
.admin-product-head strong { font-size: 15px; line-height: 1.35; }
.admin-product-head small { margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10px; letter-spacing: .025em; text-overflow: ellipsis; white-space: nowrap; }
.pricing-state { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: #e8edef; color: #42545f; font-size: 10px; font-weight: 750; }
.pricing-state.custom { background: var(--signal-pale); color: var(--signal-deep); }
.price-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.price-editor > label { display: grid; gap: 6px; min-width: 0; }
.price-editor label > span:first-child { color: var(--muted); font-size: 11px; font-weight: 650; }
.price-editor output, .admin-price-input { display: flex; align-items: center; min-height: 46px; padding: 0 11px; border: 1px solid #b4c0c7; border-radius: 11px; background: var(--paper); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.admin-price-input:focus-within { border-color: var(--signal); box-shadow: 0 7px 22px rgba(0, 71, 179, .1); }
.admin-price-input input { min-width: 0; width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; }
.admin-price-input b { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.admin-product-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; margin-top: 10px; }
.admin-product-actions button { min-height: 42px; border-radius: 11px; font-size: 12px; font-weight: 750; }
.admin-product-actions button:disabled { opacity: .45; cursor: not-allowed; }
.save-price { border: 0; background: var(--signal); color: white; }
.save-price:disabled { background: #8798a2; }
.admin-product-feedback { min-height: 0; margin: 8px 0 0; color: var(--success); font-size: 11px; }
.admin-product-feedback:empty { margin: 0; }
.admin-product-feedback.error { color: var(--danger); }
.tab-bar { position: fixed; z-index: 18; right: 0; bottom: 0; left: 0; display: grid; width: 100%; max-width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 7px max(12px, calc((100vw - 760px) / 2)) calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid #cbd4d9; background: rgba(255, 255, 255, .97); box-shadow: 0 -8px 24px rgba(17, 25, 31, .07); transition: opacity .16s ease-out, transform .16s ease-out; }
.tab-item { display: grid; place-items: center; gap: 3px; min-height: 53px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.tab-item svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.tab-item.active { color: var(--signal-deep); }
.tab-item.active svg { stroke-width: 2.15; }
.tab-item:hover { background: var(--signal-pale); }

.catalog { padding: 22px 20px 0; }
.catalog-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 9px; border-bottom: 1px solid #aebbc3; }
.catalog-head h2 { margin: 0; font-size: 14px; letter-spacing: .02em; }
.catalog-head span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.plans { display: grid; }
.plan { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; width: 100%; min-height: 122px; padding: 17px 0; border: 0; border-bottom: 1px solid #c7d1d7; background: transparent; text-align: left; cursor: pointer; }
.plan:hover { background: rgba(255, 255, 255, .55); }
.plan:active { background: var(--signal-pale); }
.plan h3 { grid-column: 1 / -1; margin: 0; font-size: 17px; line-height: 1.28; letter-spacing: -.015em; }
.plan-price { grid-column: 2; grid-row: 2; align-self: end; text-align: right; color: var(--signal-deep); font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; }
.plan-price small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 500; }
.plan-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; grid-column: 1; grid-row: 2; color: var(--muted); font-size: 12px; }
.plan-meta strong { color: var(--ink); font-weight: 650; }
.plan-code { grid-column: 1 / -1; color: #52636d; font-size: 10px; letter-spacing: .06em; }

.notice { margin-bottom: 12px; padding: 12px 14px; border-radius: 12px; background: #fff0df; color: #713600; font-size: 13px; line-height: 1.5; }
.empty { padding: 54px 24px; text-align: center; }
.empty svg { width: 54px; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.empty h3 { margin: 14px 0 5px; font-size: 16px; }
.empty p { margin: 0; color: var(--muted); font-size: 13px; }
.skeleton { height: 110px; border-bottom: 1px solid #c7d1d7; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.8) 42%, transparent 64%); background-size: 240% 100%; animation: scan 1.3s ease-in-out infinite; }
@keyframes scan { to { background-position: -160% 0; } }

.backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(9, 18, 24, .46); opacity: 0; transition: opacity .24s ease-out; }
.backdrop.visible { opacity: 1; }
.sheet { position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; max-height: 91vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 10px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--surface); box-shadow: 0 -18px 45px rgba(17, 25, 31, .2); transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.sheet.visible { transform: translateY(0); }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 8px; border-radius: 2px; background: #c2cbd0; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto; border: 0; border-radius: 50%; background: #edf1f3; }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sheet h2 { margin: 0; font-size: 27px; line-height: 1.1; letter-spacing: -.03em; }
.detail-price { margin: 17px 0 23px; color: var(--signal-deep); font-size: 28px; font-weight: 800; }
.detail-price small { color: var(--muted); font-size: 12px; font-weight: 500; }
.readout { display: grid; grid-template-columns: 110px 1fr; gap: 0; margin: 0 0 22px; border-top: 1px solid #9aabb5; }
.readout dt, .readout dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--faint); font-size: 13px; line-height: 1.45; }
.readout dt { color: var(--muted); }
.readout dd { color: var(--ink); font-weight: 560; }
.explain { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: #edf4ff; color: #173b6c; font-size: 12px; line-height: 1.55; }
.buy-button { width: 100%; min-height: 54px; border: 0; border-radius: var(--radius); background: var(--signal); color: white; font-weight: 750; box-shadow: 0 8px 22px rgba(0, 80, 190, .22); }
.buy-button:disabled { background: #9aa8b0; box-shadow: none; cursor: not-allowed; }
.confirm-box { margin-top: 16px; padding: 15px; border-radius: var(--radius); background: #fff5e7; }
.confirm-box p { margin: 0 0 12px; color: #663500; font-size: 13px; line-height: 1.5; }
.confirm-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(9, 18, 24, .58); opacity: 0; transition: opacity .18s ease-out; }
.confirm-backdrop.visible { opacity: 1; }
.confirm-dialog { position: fixed; z-index: 31; top: 50%; left: 50%; width: min(calc(100vw - 40px), 420px); max-height: min(78vh, 560px); overflow-y: auto; padding: 22px; border-radius: 16px; background: var(--surface); box-shadow: 0 18px 48px rgba(17, 25, 31, .26); opacity: 0; transform: translate(-50%, calc(-50% + 14px)) scale(.98); transition: opacity .18s ease-out, transform .18s cubic-bezier(.2,.8,.2,1); }
.confirm-dialog.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.confirmation-open .sheet { overflow: hidden; overscroll-behavior: none; touch-action: none; pointer-events: none; }
.confirmation-open .confirm-dialog { overscroll-behavior: contain; touch-action: manipulation; }
.confirm-dialog h2 { margin: 0 0 10px; font-size: 21px; line-height: 1.2; letter-spacing: -.02em; }
.confirm-dialog p { margin: 0 0 18px; color: #663500; font-size: 13px; line-height: 1.6; }

.premium-page { padding-bottom: 132px; }
.premium-availability { padding: 6px 9px; border-radius: 999px; background: #e5f4ec; color: #17603c; font-size: 11px; font-weight: 750; white-space: nowrap; }
.premium-block { margin-top: 14px; padding: 16px; border: 1px solid var(--faint); border-radius: var(--radius); background: var(--paper); }
.field-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.field-heading strong { font-size: 14px; }
.field-heading span { color: var(--muted); font-size: 11px; }
.premium-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.premium-plan { min-width: 0; padding: 13px 6px; border: 1px solid var(--faint); border-radius: 11px; background: var(--surface); color: var(--ink); text-align: left; }
.premium-plan strong, .premium-plan span { display: block; }
.premium-plan strong { font-size: 13px; }
.premium-plan span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.premium-plan.active { border-color: var(--signal); background: var(--signal-pale); box-shadow: inset 0 0 0 1px var(--signal); }
.premium-plan.active span { color: var(--signal); font-weight: 700; }
#premium-usernames { box-sizing: border-box; width: 100%; min-height: 142px; resize: none; padding: 13px; border: 1px solid var(--faint); border-radius: 11px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.5; outline: none; }
#premium-usernames:focus { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(0, 96, 190, .1); }
.field-help { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.premium-result { margin-top: 12px; }
.premium-confirm, .premium-outcome { padding: 14px; border-radius: var(--radius); background: #fff5e7; color: #663500; }
.premium-confirm strong, .premium-outcome > strong { font-size: 13px; }
.premium-confirm p, .premium-outcome p { margin: 7px 0 0; font-size: 12px; line-height: 1.5; }
.premium-outcome.success { background: #e8f5ee; color: #165e3b; }
.premium-outcome.failed, .premium-outcome.partial { background: #fff0ee; color: #81291f; }
.premium-outcome p { display: flex; justify-content: space-between; gap: 12px; }
.premium-outcome p b { text-align: right; font-weight: 700; }
.premium-outcome small { display: block; margin-top: 10px; opacity: .75; }
.premium-checkout { position: fixed; z-index: 8; right: env(safe-area-inset-right); bottom: calc(67px + env(safe-area-inset-bottom)); left: env(safe-area-inset-left); display: grid; width: auto; max-width: 520px; grid-template-columns: minmax(0, 1fr) minmax(140px, 48%); align-items: center; gap: 14px; margin: auto; padding: 12px 20px; border-top: 1px solid var(--faint); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); transition: opacity .16s ease-out, transform .16s ease-out; }
.premium-checkout > div span, .premium-checkout > div strong { display: block; }
.premium-checkout > div span { color: var(--muted); font-size: 11px; }
.premium-checkout > div strong { margin-top: 3px; font-size: 20px; }
.premium-checkout > div small { font-size: 11px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.recovery-actions { display: grid; grid-template-columns: 1fr; gap: 9px; }
.recovery-actions .buy-button { min-height: 50px; }
.secondary-button, .danger-button { min-height: 45px; border-radius: 12px; font-weight: 700; }
.secondary-button { border: 1px solid #a9b5bc; background: white; }
.danger-button { border: 0; background: var(--danger); color: white; }
.result-state { text-align: center; padding: 4px 0 14px; }
.result-state .state-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 50%; background: #dff6ec; color: var(--success); font-size: 28px; font-weight: 800; }
.state-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.result-state h2 { font-size: 25px; }
.result-state p { color: var(--muted); font-size: 13px; }
.qr { display: block; width: min(72vw, 280px); margin: 18px auto; image-rendering: pixelated; }
.credential { margin-top: 12px; padding: 13px; border-radius: 12px; background: #edf1f3; }
.credential span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.credential code { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; line-height: 1.5; user-select: all; }
.copy-button { width: 100%; min-height: 45px; margin-top: 8px; border: 1px solid #9eacb5; border-radius: 12px; background: white; font-weight: 700; }
.tool-intro { margin-bottom: 19px; }
.tool-intro h2 { margin-bottom: 7px; }
.tool-intro p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.tool-form label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 650; }
.tool-input { width: 100%; min-height: 50px; padding: 12px 13px; border: 1px solid #9eacb5; border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 16px; }
.tool-hint { margin: 7px 0 15px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.tool-error { margin: 12px 0 0; padding: 11px 12px; border-radius: 12px; background: #fde7e5; color: #75211c; font-size: 12px; line-height: 1.5; }
.usage-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 2px 0 12px; }
.usage-summary strong { font-size: 18px; }
.status-badge { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: #dff6ec; color: #075f43; font-size: 11px; font-weight: 700; }
.usage-meter { width: 100%; height: 9px; overflow: hidden; border: 0; border-radius: 999px; background: var(--faint); }
.usage-meter::-webkit-progress-bar { background: var(--faint); }
.usage-meter::-webkit-progress-value { background: var(--signal); }
.usage-meter::-moz-progress-bar { background: var(--signal); }
.usage-numbers { display: flex; justify-content: space-between; margin: 7px 0 20px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.renew-status { margin: 0 0 15px; padding: 12px 13px; border-radius: 12px; background: #fff0df; color: #713600; font-size: 12px; line-height: 1.55; }
.renew-packages { display: grid; gap: 8px; }
.renew-package { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 15px; align-items: center; width: 100%; min-height: 62px; padding: 11px 12px; border: 1px solid var(--faint); border-radius: 12px; background: var(--paper); text-align: left; }
.renew-package:hover { border-color: var(--signal); }
.renew-package strong { font-size: 13px; line-height: 1.35; }
.renew-package span { color: var(--signal-deep); font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.renew-package small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.spinner { display: inline-block; width: 17px; height: 17px; margin-right: 8px; border: 2px solid rgba(255,255,255,.45); border-top-color: white; border-radius: 50%; vertical-align: -3px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; z-index: 40; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); max-width: calc(100vw - 40px); padding: 11px 16px; border-radius: 12px; background: var(--ink); color: white; font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .2s ease-out; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

.keyboard-open .tab-bar,
.keyboard-open .premium-checkout { opacity: 0; pointer-events: none; transform: translateY(110%); }

@media (min-width: 720px) {
  #app { max-width: 760px; margin: 0 auto; }
  .sheet { left: 50%; right: auto; width: 520px; border-radius: 18px 18px 0 0; transform: translate(-50%, 105%); }
  .sheet.visible { transform: translate(-50%, 0); }
  .plans { grid-template-columns: 1fr 1fr; column-gap: 28px; }
}

@media (max-width: 420px) {
  .amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
