:root {
  --navy: #071b4f;
  --navy-2: #0b2d78;
  --blue: #2859ff;
  --blue-2: #587dff;
  --violet: #8e45f5;
  --sky: #dff1ff;
  --paper: #f7fbff;
  --white: #ffffff;
  --ink: #14234f;
  --muted: #7181a8;
  --line: rgba(71, 112, 194, 0.16);
  --shadow: 0 18px 55px rgba(27, 72, 160, 0.13);
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --text-xs: clamp(10px, 0.48vw, 12px);
  --text-sm: clamp(12px, 0.56vw, 14px);
  --text-md: clamp(13px, 0.62vw, 16px);
  --text-lg: clamp(18px, 0.92vw, 22px);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--navy); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--ink); background: var(--sky); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: white; }
.brand-logo { position: relative; display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: linear-gradient(145deg, #2046ff, #6e4cff); box-shadow: 0 10px 22px rgba(37,80,255,.3); transform: rotate(45deg); }
.brand-logo::after { position: absolute; inset: 7px; border: 2px solid rgba(255,255,255,.92); border-radius: 9px; content: ""; }
.brand-logo i { position: absolute; z-index: 1; width: 3px; border-radius: 4px; background: white; transform: rotate(-45deg); }
.brand-logo i:nth-child(1) { height: 10px; margin-left: -12px; }
.brand-logo i:nth-child(2) { height: 20px; margin-left: -4px; }
.brand-logo i:nth-child(3) { height: 14px; margin-left: 4px; }
.brand-logo i:nth-child(4) { height: 7px; margin-left: 12px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 19px; letter-spacing: .04em; }
.brand small { margin-top: 3px; color: rgba(255,255,255,.65); font-size: var(--text-xs); letter-spacing: .08em; }
.kicker { display: inline-block; color: rgba(255,255,255,.65); font-size: var(--text-xs); font-weight: 800; letter-spacing: .12em; }
.kicker.blue { color: var(--blue); }
.error { min-height: 18px; margin: 0; color: #d34b4b; font-size: var(--text-xs); }

.login-shell { display: grid; grid-template-columns: 1.05fr .95fr; width: calc(100% - 32px); max-width: 1600px; min-height: calc(100vh - 36px); margin: 18px auto; overflow: hidden; border-radius: 28px; background: var(--paper); box-shadow: 0 28px 80px rgba(7,27,79,.2); }
.login-left { position: relative; display: flex; min-height: 700px; padding: 48px 58px; overflow: hidden; flex-direction: column; color: white; background: radial-gradient(circle at 80% 24%, rgba(76,115,255,.42), transparent 32%), linear-gradient(145deg,#071b4f,#0a2b79 68%,#2552c8); }
.login-left::before { position: absolute; inset: 0; content: ""; opacity: .15; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 62px 62px; mask-image: linear-gradient(to bottom right,black,transparent 70%); }
.login-left > * { position: relative; z-index: 1; }
.login-copy { margin: auto 0; }
.login-copy h1 { margin: 18px 0; font-size: clamp(52px, 6vw, 83px); line-height: 1.03; letter-spacing: -.065em; }
.login-copy h1 em { color: #a9c9ff; font-style: normal; }
.login-copy p { max-width: 510px; margin: 0; color: rgba(255,255,255,.68); font-size: 14px; line-height: 1.8; }
.login-bars { position: absolute !important; right: 55px; bottom: 70px; display: flex; height: 115px; align-items: center; gap: 7px; opacity: .65; }
.login-bars i { width: 5px; height: 28px; border-radius: 7px; background: linear-gradient(to top,#5e83ff,#b8d6ff); }
.login-bars i:nth-child(2n) { height: 68px; }
.login-bars i:nth-child(3n) { height: 100px; }
.login-bars i:nth-child(4n) { height: 46px; }
.login-right { display: grid; padding: 48px; place-items: center; background: radial-gradient(circle at 80% 12%, #ddefff, transparent 32%), var(--paper); }
.login-card { display: grid; width: min(100%, 405px); gap: 18px; }
.login-card h2 { margin: -2px 0 -10px; font-size: 39px; letter-spacing: -.04em; }
.login-card > p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.login-card form { display: grid; gap: 17px; }
label { display: grid; gap: 8px; }
label > span, .field > span { display: flex; justify-content: space-between; color: #4d6085; font-size: var(--text-sm); font-weight: 700; }
label > span small, .field > span small { color: #94a2bf; font-weight: 500; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: rgba(255,255,255,.82); color: var(--ink); transition: .18s ease; }
input, select { height: 44px; padding: 0 13px; }
textarea { padding: 15px; resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { border-color: #6b8eff; background: white; box-shadow: 0 0 0 4px rgba(61,104,255,.1); }
input::placeholder, textarea::placeholder { color: #a2aec5; }
.gradient-button { display: flex; height: 49px; padding: 0 18px; align-items: center; justify-content: space-between; border: 0; border-radius: 12px; background: linear-gradient(100deg,#2551ff,#8243f3); color: white; font-weight: 800; box-shadow: 0 10px 22px rgba(51,82,242,.26); }
.auth-switch { display: flex; justify-content: center; gap: 6px; color: var(--muted); font-size: var(--text-sm); }
.auth-switch button { padding: 0; border: 0; background: transparent; color: var(--blue); font-weight: 700; }
.login-note { color: #9aa7bf; font-size: var(--text-xs); text-align: center; }
.login-modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; padding: 20px; place-items: center; background: rgba(10,31,74,.36); backdrop-filter: blur(8px); }
.login-dialog { position: relative; display: grid; width: min(420px,100%); padding: 28px; gap: 13px; border: 1px solid rgba(66,102,165,.18); border-radius: 18px; background: #f9fbff; box-shadow: 0 28px 80px rgba(7,27,79,.26); }
.login-dialog h2 { margin: 0; font-size: 29px; }
.login-dialog > p { margin: -4px 0 5px; color: var(--muted); font-size: var(--text-sm); }
.login-dialog form { display: grid; gap: 14px; }
.login-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #6c7e9e; font-size: 17px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 9px; background: #edf3fc; }
.auth-tabs button { height: 35px; border: 0; border-radius: 7px; background: transparent; color: #7384a3; font-size: var(--text-sm); }
.auth-tabs button.active { background: white; color: var(--blue); box-shadow: 0 3px 10px rgba(39,76,150,.1); }
.code-row { display: grid; grid-template-columns: 1fr 116px; gap: 8px; }
.code-row button { border: 1px solid #cfddf4; border-radius: 10px; background: #f2f7ff; color: var(--blue); font-size: var(--text-sm); }
.code-row button:disabled { cursor: wait; opacity: .65; }
.signup-notice { margin: -4px 0 0; color: #4773c7; font-size: var(--text-xs); text-align: center; }

.app-shell { position: relative; display: flex; width: 100%; max-width: none; min-height: 100vh; margin: 0; overflow: hidden; flex-direction: column; border-radius: 0; background: #f5f9ff; }
.sidebar { position: relative; z-index: 5; display: flex; height: 74px; min-height: 74px; padding: 0 clamp(20px,3vw,58px); align-items: center; color: var(--navy); background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(47,87,149,.12); box-shadow: 0 4px 18px rgba(23,55,117,.06); backdrop-filter: blur(16px); }
.sidebar .brand { flex: 0 0 auto; margin: 0 clamp(24px,3vw,52px) 0 0; color: var(--navy); }
.sidebar .brand small { color: #7285a9; }
.brand-logo { width: 42px; height: 42px; border-radius: 13px; }
.brand strong { font-size: 17px; }
.side-nav { display: flex; gap: 7px; align-items: center; }
.side-nav button { display: flex; height: 42px; padding: 0 15px; align-items: center; gap: 8px; border: 0; border-radius: 10px; background: transparent; color: #566b91; font-size: var(--text-sm); text-align: left; transition: .18s; }
.side-nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.side-nav button:hover { background: #f1f5fd; }
.side-nav button.active { background: #eaf1ff; color: var(--blue); box-shadow: none; }
.side-bottom { display: flex; margin-left: auto; align-items: center; gap: 10px; }
.credit-box { position: relative; min-width: 116px; padding: 7px 12px; overflow: hidden; border: 1px solid #dbe6f8; border-radius: 10px; background: #f3f7ff; }
.credit-box > div { justify-content: flex-start; gap: 6px; color: #6d7f9f; font-size: var(--text-xs); }
.credit-box > div i { width: 6px; height: 6px; border-radius: 50%; background: #60d9b3; box-shadow: 0 0 0 4px rgba(96,217,179,.11); }
.credit-box > strong { display: inline-block; margin: 1px 10px 0 0; color: var(--navy); font-size: 18px; font-weight: 700; }
.credit-box > button { padding: 0; border: 0; background: transparent; color: #5272ae; font-size: var(--text-xs); }
.credit-cube { display: none; }
.side-logout { height: 34px; padding: 0 10px; border: 1px solid #dbe4f2; border-radius: 8px; background: white; color: #65799c; font-size: var(--text-xs); }

.main-stage { position: relative; min-width: 0; min-height: calc(100vh - 74px); overflow: hidden; background: radial-gradient(circle at 78% 4%, #e2e7ff, transparent 27%), radial-gradient(circle at 48% 14%, #d8f2ff, transparent 36%), linear-gradient(180deg,#e5f3ff 0,#eef2ff 220px,#f7faff 390px,#f4f9ff 100%); }
.main-stage::before { position: absolute; top: 0; right: 0; left: 0; height: 290px; content: ""; opacity: .45; background-image: linear-gradient(120deg,transparent 20%,rgba(255,255,255,.6) 21%,transparent 42%), radial-gradient(ellipse at 20% 100%,rgba(67,123,255,.35),transparent 42%); pointer-events: none; }
.app-topbar { position: relative; z-index: 1; display: flex; width: min(calc(100% - 48px),2200px); height: 58px; margin: 0 auto; padding: 0 6px; align-items: center; justify-content: flex-end; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); }
.breadcrumb span { display: inline-flex; padding: 7px 11px; align-items: center; gap: 6px; border-radius: 18px; background: rgba(255,255,255,.8); color: var(--blue); font-weight: 800; box-shadow: 0 6px 18px rgba(46,85,180,.08); }
.breadcrumb i { color: #91a4c9; font-style: normal; }
.breadcrumb strong { color: #41577d; }
.user-actions { display: flex; align-items: center; gap: 9px; }
.top-nav-link, .top-credit { height: 34px; padding: 0 12px; border: 1px solid rgba(62,91,149,.14); border-radius: 9px; background: rgba(255,255,255,.7); color: #5d7296; font-size: var(--text-sm); }
.top-credit { display: inline-flex; align-items: center; gap: 7px; }
.top-credit span { color: #7f90ad; font-size: var(--text-xs); }
.top-credit strong { color: var(--blue); font-size: var(--text-sm); }
.top-recharge { height: 34px; padding: 0 13px; border: 0; border-radius: 9px; background: linear-gradient(100deg,#2858f5,#7649f2); color: white; font-size: var(--text-sm); font-weight: 700; }
.user-avatar { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; background: var(--navy); color: white; font-size: 12px; }
.user-actions > div strong, .user-actions > div small { display: block; }
.user-actions > div strong { color: var(--navy); font-size: var(--text-sm); }
.user-actions > div small { margin-top: 2px; color: var(--muted); font-size: var(--text-xs); }
.top-logout, .top-login { height: 33px; padding: 0 12px; border: 1px solid rgba(62,91,149,.16); border-radius: 9px; background: rgba(255,255,255,.58); color: #5f7396; font-size: var(--text-sm); }
.top-login { border-color: transparent; background: var(--blue); color: white; font-weight: 700; }

.page-view { position: relative; z-index: 1; width: min(calc(100% - 48px),2200px); margin: 0 auto; padding: 0 0 50px; animation: enter .24s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.hero { position: relative; display: flex; height: 220px; padding: 30px clamp(8px,.7vw,16px) 0; overflow: hidden; align-items: flex-start; }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { margin: 12px 0 9px; color: #102d67; font-size: clamp(40px, 4vw, 61px); line-height: 1.03; letter-spacing: -.055em; }
.hero p { margin: 0; color: #46648f; font-size: var(--text-md); line-height: 1.7; }
.hero-art { position: absolute; right: 25px; bottom: 3px; display: flex; width: 49%; height: 180px; align-items: center; justify-content: center; }
.hero-wave { display: flex; height: 112px; align-items: center; gap: 5px; opacity: .55; }
.hero-wave i { width: 5px; height: 20px; border-radius: 5px; background: linear-gradient(to top,#9db9ff,#3f65ff); }
.hero-wave i:nth-child(2n) { height: 55px; }
.hero-wave i:nth-child(3n) { height: 90px; }
.hero-wave i:nth-child(4n) { height: 35px; }
.mic-illustration { position: relative; display: grid; width: 155px; height: 150px; place-items: center; }
.mic-head { position: relative; z-index: 2; display: flex; width: 67px; height: 100px; align-items: center; justify-content: center; gap: 5px; border: 3px solid #4f74c8; border-radius: 35px; background: linear-gradient(145deg,#dcecff,#7799e8); box-shadow: inset 6px 0 10px rgba(255,255,255,.65), inset -6px 0 12px rgba(57,91,185,.35), 0 12px 22px rgba(43,84,177,.2); }
.mic-head i { width: 3px; height: 18px; border-radius: 3px; background: #365cac; }
.mic-head i:nth-child(2) { height: 39px; }
.mic-head i:nth-child(3) { height: 27px; }
.mic-neck { position: absolute; bottom: 28px; width: 7px; height: 30px; border-radius: 5px; background: #486cae; }
.mic-base { position: absolute; bottom: 18px; width: 73px; height: 15px; border-radius: 50%; background: linear-gradient(to bottom,#6e91db,#31599e); box-shadow: 0 8px 6px rgba(33,67,124,.22); }
.mic-ring { position: absolute; inset: 18px 2px 0; border: 1px solid rgba(61,100,198,.22); border-radius: 50%; box-shadow: 0 0 0 13px rgba(74,105,193,.06),0 0 0 26px rgba(74,105,193,.035); }

.studio-dashboard { display: grid; height: clamp(620px,calc(100vh - 420px),820px); min-height: 0; grid-template-columns: minmax(0,1.75fr) minmax(340px,.62fr); gap: 16px; align-items: stretch; }
.config-card, .preview-card, .clone-panel { border: 1px solid rgba(86,116,179,.15); border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.config-card { display: flex; height: 100%; min-height: 0; padding: 24px 28px 21px; overflow: hidden; flex-direction: column; }
.step-title { display: flex; align-items: center; gap: 11px; }
.step-title > span { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--blue); color: white; font-size: 12px; font-weight: 800; }
.step-title h2 { margin: 0; font-size: var(--text-lg); }
.step-title p { margin: 3px 0 0; color: var(--muted); font-size: var(--text-sm); }
.clone-tools { display: flex; margin: 14px 0; padding: 9px 11px; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #d6e4fb; border-radius: 11px; background: linear-gradient(90deg,#f1f7ff,#f9fbff); }
.clone-tools-copy { display: flex; min-width: 0; align-items: center; gap: 9px; }
.clone-tool-icon { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: #e3ecff; color: #426cda; font-size: 14px; }
.clone-tools-copy strong, .clone-tools-copy small { display: block; }
.clone-tools-copy strong { font-size: var(--text-sm); }
.clone-tools-copy small { margin-top: 2px; color: #8091af; font-size: var(--text-xs); }
.clone-tools-actions { display: flex; gap: 7px; }
.clone-tools-actions button { height: 35px; padding: 0 13px; border: 1px solid #ceddf5; border-radius: 8px; background: white; color: #48679c; font-size: var(--text-sm); font-weight: 700; white-space: nowrap; }
.clone-tools-actions button:first-child { border-color: transparent; background: linear-gradient(100deg,#315df1,#6b54ed); color: white; }
.clone-tools-actions b { display: inline-grid; min-width: 16px; height: 16px; margin-left: 3px; padding: 0 3px; place-items: center; border-radius: 8px; background: #e6edfb; color: #365eae; font-size: 8px; }
.clone-quick { display: grid; grid-template-columns: minmax(88px,.75fr) auto minmax(72px,.7fr) minmax(118px,1fr) minmax(145px,1.2fr) auto auto; gap: 7px; margin-top: 13px; padding: 8px 9px; align-items: center; border: 1px solid #d7e4fb; border-radius: 10px; background: linear-gradient(90deg,#f2f7ff,#f8faff); }
.clone-quick-title { display: grid; gap: 1px; min-width: 0; }
.clone-quick-title strong { font-size: 10px; color: #2b4a80; }
.clone-quick-title small { overflow: hidden; color: #8a9ab7; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.mini-upload { display: inline-flex; cursor: pointer; }
.mini-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mini-upload span { display: inline-flex; height: 31px; padding: 0 9px; align-items: center; border: 1px solid #c7d8f4; border-radius: 7px; background: white; color: #3b63b3; font-size: 8px; font-weight: 700; white-space: nowrap; }
.mini-upload:hover span, .mini-upload.has-file span { border-color: #7c9cf1; background: #eef4ff; }
.quick-file-name { overflow: hidden; color: #8190aa; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.clone-quick > input:not(.visually-hidden), .clone-quick > select:not(.visually-hidden) { height: 31px; padding: 0 8px; border-radius: 7px; font-size: 8px; }
.quick-clone-button, .my-voices-button { height: 31px; padding: 0 10px; border: 0; border-radius: 7px; font-size: 8px; font-weight: 700; white-space: nowrap; }
.quick-clone-button { background: linear-gradient(100deg,#2857f5,#704bf0); color: white; }
.quick-clone-button .button-loading { display: none; align-items: center; gap: 5px; }
.quick-clone-button.loading .button-idle { display: none; }
.quick-clone-button.loading .button-loading { display: inline-flex; }
.quick-clone-button:disabled { cursor: wait; opacity: .7; }
.my-voices-button { border: 1px solid #d2def1; background: white; color: #526b94; }
.my-voices-button b { display: inline-grid; min-width: 15px; height: 15px; margin-left: 3px; padding: 0 3px; place-items: center; border-radius: 8px; background: #e4ecfb; color: #315bb2; font-size: 7px; }
.clone-quick > .error { grid-column: 1 / -1; min-height: 0; padding-left: 2px; font-size: 8px; }
.model-selector { margin-top: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f9fbff; }
.model-selector > label { margin-bottom: 9px; color: #4d6085; font-size: var(--text-sm); font-weight: 700; }
.model-select-row { display: grid; grid-template-columns: 34px minmax(180px,.9fr) minmax(0,1.2fr); align-items: center; gap: 11px; }
.model-symbol { display: flex; width: 33px; height: 33px; align-items: center; justify-content: center; gap: 3px; border-radius: 9px; background: #e8f0ff; }
.model-symbol i { width: 2px; height: 10px; background: #5c7bff; }
.model-symbol i:nth-child(2) { height: 20px; }
.model-select-row select { height: 46px; border-radius: 9px; font-size: var(--text-md); font-weight: 700; }
.model-meta { overflow: hidden; color: #7183a4; font-size: var(--text-sm); text-overflow: ellipsis; white-space: nowrap; }
#generateForm { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.voice-fields { order: 3; margin-top: 12px; }
.expression-fields { order: 4; margin-top: 13px; }
#generateForm .model-selector { order: 2; }
#generateForm .text-field { order: 1; margin-top: 0; }
#generateForm .advanced { order: 5; }
#generateForm .generate-footer { order: 6; }
#generateForm > .error { order: 7; }
.form-grid { display: grid; gap: 13px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.config-card > .form-grid { margin-top: 14px; }
.select-with-avatar { position: relative; }
.select-with-avatar select { padding-left: 45px; }
.voice-avatar-small { position: absolute; z-index: 1; top: 7px; left: 8px; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: linear-gradient(145deg,#d9e7ff,#91adf6); color: #284daf; font-size: 9px; }
.clone-inline-link { margin: 8px 0 -3px; padding: 0; border: 0; background: transparent; color: var(--blue); font-size: 9px; font-weight: 700; }
.text-field { display: flex; min-height: 190px; margin-top: 12px; flex: 1; flex-direction: column; }
.text-field textarea { min-height: 190px; flex: 1; font-size: var(--text-md); }
.textarea-wrap { position: relative; display: flex; min-height: 190px; flex: 1; }
.textarea-wrap textarea { padding-bottom: 32px; }
.textarea-wrap > small { position: absolute; right: 13px; bottom: 10px; color: #7d8eae; font-size: var(--text-xs); pointer-events: none; }
.config-card .field input, .config-card .field select { height: 46px; font-size: var(--text-md); }
.advanced { margin-top: 12px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #f3f7ff; }
.advanced summary { display: flex; align-items: center; justify-content: space-between; color: #4b617f; font-size: var(--text-sm); font-weight: 700; list-style: none; cursor: pointer; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced[open] summary b { transform: rotate(90deg); }
.advanced-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; padding-top: 14px; }
.range-field { display: grid; gap: 7px; align-content: center; }
.range-field > span { display: flex; justify-content: space-between; color: #536487; font-size: var(--text-xs); }
input[type="range"] { height: 4px; padding: 0; border: 0; accent-color: var(--blue); box-shadow: none; }
.generate-footer { display: flex; margin-top: auto; padding-top: 17px; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); }
.cost { display: flex; align-items: center; gap: 12px; color: #4d5e7f; font-size: var(--text-sm); }
.cost strong { color: var(--ink); font-size: var(--text-md); }
.cost b { color: var(--blue); font-size: 22px; }
.generate-button { min-width: 211px; height: 50px; padding: 0 18px; border: 0; border-radius: 25px; background: linear-gradient(100deg,#2455ff,#8447f6); color: white; font-weight: 800; box-shadow: 0 12px 25px rgba(52,85,244,.25); }
.generate-button:hover { transform: translateY(-1px); }
.generate-button:disabled { cursor: wait; opacity: .75; }
.button-loading { display: none; }
.generate-button.loading .button-idle { display: none; }
.generate-button.loading .button-loading { display: inline-flex; align-items: center; gap: 8px; }
.spinner { width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.3); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mini-wave { margin-right: 5px; font-style: normal; letter-spacing: -3px; }
.generate-button b { margin-left: 14px; font-size: 17px; }

.preview-card { display: flex; min-height: 0; padding: 23px; flex-direction: column; background: radial-gradient(circle at 80% 22%,rgba(230,236,255,.9),transparent 32%),rgba(255,255,255,.92); }
.preview-heading { display: flex; align-items: center; justify-content: space-between; }
.preview-heading > div { display: flex; align-items: center; gap: 8px; }
.preview-heading > div span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; background: var(--blue); color: white; font-size: 8px; }
.preview-heading strong { font-size: var(--text-md); }
.preview-heading button { padding: 0; border: 0; background: transparent; color: #61779b; font-size: var(--text-sm); }
.voice-preview-name { display: flex; margin: 17px 0 5px; align-items: center; justify-content: space-between; }
.voice-preview-name span { font-size: var(--text-md); font-weight: 700; }
.voice-preview-name small { color: var(--muted); font-size: var(--text-xs); }
.preview-stage { position: relative; display: grid; min-height: 265px; place-items: center; }
.preview-halo { position: absolute; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle,rgba(100,139,255,.2),rgba(100,139,255,.02) 65%,transparent 70%); box-shadow: 0 0 0 18px rgba(95,137,255,.04),0 0 0 36px rgba(95,137,255,.025); }
.preview-play { position: relative; z-index: 2; display: grid; width: 78px; height: 78px; place-items: center; border: 0; border-radius: 50%; background: linear-gradient(145deg,#6f9dff,#315dff); color: white; box-shadow: inset 0 8px 18px rgba(255,255,255,.35),0 12px 30px rgba(49,93,255,.3); }
.preview-play span { margin-left: 4px; font-size: 24px; }
.preview-play.playing span { margin-left: 0; font-size: 18px; }
.preview-bars { position: absolute; bottom: 56px; display: flex; height: 45px; align-items: center; gap: 3px; opacity: .75; }
.preview-bars i { width: 2px; height: 8px; border-radius: 3px; background: #547cff; }
.preview-bars i:nth-child(2n) { height: 22px; }
.preview-bars i:nth-child(3n) { height: 34px; }
.preview-bars i:nth-child(5n) { height: 17px; }
.preview-play.playing + .preview-bars i { animation: bars .7s ease-in-out infinite alternate; }
.preview-bars i:nth-child(2n) { animation-delay: -.2s; }
.preview-bars i:nth-child(3n) { animation-delay: -.4s; }
@keyframes bars { to { transform: scaleY(.45); opacity: .45; } }
.preview-stage audio { display: none; }
.preview-timeline { position: absolute; right: 4px; bottom: 4px; left: 4px; display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 7px; color: #7e8daa; font-size: var(--text-xs); }
.preview-timeline input { accent-color: var(--blue); }
.preview-tip { display: flex; margin-top: 4px; padding: 11px; align-items: flex-start; gap: 8px; border-radius: 9px; background: #f2f6fd; }
.preview-tip span { display: grid; width: 16px; height: 16px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #dfe8f8; color: #64789b; font-size: 8px; }
.preview-tip p { margin: 0; color: #7282a1; font-size: var(--text-sm); line-height: 1.6; }
.preview-placeholder { display: grid; flex: 1; place-items: center; align-content: center; gap: 8px; color: #9aa9c3; font-size: var(--text-sm); }
.preview-placeholder span { font-size: 28px; color: #c3d1e8; }
.generated-result { margin-top: 12px; padding-top: 13px; border-top: 1px solid var(--line); }
.result-success { display: flex; align-items: center; gap: 9px; }
.result-success > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #2cc99b; color: white; }
.result-success strong, .result-success small { display: block; }
.result-success strong { font-size: var(--text-sm); }
.result-success small { margin-top: 2px; color: var(--muted); font-size: var(--text-xs); }
.generated-result h3 { margin: 12px 0 7px; font-size: var(--text-md); }
.generated-result audio { width: 100%; height: 35px; }
.download-link { display: block; margin-top: 7px; padding: 8px; border-radius: 8px; background: var(--navy); color: white; font-size: 8px; text-align: center; }

.voice-workbench { display: flex; height: 100%; min-height: 0; padding: 22px; overflow: hidden; flex-direction: column; gap: 13px; }
.voice-workbench-top { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); align-items: end; gap: 12px; }
.voice-workbench-top .field { gap: 7px; }
.voice-workbench-top select, .voice-workbench-top input { height: 43px; }
.voice-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 11px; background: #edf3fd; }
.voice-tabs button { height: 38px; border: 0; border-radius: 8px; background: transparent; color: #7181a0; font-size: var(--text-sm); font-weight: 700; }
.voice-tabs button.active { background: white; color: var(--blue); box-shadow: 0 3px 12px rgba(42,80,155,.12); }
.voice-tabs b { display: inline-grid; min-width: 17px; height: 17px; margin-left: 3px; padding: 0 4px; place-items: center; border-radius: 9px; background: #e8eef9; font-size: var(--text-xs); }
.voice-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: var(--text-xs); }
.voice-table-toolbar button { padding: 0; border: 0; background: transparent; color: var(--blue); font-size: var(--text-xs); }
.voice-table { display: grid; min-height: 0; flex: 1 1 0; gap: 6px; overflow-y: auto; overflow-x: hidden; padding-right: 3px; align-content: start; }
.voice-table-row { display: grid; width: 100%; min-height: 48px; padding: 7px 9px; align-items: center; gap: 9px; border: 1px solid #e0e8f5; border-radius: 10px; background: #fbfdff; color: var(--ink); text-align: left; }
.voice-table-row.system-row { grid-template-columns: 30px minmax(0,1fr) auto; }
.voice-table-row:hover, .voice-table-row.selected { border-color: #9eb6f3; background: #f3f7ff; }
.voice-table-row.selected { box-shadow: inset 3px 0 var(--blue); }
.voice-row-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: linear-gradient(145deg,#d7e8ff,#8fb3f3); color: #284e9e; font-size: 11px; font-weight: 700; box-shadow: inset 0 1px 4px rgba(255,255,255,.7); }
.voice-row-avatar.gender-男 { background: linear-gradient(145deg,#dbe7ff,#82a7ed); color: #23468f; }
.voice-row-avatar.gender-女 { background: linear-gradient(145deg,#ffe5ed,#f2a3bd); color: #9a4261; }
.voice-row-avatar.gender-童声 { background: linear-gradient(145deg,#fff1cf,#f0c36d); color: #87601b; }
.voice-row-avatar.clone-avatar { background: linear-gradient(145deg,#e5dfff,#ad98ef); color: #5b3fa3; }
.voice-table-row > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.voice-table-row strong { overflow: hidden; font-size: var(--text-sm); text-overflow: ellipsis; white-space: nowrap; }
.voice-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.voice-tags b { padding: 2px 5px; border-radius: 5px; background: #edf3fd; color: #6b7e9e; font-size: 9px; font-weight: 600; }
.voice-play-button { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: #eef4ff; color: var(--blue); font-size: 9px; font-style: normal; }
.voice-table-row:hover .voice-play-button, .voice-table-row.selected .voice-play-button { background: var(--blue); color: white; }
.clone-row { display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 0; overflow: hidden; }
.voice-row-main { display: grid; min-width: 0; padding: 7px 9px; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 9px; border: 0; background: transparent; color: inherit; text-align: left; }
.voice-row-main:disabled { cursor: wait; opacity: .65; }
.voice-row-delete { padding: 0 9px; border: 0; border-left: 1px solid #e4ebf5; background: white; color: #ad5757; font-size: var(--text-xs); }
.voice-table-empty { display: grid; min-height: 210px; place-items: center; align-content: center; gap: 7px; border: 1px dashed #bfd0ea; border-radius: 11px; color: #8495b4; text-align: center; }
.voice-table-empty strong { color: #50688f; font-size: var(--text-sm); }
.voice-table-empty span { font-size: var(--text-xs); }
.voice-table-empty button { margin-top: 4px; padding: 7px 10px; border: 1px solid #cddbf0; border-radius: 7px; background: white; color: var(--blue); font-size: var(--text-xs); }
.audio-bottom { display: grid; margin-top: auto; padding-top: 14px; gap: 9px; border-top: 1px solid var(--line); }
.audio-bottom-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.audio-bottom-head span { overflow: hidden; font-size: var(--text-sm); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.audio-bottom-head small { flex: 0 0 auto; color: var(--muted); font-size: var(--text-xs); }
.audio-bottom audio { width: 100%; height: 38px; }
.audio-bottom .download-link { margin-top: 0; padding: 9px; font-size: var(--text-sm); }

.clone-panel { margin-top: 15px; padding: 22px 25px; scroll-margin-top: 15px; }
.clone-heading { display: flex; align-items: center; justify-content: space-between; }
.clone-free { padding: 6px 9px; border-radius: 8px; background: #e9f0ff; color: var(--blue); font-size: 8px; font-weight: 800; }
.clone-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; margin-top: 18px; }
.clone-form { display: grid; gap: 13px; }
.upload-zone { position: relative; display: grid; min-height: 150px; padding: 20px; place-items: center; align-content: center; gap: 6px; border: 1px dashed #9db4e1; border-radius: 13px; background: #f7faff; text-align: center; cursor: pointer; transition: .18s; }
.upload-zone:hover, .upload-zone.dragging, .upload-zone.has-file { border-color: var(--blue); background: #eef4ff; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-plus { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: #e4ecff; color: var(--blue); font-size: 20px; }
.upload-zone strong { font-size: var(--text-sm); }
.upload-zone small { color: var(--muted); font-size: var(--text-xs); }
.clone-modal { width: min(560px,100%); padding: 23px; border: 1px solid rgba(74,113,185,.18); border-radius: 18px; background: #f9fbff; box-shadow: 0 25px 80px rgba(7,27,79,.25); }
.clone-modal-head { display: flex; margin-bottom: 17px; align-items: flex-start; justify-content: space-between; gap: 18px; }
.clone-modal-head > div > span { color: var(--blue); font-size: var(--text-xs); font-weight: 800; letter-spacing: .08em; }
.clone-modal-head h2 { margin: 4px 0 5px; font-size: 24px; }
.clone-modal-head p { margin: 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.6; }
.clone-modal-head > button { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #637797; font-size: 17px; }
.clone-modal-fields { display: grid; grid-template-columns: 1fr 1.15fr; gap: 12px; margin-top: 14px; }
.clone-modal-fields label { display: grid; gap: 7px; }
.clone-modal-fields label > span { color: #536487; font-size: var(--text-sm); font-weight: 700; }
.clone-compatible { display: grid; align-content: center; gap: 7px; padding: 10px 12px; border: 1px solid #d9e5f8; border-radius: 10px; background: #f3f8ff; }
.clone-compatible span { color: #536487; font-size: var(--text-sm); font-weight: 700; }
.clone-compatible strong { color: var(--blue); font-size: var(--text-xs); }
.clone-modal-foot { display: flex; margin-top: 16px; align-items: center; justify-content: space-between; gap: 15px; }
.clone-modal-foot p { margin: 0; color: var(--muted); font-size: var(--text-xs); line-height: 1.5; }
.clone-modal-foot button { min-width: 130px; height: 41px; padding: 0 14px; border: 0; border-radius: 10px; background: linear-gradient(100deg,#2857f5,#714cf0); color: white; font-size: var(--text-sm); font-weight: 800; }
.clone-modal-foot .button-loading { display: none; align-items: center; gap: 6px; }
.clone-modal-foot button.loading .button-idle { display: none; }
.clone-modal-foot button.loading .button-loading { display: inline-flex; }
.clone-fields { grid-template-columns: 1.15fr 1fr .7fr; }
.preprocess-switch { display: flex; align-items: center; gap: 8px; color: #536487; }
.preprocess-switch input { width: 15px; height: 15px; accent-color: var(--blue); }
.preprocess-switch span { display: flex; align-items: center; gap: 7px; }
.preprocess-switch b { font-size: 9px; }
.preprocess-switch small { color: var(--muted); font-size: 8px; }
.clone-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.clone-submit-row p { margin: 0; color: var(--muted); font-size: 8px; }
.clone-button { min-width: 128px; height: 40px; border: 0; border-radius: 11px; background: linear-gradient(100deg,#2553ff,#8645f7); color: white; font-size: 9px; font-weight: 800; }
.my-voices { min-width: 0; padding-left: 18px; border-left: 1px solid var(--line); }
.my-voices-head { display: flex; margin-bottom: 12px; align-items: center; justify-content: space-between; }
.my-voices-head strong, .my-voices-head small { display: block; }
.my-voices-head strong { font-size: 11px; }
.my-voices-head small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.my-voices-head button { padding: 0; border: 0; background: transparent; color: var(--blue); font-size: 8px; }
.voice-library { display: grid; gap: 8px; max-height: 250px; overflow: auto; }
.voice-card { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; padding: 10px; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 11px; background: #f9fbff; }
.voice-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: linear-gradient(145deg,#dfeaff,#8eafff); color: #234ba1; font-size: 11px; font-weight: 700; }
.voice-copy h3 { margin: 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.voice-copy p, .voice-copy small { margin: 2px 0 0; color: var(--muted); font-size: 7px; }
.voice-status { display: inline-block; margin-bottom: 3px; padding: 3px 5px; border-radius: 5px; background: #e1f3ec; color: #2b8366; font-size: 6px; font-weight: 800; }
.voice-status.pending { background: #fff1d9; color: #96671f; }
.voice-status.failed { background: #f8e2e2; color: #a84c4c; }
.voice-actions { display: grid; gap: 4px; }
.voice-actions button { padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; background: white; color: #526a90; font-size: 7px; }
.voice-actions .danger-link { color: #b55a5a; }
.voice-empty { display: grid; min-height: 130px; place-items: center; align-content: center; gap: 9px; border: 1px dashed #bac9e4; border-radius: 12px; color: #8595b3; font-size: 8px; text-align: center; }
.voice-empty button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--blue); font-size: 8px; }

.view-heading { display: flex; padding: 46px 4px 25px; align-items: flex-end; justify-content: space-between; gap: 20px; }
.view-heading h1 { margin: 8px 0 4px; font-size: 37px; letter-spacing: -.04em; }
.view-heading p { margin: 0; color: var(--muted); font-size: var(--text-sm); }
.outline-button { height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.7); color: #566b91; font-size: var(--text-sm); }
.history-list { display: grid; gap: 9px; }
.history-item { display: grid; grid-template-columns: 40px minmax(0,1fr) auto auto; padding: 14px; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 8px 25px rgba(43,83,163,.06); }
.history-index { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: var(--navy); color: #9bbcff; font-size: 11px; }
.history-copy h4 { margin: 0 0 4px; overflow: hidden; font-size: var(--text-sm); text-overflow: ellipsis; white-space: nowrap; }
.history-copy p { margin: 0; color: var(--muted); font-size: var(--text-xs); }
.history-audio { display: flex; align-items: center; gap: 7px; }
.history-audio audio { width: 230px; height: 33px; }
.history-audio a { padding: 7px 9px; border-radius: 6px; background: #e9f0ff; color: var(--blue); font-size: var(--text-xs); font-weight: 700; }
.status-failed { color: #b14e4e !important; }
.status-processing { color: #99702c !important; }
.empty-state { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 10px; border: 1px dashed #b7c9e5; border-radius: 15px; color: #8091b0; font-size: var(--text-sm); text-align: center; }
.wallet-hero { padding: 25px 28px; border-radius: 17px; color: white; background: radial-gradient(circle at 85% 15%,rgba(91,129,255,.55),transparent 32%),linear-gradient(120deg,#071b4f,#164bb6); box-shadow: var(--shadow); }
.wallet-hero > span { color: rgba(255,255,255,.58); font-size: var(--text-xs); }
.wallet-hero strong { display: block; margin: 7px 0 3px; font-size: 48px; }
.wallet-hero p { margin: 0; color: rgba(255,255,255,.55); font-size: var(--text-sm); }
.table-wrap { margin-top: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.8); }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: var(--text-xs); letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }
.amount-plus { color: #218262; font-weight: 800; }
.amount-minus { color: #bb4f4f; font-weight: 800; }

.recharge-heading { align-items: center; }
.recharge-balance { display: grid; min-width: 150px; padding: 14px 18px; gap: 2px; border: 1px solid #d6e3f8; border-radius: 12px; background: rgba(255,255,255,.72); }
.recharge-balance span { color: var(--muted); font-size: var(--text-xs); }
.recharge-balance strong { color: var(--blue); font-size: 28px; }
.recharge-layout { display: grid; grid-template-columns: minmax(0,1fr) 325px; gap: 16px; align-items: start; }
.recharge-main { min-width: 0; }
.recharge-plans { display: grid; grid-template-columns: repeat(5,minmax(150px,1fr)); gap: 11px; }
.recharge-plan { position: relative; display: grid; min-height: 205px; padding: 18px; align-content: space-between; border: 1px solid #dce6f6; border-radius: 15px; background: rgba(255,255,255,.78); color: var(--ink); text-align: left; box-shadow: 0 8px 24px rgba(38,80,157,.06); }
.recharge-plan:hover { border-color: #93b0ef; transform: translateY(-2px); }
.recharge-plan.selected { border-color: var(--blue); background: linear-gradient(160deg,#eff5ff,#fff); box-shadow: 0 10px 26px rgba(44,90,218,.13); }
.plan-badge { justify-self: start; padding: 4px 7px; border-radius: 6px; background: #edf3fd; color: #657999; font-size: var(--text-xs); }
.recharge-plan.selected .plan-badge { background: #e4edff; color: var(--blue); }
.plan-price { margin-top: 18px; font-size: 31px; font-weight: 750; letter-spacing: -.03em; }
.plan-price small { margin-left: 2px; font-size: var(--text-sm); font-weight: 500; }
.plan-credits { margin-top: 8px; color: #405a86; font-size: 15px; font-weight: 700; }
.plan-unit { margin-top: 6px; color: var(--muted); font-size: var(--text-xs); }
.plan-name { margin-top: 17px; padding-top: 12px; border-top: 1px solid var(--line); color: #667995; font-size: var(--text-sm); }
.recharge-rules { display: flex; margin-top: 14px; padding: 16px 18px; flex-wrap: wrap; gap: 8px 22px; border: 1px solid #e0e8f4; border-radius: 12px; background: rgba(255,255,255,.54); }
.recharge-rules strong { width: 100%; font-size: var(--text-sm); }
.recharge-rules span { color: var(--muted); font-size: var(--text-xs); }
.checkout-panel { position: sticky; top: 18px; padding: 20px; border: 1px solid #dce6f6; border-radius: 16px; background: rgba(255,255,255,.9); box-shadow: 0 14px 38px rgba(30,71,145,.1); }
.checkout-head { display: flex; padding-bottom: 16px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.wechat-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: #1aad19; color: white; font-size: 15px; font-weight: 700; }
.checkout-head strong, .checkout-head small { display: block; }
.checkout-head strong { font-size: var(--text-md); }
.checkout-head small { margin-top: 3px; color: var(--muted); font-size: var(--text-xs); }
.checkout-line { display: flex; padding: 14px 0 0; justify-content: space-between; color: #617493; font-size: var(--text-sm); }
.checkout-line strong { color: var(--ink); }
.checkout-total { display: flex; margin-top: 17px; padding-top: 16px; align-items: flex-end; justify-content: space-between; border-top: 1px solid var(--line); }
.checkout-total span { color: #617493; font-size: var(--text-sm); }
.checkout-total strong { color: #f05a4f; font-size: 28px; }
.checkout-panel > button { width: 100%; height: 46px; margin-top: 18px; border: 0; border-radius: 10px; background: #1aad19; color: white; font-size: var(--text-md); font-weight: 700; }
.checkout-panel > button:disabled { background: #bac5d6; cursor: not-allowed; }
.checkout-panel > p { margin: 10px 0 0; color: var(--muted); font-size: var(--text-xs); line-height: 1.6; text-align: center; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; padding: 11px 17px; border-radius: 10px; background: var(--navy); color: white; font-size: 10px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: none; }

.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; padding: 24px; place-items: center; background: rgba(6,24,65,.38); backdrop-filter: blur(7px); }
.history-dialog { display: flex; width: min(820px,100%); max-height: min(760px,calc(100vh - 48px)); padding: 22px; overflow: hidden; flex-direction: column; border: 1px solid rgba(74,113,185,.18); border-radius: 18px; background: #f9fbff; box-shadow: 0 25px 80px rgba(7,27,79,.25); }
.history-modal-head { display: flex; margin-bottom: 16px; align-items: flex-start; justify-content: space-between; gap: 18px; }
.history-modal-head h2 { margin: 0; font-size: 24px; }
.history-modal-head p { margin: 5px 0 0; color: var(--muted); font-size: var(--text-sm); }
.history-modal-head > div:last-child { display: flex; gap: 7px; }
.history-modal-head button { height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #637797; font-size: var(--text-xs); }
.history-modal-head button:last-child { width: 32px; padding: 0; font-size: 17px; }
.history-dialog .history-list { overflow-y: auto; padding-right: 3px; }
.history-cost { display: grid; min-width: 80px; gap: 3px; text-align: right; }
.history-cost span { color: var(--muted); font-size: var(--text-xs); }
.history-cost strong { color: var(--coral-dark, #e85443); font-size: var(--text-md); }
.history-cost strong.refunded { color: #2b8569; font-size: var(--text-sm); }
.recharge-dialog { width: min(1180px,100%); max-height: min(830px,calc(100vh - 42px)); padding: 24px; overflow: auto; border: 1px solid rgba(74,113,185,.18); border-radius: 18px; background: #f7faff; box-shadow: 0 25px 80px rgba(7,27,79,.25); }
.recharge-modal-head { display: flex; margin-bottom: 18px; align-items: flex-start; justify-content: space-between; gap: 20px; }
.recharge-modal-head > div:first-child > span { color: var(--blue); font-size: var(--text-xs); font-weight: 800; letter-spacing: .1em; }
.recharge-modal-head h2 { margin: 4px 0; font-size: 28px; }
.recharge-modal-head p { margin: 0; color: var(--muted); font-size: var(--text-sm); }
.recharge-modal-actions { display: flex; align-items: center; gap: 10px; }
.recharge-modal-actions > button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #637797; font-size: 17px; }
.recharge-dialog .recharge-balance { min-width: 120px; padding: 8px 12px; }
.recharge-dialog .recharge-balance strong { font-size: 22px; }
.recharge-dialog .recharge-layout { grid-template-columns: minmax(0,1fr) 300px; }
.recharge-dialog .checkout-panel { position: static; }
.payment-dialog { width: min(390px,100%); padding: 24px; border: 1px solid rgba(74,113,185,.18); border-radius: 18px; background: white; box-shadow: 0 25px 80px rgba(7,27,79,.28); text-align: center; }
.payment-modal-head { display: flex; align-items: flex-start; justify-content: space-between; text-align: left; }
.payment-modal-head span { color: #1aad19; font-size: var(--text-xs); font-weight: 800; }
.payment-modal-head h2 { margin: 4px 0 0; font-size: 25px; }
.payment-modal-head button { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #637797; font-size: 17px; }
.payment-qr-wrap { display: grid; width: 230px; height: 230px; margin: 22px auto 16px; padding: 10px; place-items: center; border: 1px solid #e2e8f2; border-radius: 12px; background: #fbfcfe; }
.payment-qr-wrap img { display: block; width: 100%; height: 100%; }
.payment-summary { display: flex; padding: 9px 0; justify-content: space-between; border-bottom: 1px solid #eef1f5; color: #697b98; font-size: var(--text-sm); }
.payment-summary strong { color: var(--ink); }
.payment-status-text { min-height: 38px; margin: 14px 0; color: #687b99; font-size: var(--text-sm); line-height: 1.5; }
.payment-dialog > button { width: 100%; height: 43px; border: 1px solid #cfdaea; border-radius: 9px; background: #f4f8fd; color: var(--blue); font-size: var(--text-sm); font-weight: 700; }
.voice-modal { width: min(760px,100%); max-height: min(720px,calc(100vh - 48px)); padding: 22px; overflow: auto; border: 1px solid rgba(74,113,185,.18); border-radius: 18px; background: #f9fbff; box-shadow: 0 25px 80px rgba(7,27,79,.24); }
.voice-modal-head { display: flex; margin-bottom: 17px; align-items: flex-start; justify-content: space-between; gap: 20px; }
.voice-modal-head h2 { margin: 0; font-size: 22px; }
.voice-modal-head p { margin: 5px 0 0; color: var(--muted); font-size: var(--text-sm); }
.voice-modal-head > div:last-child { display: flex; gap: 6px; }
.voice-modal-head button { height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #5c7196; font-size: var(--text-xs); }
.voice-modal-head button:last-child { width: 30px; padding: 0; font-size: 17px; }
.voice-modal .voice-library { max-height: 570px; }

@media (max-width: 1240px) {
  .studio-dashboard { height: auto; min-height: 0; grid-template-columns: 1fr; }
  .config-card { height: auto; overflow: visible; }
  .preview-card { min-height: 430px; }
  .voice-workbench { height: 600px; }
  .recharge-plans { grid-template-columns: repeat(3,minmax(150px,1fr)); }
  .clone-layout { grid-template-columns: 1fr; }
  .my-voices { padding: 15px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .hero-art { width: 43%; opacity: .8; }
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; width: 100%; margin: 0; border-radius: 0; }
  .login-left { min-height: 420px; }
  .app-shell { width: 100%; margin: 0; border-radius: 0; }
  .sidebar { height: 64px; min-height: 64px; padding: 0 15px; }
  .sidebar .brand { margin: 0; }
  .sidebar .brand small { display: none; }
  .side-bottom { display: none; }
  .side-nav { position: fixed; z-index: 10; right: 10px; bottom: 10px; left: 10px; display: grid; grid-template-columns: repeat(3,1fr); padding: 7px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(7,27,79,.95); backdrop-filter: blur(16px); }
  .side-nav button { height: 43px; padding: 6px; justify-content: center; color: rgba(255,255,255,.72); font-size: 8px; }
  .side-nav svg { display: none; }
  .side-nav button.active { background: #2459df; color: white; box-shadow: none; }
  .main-stage { min-height: 100vh; padding-bottom: 20px; }
  .app-topbar, .page-view { width: calc(100% - 24px); }
  .app-topbar { height: 52px; padding: 0 4px; }
  .page-view { padding: 0 0 30px; }
  .voice-workbench { height: 600px; }
  .hero { height: 190px; padding: 20px 10px 0; }
  .hero-art { opacity: .35; right: -80px; }
  .hero p { max-width: 420px; }
  .config-card, .preview-card, .clone-panel { border-radius: 15px; }
  .clone-tools { align-items: flex-start; flex-direction: column; }
  .clone-tools-actions { width: 100%; }
  .clone-tools-actions button { flex: 1; }
  .recharge-layout { grid-template-columns: 1fr; }
  .recharge-dialog .recharge-layout { grid-template-columns: 1fr; }
  .checkout-panel { position: static; }
}

@media (max-width: 640px) {
  .login-left { min-height: 350px; padding: 28px 24px; }
  .login-copy h1 { font-size: 47px; }
  .login-right { padding: 40px 24px; }
  .app-topbar { height: 52px; padding: 0; }
  .top-nav-link { display: none; }
  .recharge-plans { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .recharge-modal-head { align-items: flex-start; flex-direction: column; }
  .recharge-modal-actions { width: 100%; justify-content: space-between; }
  .recharge-heading { align-items: flex-start; }
  .user-actions > div { display: none; }
  .hero { height: 210px; }
  .hero h1 { font-size: 36px; }
  .hero-art { display: none; }
  .config-card, .clone-panel { padding: 18px; }
  .model-select-row { grid-template-columns: 32px 1fr; }
  .model-meta { grid-column: 1 / -1; }
  .form-grid.two, .advanced-grid, .clone-fields { grid-template-columns: 1fr; }
  .clone-modal-fields { grid-template-columns: 1fr; }
  .voice-workbench-top { grid-template-columns: 1fr; }
  .clone-modal-foot { align-items: stretch; flex-direction: column; }
  .clone-modal-foot button { width: 100%; }
  .modal-backdrop { padding: 10px; }
  .voice-modal { padding: 16px; border-radius: 14px; }
  .generate-footer { align-items: stretch; flex-direction: column; }
  .generate-button { width: 100%; }
  .preview-card { min-height: 390px; }
  .history-item { grid-template-columns: 37px minmax(0,1fr); }
  .history-cost { grid-column: 2; text-align: left; }
  .history-audio { grid-column: 1 / -1; justify-content: space-between; }
  .history-audio audio { width: min(100%,230px); }
  .view-heading { align-items: flex-start; flex-direction: column; }
  .recharge-plans { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

