:root {
  --ink: #171916;
  --muted: #6d7168;
  --line: #dedfd7;
  --paper: #f6f5f0;
  --card: rgba(255, 255, 252, 0.88);
  --white: #fff;
  --accent: #ee5c3b;
  --accent-dark: #d74628;
  --lime: #d9ff57;
  --green: #31865c;
  --shadow: 0 18px 60px rgba(31, 34, 27, 0.08);
  --radius: 24px;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 7% 14%, rgba(217, 255, 87, 0.19), transparent 25rem),
    radial-gradient(circle at 92% 3%, rgba(238, 92, 59, 0.1), transparent 24rem),
    var(--paper);
}

button, input, textarea, select { font: inherit; }
button, select, label { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
  z-index: -1;
}

.ambient-one {
  width: 340px;
  height: 340px;
  border: 1px solid rgba(36, 39, 31, 0.06);
  top: 230px;
  right: -180px;
}

.ambient-two {
  width: 170px;
  height: 170px;
  border: 1px solid rgba(36, 39, 31, 0.06);
  left: -90px;
  bottom: 80px;
}

.topbar {
  width: min(1280px, calc(100% - 64px));
  height: 92px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(45, 48, 40, 0.12);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.brand strong { font-size: 18px; letter-spacing: -0.02em; }
.brand small { font-size: 8px; letter-spacing: 0.25em; color: var(--muted); }

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 8px 20px rgba(23, 25, 22, 0.16);
}

.brand-mark i {
  display: block;
  width: 3px;
  border-radius: 8px;
  background: var(--lime);
}

