:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --line: #e5e7eb;
  --muted: #6b7280;
  --text: #1f2937;
  --label: #374151;
  --secondary-text: #4b5563;
  --subtle-text: #737d8b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --button-bg: #2563eb;
  --button-hover: #1d4ed8;
  --control-border: #d1d5db;
  --selected-border: #6b98f2;
  --selected-bg: #f8fbff;
  --surface-hover: #f9fafb;
  --surface-muted: #f8fafc;
  --icon-bg: #f3f4f6;
  --tg-icon-bg: #eff8ff;
  --blue-bg: #eff6ff;
  --blue-line: #dbeafe;
  --green-text: #15803d;
  --green-bg: #f0fdf4;
  --green-line: #bbdfcb;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-line: #fecaca;
  --amber-text: #a16207;
  --amber-bg: #fffbeb;
  --amber-line: #fef3c7;
  --notice-text: #44628c;
  --toast-bg: #1f2937;
  --toast-text: #ffffff;
  --dialog-shadow: #0f172a24;
  --backdrop: #0f172a59;
  --gpt-logo-filter: brightness(0);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  color-scheme: light;
}

/* Native system fallback when JavaScript is unavailable. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #111827;
    --panel: #182233;
    --line: #334155;
    --muted: #a7b4c7;
    --text: #e5edf8;
    --label: #d5dfed;
    --secondary-text: #c4cfe0;
    --subtle-text: #a1aec1;
    --accent: #91b8ff;
    --accent-hover: #bad2ff;
    --control-border: #526077;
    --selected-border: #729fff;
    --selected-bg: #1c304b;
    --surface-hover: #223046;
    --surface-muted: #202c40;
    --icon-bg: #29354a;
    --tg-icon-bg: #17354d;
    --blue-bg: #1b3252;
    --blue-line: #37577e;
    --green-text: #86dfae;
    --green-bg: #183c32;
    --green-line: #346450;
    --red: #ff9b9b;
    --red-bg: #48292f;
    --red-line: #89515e;
    --amber-text: #f5cf81;
    --amber-bg: #413620;
    --amber-line: #71603b;
    --notice-text: #bed5fa;
    --toast-bg: #e5edf8;
    --toast-text: #182233;
    --dialog-shadow: #00000066;
    --backdrop: #02061799;
    --gpt-logo-filter: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111827;
  --panel: #182233;
  --line: #334155;
  --muted: #a7b4c7;
  --text: #e5edf8;
  --label: #d5dfed;
  --secondary-text: #c4cfe0;
  --subtle-text: #a1aec1;
  --accent: #91b8ff;
  --accent-hover: #bad2ff;
  --control-border: #526077;
  --selected-border: #729fff;
  --selected-bg: #1c304b;
  --surface-hover: #223046;
  --surface-muted: #202c40;
  --icon-bg: #29354a;
  --tg-icon-bg: #17354d;
  --blue-bg: #1b3252;
  --blue-line: #37577e;
  --green-text: #86dfae;
  --green-bg: #183c32;
  --green-line: #346450;
  --red: #ff9b9b;
  --red-bg: #48292f;
  --red-line: #89515e;
  --amber-text: #f5cf81;
  --amber-bg: #413620;
  --amber-line: #71603b;
  --notice-text: #bed5fa;
  --toast-bg: #e5edf8;
  --toast-text: #182233;
  --dialog-shadow: #00000066;
  --backdrop: #02061799;
  --gpt-logo-filter: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; line-height: 1.65; font-size: 14px; background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--selected-border); box-shadow: 0 0 0 3px var(--blue-bg); }
::selection { background: var(--blue-line); }
.shell { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 32px; }
main.shell { min-height: 60vh; padding-bottom: 60px; }

.nav { height: 80px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 650; letter-spacing: .3px; white-space: nowrap; }
.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: linear-gradient(90deg, #2aabee 12%, #f59e0b 88%);
  -webkit-mask: url("/static/logos/lmshop-final.png?v=20261027-final") center / contain no-repeat;
  mask: url("/static/logos/lmshop-final.png?v=20261027-final") center / contain no-repeat;
}
.brand-name { color: var(--text); }
.brand-caption { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 9px; padding-left: 12px; border-left: 1px solid var(--line); letter-spacing: 0; }
.nav nav { display: flex; align-items: center; gap: 27px; color: var(--muted); font-size: 13px; }
.nav nav a.active, .nav nav a:hover { color: var(--accent); }
.nav .support-link { border: 1px solid var(--control-border); border-radius: 6px; padding: 7px 13px; color: var(--label); background: var(--panel); font: inherit; }
.nav .support-link:hover { background: var(--surface-hover); }
.theme-toggle { width: 34px; height: 34px; display: grid; place-items: center; flex-shrink: 0; padding: 7px; border: 1px solid var(--control-border); border-radius: 6px; background: var(--panel); color: var(--label); }
.theme-toggle:hover { background: var(--surface-hover); }
.theme-toggle svg { display: block; width: 18px; height: 18px; }
.theme-toggle .theme-sun, :root[data-theme="dark"] .theme-moon { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }

.hero { padding: 40px 0 30px; }
.hero h1, .page-heading h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.4; font-weight: 600; letter-spacing: -.5px; }
.hero p, .page-heading p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.9; }
.purchase-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 28px; align-items: start; }
.section-label { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.section-label h2 { font-size: 14px; font-weight: 600; margin: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.product-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.product-tabs.single-product { grid-template-columns: 1fr; }
.product-tab { position: relative; display: flex; align-items: center; gap: 10px; text-align: left; padding: 18px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); transition: border-color .15s, background .15s; }
.product-tab:hover { border-color: var(--selected-border); }
.product-tab.selected { border-color: var(--selected-border); background: var(--selected-bg); }
.product-icon { width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0; border-radius: 8px; background: var(--icon-bg); }
.product-icon img { display: block; width: 66%; height: 66%; object-fit: contain; }
.gpt-icon { background: var(--icon-bg); }
.gpt-icon img { filter: var(--gpt-logo-filter); }
.tg-icon { background: var(--tg-icon-bg); }
.stars-icon { background: var(--amber-bg); }
.stars-badge { color: var(--amber-text); background: var(--amber-bg); border-color: var(--amber-line); }
.periods.stars-periods { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stars-custom-input { margin-bottom: 18px; }
.stars-custom-input .field-error:empty { margin: 0; }
.stars-settings-heading { padding-top: 28px; }
.stars-pricing-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.stars-pricing-settings label { margin: 0; }
.stars-pricing-settings input { margin-top: 6px; }
.stars-settings-price { color: var(--accent); font-weight: 600; font-size: 14px; }
.product-tab strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.45; }
.product-tab small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.tab-check { position: absolute; right: 8px; top: 8px; width: 11px; height: 11px; border: 1px solid var(--control-border); border-radius: 50%; }
.selected .tab-check { border: 3px solid var(--accent); background: var(--panel); }
.membership-panel { padding: 26px; }
.product-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-heading h2 { font-size: 20px; font-weight: 600; margin: 0; line-height: 1.5; }
.muted { font-size: 12px; color: var(--muted); }
[role=tabpanel] > .muted { margin: 8px 0 15px; }
.badge { display: inline-flex; align-items: center; white-space: nowrap; border: 1px solid var(--line); background: var(--surface-hover); color: var(--muted); border-radius: 5px; font-size: 10px; padding: 3px 8px; line-height: 1.6; }
.badge.green { color: var(--green-text); background: var(--green-bg); border-color: var(--green-line); }
.badge.purple { color: var(--accent); background: var(--blue-bg); border-color: var(--blue-line); }
.features { display: flex; flex-wrap: wrap; gap: 0; color: var(--muted); font-size: 11px; margin: 16px 0 20px; }
.features span + span::before { content: "·"; margin: 0 12px; color: var(--control-border); }
.duration { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--surface-hover); border-radius: 7px; padding: 13px 15px; font-size: 13px; }
.duration small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.duration strong { font-size: 21px; font-weight: 600; white-space: nowrap; }
.duration strong small { display: inline; font-weight: 400; }
.tutorial { padding: 16px 0; border-bottom: 1px solid var(--line); }
.tutorial summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 11px; color: var(--secondary-text); }
.tutorial summary::-webkit-details-marker { display: none; }
.tutorial summary span:last-child { color: var(--accent); white-space: nowrap; font-size: 10px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.guide-grid img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 6px; }
.guide-grid b { display: block; margin: 10px 0 6px; font-size: 10px; font-weight: 600; }
.guide-grid p { color: var(--muted); font-size: 10px; margin: 0; line-height: 1.9; overflow-wrap: anywhere; }
.form-divider { margin: 24px 0 20px; }
.form-divider h2 { font-size: 14px; font-weight: 600; margin: 0; }
label { display: block; font-size: 12px; font-weight: 500; color: var(--label); margin-bottom: 8px; }
.required { color: var(--red); }
input:not([type=radio]):not([type=checkbox]):not([type=hidden]), textarea, select { width: 100%; border: 1px solid var(--control-border); background: var(--panel); color: var(--text); padding: 11px 12px; border-radius: 6px; font-size: 13px; line-height: 1.65; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: var(--subtle-text); font-size: 11px; }
.input-wrap { position: relative; }
.input-wrap input { padding-left: 34px !important; }
.input-icon { position: absolute; left: 12px; top: 10px; color: var(--subtle-text); font-size: 15px; }
.hint { color: var(--muted); font-size: 10px; line-height: 1.85; margin: 8px 0 0; }
.field-error { color: var(--red); font-size: 11px; line-height: 1.8; margin: 6px 0 16px; }
.field-error:empty { margin: 0 0 19px; }
.invalid { border-color: var(--red-line) !important; }
.payment-label { margin-top: 23px; }
.payment-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.payment-choice { position: relative; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 6px; padding: 12px; cursor: pointer; margin: 0; font-size: 12px; font-weight: 400; }
.payment-choice:has(input:checked) { border-color: var(--selected-border); background: var(--selected-bg); }
.payment-choice input { position: absolute; opacity: 0; }
.payment-choice:focus-within { outline: 2px solid var(--selected-border); outline-offset: 2px; }
.pay-logo { width: 24px; height: 24px; display: grid; place-items: center; flex-shrink: 0; }
.pay-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.radio-mark { width: 13px; height: 13px; border: 1px solid var(--control-border); border-radius: 50%; margin-left: auto; }
.payment-choice:has(input:checked) .radio-mark { border: 4px solid var(--accent); background: var(--panel); }
.agreement { display: flex; align-items: flex-start; gap: 8px; font-size: 10px; font-weight: 400; color: var(--muted); line-height: 1.9; margin: 20px 0 0; }
.agreement input { accent-color: var(--accent); margin: 4px 0 0; flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 16px; border-radius: 6px; border: 1px solid transparent; font-size: 12px; font-weight: 500; line-height: 1.6; white-space: nowrap; transition: background .15s, border-color .15s; }
.primary { background: var(--button-bg); color: #fff; }
.primary:hover:not(:disabled) { background: var(--button-hover); }
.secondary { background: var(--panel); border-color: var(--control-border); color: var(--label); }
.secondary:hover { background: var(--surface-hover); }
.danger { background: var(--panel); border-color: var(--red-line); color: var(--red); }
.danger:hover { background: var(--red-bg); }
.full { width: 100%; }
.text-button { border: none; background: none; padding: 6px 0; margin-right: 12px; color: var(--accent); font-size: 11px; cursor: pointer; }
.text-button:hover { color: var(--accent-hover); }
.text-center { text-align: center; }
.accent { color: var(--accent) !important; }
.summary-column { position: sticky; top: 25px; }
.order-summary { padding: 24px; }
.summary-item { display: flex; align-items: center; gap: 11px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.summary-item strong { display: block; font-size: 13px; font-weight: 600; }
.summary-item small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.summary-lines { padding: 13px 0 16px; border-bottom: 1px solid var(--line); }
.summary-lines > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; font-size: 11px; }
.summary-lines span { color: var(--muted); }
.summary-lines b { font-weight: 400; }
.summary-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 0; }
.summary-price > span { font-size: 12px; }
.summary-price > span small { display: block; font-size: 9px; color: var(--subtle-text); margin-top: 3px; }
.summary-price strong { font-size: 30px; line-height: 1; font-weight: 600; letter-spacing: -.6px; }
.summary-price strong small { font-size: 17px; margin-right: 3px; }
.order-summary .primary { width: 100%; padding: 12px; }
.summary-security { text-align: center; font-size: 10px; color: var(--subtle-text); margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.help-card { padding: 20px 2px 0; }
.help-card strong { font-size: 12px; font-weight: 500; }
.help-card p { font-size: 11px; line-height: 1.8; color: var(--muted); margin: 6px 0; }
.help-card .text-button { padding: 0; margin: 0; }
.periods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 18px; }
.period { padding: 16px 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--panel); }
.period.selected { border-color: var(--selected-border); background: var(--selected-bg); }
.period strong { display: block; font-size: 14px; font-weight: 600; }
.period span { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
.period.selected span { color: var(--accent); }
.period small { font-size: 10px; color: var(--red); }
.info-note { padding: 12px 14px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; font-size: 10px; color: var(--muted); line-height: 1.9; }
.verify-row { display: flex; gap: 8px; }
.verify-row .input-wrap { flex: 1; min-width: 0; }
.verify-row button { font-size: 11px; }
.profile { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--green-line); background: var(--green-bg); border-radius: 6px; margin-top: 12px; }
.profile img { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; }
.profile strong { font-size: 12px; font-weight: 500; }
.profile small { display: block; font-size: 10px; color: var(--muted); }
.verified-label { font-size: 9px; color: var(--green-text); margin-left: auto; }

.footer { padding-top: 24px; padding-bottom: 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--secondary-text); font-size: 11px; }
.footer .muted { font-size: 10px; }
.footer-separator { padding: 0 9px; color: var(--control-border); }
.footer-links { display: flex; align-items: center; gap: 23px; font-size: 11px; color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.footer p { width: 100%; font-size: 10px; color: var(--subtle-text); margin: 0; line-height: 1.8; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: 90vw; background: var(--toast-bg); color: var(--toast-text); padding: 12px 20px; border-radius: 7px; font-size: 12px; z-index: 10; box-shadow: 0 5px 20px #0001; }
.page-heading { padding: 40px 0 28px; }
.lookup-form { padding: 24px; }
.lookup-row { display: flex; gap: 12px; }
.lookup-row input { min-width: 0; flex: 1; }
.results-heading { display: flex; justify-content: space-between; align-items: center; margin: 30px 0 17px; }
.results-heading h2 { font-size: 15px; font-weight: 600; margin: 0; }
.results-heading a { font-size: 11px; color: var(--accent); }
.order-card, .admin-order { padding: 23px; margin-bottom: 17px; }
.order-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.mono { font: 11px "Cascadia Code", Consolas, monospace; overflow-wrap: anywhere; color: var(--muted); }
.status-PENDING { color: var(--amber-text); background: var(--amber-bg); border-color: var(--amber-line); }
.status-PAID { color: var(--accent); background: var(--blue-bg); border-color: var(--blue-line); }
.status-COMPLETED { color: var(--green-text); background: var(--green-bg); border-color: var(--green-line); }
.status-ISSUE { color: var(--red); background: var(--red-bg); border-color: var(--red-line); }
.order-card-main { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 0 20px; }
.order-card h3, .admin-order h3 { margin: 4px 0; font-size: 17px; font-weight: 600; }
.order-amount { font-size: 24px; font-weight: 600; white-space: nowrap; }
.progress { display: flex; align-items: center; gap: 14px; font-size: 11px; color: var(--subtle-text); padding: 12px 0; }
.progress i { height: 1px; background: var(--line); flex: 1; }
.progress .done { color: var(--accent); }
.seller-note { background: var(--surface-muted); border-radius: 6px; padding: 13px 15px; font-size: 11px; margin-top: 12px; }
.seller-note strong { font-weight: 500; }
.seller-note p { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); margin: 6px 0 0; }
.order-actions { display: flex; gap: 10px; }
.order-actions:not(:empty) { margin-top: 16px; }
.empty-state { text-align: center; padding: 50px 20px; margin-bottom: 30px; background: var(--surface-hover); }
.empty-state > span { color: var(--subtle-text); font-size: 26px; }
.empty-state h3 { font-size: 15px; font-weight: 500; margin: 12px 0 8px; }
.empty-state p { color: var(--muted); font-size: 11px; margin: 0; }
.pagination { display: flex; justify-content: flex-end; gap: 12px; margin: 25px 0 0; }
.notice { border: 1px solid var(--blue-line); border-radius: 7px; background: var(--selected-bg); padding: 13px 17px; color: var(--notice-text); font-size: 11px; margin: 18px 0; line-height: 1.9; }

.login-container { display: flex; justify-content: center; padding: 70px 0 40px; }
.login-panel { width: 420px; max-width: 100%; padding: 32px; }
.login-panel h1 { font-size: 25px; font-weight: 600; margin: 0 0 8px; }
.login-panel > .muted { margin: 0; }
.login-panel form { margin: 26px 0 16px; }
.login-panel .button { margin-top: 24px; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 35px 0 22px; }
.admin-heading h1 { font-size: 26px; font-weight: 600; margin: 0; line-height: 1.5; }
.admin-nav { display: flex; gap: 30px; border-bottom: 1px solid var(--line); margin-bottom: 25px; font-size: 13px; }
.admin-nav a { color: var(--muted); padding: 8px 0 13px; }
.admin-nav .active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.stats-grid article { padding: 20px; }
.stats-grid article > span { color: var(--muted); font-size: 11px; }
.stats-grid strong { display: block; font-size: 28px; font-weight: 500; line-height: 1.4; margin-top: 12px; }
.stats-grid small { color: var(--muted); font-size: 11px; margin: 0 4px; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 18px; }
.filter-row h2 { margin: 0; font-size: 15px; font-weight: 600; }
.filter-row form { display: flex; gap: 9px; }
.filter-row select { width: 145px; padding: 8px 11px; font-size: 12px; }
.filter-row .button { padding: 8px 14px; }
.admin-order-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; padding: 19px 0; }
.mini-label { color: var(--muted); font-size: 11px; }
.contact-value { font-size: 12px; overflow-wrap: anywhere; margin: 6px 0; }
.target-value { display: block; font-size: 11px; overflow-wrap: anywhere; white-space: pre-wrap; max-height: 130px; overflow: auto; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 5px; padding: 10px; color: var(--secondary-text); }
.admin-note-form { padding-top: 15px; border-top: 1px solid var(--line); }
textarea { resize: vertical; }
.admin-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.settings-panel { padding: 25px; margin-bottom: 24px; }
.settings-panel h2 { font-size: 20px; font-weight: 600; margin: 0; }
.settings-row { display: grid; grid-template-columns: 1.5fr 1fr .7fr; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.settings-row strong { font-size: 13px; font-weight: 500; }
.settings-row > label { margin: 0; font-size: 10px; }
.settings-row input[type=number] { margin-top: 6px; }
.toggle { display: flex; align-items: center; gap: 8px; justify-self: end; }
.toggle input { accent-color: var(--accent); width: 15px; height: 15px; }
.settings-panel form > .button { margin-top: 22px; }
.connection-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.connection-row strong { font-size: 13px; font-weight: 500; }
.settings-panel > #test-tg { margin-top: 21px; }
.settings-panel > .info-note { margin-top: 21px; }
.payment-panel { max-width: 610px; margin: 60px auto 0; padding: 35px; text-align: center; }
.payment-panel h1 { font-size: 26px; font-weight: 600; margin: 0 0 12px; }
.eyebrow { color: var(--subtle-text); font-size: 12px; display: block; margin-bottom: 12px; }
.checkout-details { margin: 27px 0; text-align: left; border-top: 1px solid var(--line); }
.checkout-details > div { display: flex; justify-content: space-between; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.checkout-details span { color: var(--muted); white-space: nowrap; }
.checkout-details code { font-size: 11px; overflow-wrap: anywhere; }
.checkout-details strong { font-weight: 500; }
.error-actions { display: flex; justify-content: center; gap: 12px; margin-top: 26px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.dialog-open { overflow: hidden; }
.support-dialog { position: fixed; inset: 0; margin: auto; width: min(420px, calc(100% - 36px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 25px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 20px 70px var(--dialog-shadow); }
.support-dialog::backdrop { background: var(--backdrop); }
.support-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.support-dialog h2 { font-size: 21px; font-weight: 600; line-height: 1.5; margin: 0; }
.support-close { width: 28px; height: 28px; display: grid; place-items: center; border: none; border-radius: 5px; background: var(--icon-bg); color: var(--muted); font-size: 21px; line-height: 1; }
.support-close:hover { background: var(--line); }
.support-dialog > .muted { margin: 0; font-size: 11px; line-height: 1.9; }
.support-channels { display: grid; gap: 11px; margin: 22px 0 17px; }
.support-channel { display: flex; align-items: center; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); transition: border-color .15s, background .15s; }
.support-channel[href]:hover { border-color: var(--selected-border); background: var(--selected-bg); }
.support-channel img { display: block; flex-shrink: 0; object-fit: contain; }
.support-channel strong { display: block; font-size: 13px; font-weight: 500; }
.support-channel small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.support-arrow { margin-left: auto; color: var(--accent); font-size: 17px; }
.support-channel.unavailable { background: var(--surface-hover); }
.support-copy { justify-self: end; font-size: 10px; margin-top: -5px; }
.support-dialog > .hint { border-top: 1px solid var(--line); padding-top: 14px; }

@media (max-width: 1000px) {
  .shell { padding-left: 25px; padding-right: 25px; }
  .purchase-layout { grid-template-columns: minmax(0, 1fr) 285px; gap: 22px; }
  .product-tab { padding: 16px 11px; gap: 8px; }
  .product-tab strong { font-size: 11px; }
  .product-tab small { font-size: 9px; }
  .product-icon { width: 33px; height: 33px; }
  .membership-panel { padding: 22px; }
  .product-heading h2 { font-size: 19px; }
  .order-summary { padding: 21px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-grid article { display: grid; grid-template-columns: 115px 1fr; gap: 0 12px; }
  .guide-grid img { grid-row: span 2; }
  .guide-grid b { margin: 0 0 5px; }
  .stats-grid article { padding: 17px; }
}

@media (max-width: 800px) {
  .purchase-layout { grid-template-columns: 1fr; gap: 27px; }
  .summary-column { position: static; }
  .product-tab { padding: 18px; gap: 12px; }
  .product-tab strong { font-size: 13px; }
  .product-tab small { font-size: 10px; }
  .membership-panel { padding: 25px; }
  .summary-lines { padding: 10px 0; }
  .summary-price { padding: 20px 0; }
  .help-card { padding-top: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-order-grid { grid-template-columns: 1fr; gap: 20px; }
  .settings-row { grid-template-columns: 1.2fr .8fr .7fr; gap: 16px; }
  .brand-caption { display: none; }
}

@media (max-width: 520px) {
  .periods.stars-periods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stars-pricing-settings { grid-template-columns: 1fr; }
  .shell { padding-left: 18px; padding-right: 18px; }
  main.shell { padding-bottom: 36px; }
  .nav { height: 68px; }
  .brand { font-size: 15px; gap: 7px; }
  .brand-logo { width: 36px; height: 36px; }
  .nav nav { gap: 9px; font-size: 11px; }
  .theme-toggle { width: 30px; height: 30px; padding: 5px; }
  .nav .support-link { padding: 6px 8px; font-size: 10px; }
  .hero, .page-heading { padding: 28px 0 24px; }
  .hero h1, .page-heading h1 { font-size: 26px; margin-bottom: 10px; }
  .hero p, .page-heading p { font-size: 12px; line-height: 1.85; }
  .section-label h2 { font-size: 13px; }
  .product-tabs { gap: 9px; margin-bottom: 14px; }
  .product-tab { padding: 16px 10px; gap: 8px; align-items: flex-start; }
  .product-tab .product-icon { width: 29px; height: 29px; border-radius: 6px; }
  .product-tab strong { font-size: 10px; margin-top: 2px; letter-spacing: -.1px; }
  .product-tab small { font-size: 8px; line-height: 1.7; margin-top: 4px; }
  .tab-check { width: 9px; height: 9px; right: 6px; top: 6px; }
  .selected .tab-check { border-width: 2px; }
  .membership-panel { padding: 21px 17px; }
  .product-heading { gap: 8px; }
  .product-heading h2 { font-size: 19px; }
  .badge { font-size: 9px; padding: 3px 6px; }
  .muted { font-size: 11px; }
  .features { font-size: 10px; margin: 15px 0 18px; }
  .features span + span::before { margin: 0 9px; }
  .duration { padding: 12px; font-size: 12px; }
  .duration strong { font-size: 19px; }
  .duration small { font-size: 9px; }
  .tutorial summary { font-size: 10px; gap: 6px; }
  .tutorial summary span:last-child { font-size: 9px; }
  .guide-grid article { grid-template-columns: 100px 1fr; }
  .guide-grid p { font-size: 9px; }
  .guide-grid img { align-self: start; }
  .form-divider { margin: 22px 0 18px; }
  .form-divider h2 { font-size: 13px; }
  label { font-size: 12px; }
  input::placeholder { font-size: 10px; }
  .hint, .agreement { font-size: 9px; }
  .payment-choice { padding: 11px 10px; font-size: 11px; }
  .period { padding: 13px 6px; }
  .period strong { font-size: 13px; }
  .period span { font-size: 11px; }
  .verify-row .button { padding: 11px 10px; }
  .profile { gap: 8px; }
  .verified-label { font-size: 8px; }
  .footer { font-size: 10px; gap: 12px; padding-top: 21px; padding-bottom: 22px; }
  .footer .muted, .footer-separator { display: none; }
  .footer-links { font-size: 10px; gap: 18px; }
  .footer p { font-size: 9px; }
  .lookup-form { padding: 18px; }
  .lookup-row { flex-direction: column; gap: 10px; }
  .lookup-row .button { width: 100%; }
  .order-card, .admin-order { padding: 17px; }
  .order-card-head { align-items: flex-start; gap: 10px; }
  .mono { font-size: 9px; max-width: 75%; }
  .order-card-main { padding: 14px 0; }
  .order-card h3, .admin-order h3 { font-size: 15px; }
  .order-amount { font-size: 20px; }
  .progress { font-size: 9px; gap: 8px; }
  .order-card-main .hint { font-size: 8px; }
  .login-container { padding: 40px 0 15px; }
  .login-panel { padding: 25px 22px; }
  .login-panel h1 { font-size: 23px; }
  .admin-heading { padding-top: 27px; gap: 12px; }
  .admin-heading h1 { font-size: 22px; }
  .admin-heading .button { padding: 8px 10px; font-size: 10px; }
  .admin-nav { font-size: 12px; }
  .stats-grid { gap: 10px; }
  .stats-grid article { padding: 15px; }
  .stats-grid article > span { font-size: 10px; }
  .stats-grid strong { font-size: 24px; }
  .filter-row h2 { font-size: 14px; }
  .filter-row select { width: 120px; }
  .admin-actions { flex-wrap: wrap; }
  .admin-actions .button { font-size: 10px; padding: 9px 11px; }
  .settings-panel { padding: 20px 17px; }
  .settings-panel h2 { font-size: 18px; }
  .settings-row { grid-template-columns: 1fr 1fr; gap: 13px; }
  .settings-row > div { grid-column: span 2; }
  .settings-row .toggle { justify-self: start; align-self: end; padding-bottom: 11px; }
  .connection-row .hint { font-size: 8px; overflow-wrap: anywhere; }
  .payment-panel { margin-top: 35px; padding: 27px 20px; }
  .payment-panel h1 { font-size: 23px; }
  .checkout-details > div { font-size: 11px; gap: 10px; }
  .checkout-details code { font-size: 9px; max-width: 73%; }
  .error-actions { flex-direction: column; }
  .support-dialog { padding: 22px; }
  .support-dialog h2 { font-size: 20px; }
  .support-channel { padding: 14px; }
  .support-channel small { font-size: 9px; }
}

@media (max-width: 359px) {
  .nav { height: auto; min-height: 68px; flex-wrap: wrap; gap: 4px 10px; padding-top: 8px; padding-bottom: 8px; }
  .nav nav { gap: 7px; font-size: 10px; }
  .brand { font-size: 13px; gap: 5px; }
  .product-tab { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .product-tab .product-icon { width: 24px; height: 24px; }
  .product-tab strong { font-size: 9px; }
  .product-tab small { font-size: 7px; }
}

.epay-balance-panel { padding: clamp(16px, 3vw, 24px); margin-bottom: 22px; }
.epay-balance-panel h2 { margin: 0; font-size: 18px; }
.epay-balance-panel .connection-row { gap: 16px; flex-wrap: wrap; padding-top: 0; padding-bottom: 16px; }
.epay-balance-value { margin: 8px 0; font-size: 30px; color: var(--text); font-variant-numeric: tabular-nums; }
.epay-balance-value > span { font-size: 20px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
