:root {
  --ink: #171817;
  --ink-soft: #5e615e;
  --ink-faint: #858984;
  --paper: #f5f2ec;
  --surface: #fffefa;
  --surface-muted: #f7f5f0;
  --line: #e5e1d9;
  --line-strong: #d5d0c7;
  --accent: #ef5b3f;
  --accent-dark: #d8492f;
  --accent-pale: #fff0eb;
  --violet: #6d61dd;
  --violet-pale: #efedff;
  --green: #2f9b72;
  --green-pale: #e9f7f0;
  --amber: #c17a23;
  --red: #c8463c;
  --shadow: 0 18px 50px rgba(35, 30, 23, 0.07);
  --shadow-soft: 0 8px 30px rgba(35, 30, 23, 0.05);
  --radius-xl: 28px;
  --radius-lg: 21px;
  --radius-md: 15px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button, select, input[type="range"], input[type="file"] { cursor: pointer; }
button { color: inherit; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid rgba(109, 97, 221, .35); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 999; top: 10px; left: 10px; transform: translateY(-160%); padding: 10px 14px; border-radius: 10px; background: var(--ink); color: white; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }
.auth-locked { overflow: hidden; }
.auth-locked .app-shell { filter: blur(7px); pointer-events: none; user-select: none; }

.topbar {
  position: sticky; top: 0; z-index: 30; height: 70px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; border-bottom: 1px solid rgba(220, 215, 205, .8); background: rgba(245, 242, 236, .88);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; gap: 3px; border-radius: 12px; background: var(--ink); box-shadow: 0 7px 18px rgba(23,24,23,.2); }
.brand-mark span, .pin-logo span { width: 3px; border-radius: 10px; background: #fff; }
.brand-mark span:nth-child(1), .pin-logo span:nth-child(1) { height: 9px; }
.brand-mark span:nth-child(2), .pin-logo span:nth-child(2) { height: 19px; background: #ff765b; }
.brand-mark span:nth-child(3), .pin-logo span:nth-child(3) { height: 13px; }
.brand-copy { display: grid; line-height: 1; gap: 3px; }
.brand-copy strong { font-size: 16px; letter-spacing: -.03em; }
.brand-copy small { color: var(--ink-soft); font-size: 10px; letter-spacing: .07em; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.connection-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; background: rgba(255,255,255,.78); font-size: 12px; font-weight: 700; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(193,122,35,.12); }
.connection-pill.is-online .status-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(47,155,114,.12); }
.connection-pill.is-offline .status-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(200,70,60,.12); }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 800; }
.pin-button { width: 38px; font-size: 11px; letter-spacing: 1px; }

.layout { width: min(1440px, 100%); margin: 0 auto; padding: 18px 14px calc(92px + var(--safe-bottom)); }
.side-rail { display: none; }
.content-column { min-width: 0; }
.page-panel { animation: panel-in .28s ease both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(5px); } }

