/* Crazy17 官网：和工作台同一套——暖白底、墨黑、只用「涨红」做强调；不用外部字体（国内加载不稳） */
:root { --bg: #f7f6f3; --panel: #fff; --text: #1b1b1a; --muted: #7d7b76; --faint: #b4b1aa; --line: #e7e5e0; --line-strong: #d6d3cc; --red: #d93a2b; --ok: #2c7a4b; --danger: #b4362f; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; background: var(--bg); color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px; }
.nav .logo img { height: 26px; display: block; }
.nav nav { display: flex; gap: 6px; }
.nav nav a { padding: 7px 14px; border-radius: 999px; font-size: 14px; text-decoration: none; color: var(--muted); }
.nav nav a:hover { color: var(--text); background: #efede8; }
.nav nav a.solid { color: #fff; background: var(--text); }
.nav nav a.solid:hover { background: #333230; }
main { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-width: 0; padding: 40px 20px 64px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; min-width: 0; }
.hero .lockup { width: min(350px, 72vw); max-width: 100%; height: auto; display: block; }
.hero h1 { margin: 42px 0 0; padding: 0 .08em .08em; font-weight: 700; font-size: clamp(50px, 7.1vw, 100px); line-height: 1.12; letter-spacing: -.04em;
  background: linear-gradient(100deg, #272320 0%, #bd3025 58%, #e15a37 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.downloads { margin-top: 46px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.dl { min-width: 210px; display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel); text-decoration: none; text-align: left; }
.dl:hover { border-color: var(--text); }
.dl.primary { background: var(--text); border-color: var(--text); color: #fff; }
.dl.primary:hover { background: #333230; }
.dl svg { width: 26px; height: 26px; flex-shrink: 0; fill: currentColor; }
.dl b { display: block; font-size: 15px; }
.dl small { display: block; font-size: 12px; opacity: .65; }
.dl.soon { cursor: default; color: var(--faint); background: transparent; border-style: dashed; border-color: var(--line-strong); }
.dl.soon:hover { border-color: var(--line-strong); }
.hint { margin-top: 16px; font-size: 13px; color: var(--muted); }
.hint a { color: var(--text); }
.card { width: min(420px, 100%); padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.card h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.01em; }
.card > p { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 13px; }
.field small { color: var(--faint); }
.field input { height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; background: #fff; }
.field input:focus { outline: none; border-color: var(--text); }
button.submit { width: 100%; height: 44px; margin-top: 6px; border: 0; border-radius: 999px; background: var(--text); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
button.submit:hover { background: #333230; }
button.submit:disabled { opacity: .5; cursor: default; }
.error { min-height: 0; margin: 4px 0 0; color: var(--danger); font-size: 13px; }
.error:empty { display: none; }
.done { text-align: center; }
.done .check { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: #e6f3ea; color: var(--ok); font-size: 24px; }
.done ol { text-align: left; margin: 16px 0 0; padding-left: 20px; font-size: 14px; color: var(--muted); }
.done ol b { color: var(--text); }
.alt { margin-top: 18px; text-align: center; font-size: 13px; color: var(--muted); }
body.home { grid-template-rows: 1fr auto; }
/* 联系客服：右侧竖排标签（同 Voice17），悬停 / 点击弹出二维码 */
.kefu { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 40; }
.kefu-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 6px; border: 0; border-radius: 8px 0 0 8px;
  background: var(--red); color: #fff; font: inherit; font-size: 12px; font-weight: 500; line-height: 1.25; cursor: pointer; box-shadow: 0 4px 12px rgba(217,58,43,.2); }
.kefu-tab:hover { background: #c53224; }
.kefu-tab svg { width: 14px; height: 14px; fill: currentColor; }
.kefu-tab span { writing-mode: vertical-rl; text-orientation: upright; letter-spacing: .05em; }
.kefu-panel { position: absolute; right: calc(100% + 14px); top: 50%; transform: translate(8px, -50%); width: 200px; padding: 16px 16px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 16px 40px rgba(27,27,26,.14); text-align: center;
  opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s; }
.kefu-panel::after { content: ""; position: absolute; left: 100%; top: 50%; transform: translateY(-50%); border: 8px solid transparent; border-left-color: var(--panel); }
.kefu-panel img { display: block; width: 160px; height: 160px; margin: 0 auto; }
.kefu-panel p { margin: 10px 0 0; font-size: 13px; color: var(--text); }
.kefu:hover .kefu-panel, .kefu.open .kefu-panel { opacity: 1; visibility: visible; transform: translate(0, -50%); }
footer { padding: 22px; text-align: center; font-size: 12px; color: var(--faint); }
@media (max-width: 720px) {
  .nav { padding: 14px 16px; }
  .dl { min-width: 0; width: 100%; }
  .hero h1 { margin-top: 36px; font-size: clamp(50px, 15vw, 60px); line-height: 1.08; }
  .hero h1 span { display: block; }
  .downloads { margin-top: 40px; }
}
footer a { color: inherit; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .sep { margin: 0 8px; opacity: .6; }
/* IDE 接入：只在需要时展开，不在首页堆说明。 */
[hidden] { display: none !important; }
body.home { grid-template-rows: auto 1fr auto; }
.site-header { display: flex; align-items: center; justify-content: flex-end; padding: 18px 36px; min-height: 78px; }
.account { display: flex; align-items: center; gap: 12px; }
button, select, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.quiet { color: var(--text); border: 0; background: transparent; cursor: pointer; padding: 8px 4px; font-size: 13px; }
.quiet:hover { color: var(--red); }
.muted { color: var(--muted); }
.home main { padding-top: 10px; padding-bottom: 64px; }
.home .hero { max-width: 1200px; }
.home .hero .lockup { width: min(290px, 66vw); }
.home .hero h1 { margin-top: 36px; font-size: clamp(48px, 6.6vw, 88px); line-height: 1.22; letter-spacing: -.05em; }
.home .hero h1 span:first-child { display: block; }
.downloads { align-items: stretch; gap: 10px; }
.dl { min-width: 174px; justify-content: center; padding: 13px 20px; border-radius: 12px; }
.ide-primary { background: var(--red); color: white; border-color: var(--red); cursor: pointer; min-width: 190px; }
.ide-primary:hover { background: #c33225; border-color: #c33225; }
.ide-primary b > span { margin-left: 14px; font-size: 19px; font-weight: 400; }
.dl.primary { background: var(--panel); border-color: var(--line-strong); color: var(--text); }
.dl.primary:hover { background: #efede8; }
.dl.soon { min-width: 164px; }
dialog { position: fixed; width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 38px 32px 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--text); box-shadow: 0 24px 100px #1b1b1a24; }
dialog::backdrop { background: #25201b54; backdrop-filter: blur(5px); }
dialog h2 { margin: 0 0 26px; font-size: 24px; font-weight: 600; letter-spacing: -.04em; line-height: 1.5; }
.close { position: absolute; right: 14px; top: 10px; border: 0; background: transparent; color: var(--muted); font-size: 26px; cursor: pointer; width: 36px; height: 36px; border-radius: 50%; }
.close:hover { background: var(--line); color: var(--text); }
.field select { width: 100%; min-width: 0; height: 46px; border: 1px solid var(--line-strong); padding: 0 10px; border-radius: 10px; background: var(--panel); color: var(--text); }
.connect-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.eyebrow { display: block; color: var(--muted); font-size: 10px; letter-spacing: .16em; margin-bottom: 12px; }
.dialog-hint { color: var(--muted); font-size: 12px; line-height: 1.8; text-align: center; margin: 14px 0 0; }
dialog button.submit { border-radius: 10px; height: 48px; font-size: 14px; }
/* A fixed, fully visible WeChat viewport; the provider gets its own stylesheet. */
.login-dialog { width: min(408px, calc(100% - 24px)); padding: 32px 24px 22px; background: #fff; text-align: center; border-radius: 24px; }
.login-brand { display: block; width: 122px; height: auto; margin: 0 auto 24px; }
.login-dialog h2 { margin: 0 0 6px; font-size: 26px; font-weight: 650; letter-spacing: -.035em; }
.login-subtitle { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.qr-frame { position: relative; width: 100%; max-width: 300px; height: 324px; margin: 0 auto; display: grid; place-items: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.qr-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.qr-frame[aria-busy="true"]::after { content: ""; position: absolute; width: 26px; height: 26px; border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: qr-spin .8s linear infinite; pointer-events: none; }
.qr-status { min-height: 21px; margin: 16px 0 0; font-size: 13px; color: var(--muted); }
.qr-status.is-error { color: var(--danger); }
#refreshQR { display: block; margin: 2px auto 0; color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
#refreshQR:disabled { opacity: .45; cursor: wait; }
.login-footnote { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.7; }
.close:focus-visible, .qr-refresh:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
@keyframes qr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .qr-frame[aria-busy="true"]::after { animation: none; } }
@media (max-width: 380px), (max-height: 700px) {
  .login-dialog { padding: 24px 16px 18px; }
  .login-brand { width: 105px; margin-bottom: 14px; }
  .login-subtitle { margin-bottom: 14px; }
  .login-footnote { margin-top: 14px; padding-top: 12px; }
}
.connection-status { color: var(--ok); font-size: 13px; text-align: center; margin: 12px 0 0; }
.connection-status:empty { display: none; }
#manualCopy { width: 100%; height: 150px; margin-top: 16px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; resize: vertical; font: 12px/1.6 monospace; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.field input:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
@media (max-width: 720px) {
  .site-header { padding: 16px 22px; min-height: 64px; }
  .home main { padding: 16px 22px 48px; }
  .home .hero h1 { font-size: clamp(38px, 10.4vw, 62px); margin-top: 30px; }
  .home .hero h1 span { display: inline; }
  .home .hero h1 span:first-child { display: block; }
  .downloads { width: min(340px, 100%); margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; }
  .ide-primary { grid-column: 1 / -1; min-width: 0; min-height: 54px; }
  .dl, .dl.soon { min-width: 0; padding: 12px 10px; }
  .dl svg { width: 22px; height: 22px; }
  .dl b { font-size: 14px; }
  dialog { padding: 36px 24px 26px; }
  dialog h2 { font-size: 22px; }
  footer { font-size: 10px; padding: 18px 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

.entry-error { color: var(--danger); font-size: 13px; margin: 16px 0 0; }
.ide-primary:disabled { opacity: .65; cursor: wait; }

/* 登录入口：轻描边胶囊，已登录时显示昵称首字。 */
.account { gap: 14px; }
.account-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 42px; padding: 9px 18px; border: 1px solid #dedad2; border-radius: 999px; background: #fffdf9; color: #332d27; box-shadow: 0 2px 5px #49392706; font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color .18s, background .18s, box-shadow .18s; }
.account-button:hover { border-color: #b9aaa0; background: #fff; box-shadow: 0 3px 12px #4939270b; }

.account { position: relative; }
.account-button.is-signed-in { padding: 8px 6px; border-color: transparent; border-radius: 7px; background: transparent; box-shadow: none; font-size: 14px; }
.account-button.is-signed-in:hover, .account-button.is-signed-in[aria-expanded="true"] { color: var(--red); background: #edeae440; }
.account-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: 192px; padding: 8px; background: #fffefa; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px #332d2712; }
.account-menu[hidden] { display: none; }
.account-menu button { display: block; width: 100%; padding: 11px 14px; border: 0; border-radius: 6px; background: transparent; color: var(--text); text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
.account-menu button:hover, .account-menu button:focus-visible { background: #f4f1eb; }
.menu-divider { height: 1px; margin: 5px 10px; background: var(--line); }
.account-menu #logoutButton { color: var(--muted); }
.account-menu .error:empty { display: none; }
.account-menu .error { padding: 0 12px; }
.account-details { margin: 0; }
.account-details div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.account-details dt { color: var(--muted); }
.account-details dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.credit-balance { margin: 0 0 26px; font-size: 38px; font-weight: 600; letter-spacing: -.04em; }
.credit-balance small { margin-left: 8px; font-size: 13px; color: var(--muted); font-weight: 400; }
.credit-ledger { list-style: none; padding: 0; margin: 0; }
.credit-ledger li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 13px; }
.credit-ledger small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.account-empty { color: var(--muted); font-size: 13px; }
.plan-option { display: block; padding: 16px; margin: 10px 0; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.plan-option:has(input:checked) { border-color: var(--red); background: #d93a2b04; }
.plan-option input { accent-color: var(--red); margin-right: 8px; }
.plan-option strong { float: right; font-weight: 500; }
.plan-option small { display: block; margin: 9px 0 0 24px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.account-toolbar { display: flex; gap: 8px; margin: 18px 0; }
.account-toolbar button { flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer; color: var(--text); }
.account-toolbar button[aria-pressed="true"] { border-color: var(--text); background: #fff; }
.payment-qr { display: block; width: 220px; height: 220px; margin: 20px auto; }
.payment-total { text-align: center; font-size: 28px; }
.payment-status { text-align: center; color: var(--muted); font-size: 13px; }
#accountLabel { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#logoutButton { font-size: 12px; }
@media (max-width: 720px) { .account { gap: 10px; } .account-button { min-height: 40px; padding: 8px 16px; } #accountLabel { max-width: 112px; } }

/* Public templates: a material → result gallery. */
html { scroll-behavior: smooth; }
.home .site-header { width: min(1280px, 100%); margin: auto; gap: 28px; }
.header-brand { margin-right: auto; display: flex; }
.header-brand img { width: 119px; height: auto; }
.templates-nav { font-size: 13px; text-decoration: none; color: var(--muted); }
.templates-nav:hover { color: var(--red); }
.home main { display: block; padding: 30px 40px 0; }
.home .hero { margin: 0 auto; padding: 18px 0 76px; }
.home .hero .lockup { width: 185px; }
.home .hero h1 { margin-top: 24px; font-size: clamp(44px, 5.3vw, 72px); line-height: 1.2; }
.home .downloads { margin-top: 32px; }
.explore-templates { margin-top: 28px; color: var(--muted); font-size: 13px; text-decoration: none; }
.explore-templates span { margin-left: 10px; }
.template-showcase { max-width: 1160px; margin: 0 auto; padding-top: 42px; border-top: 1px solid var(--line-strong); scroll-margin-top: 24px; }
.showcase-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.showcase-heading :is(h1, h2) { font-size: clamp(25px, 3vw, 36px); font-weight: 600; letter-spacing: -.05em; margin: 10px 0 0; line-height: 1.4; }
.showcase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; row-gap: 42px; }
.template-card { min-width: 0; }
.template-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.use-template { flex: none; border: 0; border-radius: 999px; background: var(--red); color: #fff; padding: 8px 16px; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; box-shadow: 0 4px 14px #d93a2b33; opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s, background .15s; }
.use-template:hover { background: #c22f21; }
.use-template span { display: inline-block; margin-left: 4px; transition: transform .15s; }
.use-template:hover span { transform: translate(2px, -2px); }
.use-template:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.template-card:hover .use-template, .template-card:focus-within .use-template, .use-template:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .use-template { opacity: 1; } }
.template-title h3 { margin: 0; font-weight: 600; font-size: 21px; letter-spacing: -.03em; }
.comparison { display: grid; grid-template-columns: 1fr 1fr; position: relative; gap: 10px; }
.comparison-side { min-width: 0; }
.preview-pane { display: block; position: relative; width: 100%; aspect-ratio: 4 / 5; padding: 0; overflow: hidden; border: 1px solid #e0dcd5; border-radius: 10px; background: #e9e6df; color: var(--text); cursor: pointer; isolation: isolate; text-align: left; }
.preview-pane.after { background: #252823; border-color: #252823; }
.preview-pane:focus-visible { outline-offset: 3px; }
.preview-pane > video, .preview-pane > img { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; background: #181917; }
.preview-pane audio { display: none; }
.comparison-arrow { position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: 15px; pointer-events: none; }
.side-tag { position: absolute; top: 10px; left: 10px; z-index: 4; padding: 4px 9px; border-radius: 999px; background: #1b1b1a8c; color: #fff; font-size: 12px; font-weight: 500; letter-spacing: .04em; line-height: 1.2; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none; }
.after .side-tag { background: var(--red); }
.sample-badge { position: absolute; top: 12px; right: 10px; z-index: 3; padding: 3px 7px; border-radius: 4px; background: #f7f6f3dc; font-size: 9px; color: #706b62; }
.template-caption { margin-top: 12px; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 5px 10px; }
.template-caption > p { width: 100%; color: #737068; margin: 0; font-size: 13px; line-height: 1.85; }
.playback-note { color: var(--danger); font-size: 11px; }
.playback-note:empty { display: none; }
.showcase-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 36px; padding: 32px 0; border-top: 1px solid var(--line-strong); }
.showcase-bottom p { margin: 0; font-size: 16px; font-weight: 500; }
.showcase-bottom > a { color: var(--red); text-decoration: none; font-size: 14px; }
.showcase-bottom > a span { padding-left: 16px; }
/* Illustrations are layout placeholders, replaced by the supplied case media. */
.speaker-art { position: absolute; inset: 0; background: #d6d4c9; overflow: hidden; }
.scene-window { position: absolute; width: 52%; height: 58%; right: -8%; top: 0; background: #eae8de; border: 10px solid #babcae; border-top: 0; transform: skewY(-8deg); }
.speaker-head { position: absolute; width: 27%; height: 29%; border-radius: 45% 45% 42% 42%; background: #9c9f8c; top: 25%; left: 36%; box-shadow: inset 0 15px #555c4d; }
.speaker-body { position: absolute; width: 76%; height: 58%; border-radius: 45% 45% 0 0; background: #69725e; bottom: -8%; left: 12%; }
.after .speaker-art { background: #bdbfae; }
.after .speaker-body { background: #464f3d; }
.source-time { position: absolute; bottom: 14px; left: 14px; right: 14px; font-size: 10px; color: #fff; }
.source-time span { display: block; margin-top: 7px; opacity: .6; letter-spacing: 2px; }
.sample-captions { position: absolute; left: 13%; bottom: 23%; right: 5%; color: white; }
.sample-captions b { display: block; font: 600 clamp(13px, 1.45vw, 21px)/1.7 'Songti SC', serif; }
.sample-captions em { display: block; color: #f6da71; font-style: normal; }
.sample-captions > span { font: italic 12px/1.5 Georgia, serif; }
.slice-title { position: absolute; top: 20%; left: 9%; color: #f6da71; font-size: clamp(17px, 2vw, 27px); font-weight: 700; line-height: 1.4; }
.slice-caption { position: absolute; bottom: 18%; left: 0; width: 100%; color: #fff; font-size: 10px; text-align: center; }
.slice-chapters { position: absolute; bottom: 11%; left: 33%; display: flex; gap: 8px; }
.slice-chapters i { width: 15px; height: 3px; border-radius: 4px; background: #ffffff55; }
.slice-chapters i:first-child { background: #f6da71; }
.script-plain { position: absolute; inset: 0; display: flex; align-items: center; padding: 44px 20px 24px; background: #fffdf8; }
.script-plain p { margin: 0; font: 15px/2 'Songti SC', 'Noto Serif SC', serif; color: #2b2a27; letter-spacing: .02em; }
.script-sheet { position: absolute; top: 21%; left: 10%; width: 80%; padding: 20px 14px; background: #fffdf8; box-shadow: 0 5px 24px #5147360d; transform: rotate(-4deg); }
.script-sheet > span { font-size: 9px; color: #9b9589; }
.script-sheet p { font: 16px/1.9 'Songti SC', serif; margin: 18px 0; }
.script-sheet i { display: block; height: 3px; width: 85%; margin-top: 9px; background: #ece9e1; }
.script-sheet i:nth-last-of-type(1) { width: 58%; }
.script-sheet small { display: block; color: #a49d90; margin-top: 20px; font-size: 9px; }
.caption-art { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; background: #20221e; padding: 12px; }
.caption-art > small { font-size: 9px; color: #898d7e; letter-spacing: .1em; }
.caption-art p { margin: 24px 0; color: #fff; font: 600 clamp(13px, 1.45vw, 21px)/2 'Songti SC', serif; }
.caption-art p span { color: #f6da71; }
.caption-lines { display: flex; gap: 5px; }
.caption-lines i { height: 3px; width: 22px; background: #55594e; }
.caption-lines i:first-child { background: #f6da71; }
.audio-art { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 18px; background: #ece8df; }
.audio-lang { font-size: 36px; font-family: Georgia, 'Songti SC', serif; color: #6d675e; }
.waveform { width: 100%; height: 52px; margin: 25px 0; display: flex; align-items: center; justify-content: center; gap: 3px; }
.waveform i { width: 3px; height: var(--bar); border-radius: 4px; background: #9b9386; transform-origin: center; }
.audio-art p { font-size: 12px; margin: 0; }
.audio-art small { font-size: 9px; color: #9b9386; margin-top: 10px; }
.after .audio-art { background: #e3e7df; }
.after .audio-lang { color: #495c45; }
.after .waveform i { background: #75876d; }
.is-playing .waveform i { animation: waveform .8s var(--delay) infinite alternate ease-in-out; }
.is-playing .sample-captions, .is-playing .caption-art p { animation: caption-reveal 2.5s infinite; }
.is-playing .slice-chapters i { animation: waveform 1s infinite alternate; }
.is-playing .speaker-head { animation: speaker-drift 3s ease-in-out infinite alternate; }
@keyframes waveform { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@keyframes caption-reveal { 0% { clip-path: inset(0 100% 0 0); } 55%,100% { clip-path: inset(0); } }
@keyframes speaker-drift { to { transform: translateY(3px) rotate(3deg); } }
@media (max-width: 850px) {
  .home main { padding: 20px 24px 0; }
  .showcase-grid { column-gap: 22px; }
  .showcase-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .sample-captions b, .caption-art p { font-size: 16px; }
  .script-sheet { padding: 12px; }
  .script-sheet p { font-size: 13px; }
  .script-plain p { font-size: 13px; line-height: 1.85; }
}
@media (max-width: 600px) {
  .home .site-header { padding: 16px 20px; gap: 18px; }
  .header-brand img { width: 96px; }
  .templates-nav { font-size: 12px; }
  .account-button { min-height: 36px; padding: 7px 12px; font-size: 12px; }
  .home main { padding: 12px 20px 0; }
  .home .hero { padding: 24px 0 46px; }
  .home .hero .lockup { width: 150px; }
  .home .hero h1 { font-size: 42px; }
  .template-showcase { padding-top: 28px; }
  .showcase-heading { margin-bottom: 28px; }
  .showcase-heading :is(h1, h2) { font-size: 27px; }
  .showcase-grid { grid-template-columns: 1fr; row-gap: 26px; }
  .template-title { margin-bottom: 12px; }
  .preview-pane { aspect-ratio: 3 / 4; }
  .sample-badge { font-size: 8px; top: 9px; right: 7px; padding: 2px 5px; }
  .side-tag { top: 8px; left: 8px; font-size: 11px; padding: 3px 8px; }
  .sample-captions b, .caption-art p { font-size: 15px; }
  .sample-captions > span { font-size: 10px; }
  .slice-title { font-size: 21px; }
  .script-sheet p { font-size: 14px; }
  .script-plain { padding: 38px 16px 18px; }
  .script-plain p { font-size: 14px; }
  .template-caption { min-height: 0; }
  .showcase-bottom { margin-top: 28px; padding: 24px 0; }
  .showcase-bottom p { font-size: 14px; }
  .showcase-bottom > a { white-space: nowrap; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .is-playing * { animation: none !important; } }

/* Shared navigation; templates and pricing live on their own pages. */
.header-links { display: flex; align-items: center; gap: 28px; }
.header-links a { color: var(--muted); font-size: 13px; text-decoration: none; padding: 8px 0; }
.header-links a:hover, .header-links a[aria-current="page"] { color: var(--text); }
.header-links a[aria-current="page"] { box-shadow: 0 1px var(--red); }
.home:not(.subpage) main { display: grid; place-items: center; padding-bottom: 40px; }
.home:not(.subpage) .hero { padding: 8px 0 30px; }
.home:not(.subpage) .hero .lockup { width: min(290px, 66vw); }
.home:not(.subpage) .hero h1 { margin-top: 36px; font-size: clamp(48px, 6.6vw, 88px); }
.home.subpage main { padding-top: 32px; }
.subpage .template-showcase { border-top: 0; padding-top: 12px; }
.subpage .showcase-heading { margin-bottom: 44px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.category-tabs { display: flex; gap: 28px; margin: 8px 0 40px; border-bottom: 1px solid var(--line); }
.category-tabs button { border: 0; background: none; padding: 0 0 12px; margin-bottom: -1px; font: inherit; font-size: 17px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.category-tabs button:hover { color: var(--text); }
.category-tabs button[aria-selected="true"] { color: var(--text); font-weight: 600; border-bottom-color: var(--red); }
.category-tabs button:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.pricing-page > main > .pricing-page { max-width: 1200px; margin: 0 auto; }
.pricing-heading { text-align: center; margin: 8px 0 34px; }
.pricing-heading h1 { margin: 10px 0; font-weight: 600; font-size: clamp(32px, 4vw, 46px); letter-spacing: -.05em; }
.pricing-heading > p { color: var(--muted); font-size: 13px; margin: 0; }
.pricing-toolbar { display: flex; justify-content: center; position: relative; align-items: center; gap: 20px; margin: 0 0 30px; }
.billing-cycle { display: inline-flex; padding: 4px; border-radius: 9px; border: 1px solid var(--line); background: #eeece6; }
.billing-cycle button { font-size: 13px; background: transparent; border: 0; padding: 8px 24px; border-radius: 6px; color: var(--muted); cursor: pointer; }
.billing-cycle button[aria-pressed="true"] { background: #fffefa; color: var(--text); box-shadow: 0 1px 4px #332d2712; }
.website-plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.website-plan { padding: 25px 22px 28px; background: #fffdf9; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.website-plan.recommended { border-color: var(--red); background: #fffaf4; box-shadow: 0 3px 12px #d93a2b08; }
.plan-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-heading h2 { font-size: 20px; margin: 0; font-weight: 600; }
.plan-heading > span { background: #f8e4dd; color: #b73a2c; font-size: 10px; padding: 2px 7px; border-radius: 4px; }
.plan-audience { color: var(--muted); margin: 4px 0 25px; font-size: 12px; }
.plan-price { display: flex; gap: 4px; align-items: baseline; line-height: 1.15; }
.plan-price small { font-size: 13px; color: var(--muted); }
.plan-price strong { font-size: 45px; letter-spacing: -.05em; font-weight: 600; }
.plan-billing { font-size: 11px; color: var(--muted); margin: 9px 0 18px; }
.plan-credits { font-size: 13px; margin: 0 0 20px; }
.plan-cta { display: block; width: 100%; padding: 11px 6px; font-size: 13px; border: 1px solid var(--line-strong); border-radius: 7px; background: transparent; cursor: pointer; color: var(--text); }
.plan-cta:hover { background: #f1eee7; }
.recommended .plan-cta { background: var(--red); color: white; border-color: var(--red); }
.recommended .plan-cta:hover { background: #c33225; }
.plan-cta:disabled { cursor: default; opacity: .55; }
.plan-features { margin-top: 25px; border-top: 1px solid var(--line); padding-top: 18px; }
.plan-features > p { color: var(--muted); font-size: 11px; margin: 0 0 12px; }
.plan-features ul { padding: 0; list-style: none; margin: 0; }
.plan-features li { position: relative; padding-left: 16px; font-size: 12px; margin-top: 10px; line-height: 1.8; }
.plan-features li::before { content: '✓'; position: absolute; left: 0; color: #7b876d; font-size: 10px; }
.website-compare { border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); margin-top: 30px; }
.website-compare summary { display: flex; justify-content: space-between; padding: 22px 0; cursor: pointer; font-size: 14px; list-style: none; }
.website-compare summary::-webkit-details-marker { display: none; }
.website-compare summary > span { font-size: 18px; color: var(--muted); }
.website-compare[open] summary > span { transform: rotate(45deg); }
.compare-scroll { overflow: auto; }
#pricingCompare { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 12px; margin-bottom: 20px; }
#pricingCompare th, #pricingCompare td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: center; font-weight: 400; }
#pricingCompare th:first-child { text-align: left; color: var(--muted); }
#pricingCompare thead th { font-weight: 600; }
.compare-yes { color: #708362; }
.credit-section { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 38px 0; }
.credit-section h2, .credit-rules h2 { margin: 0 0 8px; font-size: 20px; font-weight: 500; }
.credit-section p, .credit-rules > p { color: var(--muted); font-size: 12px; margin: 0; }
.website-packs { display: flex; gap: 14px; }
.website-pack { min-width: 210px; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; background: #fffdf9; }
.website-pack > div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.website-pack strong { font-size: 20px; font-weight: 500; }
.website-pack small { color: var(--muted); font-size: 11px; font-weight: 400; }
.website-pack span { font-size: 13px; }
.website-pack button { width: 100%; margin-top: 12px; padding: 7px; background: transparent; border: 1px solid var(--line-strong); border-radius: 5px; font-size: 12px; cursor: pointer; color: var(--text); }
.website-pack button:disabled { cursor: default; opacity: .5; }
.credit-rules { border-top: 1px solid var(--line); padding: 26px 0 36px; }
#pricingRules { display: flex; gap: 32px; margin: 20px 0; }
#pricingRules > div { display: flex; gap: 16px; font-size: 12px; }
#pricingRules span { color: var(--muted); }
#pricingRules strong { font-weight: 500; }
@media (max-width: 1000px) {
  .website-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credit-section { align-items: flex-start; flex-direction: column; gap: 20px; }
  .website-packs { width: 100%; }
  .website-pack { flex: 1; }
  #pricingRules { flex-wrap: wrap; gap: 14px 25px; }
}
@media (max-width: 600px) {
  .header-links { gap: 18px; }
  .header-links a { font-size: 12px; }
  .home .site-header { gap: 16px; }
  .header-brand img { width: 88px; }
  .home:not(.subpage) .hero h1 { font-size: clamp(38px,10.4vw,62px); }
  .home.subpage main { padding-top: 24px; }
  .pricing-heading { text-align: left; margin: 0 0 25px; }
  .pricing-heading h1 { font-size: 31px; }
  .pricing-heading > p { font-size: 12px; }
  .pricing-toolbar { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 24px; }
  .website-plans { grid-template-columns: 1fr; gap: 16px; }
  .website-plan { padding: 24px; }
  .website-packs { flex-direction: column; }
  .website-pack { min-width: 0; }
  .plan-price strong { font-size: 42px; }
  .plan-audience { margin-bottom: 20px; }
}
