:root {
  color-scheme: light;
  --bg: #edf7f3;
  --bg-2: #fbfdfb;
  --surface: #ffffff;
  --surface-soft: #f3faf6;
  --surface-strong: #14251e;
  --text: #17251e;
  --muted: #6f8178;
  --line: #d8e7df;
  --line-strong: #b9d6c8;
  --brand: #2fac82;
  --brand-2: #1f9a73;
  --brand-3: #5ccba6;
  --ink: #24283b;
  --gold: #bf8b32;
  --violet: #5468ff;
  --sky: #33a7c7;
  --danger: #c84d4d;
  --shadow: 0 18px 50px rgba(36, 80, 58, .13);
  --shadow-strong: 0 24px 80px rgba(31, 154, 115, .25);
  --radius: 24px;
  --radius-sm: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07110f;
  --bg-2: #0d1516;
  --surface: #111d1c;
  --surface-soft: #142321;
  --surface-strong: #e7fff5;
  --text: #ecfff7;
  --muted: #9fb9ad;
  --line: #213a31;
  --line-strong: #315f4c;
  --brand: #4fd5a7;
  --brand-2: #2bb989;
  --brand-3: #83efd0;
  --ink: #f5fbff;
  --gold: #f0bd68;
  --violet: #9ba6ff;
  --sky: #62d6f2;
  --danger: #ff7a7a;
  --shadow: 0 18px 60px rgba(0, 0, 0, .35);
  --shadow-strong: 0 24px 90px rgba(24, 214, 149, .14);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at 20% 0%, rgba(80, 213, 167, .22), transparent 36%), linear-gradient(180deg, var(--bg), var(--bg-2)); color: var(--text); }
body { font-size: 16px; line-height: 1.55; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--line);
}
.nav {
  min-height: 74px;
  max-width: 1460px;
  margin: 0 auto;
  padding: 0 26px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 13px; font-weight: 900; min-width: max-content; }
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
  box-shadow: 0 12px 28px rgba(31, 154, 115, .32);
  font-weight: 950;
}
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 22px; letter-spacing: 0; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 12px; letter-spacing: .16em; }
.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-links a, .ghost-link {
  border-radius: 999px;
  color: color-mix(in srgb, var(--text) 76%, var(--muted));
  padding: 11px 17px;
  font-weight: 800;
}
.nav-links a:hover, .nav-links a.active, .ghost-link:hover { background: var(--surface-soft); color: var(--brand-2); }
.nav-links a.active { background: var(--brand-2); color: white; box-shadow: 0 12px 28px rgba(31, 154, 115, .28); }
.nav-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.token-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--surface-soft);
  color: var(--brand-2);
  font-weight: 900;
  white-space: nowrap;
}
.icon { width: 18px; height: 18px; object-fit: contain; vertical-align: -3px; }
.token-pill .icon, .theme-btn .icon, .mobile-menu-btn .icon { filter: saturate(1.2); }
.theme-btn, .mobile-menu-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  display: inline-grid;
  place-items: center;
}
.mobile-menu-btn { display: none; }
.lang-switch {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--surface);
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  min-width: 34px;
  height: 32px;
  font-weight: 900;
}
.lang-switch button.active { background: var(--brand-2); color: white; }
.avatar-link {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand) 16%, var(--surface));
  color: var(--brand-2);
  font-weight: 950;
}
.announcement-bar {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px max(24px, calc((100vw - 1460px) / 2 + 26px));
  background: color-mix(in srgb, var(--brand) 9%, var(--surface));
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  color: var(--muted);
  font-size: 14px;
}
.announcement-bar strong { color: var(--brand-2); white-space: nowrap; }
.announcement-bar a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }

.container { max-width: 1460px; margin: 0 auto; padding: 34px 26px 72px; }
.narrow { max-width: 840px; }
.page-head { display: flex; justify-content: space-between; gap: 22px; align-items: flex-start; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.05; letter-spacing: 0; }
.page-head p { margin: 10px 0 0; color: var(--muted); }