.eyebrow { display: inline-block; color: var(--accent); font-size: 10px; line-height: 1.2; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.hero-card {
  position: relative; min-height: 245px; overflow: hidden; display: flex; align-items: center; padding: 30px 24px;
  border: 1px solid rgba(218,211,200,.8); border-radius: var(--radius-xl); background:
    radial-gradient(circle at 85% 0%, rgba(255,164,132,.33), transparent 37%),
    radial-gradient(circle at 100% 100%, rgba(109,97,221,.16), transparent 42%), var(--surface);
  box-shadow: var(--shadow-soft);
}
.hero-copy { position: relative; z-index: 2; width: 72%; }
.hero-copy h1 { margin: 12px 0 12px; max-width: 560px; font-size: clamp(31px, 9vw, 54px); line-height: 1.05; letter-spacing: -.065em; }
.hero-copy h1 span { color: var(--accent); }
.hero-copy p { margin: 0; max-width: 410px; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.voice-orbit { position: absolute; width: 190px; height: 190px; right: -64px; bottom: -20px; display: grid; place-items: center; }
.orbit-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(109,97,221,.2); }
.orbit-ring-one { inset: 16px; }
.orbit-ring-two { inset: 38px; border-color: rgba(239,91,63,.3); }
.wave-bars { width: 94px; height: 94px; display: flex; align-items: center; justify-content: center; gap: 5px; border-radius: 50%; background: rgba(23,24,23,.92); box-shadow: 0 18px 35px rgba(23,24,23,.2); }
.wave-bars i { width: 3px; height: 24px; border-radius: 99px; background: #fff; animation: pulse-bar 1.35s ease-in-out infinite; }
.wave-bars i:nth-child(2), .wave-bars i:nth-child(6) { height: 39px; animation-delay: -.3s; background: #ff765b; }
.wave-bars i:nth-child(3), .wave-bars i:nth-child(5) { height: 50px; animation-delay: -.6s; }
.wave-bars i:nth-child(4) { height: 34px; animation-delay: -.8s; background: #b7afff; }
@keyframes pulse-bar { 0%,100% { transform: scaleY(.58); } 50% { transform: scaleY(1); } }

.surface { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-soft); }
.creation-grid { display: grid; gap: 14px; margin-top: 14px; }
.legacy-control[hidden] { display: none !important; }
.audio-only-grid { grid-template-columns: minmax(0, 1fr) !important; }
.audio-driver-card { border: 1px solid var(--line); padding: 20px; border-radius: 18px; background: var(--wash); }
.audio-generate-button { width: 100%; margin-top: 14px; }
.script-surface, .settings-surface, .clone-card, .library-card, .emotion-sample-card { padding: 22px 18px; }
.surface-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.surface-heading > div:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; }
.surface-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.035em; }
.step-number { display: inline-grid; place-items: center; min-width: 31px; height: 24px; padding: 0 7px; border-radius: 8px; background: var(--violet-pale); color: var(--violet); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.text-button { border: 0; padding: 4px 0; background: transparent; color: var(--accent-dark); font-size: 12px; font-weight: 800; white-space: nowrap; }
.soft-badge { padding: 5px 8px; border-radius: 999px; background: var(--green-pale); color: var(--green); font-size: 10px; font-weight: 800; }

.field-group { display: grid; gap: 9px; margin-bottom: 20px; }
.field-group:last-child { margin-bottom: 0; }
.field-group label, .field-group legend, .field-label { color: #3f423f; font-size: 13px; font-weight: 750; }
.field-group legend { padding: 0; margin-bottom: 10px; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0 0 20px; }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.label-row > label { color: #3f423f; font-size: 13px; font-weight: 750; }
.label-row > span, .label-row output { color: var(--ink-faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.select-wrap { position: relative; }
.select-wrap::after { content: "⌄"; position: absolute; right: 14px; top: 50%; transform: translateY(-57%); pointer-events: none; color: var(--ink-soft); }
select, input[type="text"], input[type="password"], textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 13px; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
select, input[type="text"], input[type="password"] { height: 48px; padding: 0 42px 0 14px; }
select { appearance: none; }
textarea { min-height: 176px; resize: vertical; padding: 15px; line-height: 1.75; }
select:focus, input[type="text"]:focus, input[type="password"]:focus, textarea:focus { outline: 0; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(109,97,221,.1); }
.field-hint { margin: -2px 0 0; color: var(--ink-faint); font-size: 11px; line-height: 1.55; }

.emotion-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.emotion-option { position: relative; min-width: 0; }
.emotion-option input { position: absolute; opacity: 0; pointer-events: none; }
.emotion-option span:last-child { display: block; color: var(--ink-soft); font-size: 11px; }
.emotion-option { display: grid; justify-items: center; gap: 2px; min-height: 62px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-muted); transition: .2s ease; cursor: pointer; }
.emotion-face { font-size: 19px; font-weight: 800; line-height: 1; }
.emotion-option:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.emotion-option.is-selected { border-color: rgba(239,91,63,.55); background: var(--accent-pale); color: var(--accent-dark); box-shadow: inset 0 0 0 1px rgba(239,91,63,.08); }
.emotion-option.is-selected span:last-child { color: var(--accent-dark); font-weight: 800; }
.emotion-option:has(input:focus-visible) { outline: 3px solid rgba(109,97,221,.35); outline-offset: 2px; }

.range-group { display: grid; gap: 11px; margin-bottom: 25px; }
input[type="range"] { width: 100%; height: 5px; margin: 2px 0; appearance: none; border-radius: 10px; background: linear-gradient(to right, var(--accent) var(--range-progress, 50%), #e6e2da var(--range-progress, 50%)); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border: 4px solid white; border-radius: 50%; background: var(--accent); box-shadow: 0 2px 7px rgba(69,46,38,.3); }
input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border: 4px solid white; border-radius: 50%; background: var(--accent); box-shadow: 0 2px 7px rgba(69,46,38,.3); }
.range-labels { display: flex; justify-content: space-between; color: var(--ink-faint); font-size: 10px; }
.segmented-control { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 13px; background: #efede8; }
.segmented-control label { position: relative; }
.segmented-control input { position: absolute; opacity: 0; }
.segmented-control span { display: grid; place-items: center; min-height: 37px; border-radius: 9px; color: var(--ink-soft); font-size: 12px; transition: .2s; cursor: pointer; }
.segmented-control input:checked + span { background: #fff; color: var(--ink); font-weight: 800; box-shadow: 0 3px 10px rgba(43,39,33,.08); }
.segmented-control input:focus-visible + span { outline: 3px solid rgba(109,97,221,.35); }
.divider { height: 1px; margin: 22px 0; background: var(--line); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.toggle-row label { font-size: 13px; font-weight: 800; }
.toggle-row p { margin: 5px 0 0; color: var(--ink-faint); font-size: 11px; line-height: 1.45; }
.switch { position: relative; flex: 0 0 auto; width: 46px; height: 27px; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #d9d6d0; transition: .22s ease; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: .22s ease; }
.switch input:checked + span { background: var(--violet); }
.switch input:checked + span::after { transform: translateX(19px); }
.switch input:focus-visible + span { outline: 3px solid rgba(109,97,221,.3); outline-offset: 3px; }
.avatar-field { padding: 15px; border-radius: 15px; background: var(--violet-pale); }
.generation-summary { display: flex; align-items: center; gap: 11px; margin: 22px 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-muted); }
.summary-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: var(--ink); color: white; font-size: 19px; }
.generation-summary p { display: grid; gap: 3px; margin: 0; }
.generation-summary strong { font-size: 12px; }
.generation-summary span:last-child { color: var(--ink-faint); font-size: 10px; }
.primary-button, .secondary-button { min-height: 48px; border-radius: 13px; font-weight: 800; transition: transform .18s, box-shadow .18s, background .18s; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; padding: 0 18px; background: var(--ink); color: white; box-shadow: 0 10px 24px rgba(23,24,23,.17); }
.primary-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(23,24,23,.22); }
.primary-button .button-icon { color: #ff8068; }
.primary-button.is-loading, .secondary-button.is-loading { pointer-events: none; }
.primary-button.is-loading > span:first-child::after, .secondary-button.is-loading::after { content: ""; display: inline-block; width: 13px; height: 13px; margin-left: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.secondary-button { border: 1px solid var(--line-strong); padding: 0 17px; background: var(--surface); color: var(--ink); }
.secondary-button:hover:not(:disabled) { border-color: var(--ink); }
.submit-note { margin: 9px 0 0; text-align: center; color: var(--ink-faint); font-size: 10px; }

.latest-result { margin-top: 14px; padding: 20px 18px; }
.compact-heading { margin-bottom: 16px; }
.empty-state { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 170px; padding: 28px; text-align: left; color: var(--ink-soft); }
.compact-empty { min-height: 90px; padding: 14px; border-radius: 15px; background: var(--surface-muted); }
.empty-state strong { color: var(--ink); font-size: 13px; }
.empty-state p { margin: 5px 0 0; font-size: 11px; line-height: 1.5; }
.empty-icon { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; background: #ece9e2; color: var(--ink-soft); font-size: 19px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 14px 4px 24px; }
.page-heading h1 { margin: 7px 0 6px; font-size: clamp(31px, 8vw, 48px); line-height: 1; letter-spacing: -.055em; }
.page-heading p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.page-stat { display: none; align-items: baseline; gap: 5px; color: var(--ink-faint); font-size: 12px; }
.page-stat strong { color: var(--ink); font-size: 25px; }
.voice-layout { display: grid; gap: 14px; }
.voice-library-column { display: grid; align-content: start; gap: 14px; }
.source-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 10px; padding: 4px; border-radius: 13px; background: #efede8; }
.source-tab { min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.source-tab.is-active { background: white; color: var(--ink); box-shadow: 0 3px 10px rgba(43,39,33,.08); }
.upload-zone { display: grid; place-items: center; min-height: 183px; padding: 22px; border: 1px dashed var(--line-strong); border-radius: 16px; background: var(--surface-muted); text-align: center; transition: .2s; }
.upload-zone:hover, .upload-zone.is-dragging { border-color: var(--accent); background: var(--accent-pale); }
.upload-zone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.upload-zone:has(input:focus-visible) { outline: 3px solid rgba(109,97,221,.35); outline-offset: 3px; }
.upload-zone strong { margin: 11px 0 4px; font-size: 13px; }
.upload-zone > span:last-child { color: var(--ink-faint); font-size: 10px; line-height: 1.6; }
.upload-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: white; font-size: 21px; }
.selected-file { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px; border-radius: 13px; background: var(--green-pale); }
.selected-file .file-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; background: white; color: var(--green); }
.selected-file > div { display: grid; gap: 3px; min-width: 0; flex: 1; }
.selected-file strong, .selected-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file strong { font-size: 11px; }
.selected-file span { color: var(--ink-faint); font-size: 9px; }
.selected-file button { width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; font-size: 19px; }
.record-panel { min-height: 226px; align-items: center; justify-items: center; padding: 20px; border-radius: 16px; background: var(--surface-muted); text-align: center; }
.record-panel[hidden] { display: none; }
.record-panel:not([hidden]) { display: grid; }
.recorder-visual { height: 40px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.recorder-visual i { width: 3px; height: 10px; border-radius: 9px; background: var(--accent); }
.recorder-visual.is-recording i { animation: record-wave 1s ease-in-out infinite; }
.recorder-visual i:nth-child(2n) { height: 22px; animation-delay: -.2s; }
.recorder-visual i:nth-child(3n) { height: 31px; animation-delay: -.45s; }
@keyframes record-wave { 0%,100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
.record-panel > strong { font-size: 13px; }
.record-panel > span { color: var(--accent); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.record-panel > p { max-width: 320px; margin: 0; color: var(--ink-faint); font-size: 10px; line-height: 1.55; }
.record-button { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 99px; background: white; font-size: 11px; font-weight: 800; }
.record-button > span:first-child { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.record-button.is-recording > span:first-child { border-radius: 2px; }
.record-panel audio { width: 100%; height: 38px; }
.consent-note { display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 15px; padding: 11px; border-radius: 12px; background: var(--green-pale); color: #31745b; }
.consent-note > span { display: grid; place-items: center; flex: 0 0 auto; width: 17px; height: 17px; border-radius: 50%; background: var(--green); color: white; font-size: 9px; }
.consent-note p { margin: 0; font-size: 10px; line-height: 1.55; }
.voice-list { display: grid; gap: 9px; min-height: 80px; }
.voice-item { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-muted); }
.voice-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; background: var(--violet-pale); color: var(--violet); font-size: 18px; font-weight: 900; }
.voice-item-copy { display: grid; gap: 4px; min-width: 0; flex: 1; }
.voice-item-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.voice-item-copy span { color: var(--ink-faint); font-size: 10px; }
.voice-use-button { min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.skeleton-line { height: 54px; border-radius: 13px; background: linear-gradient(90deg,#f0ede8 25%,#faf8f4 45%,#f0ede8 65%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton-line.short { width: 74%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.section-copy { margin: -6px 0 17px; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-upload { display: grid; gap: 5px; margin: -4px 0 14px; padding: 12px; border-radius: 12px; background: var(--surface-muted); }
.inline-upload input { width: 100%; font-size: 10px; }
.inline-upload span { color: var(--ink-faint); font-size: 9px; }

.jobs-heading, .status-heading { align-items: center; }
.small-button { min-height: 41px; white-space: nowrap; font-size: 11px; }
.job-filters { display: flex; gap: 7px; overflow-x: auto; margin-bottom: 14px; padding: 2px; scrollbar-width: none; }
.job-filters::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; min-height: 35px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.filter-chip.is-active { border-color: var(--ink); background: var(--ink); color: white; }
.job-list { display: grid; gap: 12px; }
.job-card { padding: 17px; }
.job-card-top { display: flex; align-items: flex-start; gap: 11px; }
.job-status-icon { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 13px; background: var(--surface-muted); color: var(--ink-soft); font-size: 17px; font-weight: 900; }
.job-card.is-completed .job-status-icon { background: var(--green-pale); color: var(--green); }
.job-card.is-active .job-status-icon { background: var(--violet-pale); color: var(--violet); }
.job-card.is-failed .job-status-icon { background: #fceceb; color: var(--red); }
.job-title-block { min-width: 0; flex: 1; }
.job-title-row { display: flex; align-items: center; gap: 8px; }
.job-title-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.job-state { flex: 0 0 auto; padding: 4px 7px; border-radius: 99px; background: #efede8; color: var(--ink-soft); font-size: 9px; font-weight: 800; }
.job-card.is-completed .job-state { background: var(--green-pale); color: var(--green); }
.job-card.is-active .job-state { background: var(--violet-pale); color: var(--violet); }
.job-card.is-failed .job-state { background: #fceceb; color: var(--red); }
.job-meta { display: flex; gap: 10px; margin-top: 5px; color: var(--ink-faint); font-size: 9px; }
.job-text { display: -webkit-box; overflow: hidden; margin: 13px 0; color: var(--ink-soft); font-size: 11px; line-height: 1.65; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #ebe8e2; }
.progress-track span { display: block; width: var(--progress); height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--violet),#9389f0); transition: width .35s; }
.progress-copy { display: flex; justify-content: space-between; margin-top: 7px; color: var(--ink-faint); font-size: 9px; }
.production-progress { display: grid; gap: 12px; margin-top: 16px; padding: 16px; border: 1px solid rgba(109,97,221,.22); border-radius: 16px; background: linear-gradient(145deg,#faf9ff,#f2f0ff); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.production-progress[hidden] { display: none; }
.production-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.production-progress-head > div { display: grid; gap: 3px; }
.production-kicker { color: var(--violet); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.production-progress-head strong { font-size: 13px; }
.production-progress-head output { color: var(--violet); font-size: 22px; font-weight: 900; letter-spacing: -.04em; }
.production-progress-track { height: 12px; overflow: hidden; border-radius: 99px; background: #dedaf4; box-shadow: inset 0 1px 2px rgba(46,38,106,.1); }
.production-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--violet),#9b8ff5,#ef5b3f); box-shadow: 0 0 14px rgba(109,97,221,.32); transition: width .45s ease; }
.production-progress > p { margin: -3px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.production-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; margin: 0; padding: 0; list-style: none; }
.production-steps li { display: grid; justify-items: center; gap: 5px; color: var(--ink-faint); text-align: center; font-size: 8px; font-weight: 700; }
.production-steps i { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #d7d2e8; border-radius: 50%; background: white; font-style: normal; }
.production-steps li.is-active { color: var(--violet); }
.production-steps li.is-active i { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(109,97,221,.11); }
.production-steps li.is-done { color: var(--green); }
.production-steps li.is-done i { border-color: var(--green); background: var(--green); color: white; }
.production-progress.is-completed { border-color: rgba(47,155,114,.25); background: var(--green-pale); }
.production-progress.is-completed .production-progress-head output { color: var(--green); }
.production-progress.is-failed { border-color: rgba(200,70,60,.25); background: #fceceb; }
.production-progress.is-failed .production-progress-head output { color: var(--red); }
.job-error { padding: 10px; border-radius: 10px; background: #fceceb; color: #96372f; font-size: 10px; line-height: 1.5; }
.media-results { display: grid; gap: 10px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.media-result { display: grid; gap: 8px; padding: 10px; border-radius: 13px; background: var(--surface-muted); }
.media-result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.media-result-head strong { font-size: 10px; }
.download-link { padding: 5px 8px; border-radius: 8px; background: white; color: var(--accent-dark); font-size: 9px; font-weight: 800; text-decoration: none; }
.media-result audio, .media-result video { width: 100%; max-height: 360px; border-radius: 10px; background: #171817; }
.job-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; }
.job-action { min-height: 32px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: white; color: var(--ink-soft); font-size: 9px; font-weight: 800; }

.status-overview { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; margin-bottom: 14px; padding: 20px; }
.status-hero-icon { display: grid; place-items: center; width: 51px; height: 51px; border-radius: 16px; background: var(--green-pale); color: var(--green); font-size: 22px; font-weight: 900; }
.status-hero-icon.is-warning { background: #fff5e6; color: var(--amber); }
.status-hero-icon.is-error { background: #fceceb; color: var(--red); }
.status-overview h2 { margin: 5px 0 3px; font-size: 17px; }
.status-overview p { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.status-overview time { display: none; color: var(--ink-faint); font-size: 9px; }
.service-grid { display: grid; gap: 10px; margin-bottom: 14px; }
.service-card { display: flex; align-items: center; gap: 11px; min-height: 85px; padding: 16px; }
.service-indicator { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(200,70,60,.1); }
.service-indicator.is-online { background: var(--green); box-shadow: 0 0 0 5px rgba(47,155,114,.1); }
.service-indicator.is-pending { background: var(--amber); box-shadow: 0 0 0 5px rgba(193,122,35,.1); }
.service-card div { min-width: 0; }
.service-card strong { display: block; margin-bottom: 5px; font-size: 12px; }
.service-card p { overflow: hidden; margin: 0; color: var(--ink-faint); font-size: 9px; line-height: 1.5; text-overflow: ellipsis; }
.address-card { padding: 20px; }
.url-list { display: grid; gap: 8px; }
.url-row { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-muted); }
.url-row > div { min-width: 0; flex: 1; }
.url-row strong { display: block; margin-bottom: 3px; font-size: 10px; }
.url-row code { display: block; overflow: hidden; color: var(--ink-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { flex: 0 0 auto; min-height: 31px; border: 1px solid var(--line); border-radius: 9px; padding: 0 9px; background: white; font-size: 9px; font-weight: 800; }
.muted-text { color: var(--ink-faint); font-size: 11px; }

.mobile-nav { position: fixed; z-index: 35; left: 10px; right: 10px; bottom: calc(8px + var(--safe-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); height: 68px; padding: 6px; border: 1px solid rgba(216,210,200,.9); border-radius: 20px; background: rgba(255,254,250,.94); box-shadow: 0 15px 45px rgba(32,29,24,.18); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.mobile-nav button { position: relative; display: grid; place-items: center; align-content: center; gap: 3px; border: 0; border-radius: 14px; background: transparent; color: var(--ink-faint); }
.mobile-nav button > span { font-size: 17px; line-height: 1; }
.mobile-nav button small { font-size: 9px; font-weight: 750; }
.mobile-nav button.is-active { background: var(--ink); color: white; }
.mobile-nav i { position: absolute; top: 8px; right: calc(50% - 18px); width: 6px; height: 6px; border: 1px solid white; border-radius: 50%; background: var(--accent); }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(25,24,22,.48); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modal-backdrop.is-hidden { display: none; }
.pin-modal-card { width: min(410px, 100%); padding: 31px 24px 24px; border: 1px solid rgba(255,255,255,.8); border-radius: 26px; background: var(--surface); box-shadow: 0 28px 90px rgba(17,16,14,.3); text-align: center; animation: modal-in .32s cubic-bezier(.2,.8,.2,1); }
@keyframes modal-in { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.pin-logo { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0 auto 20px; border-radius: 17px; background: var(--ink); box-shadow: 0 12px 30px rgba(23,24,23,.22); }
.pin-logo span { width: 4px; }
.pin-modal-card h1 { margin: 8px 0 9px; font-size: 31px; letter-spacing: -.055em; }
.pin-modal-card > p { margin: 0 auto 22px; max-width: 310px; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.pin-field { position: relative; text-align: left; }
.pin-field input { padding-right: 66px; letter-spacing: .12em; }
.pin-field button { position: absolute; right: 7px; bottom: 7px; height: 34px; border: 0; padding: 0 9px; background: transparent; color: var(--violet); font-size: 10px; font-weight: 800; }
.form-error { margin: -7px 0 14px !important; padding: 9px; border-radius: 10px; background: #fceceb; color: var(--red) !important; text-align: left; font-size: 10px !important; }
.pin-footnote { margin: 13px 0 0 !important; color: var(--ink-faint) !important; font-size: 9px !important; }
.toast-region { position: fixed; z-index: 200; left: 14px; right: 14px; bottom: calc(88px + var(--safe-bottom)); display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; width: min(390px, 100%); padding: 12px 14px; border-radius: 13px; background: rgba(23,24,23,.94); color: white; box-shadow: 0 14px 35px rgba(23,24,23,.25); font-size: 11px; line-height: 1.45; animation: toast-in .25s ease; }
.toast.is-error { background: rgba(153,49,40,.96); }
.toast.is-success::before { content: "✓"; color: #7ce2b7; font-weight: 900; }
.toast.is-error::before { content: "!"; font-weight: 900; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

@media (min-width: 680px) {
  .topbar { height: 76px; padding: 0 28px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-copy strong { font-size: 18px; }
  .connection-pill { padding: 8px 14px; font-size: 12px; }
  .layout { padding: 24px 24px calc(100px + var(--safe-bottom)); }
  .hero-card { min-height: 290px; padding: 42px; }
  .hero-copy { width: 67%; }
  .hero-copy p { font-size: 15px; }
  .voice-orbit { width: 270px; height: 270px; right: -30px; bottom: -44px; }
  .wave-bars { width: 126px; height: 126px; }
  .script-surface, .settings-surface, .clone-card, .library-card, .emotion-sample-card { padding: 27px; }
  .emotion-grid { grid-template-columns: repeat(7, 1fr); }
  .page-stat { display: flex; }
  .status-overview { grid-template-columns: auto 1fr auto; padding: 24px; }
  .status-overview time { display: block; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .job-card { padding: 21px; }
  .media-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 980px) {
  .topbar { padding: 0 38px; }
  .layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 28px; padding: 31px 34px 55px; }
  .side-rail { position: sticky; top: 107px; display: flex; flex-direction: column; align-self: start; min-height: calc(100vh - 142px); }
  .side-intro { padding: 7px 10px 24px; }
  .side-intro p { margin: 8px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
  .nav-list { display: grid; gap: 5px; }
  .nav-item { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 47px; padding: 0 12px; border: 0; border-radius: 13px; background: transparent; color: var(--ink-soft); text-align: left; font-size: 12px; font-weight: 700; }
  .nav-item:hover { background: rgba(255,255,255,.55); color: var(--ink); }
  .nav-item.is-active { background: var(--ink); color: white; box-shadow: 0 9px 24px rgba(23,24,23,.14); }
  .nav-icon { display: grid; place-items: center; width: 24px; height: 24px; font-size: 14px; }
  .nav-count { margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: white; font-size: 9px; line-height: 19px; text-align: center; }
  .privacy-note { display: flex; align-items: flex-start; gap: 8px; margin-top: auto; padding: 13px 10px; border-top: 1px solid var(--line); color: var(--ink-faint); }
  .privacy-note p { margin: 0; font-size: 9px; line-height: 1.55; }
  .privacy-note strong { color: var(--ink-soft); }
  .privacy-icon { display: grid; place-items: center; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; background: var(--green-pale); color: var(--green); font-size: 9px; }
  .mobile-nav { display: none; }
  .toast-region { left: auto; right: 24px; bottom: 24px; width: 390px; }
  .creation-grid { grid-template-columns: minmax(0, 1.35fr) minmax(330px, .75fr); align-items: stretch; }
  .settings-surface { display: flex; flex-direction: column; }
  .generation-summary { margin-top: auto; }
  .latest-result { padding: 23px 27px; }
  .voice-layout { grid-template-columns: minmax(350px, .82fr) minmax(390px, 1.18fr); align-items: start; }
  .clone-card { position: sticky; top: 107px; }
  .service-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1260px) {
  .layout { grid-template-columns: 225px minmax(0, 1fr); gap: 36px; padding-inline: 42px; }
  .content-column { max-width: 1120px; }
  .hero-card { padding: 48px; }
  .hero-copy h1 { font-size: 58px; }
  .creation-grid { grid-template-columns: minmax(0, 1.45fr) minmax(360px, .75fr); }
}

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