.brand-mark i:nth-child(1), .brand-mark i:nth-child(5) { height: 8px; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(4) { height: 16px; }
.brand-mark i:nth-child(3) { height: 24px; }

.main-nav { display: flex; align-items: center; gap: 7px; }

.nav-item {
  border: 0;
  background: transparent;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  color: #777b72;
  transition: 160ms ease;
}

.nav-item:hover { color: var(--ink); background: rgba(255, 255, 255, 0.62); }
.nav-item.is-active { background: var(--ink); color: white; }

.nav-count {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 10px;
}

.account-button {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.account-button:hover { background: white; }
.connection-dot { width: 8px; height: 8px; border-radius: 50%; background: #aaa; }
.account-button.is-connected .connection-dot { background: #48b57c; box-shadow: 0 0 0 4px rgba(72, 181, 124, 0.13); }
.account-button span:nth-child(2) { font-size: 13px; }
.chevron { font-size: 16px; color: #8b8e87; transform: translateY(-1px); }

.app-shell {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 76px 0 44px;
}

.panel { display: none; animation: panel-in 260ms ease; }
.panel.is-active { display: block; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading, .subpage-heading, .history-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 50px;
}

.eyebrow {
  margin: 0 0 17px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.25em;
  color: var(--accent);
}

h1 {
  margin: 0;
  max-width: 730px;
  font-size: clamp(46px, 6.1vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 690;
}

h1 em { color: var(--accent); font-style: normal; font-weight: inherit; }

.subpage-heading h1, .history-heading h1 { font-size: clamp(43px, 5vw, 66px); }

.page-intro {
  margin: 22px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.service-card {
  min-width: 265px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
}

.service-card strong { display: block; margin-bottom: 7px; font-size: 14px; }
.service-card small { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); }
.service-card small i { width: 6px; height: 6px; border-radius: 50%; background: #aaa; }
.service-card.is-online small i { background: #3eab72; box-shadow: 0 0 0 3px rgba(62, 171, 114, 0.13); }

.service-visual {
  width: 58px;
  height: 42px;
  border-radius: 12px;
  background: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.service-visual span { width: 2px; border-radius: 4px; background: var(--ink); animation: equalize 1.2s ease-in-out infinite; }
.service-visual span:nth-child(1), .service-visual span:nth-child(7) { height: 8px; animation-delay: -0.2s; }
.service-visual span:nth-child(2), .service-visual span:nth-child(6) { height: 16px; animation-delay: -0.6s; }
.service-visual span:nth-child(3), .service-visual span:nth-child(5) { height: 24px; animation-delay: -0.4s; }
.service-visual span:nth-child(4) { height: 30px; animation-delay: -0.8s; }

@keyframes equalize { 0%, 100% { transform: scaleY(.62); } 50% { transform: scaleY(1); } }

.creator-grid, .asr-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.85fr); gap: 22px; align-items: stretch; }

.card {
  background: var(--card);
  border: 1px solid rgba(218, 220, 210, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.script-card, .upload-card { padding: 30px; }
.settings-card, .asr-settings-card { padding: 30px; }

.card-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.card-heading > div { display: flex; align-items: center; gap: 13px; }
.card-heading h2 { margin: 0; font-size: 17px; letter-spacing: -0.025em; }

.step-number {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid #d8d9d1;
  border-radius: 50%;
  color: var(--muted);
  font: 700 9px/1 Inter, sans-serif;
  letter-spacing: 0.08em;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
}

.text-button:hover { text-decoration: underline; }

.text-editor {
  height: 342px;
  display: flex;
  flex-direction: column;
  border-radius: 17px;
  background: #f5f5f0;
  border: 1px solid #e3e4dc;
  overflow: hidden;
  transition: 160ms ease;
}

.text-editor:focus-within { background: white; border-color: #b7b9af; box-shadow: 0 0 0 4px rgba(23, 25, 22, 0.035); }

.text-editor textarea {
  flex: 1;
  width: 100%;
  border: 0;
  resize: none;
  outline: 0;
  padding: 24px 25px;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.9;
}

.text-editor textarea::placeholder, .reference-text::placeholder { color: #aaaDA5; }

.editor-footer {
  height: 48px;
  flex: none;
  padding: 0 20px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e3e4dc;
  font-size: 11px;
  color: #8b8e86;
}

.char-count strong { font-size: 13px; color: var(--ink); }

.field-label { display: block; margin: 0 0 9px; font-size: 12px; font-weight: 650; }
.field-label span { margin-left: 6px; color: #989b93; font-weight: 400; }

.select-wrap { position: relative; display: flex; align-items: center; }
.select-avatar {
  position: absolute;
  left: 11px;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--ink);
  color: var(--lime);
  font-size: 12px;
  font-weight: 750;
}

.select-wrap select, .full-select {
  width: 100%;
  height: 58px;
  padding: 0 44px 0 59px;
  border-radius: 14px;
  appearance: none;
  border: 1px solid #dedfd7;
  background: #f7f7f3;
  color: var(--ink);
  outline: 0;
  font-size: 13px;
  cursor: pointer;
}

.select-wrap select:focus, .full-select:focus, .compact-select:focus { border-color: #a8aaa1; box-shadow: 0 0 0 3px rgba(23, 25, 22, 0.04); }
.select-wrap select:disabled { color: #999; cursor: not-allowed; }
.select-chevron { position: absolute; right: 17px; color: #777b72; pointer-events: none; }
.field-hint { margin: 8px 0 0; color: #95988f; font-size: 10px; }

.divider { height: 1px; margin: 25px 0; background: #e2e3db; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.switch-row strong { display: block; margin-bottom: 5px; font-size: 13px; }
.switch-row small { color: #8d9188; font-size: 10px; }

.switch { position: relative; width: 44px; height: 25px; flex: none; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #d5d7cf; cursor: pointer; transition: 180ms ease; }
.switch span::after { content: ""; position: absolute; width: 19px; height: 19px; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 5px rgba(0,0,0,.2); transition: 180ms ease; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(19px); background: var(--lime); }

.subtitle-options { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 20px; transition: 180ms ease; }
.subtitle-options.is-disabled { opacity: .35; pointer-events: none; }

.compact-select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid #dedfd7;
  background: #f7f7f3;
  outline: 0;
  font-size: 12px;
}

.primary-button {
  width: 100%;
  height: 56px;
  margin-top: 26px;
  padding: 0 18px 0 22px;
  border: 0;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(238, 92, 59, 0.22);
  transition: 170ms ease;
}

.primary-button b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.18); font-size: 17px; }
.primary-button:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 13px 28px rgba(238, 92, 59, 0.28); }
.primary-button:active:not(:disabled) { transform: translateY(0); }
.primary-button:disabled { background: #c8cac2; box-shadow: none; cursor: not-allowed; }
.primary-button.is-loading { pointer-events: none; }
.primary-button.is-loading span::after { content: " ···"; animation: dots 1s infinite; }

@keyframes dots { 50% { opacity: .35; } }

.result-card {
  margin-top: 22px;
  padding: 25px 28px;
  background: var(--ink);
  color: white;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(23, 25, 22, 0.15);
}

.result-card.is-hidden, .is-hidden { display: none !important; }
.result-status { display: flex; align-items: center; gap: 17px; }
.result-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--lime); color: var(--ink); font-size: 20px; }
.result-kicker { margin: 0 0 3px; font-size: 9px; letter-spacing: .18em; color: var(--lime); }
.result-status h2 { margin: 0 0 5px; font-size: 17px; }
.result-status p:last-child { margin: 0; color: #aeb2aa; font-size: 11px; }
.progress-track { height: 3px; margin-top: 21px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.progress-track span { display: block; width: 12%; height: 100%; border-radius: inherit; background: var(--lime); transition: width 400ms ease; }

.audio-result { margin-top: 22px; display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 18px; align-items: center; }
.audio-result audio { width: 100%; height: 42px; }
.artifact-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.artifact-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  color: white;
  font-size: 11px;
  cursor: pointer;
}
.artifact-button:hover { background: rgba(255,255,255,.13); }

.mini-feature-row { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.mini-feature-row span { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.5); font-size: 11px; color: var(--muted); }

.drop-zone {
  min-height: 226px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c9cbc2;
  border-radius: 18px;
  background: #f6f6f2;
  cursor: pointer;
  transition: 180ms ease;
}
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--accent); background: #fff9f6; }
.drop-zone.has-file { border-style: solid; border-color: #a7cf95; background: #f4faef; }
.drop-zone input { display: none; }
.upload-symbol { width: 52px; height: 52px; margin-bottom: 15px; display: grid; place-items: center; border-radius: 17px; background: var(--ink); color: var(--lime); font-size: 25px; }
.drop-zone strong { margin-bottom: 7px; font-size: 14px; }
.drop-zone small { color: #8d9188; font-size: 11px; }
.reference-label { margin-top: 25px; }
.reference-text { width: 100%; min-height: 100px; padding: 15px; resize: vertical; border: 1px solid #dedfd7; border-radius: 14px; background: #f7f7f3; outline: 0; font-size: 13px; line-height: 1.7; }
.reference-text:focus { background: white; border-color: #aaa; }

.option-tile { position: relative; min-height: 74px; margin-bottom: 10px; padding: 15px 15px; display: flex; align-items: center; gap: 12px; border: 1px solid #dedfd7; border-radius: 14px; background: #f7f7f3; cursor: pointer; }
.option-tile input { position: absolute; opacity: 0; }
.option-tile > span { flex: 1; }
.option-tile strong { display: block; margin-bottom: 4px; font-size: 13px; }
.option-tile small { color: #8d9188; font-size: 10px; }
.option-tile b { width: 22px; height: 22px; display: none; place-items: center; border-radius: 50%; background: var(--ink); color: var(--lime); font-size: 11px; }
.option-tile.is-selected { border-color: var(--ink); background: white; }
.option-tile.is-selected b { display: grid; }
.asr-line-label { margin-top: 22px; }
.full-select { height: 48px; padding: 0 15px; }
.result-downloads { margin-top: 21px; }

.usage-card { min-width: 300px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.55); }
.usage-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); }
.usage-meta strong { color: var(--ink); font-size: 13px; }
.usage-track { height: 5px; margin: 13px 0 8px; border-radius: 5px; background: #e2e3dc; overflow: hidden; }
.usage-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: 300ms ease; }
.usage-card small { color: #92958e; font-size: 10px; }

.history-card { overflow: hidden; }
.history-toolbar { min-height: 76px; padding: 0 25px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e3e4dc; }
.history-tabs { display: flex; gap: 5px; }
.history-tabs button, .refresh-button { border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.history-tabs button { padding: 8px 13px; }
.history-tabs button.is-active { background: var(--ink); color: white; }
.refresh-button { padding: 8px 11px; }
.refresh-button:hover { background: #f0f1eb; color: var(--ink); }
.job-list { min-height: 280px; }
.job-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 170px 110px auto; gap: 15px; align-items: center; min-height: 92px; padding: 15px 24px; border-bottom: 1px solid #ebece5; }
.job-row:last-child { border-bottom: 0; }
.job-kind { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: #f1f2ec; font-size: 18px; }
.job-main { min-width: 0; }
.job-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.job-main small, .job-time { margin-top: 6px; display: block; color: #8c8f87; font-size: 10px; }
.job-voice { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #666b62; font-size: 11px; }
.status-pill { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; background: #f0f1eb; color: #74786f; font-size: 10px; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #9b9e96; }
.status-pill.succeeded { background: #eef8ee; color: #3d7e55; }
.status-pill.succeeded::before { background: #49a46a; }
.status-pill.failed, .status-pill.cancelled { background: #fff1ed; color: #a8503d; }
.status-pill.failed::before, .status-pill.cancelled::before { background: #db654a; }
.job-actions { display: flex; justify-content: end; gap: 5px; }
.job-action { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #dfe0d8; border-radius: 9px; background: white; cursor: pointer; font-size: 13px; }
.job-action:hover { border-color: #aaa; }
.empty-state { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #999c94; }
.empty-state > span { width: 48px; height: 48px; margin-bottom: 14px; display: grid; place-items: center; border-radius: 15px; background: #f0f1eb; color: var(--ink); font-size: 21px; }
.empty-state strong { color: #62665e; font-size: 13px; }
.empty-state p { margin: 7px 0 0; font-size: 11px; }

.footer { width: min(1280px, calc(100% - 64px)); min-height: 88px; margin: 0 auto; display: flex; align-items: center; gap: 24px; border-top: 1px solid rgba(45,48,40,.12); color: #979a92; font-size: 10px; }
.footer span:first-child { color: var(--ink); font-weight: 700; }
.footer span:nth-child(2) { flex: 1; }
.footer a { color: #777b72; text-decoration: none; }
.footer a:hover { color: var(--ink); }

.connect-dialog { width: min(430px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 25px; background: white; color: var(--ink); box-shadow: 0 30px 90px rgba(23,25,22,.25); }
.connect-dialog::backdrop { background: rgba(19,21,18,.46); backdrop-filter: blur(8px); }
.connect-dialog form { position: relative; max-height: calc(100vh - 32px); padding: 38px; overflow-y: auto; }
.dialog-close { position: absolute; right: 18px; top: 17px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f1f2ed; color: #777; cursor: pointer; font-size: 19px; }
.dialog-mark { margin-bottom: 27px; }
.connect-dialog h2 { margin: 0 0 11px; font-size: 27px; letter-spacing: -.045em; }
.dialog-copy { margin: 0 0 26px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.login-fields { display: grid; gap: 17px; }
.login-input { width: 100%; height: 52px; padding: 0 15px; border: 1px solid #dcded5; border-radius: 13px; background: #f7f7f3; color: var(--ink); outline: 0; font-size: 13px; }
.login-input:focus { background: white; border-color: #9b9e95; box-shadow: 0 0 0 4px rgba(23,25,22,.04); }
.password-input-wrap { position: relative; }
.password-input-wrap .login-input { padding-right: 62px; }
.password-input-wrap button { position: absolute; right: 8px; top: 8px; height: 36px; padding: 0 10px; border: 0; background: transparent; color: var(--accent); font-size: 11px; cursor: pointer; }
.key-note { margin: 11px 0 0; color: #858980; font-size: 10px; }
.key-note span { color: var(--green); }
.connect-submit { margin-top: 23px; }
.connect-error { min-height: 15px; margin: 9px 0 0; color: #c8442d; font-size: 10px; text-align: center; }
.session-view { padding: 8px 0 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.session-avatar { width: 58px; height: 58px; margin-bottom: 14px; display: grid; place-items: center; border-radius: 18px; background: var(--ink); color: var(--lime); font-size: 20px; font-weight: 750; }
.session-view strong { font-size: 17px; }
.session-view small { margin-top: 5px; color: var(--accent); font-size: 11px; }
.session-view p { margin: 19px 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.api-key-manager { width: 100%; margin-bottom: 16px; padding: 16px; border: 1px solid #e0e1d9; border-radius: 16px; background: #f7f7f3; text-align: left; }
.api-key-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.api-key-heading span { font-size: 12px; font-weight: 750; }
.api-key-heading small { margin: 0; color: #8a8e85; font-size: 9px; }
.api-key-manager > p, .api-key-result > p { margin: 7px 0 12px; color: #7d8178; font-size: 9px; line-height: 1.55; text-align: left; }
.api-key-start, .api-key-confirm { width: 100%; height: 42px; border: 1px solid #d7d9cf; border-radius: 11px; background: white; cursor: pointer; font-size: 11px; font-weight: 700; }
.api-key-start:hover, .api-key-confirm:hover { border-color: #aeb1a7; }
.api-key-reset, .api-key-result { margin-top: 14px; }
.api-key-reset .login-input { height: 44px; margin-top: 6px; }
.api-key-confirm { margin-top: 9px; background: var(--ink); border-color: var(--ink); color: white; }
.api-key-confirm:disabled { opacity: .55; cursor: wait; }
.api-key-reset .connect-error { margin-bottom: 0; text-align: left; }
.api-key-copy-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 7px; margin-top: 6px; }
.api-key-copy-row .login-input { height: 44px; padding: 0 11px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.api-key-copy-row button { border: 0; border-radius: 10px; background: var(--lime); cursor: pointer; font-size: 10px; font-weight: 750; }
.api-key-create-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 7px; }
.api-key-create-row .login-input { height: 42px; background: white; }
.api-key-create-row button { border: 0; border-radius: 10px; background: var(--ink); color: white; cursor: pointer; font-size: 10px; font-weight: 750; }
.api-key-create-row button:disabled { opacity: .55; cursor: wait; }
.api-key-list { display: grid; gap: 7px; max-height: 210px; overflow-y: auto; }
.api-key-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px; border: 1px solid #e1e2db; border-radius: 11px; background: white; }
.api-key-item > div:first-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.api-key-item strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.api-key-item code { color: #777b72; font-size: 8px; }
.api-key-item > div:last-child { display: flex; gap: 4px; }
.api-key-item button { height: 30px; padding: 0 8px; border: 1px solid #dadcd3; border-radius: 8px; background: #f7f7f3; cursor: pointer; font-size: 9px; }
.api-key-item button:hover { background: white; border-color: #b8bbb1; }
.api-key-item button.is-danger { color: #a94a36; }
.api-key-empty { margin: 2px 0 0 !important; padding: 18px 0; border: 1px dashed #d7d9cf; border-radius: 11px; text-align: center !important; }
.logout-button { width: 100%; height: 50px; border: 1px solid #dcded5; border-radius: 13px; background: #f7f7f3; color: #8c3e2e; font-weight: 650; cursor: pointer; }
.logout-button:hover { background: #fff2ee; border-color: #efc2b7; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 20; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: var(--ink); color: white; box-shadow: 0 12px 35px rgba(0,0,0,.18); font-size: 11px; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: 200ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: #b84731; }

@media (max-width: 900px) {
  .topbar { width: min(100% - 36px, 780px); grid-template-columns: 1fr auto; height: 78px; }
  .main-nav { position: fixed; left: 50%; bottom: 14px; z-index: 10; transform: translateX(-50%); width: min(430px, calc(100% - 28px)); justify-content: space-between; padding: 7px; border: 1px solid rgba(222,223,215,.95); border-radius: 18px; background: rgba(255,255,252,.92); box-shadow: 0 15px 45px rgba(23,25,22,.16); backdrop-filter: blur(16px); }
  .nav-item { flex: 1; padding: 10px 8px; font-size: 12px; }
  .app-shell { width: min(100% - 36px, 780px); padding-top: 55px; }
  .page-heading, .subpage-heading, .history-heading { align-items: start; flex-direction: column; margin-bottom: 37px; }
  .service-card, .usage-card { width: 100%; }
  .creator-grid, .asr-grid { grid-template-columns: 1fr; }
  .footer { width: min(100% - 36px, 780px); padding-bottom: 85px; }
  .audio-result { grid-template-columns: 1fr; }
  .job-row { grid-template-columns: 44px minmax(0, 1fr) 105px auto; }
  .job-voice { display: none; }
}

@media (max-width: 560px) {
  .topbar { width: calc(100% - 28px); }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
  .account-button { padding: 0 11px; }
  .account-button .chevron { display: none; }
  .app-shell { width: calc(100% - 28px); padding-top: 42px; }
  h1 { font-size: 46px; }
  .page-intro { font-size: 14px; }
  .script-card, .upload-card, .settings-card, .asr-settings-card { padding: 22px; }
  .text-editor { height: 310px; }
  .writing-tip { display: none; }
  .editor-footer { justify-content: end; }
  .mini-feature-row { justify-content: start; }
  .history-toolbar { padding: 0 14px; }
  .job-row { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 14px; gap: 10px; }
  .job-time, .job-row > .status-pill { display: none; }
  .connect-dialog form { padding: 32px 24px 24px; }
  .footer { width: calc(100% - 28px); }
  .footer span:nth-child(2) { display: none; }
}

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