.btn {
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
  color: white;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  box-shadow: 0 14px 34px rgba(31, 154, 115, .25);
}
.btn-icon { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.btn-icon.dark-icon { filter: none; opacity: .78; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--brand-2); border-color: transparent; box-shadow: none; }
.btn.dark { background: var(--ink); color: white; }
.btn.danger { background: var(--danger); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.nav-cta { min-height: 40px; padding: 9px 16px; }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layout { display: grid; grid-template-columns: 440px minmax(0, 1fr); gap: 24px; align-items: start; }
.card {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card h1, .card h2, .card h3 { margin: 0 0 14px; letter-spacing: 0; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { color: color-mix(in srgb, var(--text) 84%, var(--muted)); font-weight: 850; font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  color: var(--text);
  padding: 13px 15px;
  min-height: 48px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.field textarea { min-height: 130px; resize: vertical; }
.inline-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.segmented, .pill-row { display: flex; gap: 10px; flex-wrap: wrap; }
.segmented button, .pill {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  color: color-mix(in srgb, var(--text) 70%, var(--muted));
  border-radius: 999px;
  padding: 11px 17px;
  font-weight: 850;
}
.segmented button.active, .pill.active { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); color: var(--brand-2); box-shadow: 0 8px 20px rgba(31, 154, 115, .12); }

.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 680px; }
.table th, .table td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 900; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand-2); }
.badge.warn { background: color-mix(in srgb, var(--gold) 16%, var(--surface)); color: var(--gold); }
.badge.danger { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.notice { border-radius: 18px; border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line)); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); padding: 14px 16px; color: color-mix(in srgb, var(--text) 82%, var(--brand)); }
.error { border-color: color-mix(in srgb, var(--danger) 32%, var(--line)); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
.empty { color: var(--muted); padding: 28px; text-align: center; border: 1px dashed var(--line); border-radius: 18px; }
.progress { height: 12px; background: color-mix(in srgb, var(--line) 52%, var(--surface)); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-3), var(--brand-2)); width: 0%; }

