:root {
  color-scheme: light dark;
  --bg: #fafafb;
  --panel: #fff;
  --wash: #f2f3f4;
  --line: #dedfe2;
  --ink: #262c35;
  --muted: #606974;
  --primary: #272d36;
  --on-primary: #fff;
  --clay: #b96e53;
  --error: #a63140;
  --red: #d74d59;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151a;
    --panel: #191e25;
    --wash: #232931;
    --line: #373e47;
    --ink: #e7ebef;
    --muted: #a5aeb9;
    --primary: #e7ebef;
    --on-primary: #242a31;
    --clay: #d99479;
    --error: #ff9aab;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .57; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }
.container { width: min(1112px, calc(100% - 80px)); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--line); }
.head-inner, .head-actions, .brand, .apk-link { display: flex; align-items: center; }
.head-inner { min-height: 76px; justify-content: space-between; gap: 20px; }
.brand { gap: 10px; font-size: 1.125rem; font-weight: 700; letter-spacing: -.05em; text-decoration: none; white-space: nowrap; }
.brand-product { color: var(--muted); font-weight: 440; }
.mark { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; gap: 2.5px; background: #292f38; border: 1px solid #444b54; border-radius: 10px; flex-shrink: 0; }
.mark i { width: 2.5px; height: 8px; border-radius: 3px; background: #f5f6f7; }
.mark i:nth-child(2) { height: 15px; }
.mark i:nth-child(3) { height: 22px; }
.mark i:nth-child(4) { height: 12px; }
.mark i:last-child { height: 6px; background: var(--red); }
.head-actions { gap: 16px; }
.apk-link { min-height: 40px; padding: 6px 14px; gap: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.download-icon { position: relative; height: 15px; width: 15px; border-bottom: 1.6px solid currentColor; }
.download-icon::before, .download-icon::after { content: ""; position: absolute; }
.download-icon::before { left: 7px; top: 0; height: 10px; border-left: 1.6px solid; }
.download-icon::after { top: 4px; left: 4px; width: 6px; height: 6px; border: solid; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
main { flex: 1; padding-block: clamp(36px, 5.7vw, 82px) 60px; }
.welcome-grid, .account-grid { display: grid; grid-template-columns: minmax(0,1.22fr) minmax(350px, .89fr); gap: clamp(40px, 7vw, 105px); align-items: center; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(3.12rem, 5.3vw, 4.9rem); line-height: .99; font-weight: 620; letter-spacing: -.063em; }
h2 { font-size: clamp(1.38rem, 2.4vw, 1.85rem); line-height: 1.15; font-weight: 620; letter-spacing: -.044em; }
.lead { font-size: clamp(1.02rem, 1.55vw, 1.19rem); line-height: 1.52; color: var(--muted); margin-top: 20px; max-width: 48ch; }
.wave-panel { border: 1px solid #3a4048; height: 142px; position: relative; overflow: hidden; margin-top: 28px; border-radius: 18px; color: #e8ebef; background-color: #272c35; background-image: radial-gradient(#464b53 0.7px, transparent 0.9px); background-size: 9px 9px; }
.wave-label { position: absolute; top: 11px; left: 15px; display: flex; align-items: center; gap: 7px; font-size: .75rem; font-weight: 550; color: #d2d5da; }
.wave-label i { width: 6px; height: 6px; border-radius: 50%; background: #ef8087; }
.wave-signal { position: absolute; left: 5%; right: 5%; top: 29px; bottom: 29px; display: flex; align-items: center; justify-content: space-around; gap: 2px; }
.wave-signal i { width: 3px; max-width: 1%; border-radius: 2px; background: #efa49b; }
.wave-signal i:nth-child(5n+3) { background: #ed8e91; }
.wave-signal i:nth-child(-n+13), .wave-signal i:nth-last-child(-n+11) { background: #b48887; }
.wave-signal i[data-height="0"] { height: 3%; min-height: 2px; }
.wave-signal i[data-height="1"] { height: 8%; }
.wave-signal i[data-height="2"] { height: 17%; }
.wave-signal i[data-height="3"] { height: 27%; }
.wave-signal i[data-height="4"] { height: 39%; }
.wave-signal i[data-height="5"] { height: 54%; }
.wave-signal i[data-height="6"] { height: 66%; }
.wave-signal i[data-height="7"] { height: 78%; }
.wave-signal i[data-height="8"] { height: 93%; }
.sample-dock { display: flex; align-items: center; justify-content: center; gap: 10px; position: absolute; left: 0; right: 0; bottom: 8px; }
.dock-line { width: 19px; height: 1px; background: #757a82; }
.mic-key { display: grid; place-items: center; height: 29px; width: 39px; background: #3b414a; border: 1px solid #545a63; border-radius: 9px; }
.mic { height: 12px; width: 9px; border: solid #eceef1; border-width: 0 1.5px 1.5px; border-radius: 0 0 8px 8px; position: relative; transform: scale(.94); }
.mic::before { content: ""; position: absolute; left: 1px; top: -1px; width: 4px; height: 9px; background: #eceef1; border-radius: 4px; }
.mic::after { content: ""; position: absolute; top: 11px; left: 2.5px; height: 3px; border-left: 1.5px solid #eceef1; }
.panel, .table-panel { border: 1px solid var(--line); background: var(--panel); border-radius: 21px; }
.panel { padding: clamp(23px, 3vw, 36px); }
.muted { color: var(--muted); }
.panel > .muted { margin-top: 9px; }
.mode-switch { display: flex; padding: 4px; gap: 2px; margin: 23px 0 19px; background: var(--wash); border-radius: 11px; }
.mode-switch button { flex: 1; min-height: 36px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--muted); font-size: .9rem; font-weight: 560; }
.mode-switch button[aria-pressed="true"] { color: var(--ink); background: var(--panel); border-color: var(--line); box-shadow: 0 1px 3px #171d2410; }
label { display: block; font-size: .9rem; font-weight: 580; margin: 14px 0 5px; }
input, textarea { display: block; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 10px 12px; }
input { height: 46px; }
input::placeholder { color: var(--muted); opacity: .85; }
textarea { resize: vertical; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border-radius: 10px; font-size: .94rem; font-weight: 600; border: 1px solid transparent; text-align: center; text-decoration: none; }
.primary { color: var(--on-primary); background: var(--primary); }
.primary:hover { filter: brightness(1.13); }
.secondary { color: var(--ink); background: var(--panel); border-color: var(--line); }
.secondary:hover, .apk-link:hover { background: var(--wash); }
form .primary { width: 100%; margin-top: 20px; }
.input-hint { margin: 5px 1px 0; color: var(--muted); font-size: .82rem; }
.feedback:not(:empty) { margin-top: 12px; font-size: .9rem; }
.error { color: var(--error); }
.text-button { background: transparent; color: var(--muted); padding: 8px 0; border: 0; font-size: .9rem; }
.text-button:hover, footer a:hover { color: var(--ink); text-decoration: underline; }
.plan-section { margin-top: clamp(40px, 5.5vw, 68px); padding-top: 24px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.section-heading h2 { font-size: 1.32rem; }
.section-heading > span { font-size: .9rem; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(172px,100%),1fr)); margin-top: 17px; gap: 12px; }
.plan-item { border-left: 2px solid var(--clay); padding: 1px 12px; min-width: 0; }
.plan-item:nth-child(3n+1) { border-color: var(--red); }
.plan-item .amount { font-size: 1.18rem; font-weight: 620; line-height: 1.3; letter-spacing: -.02em; }
.plan-item .resource { color: var(--muted); font-size: .875rem; margin-top: 3px; }
.page-title { margin-bottom: 32px; }
.page-title h1 { font-size: clamp(2.4rem, 4.3vw, 3.5rem); }
.page-title .lead { margin-top: 10px; overflow-wrap: anywhere; }
.account-grid { grid-template-columns: 1fr 1fr; align-items: start; gap: 22px; }
.account-grid .panel h2 { font-size: 1.43rem; }
.usage-list { padding: 0; margin: 22px 0 0; list-style: none; }
.usage-list li + li { margin-top: 19px; }
.usage-row, .key-button { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.usage-row { flex-wrap: wrap; gap: 2px 8px; }
.usage-row > span:first-child { font-weight: 570; }
.usage-amount { font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
progress { appearance: none; border: 0; display: block; width: 100%; height: 5px; margin-top: 8px; border-radius: 10px; color: var(--clay); background: var(--wash); }
progress::-webkit-progress-bar { border-radius: 10px; background: var(--wash); }
progress::-webkit-progress-value { border-radius: 10px; background: var(--clay); }
progress::-moz-progress-bar { border-radius: 10px; background: var(--clay); }
.profile-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
details { margin-top: 20px; border-top: 1px solid var(--line); }
summary { padding-top: 16px; font-size: .94rem; font-weight: 570; cursor: pointer; }
.key-list { margin-top: 8px; }
.key-button { width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.key-button span:last-child { font-size: .88rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.admin-signin { max-width: 415px; margin: auto; }
.admin-signin h1 { font-size: 2rem; margin-bottom: 24px; line-height: 1.12; }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: .94rem; }
th, td { padding: 14px 16px; text-align: left; vertical-align: top; }
th { font-size: .875rem; background: var(--wash); font-weight: 560; color: var(--muted); }
td { border-top: 1px solid var(--line); }
td small { display: block; color: var(--muted); font-size: .81rem; }
td .stat-line { font-size: .875rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding: 12px; }
.pager span { font-size: .88rem; }
.loading { color: var(--muted); }
#connection-message { margin-bottom: 16px; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 68px; padding-block: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
footer a { padding: 6px 0; text-decoration: none; }
@media (max-width: 800px) {
  .container { width: calc(100% - 44px); }
  .welcome-grid { gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(310px, .95fr); }
  .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .container { width: calc(100% - 36px); }
  .head-inner { min-height: 63px; gap: 8px; }
  .head-actions { gap: 8px; }
  .brand { font-size: 1rem; gap: 7px; }
  .mark { width: 31px; height: 31px; border-radius: 9px; }
  .apk-link { min-height: 36px; gap: 6px; padding-inline: 9px; }
  main { padding-block: 29px 38px; }
  .welcome-grid { display: flex; flex-direction: column; align-items: stretch; gap: 24px; }
  .intro h1 { font-size: clamp(2.75rem, 10.7vw, 3.75rem); }
  .intro h1 br { display: none; }

  .lead { margin-top: 12px; }
  .wave-panel { display: none; }
  .plan-section { margin-top: 28px; }
  .plan-grid { gap: 14px; }
  .page-title { margin-bottom: 20px; }
  .panel { border-radius: 16px; padding: 22px; }
  .profile-buttons > * { flex: 1 1 180px; }
}
@media (max-width: 400px) {
  body.signed-in .brand-product { display: none; }
}
@media (max-width: 355px) {
  .head-inner { width: calc(100% - 24px); }
  .head-actions { gap: 7px; }
  .apk-link { padding-inline: 8px; }
  body.signed-in .download-icon { display: none; }
}
@media (max-width: 650px) {
  .table-scroll table, .table-scroll tbody { display: block; }
  .table-scroll thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  .table-scroll tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 16px; white-space: normal; }
  .table-scroll tr + tr { border-top: 1px solid var(--line); }
  .table-scroll td { padding: 0; border: 0; overflow-wrap: anywhere; }
  .table-scroll td:first-child, .table-scroll td:nth-child(2), .table-scroll td:last-child { grid-column: 1 / -1; }
  .table-scroll td:first-child { font-weight: 600; font-size: 1.06rem; }
  .table-scroll td:first-child small { font-weight: 400; }
  .table-scroll td[data-label]::before { display: block; content: attr(data-label); font-size: .82rem; color: var(--muted); margin-bottom: 2px; }
  .table-scroll td:nth-child(2) small { display: inline; margin-left: 8px; }
  .table-scroll td:last-child { padding-top: 10px; border-top: 1px solid var(--line); }
}
.shop-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.shop-section .section-heading { flex-wrap: wrap; justify-content: flex-start; gap: 7px 14px; }
.shop-section .section-heading h2 { font-size: 1.6rem; }
.shop-section .test-label { font-size: .81rem; font-weight: 600; color: var(--ink); background: var(--wash); border: 1px solid var(--line); border-radius: 20px; padding: 3px 10px; }
.shop-intro { margin-top: 8px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(220px,100%),1fr)); gap: 13px; margin-top: 16px; }
.product { display: flex; flex-direction: column; gap: 12px; padding: 21px; border-radius: 16px; }
.product h3, .shop-subtitle { margin: 0; font-size: 1.1rem; letter-spacing: -.025em; }
.product p { font-size: .94rem; }
.product .product-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; font-variant-numeric: tabular-nums; }
.product-price strong { font-size: 1.22rem; }
.product-price del { color: var(--muted); }
.product button { align-self: flex-start; }
.product button[disabled].selected-plan { color: var(--muted); background: var(--wash); border-color: transparent; opacity: 1; }
.shop-subtitle { margin-top: 24px; }
.shop-subtitle + p { margin-top: 3px; font-size: .94rem; }
#retry-shop { margin-top: 12px; }
.order-history { margin-top: 24px; }
.order-history summary { width: fit-content; }
.order-history ul { padding: 0; margin: 12px 0 0; list-style: none; }
.order-history li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); padding: 10px 0; }
.order-history li span { display: block; }
.order-history time { font-size: .86rem; color: var(--muted); }
.order-history li strong { white-space: nowrap; }
#no-orders { margin-top: 10px; }
.cost-total { margin-top: 7px; font-size: .875rem; font-weight: 600; }
.model-costs { margin: 3px 0 0; border: 0; white-space: normal; }
.model-costs summary { width: fit-content; padding: 3px 0; font-size: .875rem; font-weight: 500; color: var(--muted); }
.model-costs ul { margin: 4px 0; padding: 0; list-style: none; max-width: 310px; }
.model-costs li { padding: 5px 0; border-top: 1px solid var(--line); font-size: .86rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.model-costs li strong { font-weight: 600; }
.model-costs li span { margin-left: 8px; white-space: nowrap; }

.price-period { font-size: .875rem; font-weight: 400; }
