/* 独立账户页复用首页设计 token；字体只从本站加载。 */
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/fonts/barlow-condensed-latin-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
:root {
  --rap-bg: #fffbf3;
  --rap-soft: #fff3e2;
  --rap-card: #fff;
  --rap-ink: #181511;
  --rap-muted: #70665c;
  --rap-line: #e8ddce;
  --rap-orange: #cc3b00;
  --rap-orange-hover: #ad3200;
  --rap-radius: 22px;
  --rap-shadow: 0 14px 36px rgb(66 40 15 / 8%);
  --rap-display: 'Barlow Condensed', Impact, 'Arial Narrow', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--rap-bg); color: var(--rap-ink); font: 15px/1.7 Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--rap-orange); text-underline-offset: 3px; }
a:hover { color: var(--rap-orange-hover); }
::selection { background: #ffdc9c; color: var(--rap-ink); }
:focus-visible { outline: 3px solid var(--rap-orange); outline-offset: 4px; }
.account-wrap, main { width: min(1180px, calc(100% - 80px)); margin-inline: auto; }
.account-header { border-bottom: 1px solid var(--rap-line); background: rgb(255 251 243 / 95%); }
.account-header nav { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.account-brand { display: inline-flex; align-items: center; min-height: 44px; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -.9px; }
.account-brand svg { flex: none; width: 35px; height: 35px; padding: 6px; border-radius: 10px; color: white; background: var(--rap-orange); }
.account-brand, .back-link { color: var(--rap-ink); text-decoration: none; }
.back-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.back-link:hover { background: var(--rap-soft); }
.account-header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 16px; min-width: 0; }
.header-identity { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.header-avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--rap-soft); color: var(--rap-orange); font-weight: 700; }
#header-email { overflow-wrap: anywhere; min-width: 0; }
main { padding-block: 56px 40px; }
h1, h2, h3 { line-height: 1.1; margin: 0; }
h1, h2 { font-family: var(--rap-display); font-weight: 800; font-synthesis: none; text-transform: uppercase; }
h1 { font-size: 56px; letter-spacing: -.6px; }
h2 { font-size: 36px; }
h3 { font-size: 19px; }
p { margin: 0; }
.account-card { min-width: 0; padding: 28px; border: 1px solid var(--rap-line); border-radius: var(--rap-radius); background: var(--rap-card); }
/* 登录使用紧凑白卡片，单次勾选保留明确的成年与条款确认。 */
body:has(#signed-in[hidden]) { background: #f5f6f8; }
body:has(#signed-in[hidden]) main { display: flex; flex-direction: column; justify-content: center; padding-block: 48px; }
.sign-in-card { width: min(100%, 440px); margin: 0 auto; padding: 28px; border-color: #e1e4e8; border-radius: 18px; box-shadow: 0 12px 40px rgb(24 21 17 / 6%); }
.sign-in-heading { text-align: center; margin-bottom: 22px; }
.sign-in-brand { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 20px; font-weight: 800; letter-spacing: -.7px; }
.sign-in-brand svg { width: 28px; height: 28px; color: var(--rap-orange); }
.sign-in-heading h1 { margin-top: 18px; font: 600 17px/1.5 Arial, Helvetica, sans-serif; text-transform: none; letter-spacing: -.2px; text-wrap: balance; }
.sign-in-heading p { margin-top: 5px; color: var(--rap-muted); font-size: 13px; }
.sign-in-card .confirmation { gap: 10px; margin: 0 0 20px; color: #555b65; font-size: 12px; line-height: 1.65; }
.sign-in-card .confirmation input { width: 17px; height: 17px; margin-top: 2px; }
.sign-in-card .confirmation a { color: var(--rap-ink); }
.confirmation { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin: 16px 0; font-size: 14px; line-height: 1.7; cursor: pointer; }
.confirmation input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--rap-orange); cursor: pointer; }
.confirmation span { min-width: 0; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 12px 20px; border: 1px solid transparent; border-radius: 999px; background: var(--rap-orange); color: white; font: 700 14px/1.5 Arial, Helvetica, sans-serif; text-align: center; cursor: pointer; transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
button:hover:enabled { background: var(--rap-orange-hover); transform: translateY(-1px); }
button:active:enabled { transform: scale(.98); }
button:disabled { opacity: .55; cursor: not-allowed; }
.button-secondary { background: var(--rap-card); color: var(--rap-ink); border-color: var(--rap-line); }
.button-secondary:hover:enabled { background: var(--rap-soft); }
.button-dark { background: var(--rap-ink); }
/* Google 按钮使用白底、彩色 G 与独立的品牌边框，不继承橙色主按钮。 */
#google-login { position: relative; width: 100%; min-height: 44px; margin-top: 0; padding: 12px 40px; border: 1px solid #747775; border-radius: 10px; background: #fff; color: #1f1f1f; font-weight: 500; letter-spacing: .25px; }
#google-login svg { position: absolute; left: 12px; width: 20px; height: 20px; }
#google-login:hover:enabled { background: #f8fafd; box-shadow: 0 1px 3px rgb(60 64 67 / 20%); transform: none; }
.account-notices { padding: 16px 20px; border: 1px solid var(--rap-line); border-radius: 14px; background: var(--rap-soft); color: var(--rap-muted); font-size: 13px; line-height: 1.65; }
.notice { color: var(--rap-ink); font-weight: 700; }
.account-notices p + p { margin-top: 6px; }
.sign-in-card .account-notices { margin-top: 18px; padding: 0; border: 0; border-radius: 0; background: none; font-size: 12px; text-align: center; color: #6b7280; }
.service-notice { margin-block: 16px; color: var(--rap-muted); }
#feedback:empty { display: none; }
#feedback { margin: 0 0 24px; padding: 16px 20px; border: 1px solid var(--rap-orange); border-radius: 14px; background: var(--rap-soft); overflow-wrap: anywhere; }
main:has(#signed-in[hidden]) #feedback { width: min(100%, 440px); margin-inline: auto; }
.account-summary { display: flex; align-items: center; gap: 32px; }
.account-identity { flex: 1; min-width: 0; }
#identity { margin-top: 10px; color: var(--rap-muted); overflow-wrap: anywhere; }
.credit-balance { border-left: 1px solid var(--rap-line); padding-left: 32px; }
.credit-balance p { color: var(--rap-muted); font-size: 13px; }
#credits { display: block; font-family: var(--rap-display); font-size: 48px; line-height: 1.15; overflow-wrap: anywhere; }
#signed-in > .account-notices { margin-top: 20px; }
.checkout-section, .billing-section, .orders-section { margin-top: 32px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 20px; }
.section-heading p { color: var(--rap-muted); font-size: 14px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.plans article { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.plans article:has([data-plan="creator"]) { border-color: var(--rap-orange); box-shadow: var(--rap-shadow); }
.price { font-family: var(--rap-display); font-size: 36px; font-weight: 800; line-height: 1.2; }
.plans button { width: 100%; margin-top: auto; }
.disclosure { color: var(--rap-muted); font-size: 13px; }
.plans .confirmation { margin: 0; font-size: 13px; }
.billing-section p { margin-top: 16px; color: var(--rap-muted); overflow-wrap: anywhere; }
.account-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
#orders { list-style: none; margin: 0; padding: 0; color: var(--rap-muted); font-size: 14px; overflow-wrap: anywhere; }
#orders li { border-top: 1px solid var(--rap-line); padding-block: 16px; }
#orders li:last-child { padding-bottom: 0; }
.legal-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 28px; color: var(--rap-muted); font-size: 12px; }
.legal-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--rap-muted); }
.legal-links a:hover { color: var(--rap-orange); }
noscript { display: block; margin-top: 20px; text-align: center; }
@media (max-width: 800px) {
  .account-wrap, main { width: calc(100% - 40px); }
  .account-summary { flex-wrap: wrap; gap: 24px; }
  .account-identity { flex-basis: 100%; }
  .credit-balance { flex: 1; padding-left: 0; border-left: 0; }
  .section-heading { flex-wrap: wrap; }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .account-header nav { flex-wrap: wrap; gap: 0 16px; padding-block: 12px; }
  .account-brand { font-size: 19px; }
  .account-header-actions { flex: 1 1 100%; }
  .back-link { max-width: 104px; padding-inline: 0; font-size: 12px; line-height: 1.5; text-align: right; }
  main { padding-block: 28px; }
  .account-card { padding: 24px; }
  .sign-in-card { margin-top: 0; padding: 24px; }
  .sign-in-heading h1 { font-size: 17px; }
  body:has(#signed-in[hidden]) main { padding-block: 28px; }
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  .account-actions { flex-direction: column; }
  .orders-section .section-heading { flex-wrap: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  button:hover:enabled, button:active:enabled { transform: none; }
}

/* 候补页沿用账户卡片；窄屏单列，表单保留原生验证与键盘焦点。 */
.plans-link { margin-top: 32px; }
.pricing-intro { max-width: 760px; margin-bottom: 32px; }
.pricing-intro h1 { margin-block: 12px 20px; }
.pricing-intro > p:last-child { color: var(--rap-muted); }
.waitlist-button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; margin-top: auto; padding: 12px 20px; border-radius: 999px; background: var(--rap-orange); color: white; font-weight: 700; text-decoration: none; }
.waitlist-button:hover { background: var(--rap-orange-hover); color: white; }
.waitlist-card { max-width: 650px; margin: 40px auto 0; scroll-margin-top: 24px; }
.waitlist-card form { margin-top: 24px; }
.waitlist-card .email-label { display: block; margin-bottom: 8px; }
.waitlist-card input[type="email"] { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--rap-line); border-radius: 10px; background: var(--rap-bg); color: var(--rap-ink); font: inherit; }
.waitlist-card fieldset { margin: 24px 0; padding: 0; border: 0; }
.waitlist-card legend { padding: 0; font-weight: 700; }
#waitlist-status:not(:empty) { margin-top: 24px; padding: 16px; border-radius: 14px; background: var(--rap-soft); overflow-wrap: anywhere; }

/* 购买页与候补页共用网格；续费确认和提交按钮在同一张卡片。 */
.plans [data-checkout] { margin-top: auto; display: grid; gap: 18px; }
.plans article[data-selected="true"] { border-color: var(--rap-orange); }
#checkout-status:not(:empty) { padding: 16px; border-radius: 14px; background: var(--rap-soft); overflow-wrap: anywhere; }

/* 创建页：先看真实模板效果，再上传左右人物；单模板默认选中。 */
.create-page { padding-block: 32px 40px; }
.create-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.create-heading h1 { font-size: 40px; }
.create-heading p { margin-top: 6px; color: var(--rap-muted); font-size: 14px; }
.create-credit { display: grid; grid-template-columns: auto auto; align-items: center; gap: 0 12px; padding: 10px 16px; border: 1px solid var(--rap-line); border-radius: 12px; background: white; font-size: 12px; }
.create-credit strong { grid-column: 2; grid-row: 1 / 3; color: var(--rap-orange); font-size: 28px; line-height: 1.2; }
.create-credit a { width: fit-content; }
.create-workspace { display: grid; grid-template-columns: 1.15fr 1fr; border: 1px solid var(--rap-line); border-radius: 20px; overflow: hidden; background: white; }
.create-template-panel, .create-upload-panel { min-width: 0; padding: 26px; }
.create-template-panel { background: #f6f1e9; }
.create-upload-panel { display: flex; flex-direction: column; border-left: 1px solid var(--rap-line); }
.create-step { display: flex; align-items: center; gap: 10px; font: 700 16px/1.5 Arial, Helvetica, sans-serif; text-transform: none; }
.create-step > span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--rap-line); border-radius: 50%; color: var(--rap-orange); background: white; font-size: 12px; }
.create-preview { position: relative; margin-top: 20px; border-radius: 12px; overflow: hidden; background: #2c1b12; }
.create-preview video { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: contain; }
.create-example-label { position: absolute; top: 12px; left: 12px; padding: 3px 9px; border-radius: 6px; background: rgb(24 21 17 / 80%); color: white; font-size: 11px; pointer-events: none; }
.create-preview-note { margin-top: 10px; font-size: 12px; color: var(--rap-muted); }
.create-template-option { display: flex; align-items: center; position: relative; gap: 14px; margin-top: 20px; padding: 10px; border: 2px solid var(--rap-orange); border-radius: 12px; background: white; cursor: pointer; }
.create-template-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.create-template-option:focus-within { outline: 3px solid var(--rap-orange); outline-offset: 4px; }
.create-template-option img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; }
.create-template-option strong { display: block; font-size: 14px; }
.create-template-option small { display: block; color: var(--rap-muted); font-size: 12px; }
.create-selected { margin-left: auto; font-size: 11px; color: var(--rap-orange); font-weight: 700; white-space: nowrap; }
.create-scene-info { margin-block: 20px; }
.create-scene-info h3 { font-size: 16px; }
.create-scene-info p { margin-top: 7px; color: var(--rap-muted); font-size: 13px; line-height: 1.6; }
#create-form { flex: 1; display: flex; flex-direction: column; }
#create-inputs { border: 0; padding: 0; margin: 0; min-width: 0; }
.create-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.create-photo-slot { min-width: 0; }
.create-photo-target { display: block; position: relative; cursor: pointer; }
.create-photo-name { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.create-photo-drop { position: relative; display: grid; place-items: center; aspect-ratio: 1.12; overflow: hidden; border: 1px dashed #bcae9c; border-radius: 12px; background: #fcfaf7; }
.create-photo-target:hover .create-photo-drop, .create-photo-target:focus-within .create-photo-drop { border-color: var(--rap-orange); background: var(--rap-soft); }
.create-photo-target:focus-within .create-photo-drop { outline: 3px solid var(--rap-orange); outline-offset: 3px; }
.create-photo-placeholder { display: grid; justify-items: center; gap: 8px; color: var(--rap-muted); font-size: 12px; }
.create-photo-placeholder svg { width: 28px; height: 28px; color: var(--rap-orange); }
.create-photo-preview { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; background: #eee8df; }
.create-photo-change { position: absolute; bottom: 8px; left: 8px; right: 8px; padding: 3px 6px; border-radius: 5px; background: rgb(24 21 17 / 80%); color: white; font-size: 11px; text-align: center; }
.create-photo-target input { position: absolute; left: 0; bottom: 0; width: 100%; height: calc(100% - 30px); opacity: 0; cursor: pointer; }
#create-inputs:disabled .create-photo-target, #create-inputs:disabled input { cursor: not-allowed; }
.create-photo-hint { margin-top: 7px; font-size: 11px; color: var(--rap-muted); line-height: 1.5; }
.create-photo-status { display: block; font-size: 11px; color: var(--rap-orange); line-height: 1.5; overflow-wrap: anywhere; }
.create-photo-help { margin-top: 14px; font-size: 11px; color: var(--rap-muted); line-height: 1.6; }
.create-upload-panel .confirmation { margin-block: 20px; gap: 9px; font-size: 11px; line-height: 1.6; }
.create-upload-panel .confirmation input { width: 16px; height: 16px; }
.create-submit-area { margin-top: auto; padding-top: 12px; }
.create-cost { margin-bottom: 8px; font-size: 12px; color: var(--rap-muted); text-align: center; }
#create-submit { width: 100%; border-radius: 10px; min-height: 50px; }
#create-feedback:not(:empty) { margin-top: 14px; padding: 12px; border-radius: 8px; background: var(--rap-soft); font-size: 13px; }
.create-results { margin-top: 32px; }
.create-results h2 { font: 700 19px/1.4 Arial, Helvetica, sans-serif; text-transform: none; }
.create-results .section-heading { margin-bottom: 12px; }
.create-results .section-heading a { font-size: 12px; }
.create-jobs { list-style: none; padding: 0; margin: 0; overflow-wrap: anywhere; font-size: 13px; color: var(--rap-muted); }
.create-jobs li { border-top: 1px solid var(--rap-line); padding-block: 18px; }
.create-jobs video { display: block; width: min(100%, 520px); max-height: 540px; margin-block: 16px; border-radius: 10px; }
@media (max-width: 800px) {
  .create-workspace { grid-template-columns: 1fr; }
  .create-upload-panel { border-left: 0; border-top: 1px solid var(--rap-line); }
  .create-template-panel, .create-upload-panel { padding: 20px; }
  .create-heading { flex-wrap: wrap; gap: 16px; }
  .create-heading h1 { font-size: 36px; }
  .create-credit { width: 100%; }
  .create-template-option { gap: 10px; }
  .create-template-option img { width: 64px; height: 52px; }
  .create-template-option strong { font-size: 13px; }
  .create-selected { font-size: 10px; }
  .create-page { padding-block: 24px 32px; }
}

/* 视频库用留白与媒体网格组织主次，避免把每段信息都装进大卡片。 */
body:has(#signed-in) { min-height: 100vh; display: flex; flex-direction: column; }
body:has(#signed-in) main { flex: 1; }
.account-summary { padding-block: 4px 28px; border-bottom: 1px solid var(--rap-line); gap: 24px; }
.profile-avatar { position: relative; display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--rap-soft); color: var(--rap-orange); font-size: 26px; font-weight: 700; overflow: hidden; }
.profile-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-label { color: var(--rap-muted); font-size: 12px; }
#account-name { margin-top: 2px; font: 700 20px/1.4 Arial, Helvetica, sans-serif; text-transform: none; overflow-wrap: anywhere; }
.account-summary #identity { margin-top: 2px; font-size: 13px; }
.account-summary .waitlist-button { margin-top: 0; white-space: nowrap; }
.account-summary #credits { color: var(--rap-orange); }
.video-library { margin-top: 40px; }
.video-library h1 { font-size: 46px; }
.video-library .section-heading { margin-bottom: 24px; }
.video-library .section-heading .waitlist-button { margin: 0; }
#video-feedback { color: var(--rap-muted); }
#video-feedback:empty { display: none; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.video-card { min-width: 0; }
.video-preview { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; padding: 16px; border-radius: 16px; overflow: hidden; background: var(--rap-ink); color: var(--rap-soft); font-size: 14px; text-align: center; }
.video-preview:has(video) { padding: 0; }
.video-preview video { display: block; width: 100%; height: 100%; max-height: 280px; object-fit: contain; }
.video-preview[data-status="queued"], .video-preview[data-status="processing"] { background: var(--rap-soft); color: var(--rap-orange); border: 1px solid var(--rap-line); }
.video-card h2 { margin-top: 14px; font: 700 14px/1.5 Arial, Helvetica, sans-serif; text-transform: none; overflow-wrap: anywhere; }
.video-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--rap-muted); font-size: 12px; }
.video-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.video-status[data-status="succeeded"] { color: #277442; }
.video-status[data-status="failed"] { color: var(--rap-orange); }
.video-refund, .video-card > a { font-size: 13px; }
.video-card > a { display: block; width: fit-content; padding-block: 8px; }
.video-empty { display: flex; min-height: 340px; flex-direction: column; align-items: center; justify-content: center; gap: 20px; border: 1px dashed var(--rap-line); border-radius: var(--rap-radius); text-align: center; color: var(--rap-muted); padding: 32px 20px; }
.video-empty .waitlist-button { margin: 0; }
.video-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; background: var(--rap-soft); border-radius: 20px; color: var(--rap-orange); }
.video-empty-icon svg { width: 32px; height: 32px; }
#more-videos { margin-top: 24px; }
#order-history { margin-top: 40px; border-top: 1px solid var(--rap-line); border-bottom: 1px solid var(--rap-line); }
#order-history summary { cursor: pointer; padding-block: 20px; font-size: 15px; font-weight: 700; }
.orders-content { padding-bottom: 24px; }
.orders-content > button { margin-bottom: 16px; }
.account-footer { padding-block: 20px 32px; text-align: center; color: var(--rap-muted); font-size: 12px; }
.account-footer .legal-links { margin: 0 0 12px; }
.account-footer > p { max-width: 780px; margin-inline: auto; }
.account-footer > p + p { margin-top: 12px; }
@media (max-width: 1000px) {
  .account-summary { flex-wrap: wrap; gap: 16px; }
  .account-summary .account-identity { flex: 1 1 calc(100% - 100px); }
  .account-summary .credit-balance { flex: 1; padding-left: 0; border: 0; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .video-grid { grid-template-columns: 1fr; }
  .account-summary .credit-balance { flex-basis: 100%; }
  .account-summary .waitlist-button, .account-summary #sign-out { flex: 1; }
  .video-library .section-heading { align-items: flex-start; }
  .video-library h1 { font-size: 40px; }
}