#toast { position: fixed; right: 18px; bottom: 18px; z-index: 2000; max-width: min(380px, calc(100vw - 36px)); }
.toast-item { margin-top: 10px; box-shadow: var(--shadow); }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 17, 15, .56);
  backdrop-filter: blur(10px);
}
.modal-panel {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 26px 90px rgba(0, 0, 0, .28);
  padding: 24px;
}
.modal-panel h2 { margin: 0 0 10px; font-size: 24px; }
.modal-panel p { margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.site-footer {
  max-width: 1460px;
  margin: 0 auto;
  padding: 42px 26px 54px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.site-footer h3 { color: var(--text); margin: 0 0 12px; }
.site-footer a, .site-footer span, .site-footer small { display: block; margin: 8px 0; }

.hero-stage { position: relative; min-height: calc(100vh - 113px); padding: 58px 26px 46px; overflow: hidden; }
.commercial-hero {
  background:
    radial-gradient(circle at 82% 12%, color-mix(in srgb, var(--violet) 22%, transparent), transparent 28%),
    radial-gradient(circle at 76% 62%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 26%),
    linear-gradient(122deg, color-mix(in srgb, var(--surface) 97%, transparent) 0%, color-mix(in srgb, var(--brand) 10%, var(--bg)) 52%, color-mix(in srgb, var(--sky) 20%, var(--bg-2)) 100%);
}
.commercial-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, var(--bg-2));
  pointer-events: none;
}
.commercial-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--brand) 10%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--brand) 10%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 78% 34%, black, transparent 58%);
  opacity: .55;
  pointer-events: none;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .34;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 1460px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(500px, .9fr) minmax(540px, 1.1fr);
  gap: 44px;
  align-items: center;
  z-index: 2;
}
.hero-content { position: relative; z-index: 3; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 999px;
  padding: 8px 13px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  color: var(--brand-2);
  font-weight: 900;
  backdrop-filter: blur(18px);
}
.eyebrow img { width: 18px; height: 18px; }
.hero-title { margin: 22px 0 0; font-size: clamp(54px, 5.45vw, 94px); line-height: .92; letter-spacing: 0; max-width: 820px; word-break: keep-all; }
.hero-copy { color: color-mix(in srgb, var(--text) 68%, var(--muted)); font-size: 20px; max-width: 700px; margin-top: 24px; }
.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; margin-top: 28px; }
.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 23px;
  color: color-mix(in srgb, var(--text) 74%, var(--muted));
  font-weight: 850;
}
.proof-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.proof-row img { width: 17px; height: 17px; }
.capability-row {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 10px;
  margin-top: 18px;
  max-width: 700px;
}
.capability-row span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-radius: 999px;
  padding: 8px 16px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: color-mix(in srgb, var(--text) 88%, var(--brand-2));
  box-shadow: 0 12px 30px rgba(18, 37, 30, .08);
  backdrop-filter: blur(14px);
  font-size: 15px;
  font-weight: 950;
  white-space: nowrap;
}
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 30px; max-width: 640px; }
.hero-stat {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(14px);
  animation: liftIn .7s ease both;
}
.hero-stat:nth-child(2) { animation-delay: .08s; }
.hero-stat:nth-child(3) { animation-delay: .16s; }
.hero-stat strong { display: block; font-size: 31px; line-height: 1; }
.hero-stat span { display: block; margin-top: 8px; }
.paper-showcase {
  position: relative;
  min-height: 760px;
  perspective: 1400px;
  overflow: visible;
}
.showcase-browser {
  position: absolute;
  inset: -42px -12px -8px -28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform: none;
}
.browser-top { display: none; }
.browser-top span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 52%, var(--surface));
}
.browser-top span:nth-child(2) { background: color-mix(in srgb, var(--gold) 62%, var(--surface)); }
.browser-top span:nth-child(3) { background: color-mix(in srgb, var(--violet) 54%, var(--surface)); }
.browser-top strong { margin-left: 8px; color: var(--muted); font-size: 13px; letter-spacing: .02em; }
.browser-body { position: relative; height: 100%; }
.paper-stack { position: absolute; inset: 0; animation: floatStack 8s ease-in-out infinite; }
.paper-stack::after {
  content: "";
  position: absolute;
  inset: 16% -4% 0 10%;
  background: linear-gradient(120deg, rgba(47,172,130,.22), rgba(185,129,44,.18), rgba(84,104,255,.12));
  filter: blur(58px);
  border-radius: 50%;
  animation: glowShift 9s ease-in-out infinite;
}
.paper-set {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(18px) scale(.985);
  animation: paperSetCycle 18s ease-in-out infinite;
}
.paper-set.set-two { animation-delay: 6s; }
.paper-set.set-three { animation-delay: 12s; }
.paper-shot {
  position: absolute;
  width: 50%;
  aspect-ratio: 210 / 297;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  margin: 0;
  opacity: 1;
  filter: drop-shadow(0 18px 22px rgba(18, 37, 30, .16));
}
.paper-shot img { width: 100%; height: auto; object-fit: contain; display: block; }
.paper-shot.chinese {
  left: 4%;
  top: 14%;
  z-index: 2;
  transform: rotate(-8deg) translateZ(42px);
}
.paper-shot.english {
  right: 8%;
  top: 8%;
  z-index: 3;
  transform: rotate(3.5deg) translateZ(110px);
}
.paper-shot.math {
  left: 31%;
  bottom: -6%;
  z-index: 1;
  opacity: 1;
  transform: rotate(8deg) translateZ(12px);
}
.paper-set.set-two .paper-shot.chinese { transform: rotate(-5deg) translate3d(-6px, 8px, 42px); }
.paper-set.set-two .paper-shot.english { transform: rotate(5deg) translate3d(-8px, 10px, 110px); }
.paper-set.set-two .paper-shot.math { transform: rotate(4deg) translate3d(10px, 6px, 12px); }
.paper-set.set-three .paper-shot.chinese { transform: rotate(-10deg) translate3d(-8px, -2px, 42px); }
.paper-set.set-three .paper-shot.english { transform: rotate(2deg) translate3d(-10px, 12px, 110px); }
.paper-set.set-three .paper-shot.math { transform: rotate(10deg) translate3d(-4px, -8px, 12px); }
.live-panel {
  position: absolute;
  left: 20px;
  bottom: 24px;
  z-index: 4;
  max-width: 330px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 18px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  animation: liftIn .75s ease .16s both;
}
.live-panel h3 { margin: 8px 0 4px; font-size: 18px; line-height: 1.2; }
.live-panel p { margin: 0; font-size: 13px; line-height: 1.45; }
.mini-progress { height: 7px; border-radius: 99px; margin-top: 11px; background: color-mix(in srgb, var(--line) 70%, transparent); overflow: hidden; }
.mini-progress span { display: block; width: 72%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-3), var(--sky), var(--violet)); animation: progressPulse 3.8s ease-in-out infinite; }
.section-head { max-width: 820px; margin: 0 0 24px; }
.section-head.center { max-width: 860px; margin: 0 auto 28px; text-align: center; }
.section-head h2 { margin: 12px 0 0; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.1; letter-spacing: 0; }
.section-head p { margin: 14px auto 0; max-width: 760px; }
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 30px 0 30px;
}
.mode-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.mode-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--brand) 44%, var(--line)); box-shadow: var(--shadow-strong); }
.mode-card.featured {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 13%, var(--surface)), color-mix(in srgb, var(--violet) 8%, var(--surface)));
}
.mode-card::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -58px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.mode-card > * { position: relative; z-index: 1; }
.mode-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 18%, var(--surface)), color-mix(in srgb, var(--sky) 12%, var(--surface)));
}
.mode-icon img { width: 28px; height: 28px; }
.mode-card h3 { margin: 14px 0 9px; font-size: 25px; }
.product-split {
  display: grid;
  grid-template-columns: minmax(400px, .9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
  margin-top: 26px;
}
.product-copy {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--brand) 8%, var(--surface)));
  box-shadow: var(--shadow);
}
.product-copy h2 { margin: 14px 0 10px; font-size: clamp(28px, 3vw, 44px); line-height: 1.08; }
.workflow-list { margin-top: 24px; }
.workflow-step {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.workflow-step:last-child { border-bottom: 0; }
.workflow-step > span, .workflow-step > img {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand) 14%, var(--surface));
  color: var(--brand-2);
  font-weight: 950;
  padding: 11px;
}
.subject-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.subject-card { position: relative; overflow: hidden; min-height: 250px; transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease; }
.subject-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--brand) 38%, var(--line)); box-shadow: var(--shadow-strong); }
.subject-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -34% 20%;
  height: 110px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 12%, transparent), color-mix(in srgb, var(--gold) 12%, transparent));
  filter: blur(26px);
}
.subject-card > * { position: relative; z-index: 1; }
.subject-icon { width: 42px; height: 42px; margin-bottom: 12px; }
.subject-card .btn { margin-top: 8px; }
.business-strip {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-top: 30px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 30px;
  padding: 34px;
  background:
    radial-gradient(circle at 86% 0%, color-mix(in srgb, var(--gold) 28%, transparent), transparent 32%),
    linear-gradient(135deg, #12241d, #1c6d55 58%, #24345f);
  color: white;
  box-shadow: var(--shadow-strong);
}
.business-strip::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  animation: haloPulse 8s ease-in-out infinite;
}
.business-strip > * { position: relative; z-index: 1; }
.business-strip h2 { margin: 12px 0 8px; font-size: clamp(28px, 3vw, 43px); line-height: 1.08; max-width: 780px; }
.business-strip p { margin: 0; max-width: 780px; color: rgba(255,255,255,.75); }
.business-strip .badge { background: rgba(255,255,255,.14); color: white; }
.business-strip .btn { background: #111a34; color: white; border-color: rgba(255,255,255,.16); box-shadow: 0 16px 38px rgba(0,0,0,.28); }
.final-cta {
  margin-top: 30px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--brand) 10%, var(--surface)));
  box-shadow: var(--shadow);
}
.final-cta .page-head { margin: 0; align-items: center; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, .84fr) minmax(440px, 1fr);
}
.auth-brand {
  position: relative;
  overflow: hidden;
  padding: 70px 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(150deg, #35b889, #228765);
  color: white;
}
.auth-brand::before, .auth-brand::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
}
.auth-brand::before { right: 10%; top: -80px; }
.auth-brand::after { right: -80px; bottom: -70px; width: 380px; height: 380px; }
.auth-brand .brand { position: absolute; top: 58px; left: 76px; color: white; }
.auth-brand .brand-copy small { color: rgba(255,255,255,.78); }
.auth-brand h1 { position: relative; margin: 124px 0 0; font-size: clamp(42px, 6vw, 72px); line-height: 1.08; letter-spacing: 0; }
.auth-brand p { position: relative; max-width: 560px; color: rgba(255,255,255,.78); font-size: 20px; }
.auth-points { position: relative; list-style: none; padding: 0; margin: 34px 0; display: grid; gap: 16px; font-weight: 900; }
.auth-points li { display: flex; align-items: center; gap: 14px; }
.auth-points li::before { content: ""; display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: rgba(255,255,255,.14) url("/icons/filled/check-circle.svg") center / 18px 18px no-repeat; filter: brightness(0) invert(1); }
.auth-gift {
  position: relative;
  margin-top: auto;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 24px;
  padding: 22px 24px;
  max-width: 560px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  font-weight: 900;
}
.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 56px 30px;
}
.auth-page { background: var(--bg-2); }
.auth-panel .btn { width: 100%; margin-top: 12px; }
.auth-panel .inline-fields .btn { margin-top: 0; }
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-radius: 22px;
  background: var(--surface-soft);
  padding: 6px;
  margin-bottom: 34px;
}
.auth-tabs a { text-align: center; border-radius: 17px; padding: 14px; color: var(--muted); font-weight: 950; }
.auth-tabs a.active { background: var(--surface); color: var(--brand-2); box-shadow: var(--shadow); }
.auth-panel h2 { margin: 0; font-size: 34px; }
.auth-legal { font-size: 13px; text-align: center; }

