:root {
  --paper: #f3f6f5;
  --surface: #fff;
  --ink: #20343a;
  --muted: #63767a;
  --line: #dce5e2;
  --teal: #0f6b62;
  --teal-dark: #0b534c;
  --teal-soft: #e8f3ef;
  --rail: #193d3f;
  --danger: #ac4237;
  --danger-soft: #fff1ef;
  --amber: #936324;
  --amber-soft: #fff7e8;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --display: Georgia, "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --mono: "Cascadia Code", Consolas, monospace;
  font-family: var(--sans);
  font-size: 17px;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #70b9a8; outline-offset: 3px; }
button, input, select, textarea { border-radius: 8px; }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 13px; color: var(--ink); background: white; border: 1px solid #c4d3cd; font-size: 18px; }
input::placeholder, textarea::placeholder { color: #83938f; font-size: 16px; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--teal); flex: 0 0 auto; }
label { display: block; font-size: 16px; font-weight: 600; }
label > input, label > select, label > textarea { margin-top: 8px; }
textarea { resize: vertical; min-height: 105px; }
svg { flex-shrink: 0; }
svg.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; font-weight: 650; letter-spacing: -.7px; }
h2 { font-size: 23px; line-height: 1.4; }
h3 { font-size: 18px; line-height: 1.5; }
p { line-height: 1.75; }
small { font-size: 14px; line-height: 1.65; }
[hidden] { display: none !important; }
.boot { display: grid; min-height: 100vh; place-items: center; }
.muted, .help { color: var(--muted); font-size: 15px; line-height: 1.7; }
.help { margin-top: 8px; }
.mono { font-family: var(--mono); }
.eyebrow { color: var(--muted); letter-spacing: .09em; font-size: 13px; margin-bottom: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.stack { display: grid; gap: 22px; align-content: start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.spaced { margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 10px 20px; border: 1px solid var(--line); background: white; color: var(--ink); font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover:not(:disabled) { background: var(--paper); border-color: #acc2ba; text-decoration: none; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: white; }
.btn.primary:hover:not(:disabled) { background: var(--teal-dark); }
.btn.soft { color: var(--teal); background: var(--teal-soft); border-color: var(--teal-soft); }
.btn.danger { color: var(--danger); border-color: #e8c9c4; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn.full { width: 100%; }
.text-btn { border: 0; padding: 5px 0; background: none; color: var(--teal); font-size: 15px; }
.icon-btn { width: 36px; height: 36px; padding: 7px; display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--teal-soft); color: var(--teal); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 9px; border-radius: 5px; background: var(--teal-soft); color: var(--teal); white-space: nowrap; font-weight: 600; }
.badge.grey { color: var(--muted); background: #edf1f0; }
.badge.warn { color: var(--amber); background: var(--amber-soft); }
.badge.error { color: var(--danger); background: var(--danger-soft); }
.note { padding: 13px 16px; border-radius: 8px; border: 1px solid var(--line); background: #f7faf8; font-size: 15px; color: var(--muted); line-height: 1.65; }
.note.warning { color: var(--amber); background: var(--amber-soft); border-color: #ebd8b1; }
.note.error { background: var(--danger-soft); color: var(--danger); border-color: #e7c6c2; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 25px; min-width: 0; }
.panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 21px; gap: 12px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.check { display: flex; align-items: flex-start; gap: 10px; line-height: 1.6; font-size: 15px; font-weight: 400; }
.check input { margin-top: 4px; }
.form-message { margin-top: 14px; color: var(--danger); font-size: 15px; line-height: 1.65; }
.field-row { display: flex; gap: 10px; align-items: stretch; }
.field-row > input { min-width: 0; }
.field-row > .btn { flex-shrink: 0; }

/* The fixed rail and independent document area keep the controls in reach. */
.shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); height: 100vh; overflow: hidden; }
.rail { background: var(--rail); color: #d3e2df; display: flex; flex-direction: column; height: 100vh; padding: 30px 18px 18px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 7px 35px; color: #f4faf6; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid #87ada4; border-radius: 8px; font-family: var(--display); font-size: 27px; }
.brand strong { display: block; font-size: 19px; letter-spacing: .03em; }
.brand small { display: block; color: #9bbab3; font-size: 11px; letter-spacing: .17em; margin-top: 4px; }
.nav { display: grid; gap: 6px; }
.nav button { min-height: 49px; background: transparent; color: #c5d8d3; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; text-align: left; font-size: 16px; }
.nav button:hover { background: #24494a; }
.nav button.active { color: #fff; background: #2b5957; box-shadow: inset 3px 0 #a9d3bf; }
.nav .nav-divider { margin: 14px 12px; border-top: 1px solid #365759; }
.rail-spacer { flex: 1; min-height: 32px; }
.credit-box { border: 1px solid #416260; padding: 17px; border-radius: 9px; margin: 0 5px 22px; }
.credit-box > p { font-size: 13px; color: #b3cdc4; }
.credit-number { font-size: 37px; line-height: 1; font-family: var(--mono); color: #f2f8f5; }
.credit-number small { font-family: var(--sans); font-size: 14px; margin-left: 8px; color: #b3cdc4; }
.credit-box .between { margin-top: 15px; margin-bottom: 13px; }
.credit-box a { color: #d6ece2; font-size: 14px; }
.credit-box .held { color: #abc4bc; font-size: 12px; }
.rail-user { display: flex; align-items: center; gap: 10px; padding: 14px 8px; border-top: 1px solid #355759; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #53746c; color: white; display: grid; place-items: center; font-size: 15px; flex-shrink: 0; }
.rail-email { min-width: 0; flex: 1; }
.rail-email strong { font-size: 13px; font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; }
.rail-email small { color: #9fbcb2; font-size: 12px; }
.rail .icon-btn { color: #b7d0c6; }
.main { overflow: auto; min-width: 0; scroll-behavior: smooth; }
.topbar { position: sticky; top: 0; z-index: 12; height: 88px; border-bottom: 1px solid var(--line); padding: 0 36px; background: #f3f6f5f7; display: flex; align-items: center; justify-content: space-between; backdrop-filter: blur(12px); }
.topbar .subheading { margin-top: 5px; color: var(--muted); font-size: 14px; }
.topbar h1 { font-size: 23px; }
.top-meta { text-align: right; font-size: 14px; color: var(--muted); }
.content { padding: 28px 36px 38px; max-width: 1770px; margin: 0 auto; }
.page-heading { margin-bottom: 27px; }
.page-heading h2 { margin-bottom: 8px; }
.work-grid { display: grid; grid-template-columns: minmax(360px, .78fr) minmax(0, 1.22fr); align-items: stretch; gap: 28px; }
.upload-zone { display: grid; justify-items: center; text-align: center; border: 1.5px dashed #9fbbb0; border-radius: 10px; background: #f7fbf8; padding: 27px 14px; gap: 11px; transition: background .15s; }
.upload-zone.dragging { background: #e2f1ea; border-color: var(--teal); }
.upload-zone > .icon { width: 34px; height: 34px; color: var(--teal); }
.upload-zone strong { font-size: 18px; }
.upload-zone p { font-size: 14px; color: var(--muted); }
.file-list { display: grid; margin-top: 14px; gap: 8px; max-height: 245px; overflow-y: auto; }
.file-row { display: flex; align-items: center; gap: 9px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 7px; }
.file-row.selected { border-color: #8ebbaa; background: #f5faf7; }
.file-row .file-info { flex: 1; min-width: 0; }
.file-name { display: block; color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 100%; border: 0; padding: 0; background: transparent; text-align: left; }
.file-info small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.model-strip { padding: 13px 15px; background: #f0f6f3; border-radius: 8px; margin-top: 14px; border-left: 3px solid #83aa9d; overflow-wrap: anywhere; }
.model-strip strong { display: block; font-size: 14px; font-weight: 600; font-family: var(--mono); }
.model-strip p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.settings-form { display: grid; gap: 20px; }
.settings-form .grid-2 { gap: 14px; }
details.advanced { padding-top: 17px; border-top: 1px solid var(--line); }
details.advanced summary { color: var(--muted); font-size: 15px; cursor: pointer; font-weight: 600; }
details.advanced[open] summary { margin-bottom: 18px; }
.advanced-fields { display: grid; gap: 18px; }
.start-bar { display: grid; gap: 14px; }
.cost-estimate { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; }
.cost-estimate strong { color: var(--ink); }
.start-bar .btn { min-height: 53px; font-size: 18px; }
.preview {
  height: 100%;
  min-height: calc(100vh - 180px);
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.preview-column { display: grid; min-height: 0; }
.preview-toolbar { padding: 17px 20px; border-bottom: 1px solid var(--line); }
.preview-toolbar h3 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 75%; }
.preview-tabs { display: flex; gap: 5px; background: #edf2ef; padding: 4px; border-radius: 7px; }
.preview-tabs button { border: 0; color: var(--muted); font-size: 13px; padding: 7px 12px; background: transparent; border-radius: 5px; }
.preview-tabs button.active { color: var(--teal); background: white; box-shadow: 0 1px 4px #193d3f0d; }
.preview-controls { padding: 10px 17px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.preview-canvas {
  background: #e8eeeb;
  min-height: 0;
  overflow: hidden;
  padding: 16px;
  position: relative;
}
.preview-image {
  position: absolute;
  left: 16px;
  top: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  object-fit: contain;
  box-shadow: 0 3px 17px #28473d14;
}
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; }
.pager-button { min-width: 104px; min-height: 38px; }
.page-state { min-width: 82px; text-align: center; font-family: var(--mono); font-size: 14px; color: var(--ink); }
.preview-empty { min-height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--muted); padding: 25px; }
.preview-empty > svg { width: 240px; height: 205px; margin-bottom: 27px; }
.preview-empty strong { color: var(--ink); font-size: 20px; margin-bottom: 10px; }
.preview-empty p { font-size: 14px; max-width: 295px; }
.preview-footer { padding: 13px 19px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: #fcfdfc; }
.progress { width: 100%; height: 6px; border: 0; border-radius: 5px; background: #dbe7e1; overflow: hidden; }
.progress::-webkit-progress-bar { background: #dbe7e1; border-radius: 5px; }
.progress::-webkit-progress-value { background: var(--teal); border-radius: 5px; transition: width .3s; }
.progress::-moz-progress-bar { background: var(--teal); }
.empty-state { padding: 50px 30px; text-align: center; color: var(--muted); }
.empty-state .icon { width: 35px; height: 35px; color: #85a296; margin-bottom: 15px; }
.empty-state h3 { color: var(--ink); margin-bottom: 8px; }
.empty-state p { font-size: 15px; margin-bottom: 19px; }

.task-list { display: grid; gap: 16px; }
.task { padding: 23px 25px; }
.task-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.task-name { max-width: 620px; word-break: break-all; font-size: 18px; margin-bottom: 8px; }
.task-meta { color: var(--muted); font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.task-meta .mono { font-size: 12px; }
.task .progress { margin-top: 19px; display: block; }
.task-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.task-error { margin-top: 14px; background: var(--danger-soft); color: var(--danger); font-size: 14px; padding: 11px 14px; border-radius: 6px; }
.task-warning { margin-top: 14px; background: #fff6e5; color: #8a5300; font-size: 14px; padding: 11px 14px; border-radius: 6px; }
.task-status { text-align: right; flex-shrink: 0; }
.task-status p { font-size: 13px; color: var(--muted); margin-top: 8px; }
.model-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
.provider-list { padding: 13px; align-self: start; }
.provider-search { font-size: 15px; min-height: 41px; margin-bottom: 12px; }
.provider-list button { display: flex; width: 100%; justify-content: space-between; text-align: left; align-items: center; gap: 9px; border: 0; min-height: 45px; padding: 10px 12px; font-size: 14px; color: var(--ink); background: transparent; }
.provider-list button:hover { background: #f4f7f5; }
.provider-list button.active { background: var(--teal-soft); color: var(--teal); font-weight: 600; }
.saved-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.model-form { max-width: none; }
.model-form > .stack { gap: 24px; }
.model-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 4px; }
.model-actions .row { gap: 12px; }
.secret-row { display: flex; align-items: center; position: relative; margin-top: 8px; }
.secret-row input { margin: 0; padding-right: 49px; }
.secret-row button { position: absolute; right: 7px; }
.provider-description { margin-top: 8px; margin-bottom: 24px; }
.plan-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px; margin: 26px 0 27px; }
.plan { padding: 23px 18px; position: relative; border-color: #cbded4; }
.plan h3 { font-size: 16px; margin-bottom: 21px; }
.plan-price { color: var(--teal); font-size: 35px; letter-spacing: -1.3px; font-family: var(--display); line-height: 1.15; white-space: nowrap; }
.plan-price small { font-size: 18px; margin-right: 2px; }
.plan-credits { margin-top: 21px; font-size: 15px; }
.plan-credits strong { font-size: 23px; margin-right: 4px; }
.plan-unit { margin-top: 6px; margin-bottom: 21px; font-size: 13px; color: var(--muted); }
.plan .btn { min-height: 43px; font-size: 14px; padding: 9px; width: 100%; }
.purchase-intro { padding: 27px 30px; display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.purchase-intro .gift { display: flex; align-items: center; gap: 16px; }
.purchase-intro .gift .icon { width: 32px; height: 32px; color: var(--teal); }
.purchase-intro h3 { margin-bottom: 4px; }
.rule-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.rule { padding: 0 6px; }
.rule h3 { font-size: 16px; margin-bottom: 9px; }
.rule p { color: var(--muted); font-size: 15px; }
.redeem-panel { display: grid; grid-template-columns: minmax(245px, .8fr) minmax(400px, 1.3fr); gap: 24px; align-items: center; border-color: #9abeb0; background: #f8fcfa; }
.redeem-panel input { font-family: var(--mono); font-size: 16px; }
.redeem-panel input::placeholder { font-size: 13px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contact-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 20px; background: #f6f8f6; border: 1px solid var(--line); border-radius: 9px; align-content: start; }
.contact-card strong { font-size: 17px; }
.contact-card p { font-size: 16px; margin-top: 5px; overflow-wrap: anywhere; }
.contact-card > .text-btn, .contact-card > .badge { grid-column: 2; justify-self: start; }
.contact-symbol { width: 36px; height: 36px; display: grid; place-items: center; background: #e1e9ed; color: #355c74; border-radius: 8px; font-weight: 650; font-size: 20px; }
.contact-symbol.wechat { background: #e0eee3; color: #347446; }
.contact-symbol.xianyu { background: #f6ecc9; color: #886e22; }
.modal-body .contact-grid { grid-template-columns: 1fr; gap: 12px; }
.modal-body .contact-card { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; padding: 15px 18px; }
.modal-body .contact-card > .text-btn, .modal-body .contact-card > .badge { grid-column: 3; }
.code-actions { display: flex; flex-wrap: wrap; gap: 6px 17px; min-width: 148px; }
.code-actions .text-btn { white-space: nowrap; }
.issued-code { min-height: 85px; font-family: var(--mono); font-size: 18px; line-height: 1.9; overflow-wrap: anywhere; background: #f5faf7; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
th { font-size: 13px; color: var(--muted); font-weight: 500; padding: 13px 14px; background: #f4f7f5; white-space: nowrap; }
td { padding: 16px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.65; }
tbody tr:last-child td { border-bottom: 0; }
td.long { max-width: 350px; word-break: break-word; }
td.nowrap { white-space: nowrap; }
.positive { color: var(--teal); font-weight: 600; }
.negative { color: var(--danger); }
.account-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 20px; margin-bottom: 25px; }
.account-top .panel { padding: 24px; }
.account-top h3 { margin-bottom: 14px; font-size: 15px; color: var(--muted); font-weight: 500; }
.account-value { font-family: var(--mono); font-size: 34px; }
.account-email { font-size: 19px; overflow-wrap: anywhere; }
.account-top .btn { margin-top: 16px; }
.section-tabs { display: flex; gap: 23px; border-bottom: 1px solid var(--line); margin-bottom: 23px; }
.section-tabs button { font-size: 16px; color: var(--muted); background: transparent; border: 0; border-radius: 0; border-bottom: 3px solid transparent; padding: 9px 1px 14px; }
.section-tabs button.active { color: var(--teal); border-color: var(--teal); font-weight: 600; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 25px; }
.admin-stats h3 { font-size: 14px; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.admin-stats strong { font-family: var(--mono); font-size: 26px; }
.readiness { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0; }
.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 32px; padding-top: 21px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer .row { gap: 17px; flex-wrap: wrap; }
.footer a, .footer button { font-size: 12px; color: var(--muted); }

.auth-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 540px);
  gap: clamp(36px, 4vw, 72px);
  padding: clamp(32px, 4vw, 56px) clamp(32px, 4vw, 56px) 72px;
  background: url("/assets/login-background.jpg") center / cover no-repeat;
  overflow: hidden;
}
.auth-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
}
.auth-story {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - 150px);
  color: #153532;
}
.auth-brandline { display: grid; gap: 28px; align-content: start; }
.auth-brandline .brand { color: #163834; margin: 0; }
.auth-brandline .brand-mark { border-color: #163834; background: #173f3b; color: white; }
.auth-brandline p {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #35524d;
  font-size: 13px;
  backdrop-filter: blur(16px) saturate(1.04);
  box-shadow: 0 10px 30px rgba(27, 62, 56, .04);
}
.auth-hero {
  width: min(620px, 100%);
  padding: 28px 32px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 20px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(24px) saturate(1.04);
  box-shadow: 0 18px 54px rgba(23, 54, 50, .05);
}
.auth-hero h1 {
  font-family: var(--display);
  font-size: clamp(36px, 4.5vw, 58px);
  line-height: 1.22;
  letter-spacing: .02em;
  font-weight: 520;
  color: #132f2c;
}
.auth-hero p { color: #45615c; font-size: 16px; max-width: 440px; margin-top: 16px; }
.auth-side { display: grid; align-content: center; position: relative; z-index: 1; padding: 0; }
.auth-box {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  transform: translateX(-40px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 22px;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(34px) saturate(1.04);
  box-shadow: 0 22px 70px rgba(18, 48, 44, .06);
}
.auth-box h2 { font-size: 28px; margin-bottom: 10px; }
.auth-box > p { color: var(--muted); font-size: 16px; margin-bottom: 27px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 10px; background: transparent; margin-bottom: 29px; }
.auth-tabs button { color: var(--muted); border: 0; background: transparent; min-height: 43px; font-size: 16px; }
.auth-tabs button.active { background: rgba(255, 255, 255, .16); color: var(--teal); font-weight: 600; box-shadow: none; }
.auth-form { display: grid; gap: 23px; }
.auth-form .btn.full { min-height: 51px; }
.auth-form .check { font-size: 13px; }
.auth-form .check a, .auth-form .check button { font-size: 13px; }
.auth-box .note { margin-top: 25px; font-size: 13px; }
.auth-box .note { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); backdrop-filter: blur(12px); }
.auth-form input {
  background: rgba(255, 255, 255, .38);
  border-color: rgba(196, 211, 205, .72);
  backdrop-filter: blur(12px);
}
.auth-form input:focus {
  background: rgba(255, 255, 255, .5);
  border-color: #70b9a8;
}
.auth-footer {
  position: absolute;
  left: clamp(32px, 4vw, 56px);
  right: clamp(32px, 4vw, 56px);
  bottom: 18px;
  width: auto;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 12px;
  color: var(--muted);
}
.auth-footer a, .auth-footer button { color: var(--muted); font-size: 12px; }
dialog { border: 1px solid #c9dcd2; border-radius: 14px; padding: 0; width: min(610px, calc(100vw - 48px)); max-height: calc(100vh - 60px); color: var(--ink); box-shadow: 0 24px 100px #132d3433; }
dialog::backdrop { background: #112c3066; backdrop-filter: blur(3px); }
.modal-head { padding: 23px 27px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-size: 22px; }
.modal-body { padding: 26px 28px; }
.modal-body > p { font-size: 15px; color: var(--muted); margin-bottom: 19px; }
.modal-body .stack { gap: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 12px; padding-top: 24px; }
.payment-summary { display: flex; justify-content: space-between; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.payment-summary strong { font-family: var(--display); font-size: 34px; color: var(--teal); }
.payment-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.method { padding: 15px; border: 1px solid var(--line); border-radius: 8px; display: flex; gap: 10px; font-size: 15px; align-items: center; }
.method.unavailable { opacity: .55; }
.qr-area { text-align: center; }
.qr-image { width: 235px; height: 235px; display: block; margin: 0 auto 14px; }
.qr-area .order-number { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 14px; }
.legal-copy h3 { margin: 22px 0 9px; font-size: 17px; }
.legal-copy p { font-size: 15px; line-height: 1.9; color: var(--muted); }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); max-width: min(640px, calc(100vw - 50px)); padding: 14px 22px; color: white; background: #254941; border-radius: 9px; box-shadow: 0 5px 25px #142f331f; z-index: 100; line-height: 1.7; font-size: 15px; }
.toast.error { background: #873e34; }
/* Secondary controls remain readable on desktop displays at 100% zoom. */
.nav button { font-size: 17px; }
.btn.small, .badge, .credit-box > p, .credit-box a, .credit-box .held,
.rail-email strong, .rail-email small, .topbar .subheading,
.file-name, .file-info small, .model-strip strong, .model-strip p,
.preview-tabs button, .preview-controls, .preview-footer,
.task-meta, .task-meta .mono, .task-status p, .provider-list button,
.plan .btn, .plan-unit, table, th, .admin-stats h3 { font-size: 15px; }
.footer, .footer a, .footer button, .auth-footer, .auth-footer a,
.auth-footer button, .auth-form .check, .auth-form .check button,
.auth-form .check a, .auth-box .note { font-size: 14px; }
@media (min-width: 1650px) {
  .content { padding: 35px 48px 45px; }
  .work-grid { grid-template-columns: minmax(400px, .75fr) minmax(0, 1.25fr); gap: 30px; }
  .plan { padding: 29px 25px; }
  .plan-price { font-size: 43px; }
  .preview-canvas { min-height: min(630px, calc(100vh - 300px)); }
}
@media (max-width: 1190px) {
  .shell { grid-template-columns: 206px minmax(0, 1fr); }
  .rail { padding-left: 10px; padding-right: 10px; }
  .topbar { padding: 0 24px; }
  .content { padding: 24px; }
  .work-grid { grid-template-columns: 335px minmax(0, 1fr); gap: 18px; }
  .panel { padding: 20px; }
  .preview { padding: 0; }
  .plan-grid { gap: 9px; }
  .plan { padding: 20px 12px; }
  .plan-price { font-size: 29px; }
  .auth-story { padding: 45px; }
  .auth-side { padding: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