@keyframes floatStack {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes liftIn {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes paperOne {
  0%, 100% { transform: rotate(4deg) translateY(0) translateZ(85px); }
  50% { transform: rotate(2.5deg) translateY(-12px) translateZ(85px); }
}
@keyframes paperTwo {
  0%, 100% { transform: rotate(-8deg) translateY(0) translateZ(34px); }
  50% { transform: rotate(-6deg) translateY(10px) translateZ(34px); }
}
@keyframes paperThree {
  0%, 100% { transform: rotate(9deg) translateY(0); }
  50% { transform: rotate(10.5deg) translateY(-8px); }
}
@keyframes glowShift {
  0%, 100% { transform: rotate(0deg) scale(1); opacity: .72; }
  50% { transform: rotate(8deg) scale(1.06); opacity: 1; }
}
@keyframes progressPulse {
  0%, 100% { transform: translateX(-8%); width: 62%; }
  50% { transform: translateX(34%); width: 48%; }
}
@keyframes paperSetCycle {
  0%, 26% { opacity: 1; transform: translateY(0) scale(1); }
  31%, 100% { opacity: 0; transform: translateY(-16px) scale(.982); }
}
@keyframes haloPulse {
  0%, 100% { transform: scale(1); opacity: .62; }
  50% { transform: scale(1.14); opacity: .92; }
}

.paper-workbench {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 24px;
}
.settings-panel { position: sticky; top: 126px; }
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 5px;
  margin: 22px 0;
}
.mode-tabs button { border: 0; background: transparent; border-radius: 14px; padding: 14px 8px; color: var(--muted); font-weight: 900; }
.mode-tabs button.active { background: var(--surface); color: var(--brand-2); box-shadow: 0 6px 18px rgba(31, 154, 115, .13); }
.preview-panel { overflow: hidden; padding: 0; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.config-group { display: grid; gap: 12px; margin: 20px 0; }
.config-group h3 { margin: 0; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-chip {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, var(--bg));
  color: var(--text);
  border-radius: 16px;
  padding: 11px 14px;
  font-weight: 850;
  min-height: 44px;
}
.choice-chip.active {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
  background: color-mix(in srgb, var(--brand) 15%, var(--surface));
  color: var(--brand-2);
}
.option-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option-tile {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
}
.option-tile strong { display: block; }
.option-tile small { color: var(--muted); }
.generation-status { margin-top: 16px; display: grid; gap: 12px; }
.advanced-details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-soft) 84%, transparent);
  padding: 12px 14px;
}
.advanced-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}
.advanced-details pre {
  margin: 12px 0 0;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.paper-preview {
  margin: 30px;
  min-height: 760px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: #26332d;
  padding: 56px 66px;
  box-shadow: inset 0 0 0 1px rgba(47, 172, 130, .04);
}
.paper-preview .question-line { display: grid; grid-template-columns: 28px 1fr; gap: 12px; margin: 16px 0; }
.paper-preview .question-line span { font-weight: 900; color: #1f9a73; }
.paper-preview .answer-box { min-height: 46px; border-bottom: 1px solid #a9c5ba; }
.plans-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
}
.billing-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.billing-toggle button {
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  background: transparent;
  color: var(--muted);
  font-weight: 950;
}
.billing-toggle button.active { background: var(--brand-2); color: white; }
.plan-card { position: relative; overflow: hidden; display: grid; gap: 16px; }
.plan-card.featured { border-color: color-mix(in srgb, var(--brand) 48%, var(--line)); box-shadow: var(--shadow-strong); }
.plan-card.featured::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--brand-3), var(--brand-2), var(--gold));
}
.price { font-size: 42px; line-height: 1; font-weight: 950; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; color: var(--muted); }
.feature-list li { display: flex; gap: 9px; align-items: flex-start; }
.feature-list li::before { content: ""; width: 17px; height: 17px; flex: 0 0 17px; margin-top: 3px; background: url("/icons/filled/check-circle.svg") center / contain no-repeat; }
.business-plan {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: 22px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 96%, var(--brand)), color-mix(in srgb, var(--brand-2) 76%, #10231a));
  color: white;
  box-shadow: var(--shadow-strong);
}
.business-plan::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -110px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.24);
  animation: haloPulse 7s ease-in-out infinite;
}
.business-plan > * { position: relative; z-index: 1; }
.business-plan .muted { color: rgba(255,255,255,.72); }
.business-plan .badge { background: rgba(255,255,255,.14); color: white; }
.topup-strip {
  display: grid;
  grid-template-columns: 1fr repeat(3, minmax(120px, .2fr));
  gap: 14px;
  align-items: center;
  margin-top: 22px;
}
.topup-option {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: var(--surface-soft);
  text-align: center;
  font-weight: 950;
}
.list-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  margin-bottom: 12px;
}
.list-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.contact-hero, .about-hero {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 24px;
  align-items: stretch;
}
.about-hero { align-items: center; }
.about-paper-wall {
  position: relative;
  min-height: 460px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), color-mix(in srgb, var(--gold) 10%, var(--surface)));
  box-shadow: var(--shadow);
}
.about-paper-wall::before {
  content: "";
  position: absolute;
  inset: 14% 8% 6%;
  background: linear-gradient(120deg, rgba(47,172,130,.16), rgba(185,129,44,.12));
  filter: blur(32px);
}
.about-paper {
  position: absolute;
  width: 34%;
  min-width: 170px;
  aspect-ratio: 210 / 297;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(18, 37, 30, .22);
}
.about-paper.a { left: 8%; top: 12%; transform: rotate(-8deg); animation: paperTwo 10s ease-in-out infinite; }
.about-paper.b { left: 33%; top: 5%; transform: rotate(3deg); z-index: 2; animation: paperOne 9s ease-in-out infinite; }
.about-paper.c { right: 8%; top: 18%; transform: rotate(9deg); animation: paperThree 11s ease-in-out infinite; }
.about-rail { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.about-rail .workflow-step { border-bottom: 0; border-right: 1px solid var(--line); padding: 6px 18px 6px 0; }
.about-rail .workflow-step:last-child { border-right: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.admin-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.admin-toolbar input, .admin-toolbar select { max-width: 260px; }
.paper-preview h2 { text-align: center; font-size: 30px; margin: 18px 0 4px; }
.paper-preview .paper-meta { text-align: center; color: #8ba59a; font-weight: 800; }
.paper-preview hr { border: 0; border-top: 4px solid #43b991; margin: 22px 0 30px; }
.paper-section { margin: 18px 0; }
.paper-section b { display: inline-flex; background: #e3f6ef; color: #1f9a73; border-radius: 999px; padding: 5px 13px; margin-right: 12px; }
.preview-frame {
  width: 100%;
  min-height: 680px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.admin-page { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: #10231a; color: white; padding: 22px; }
.admin-side .brand-copy small { color: rgba(255,255,255,.58); }
.admin-side a { display: block; padding: 12px 14px; border-radius: 14px; color: #dcebe1; margin: 5px 0; font-weight: 850; }
.admin-side a.active, .admin-side a:hover { background: rgba(255,255,255,.12); color: white; }
.admin-main { padding: 28px; min-width: 0; }
.stat { display: grid; gap: 4px; }
.stat strong { font-size: 34px; }

@media (max-width: 1080px) {
  .hero-inner, .paper-workbench, .layout { grid-template-columns: 1fr; }
  .product-split, .contact-hero, .about-hero, .about-rail { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: 1fr; }
  .subject-grid { grid-template-columns: 1fr; }
  .paper-showcase { min-height: 620px; }
  .showcase-browser { position: relative; inset: auto; min-height: 620px; transform: none; }
  .settings-panel { position: static; }
  .site-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-rail .workflow-step { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 0; }
  .about-rail .workflow-step:last-child { border-bottom: 0; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .nav { min-height: 66px; grid-template-columns: auto auto; padding: 10px 16px; gap: 12px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 14px; }
  .brand-copy strong { font-size: 19px; }
  .brand-copy small { font-size: 10px; }
  .mobile-menu-btn { display: inline-grid; justify-self: end; }
  .nav-links {
    grid-column: 1 / -1;
    display: none;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 8px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: grid; }
  .nav-links a { padding: 12px 14px; }
  .nav-actions { grid-column: 1 / -1; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .token-pill { order: -1; flex: 1 1 auto; justify-content: center; }
  .announcement-bar { padding: 7px 16px; font-size: 13px; }
  .container { padding: 24px 16px 50px; }
  .page-head, .preview-toolbar { flex-direction: column; align-items: stretch; }
  .grid.two, .grid.three, .inline-fields, .site-footer, .admin-shell { grid-template-columns: 1fr; }
  .card { padding: 20px; border-radius: 22px; }
  .hero-stage { min-height: auto; padding: 32px 16px 28px; }
  .hero-inner { grid-template-columns: 1fr; gap: 20px; }
  .hero-title { font-size: clamp(42px, 13vw, 58px); }
  .hero-copy { font-size: 17px; }
  .capability-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
  }
  .capability-row span {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 12px;
    white-space: normal;
    text-align: center;
  }
  .proof-row { display: grid; gap: 8px; }
  .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
  .hero-stat { padding: 10px; border-radius: 16px; }
  .hero-stat strong { font-size: 20px; }
  .hero-stat span { font-size: 12px; line-height: 1.25; }
  .paper-showcase {
    min-height: 0;
    margin-top: 24px;
    perspective: none;
    overflow: visible;
  }
  .showcase-browser {
    position: relative;
    inset: auto;
    min-height: 0;
    border-radius: 0;
  }
  .browser-body {
    height: auto;
    display: grid;
    gap: 12px;
  }
  .paper-stack {
    position: relative;
    inset: auto;
    height: 410px;
    order: 1;
    overflow: visible;
  }
  .paper-stack::after {
    inset: 14% 0 8%;
    filter: blur(34px);
  }
  .paper-set {
    inset: 0;
  }
  .paper-shot {
    width: 57%;
    filter: drop-shadow(0 12px 16px rgba(18, 37, 30, .13));
  }
  .paper-shot.chinese { left: -9%; top: 112px; }
  .paper-shot.english { right: -3%; top: 24px; }
  .paper-shot.math { left: 23%; bottom: 6px; }
  .live-panel {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    order: 3;
    max-width: none;
    padding: 12px;
    border-radius: 16px;
    z-index: 6;
  }
  .section-head h2 { font-size: 30px; }
  .section-head.center { text-align: left; }
  .mode-card { min-height: 0; padding: 22px; border-radius: 22px; }
  .mode-icon { width: 50px; height: 50px; margin-bottom: 16px; }
  .product-copy { padding: 22px; border-radius: 22px; }
  .subject-card { min-height: 0; }
  .business-strip { grid-template-columns: 1fr; padding: 24px; border-radius: 24px; }
  .final-cta { padding: 20px; border-radius: 22px; }
  .paper-preview { margin: 14px; min-height: 560px; padding: 32px 22px; font-size: 14px; overflow: auto; }
  .paper-preview h2 { font-size: 23px; }
  .preview-frame { min-height: 70vh; }
  .admin-side { position: sticky; top: 0; z-index: 20; }
  .admin-side nav { display: flex; overflow-x: auto; gap: 6px; }
  .admin-side a { white-space: nowrap; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 42vh; padding: 34px 22px; }
  .auth-brand .brand { position: relative; top: auto; left: auto; margin-bottom: 40px; }
  .auth-brand h1 { margin-top: 0; font-size: clamp(36px, 10vw, 54px); }
  .auth-brand p { font-size: 16px; }
  .auth-panel { padding: 32px 18px 42px; max-width: none; }
  .auth-gift { margin-top: 22px; }
  .plans-hero { grid-template-columns: 1fr; }
  .topup-strip, .business-plan { grid-template-columns: 1fr; }
  .about-paper-wall { min-height: 360px; }
  .about-paper { width: 48%; min-width: 0; }
  .option-row, .metric-grid { grid-template-columns: 1fr; }
  .list-card { grid-template-columns: 1fr; }
  .list-actions { justify-content: stretch; }
  .list-actions .btn { flex: 1 1 auto; }
  .mode-tabs { grid-template-columns: 1fr; }
}

.paper-desk { max-width: 1680px; }
.paper-desk.container { padding-top: 16px; }
.paper-workbench-v2 {
  height: max(720px, calc(100vh - 178px));
  display: grid;
  grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
  gap: 14px;
}
.paper-list-panel,
.paper-preview-panel {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.paper-list-panel { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.paper-preview-panel { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.paper-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.paper-panel-head h2 { margin: 0; font-size: 18px; line-height: 1.2; }
.paper-panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.paper-head-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}
.paper-head-actions .btn {
  min-height: 42px;
  padding: 9px 14px;
  white-space: nowrap;
}
.preview-head {
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 9%, var(--surface)), color-mix(in srgb, var(--sky) 7%, var(--surface)));
}
.paper-view-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-soft);
}
.paper-view-toggle button,
.preview-mode-bar button,
.icon-action {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
}
.paper-view-toggle button { width: 38px; height: 36px; }
.paper-view-toggle button + button { border-left: 1px solid var(--line); }
.paper-view-toggle button.active { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand-2); }
.paper-view-toggle img,
.icon-action img { width: 18px; height: 18px; }
.paper-list-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.paper-list-tools select,
.paper-type-sidebar input,
.paper-field input,
.paper-field select,
.paper-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 94%, var(--bg));
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}
.paper-list-tools select:focus,
.paper-type-sidebar input:focus,
.paper-field input:focus,
.paper-field select:focus,
.paper-field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}
.paper-list {
  min-height: 0;
  overflow: auto;
  padding: 14px 18px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: color-mix(in srgb, var(--surface-soft) 48%, transparent);
}
.paper-list.cards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.paper-list.rows { grid-template-columns: 1fr; }
.paper-list.rows .paper-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.paper-list.rows .paper-card-main {
  display: grid;
  grid-template-columns: auto minmax(170px, 1.2fr) minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
}
.paper-list.rows .paper-card h3,
.paper-list.rows .paper-card p { margin: 0; }
.paper-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface);
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.paper-card-main { min-width: 0; }
.paper-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); box-shadow: 0 16px 34px rgba(31, 154, 115, .13); }
.paper-card.selected { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.paper-card.generating::before,
.paper-card.ready::before,
.paper-card.error::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: var(--brand);
}
.paper-card.generating::before { background: var(--sky); }
.paper-card.error::before { background: var(--danger); }
.paper-card h3 { margin: 9px 0 5px; font-size: 16px; line-height: 1.25; word-break: break-word; }
.paper-card p,
.paper-card small { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.paper-card .progress { height: 8px; margin-top: 11px; }
.paper-card-actions { display: inline-flex; flex-direction: column; gap: 8px; }
.icon-action {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}
.icon-action:hover { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
.icon-action.danger:hover { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.danger-text { color: var(--danger) !important; }
.paper-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}
.paper-pagination .btn { min-height: 38px; padding: 8px 14px; }
.preview-mode-bar {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow-x: auto;
}
.preview-mode-bar[hidden] { display: none; }
.preview-mode-bar button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
  font-weight: 850;
}
.preview-mode-bar button.active { background: var(--brand-2); border-color: var(--brand-2); color: white; }
.preview-surface {
  min-height: 0;
  position: relative;
  background: color-mix(in srgb, var(--bg) 58%, var(--surface));
  display: grid;
  overflow: hidden;
}
.preview-state {
  min-height: 560px;
  display: grid;
  place-items: center;
  padding: 24px;
}
.preview-state[hidden] { display: none !important; }
.generation-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}
.spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid color-mix(in srgb, var(--brand) 20%, var(--surface));
  border-top-color: var(--brand-2);
  animation: spin .8s linear infinite;
}
.preview-surface .preview-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  border: 0;
  border-radius: 0;
  background: white;
  opacity: 1;
}
.preview-surface .preview-frame:not(.is-visible) {
  opacity: .01;
}
.paper-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(7, 17, 15, .62);
  backdrop-filter: blur(12px);
}
.paper-modal-shell.open { display: flex; }
.paper-modal {
  width: min(1220px, 96vw);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 34px 110px rgba(0, 0, 0, .34);
  overflow: hidden;
}
.paper-modal.small { width: min(560px, 96vw); }
.paper-modal-head,
.paper-modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.paper-modal-foot { border-top: 1px solid var(--line); border-bottom: 0; }
.paper-modal-head h2 { margin: 0; }
.paper-modal-head p { margin: 5px 0 0; color: var(--muted); }
.paper-modal-body { padding: 18px; overflow: auto; }
.paper-generator {
  min-height: 0;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
}
.paper-type-sidebar {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 62%, transparent);
}
.paper-type-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 13px;
  align-content: start;
}
.type-group { display: grid; gap: 7px; }
.type-group h3 {
  margin: 4px 4px 2px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.type-group button {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
  display: grid;
  gap: 4px;
}
.type-group button.active {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  color: var(--brand-2);
}
.type-group button span { color: var(--muted); font-size: 11px; word-break: break-all; }
.paper-schema-form { min-height: 0; overflow: auto; padding: 18px; display: grid; gap: 18px; align-content: start; }
.paper-selected-type {
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--surface)), color-mix(in srgb, var(--sky) 6%, var(--surface)));
}
.paper-selected-type h3 { margin: 10px 0 3px; font-size: 22px; }
.paper-selected-type p { margin: 0; color: var(--muted); }
.paper-field-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 13px; }
.paper-span-3 { grid-column: span 3; }
.paper-span-6 { grid-column: span 6; }
.paper-span-12 { grid-column: span 12; }
.paper-field { display: grid; gap: 7px; }
.paper-field > span,
.paper-toggle > span {
  font-size: 13px;
  font-weight: 850;
  color: color-mix(in srgb, var(--text) 84%, var(--muted));
}
.paper-field textarea { min-height: 90px; resize: vertical; }
.paper-field small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.paper-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 94%, var(--bg));
}
.paper-toggle input { width: 20px; height: 20px; accent-color: var(--brand-2); }
.paper-schema-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: color-mix(in srgb, var(--surface-soft) 46%, transparent);
}
.paper-section-title,
.paper-schema-section summary {
  font-weight: 950;
  margin-bottom: 13px;
}
.choice-row { display: flex; flex-wrap: wrap; gap: 9px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .paper-workbench-v2 {
    height: auto;
    grid-template-columns: 1fr;
  }
  .paper-list-panel {
    min-height: min(520px, 55vh);
    max-height: 620px;
  }
  .paper-preview-panel { min-height: 72vh; }
  .preview-surface { min-height: 62vh; }
}

@media (max-width: 760px) {
  .paper-workbench-v2 { gap: 12px; }
  .paper-panel-head,
  .paper-modal-head,
  .paper-modal-foot { align-items: stretch; flex-direction: column; }
  .paper-head-actions { grid-template-columns: 1fr 1fr; }
  .paper-list-tools { grid-template-columns: 1fr; }
  .paper-list.cards { grid-template-columns: 1fr; }
  .paper-list.rows .paper-card-main { grid-template-columns: 1fr; gap: 6px; }
  .paper-generator { grid-template-columns: 1fr; }
  .paper-type-sidebar { border-right: 0; border-bottom: 1px solid var(--line); max-height: none; }
  .paper-type-list { max-height: 260px; }
  .paper-field-grid { grid-template-columns: 1fr; }
  .paper-span-3,
  .paper-span-6,
  .paper-span-12 { grid-column: span 1; }
  .preview-state { min-height: 420px; }
  .paper-preview-panel { min-height: 72vh; }
  .preview-surface { min-height: 62vh; }
  .paper-modal { max-height: 96vh; }
}
