:root {
  --ink: #10211f;
  --ink-soft: #586c68;
  --ink-faint: #879894;
  --ivory: #eff5f2;
  --paper: rgba(252, 255, 253, 0.88);
  --paper-solid: #fcfffd;
  --line: rgba(12, 47, 42, 0.11);
  --line-strong: rgba(12, 47, 42, 0.18);
  --violet: #0aa99c;
  --violet-dark: #08766f;
  --violet-soft: #ddf4f0;
  --mint: #0c958a;
  --mint-soft: #dcf1ec;
  --coral: #e36c60;
  --danger: #bd4d45;
  --shadow-sm: 0 1px 2px rgba(9, 38, 34, 0.04), 0 8px 26px rgba(9, 38, 34, 0.035);
  --shadow-lg: 0 24px 80px rgba(9, 38, 34, 0.11), 0 4px 16px rgba(9, 38, 34, 0.05);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 74% 2%, rgba(166, 230, 221, 0.48), transparent 24rem),
    radial-gradient(circle at 8% 38%, rgba(194, 226, 220, 0.3), transparent 25rem),
    var(--ivory);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
}

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

.ambient-one {
  top: 23rem;
  right: -9rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(10, 169, 156, 0.09);
  box-shadow: inset 0 0 0 4rem rgba(10, 169, 156, 0.015), inset 0 0 0 8rem rgba(10, 169, 156, 0.012);
}

.ambient-two {
  top: 68rem;
  left: -8rem;
  width: 20rem;
  height: 20rem;
  background: rgba(10, 169, 156, 0.05);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 5px 16px rgba(7, 35, 32, .18);
}

.header-meta,
.connection {
  display: flex;
  align-items: center;
}

.header-meta {
  gap: 12px;
}

.header-actions,
.site-nav {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 18px;
}

.site-nav {
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
}

.site-nav a {
  min-width: 66px;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a.active {
  color: var(--ink);
  background: var(--paper-solid);
  box-shadow: 0 1px 3px rgba(35, 31, 24, 0.08);
}

.connection {
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #50a582;
  box-shadow: 0 0 0 4px rgba(80, 165, 130, 0.11);
}

.connection.error .connection-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(189, 71, 59, 0.1);
}

.version-pill {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-faint);
  background: rgba(255,255,255,0.35);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-area,
.account-user {
  display: flex;
  align-items: center;
}

.account-area {
  min-height: 34px;
  flex: none;
}

.account-status {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.google-signin {
  min-width: 40px;
  min-height: 32px;
}

.login-bonus-banner {
  display: flex;
  width: fit-content;
  max-width: calc(100% - 28px);
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  margin: -5px auto 0;
  border: 1px solid rgba(10, 169, 156, 0.24);
  border-radius: 999px;
  color: #076b64;
  background: linear-gradient(110deg, rgba(255, 249, 210, 0.96), rgba(220, 244, 240, 0.98));
  box-shadow: 0 8px 26px rgba(9, 83, 75, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
  animation: login-bonus-in 440ms var(--ease) both;
}

.login-bonus-banner::before {
  color: #cf8c13;
  content: "\2726";
  font-size: 15px;
  line-height: 1;
}

@keyframes login-bonus-in {
  from { opacity: 0; transform: translateY(-5px) scale(0.97); }
}

.account-user {
  gap: 8px;
}

.account-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.account-profile:hover .account-identity strong {
  color: var(--violet-dark);
}

.account-profile:focus-visible {
  outline: 3px solid rgba(10, 169, 156, 0.18);
  outline-offset: 3px;
}

.credit-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(10, 169, 156, 0.16);
  border-radius: 999px;
  color: var(--violet-dark);
  background: var(--violet-soft);
  font-size: 10px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.credit-badge:hover {
  border-color: rgba(10, 169, 156, 0.32);
  background: rgba(220, 241, 236, 0.95);
  transform: translateY(-1px);
}

.credit-badge:focus-visible {
  outline: 3px solid rgba(10, 169, 156, 0.18);
  outline-offset: 2px;
}

.account-avatar {
  display: block;
  width: 34px;
  height: 34px;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: var(--paper-solid);
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(9, 38, 34, 0.12);
}

.account-identity {
  display: grid;
  max-width: 145px;
  line-height: 1.2;
}

.account-identity strong,
.account-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 720;
}

.account-identity small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 9px;
}

.account-logout {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 680;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.account-logout svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.account-logout:hover {
  border-color: rgba(189, 77, 69, 0.2);
  color: var(--danger);
  background: rgba(255, 255, 255, 0.72);
}

.account-logout:disabled {
  cursor: wait;
  opacity: 0.5;
}

.hero,
.chat-intro {
  padding: 54px 0 58px;
  text-align: center;
}

.hero h1,
.chat-intro h1 {
  margin: 0;
  font-size: clamp(46px, 6.3vw, 70px);
  font-weight: 590;
  letter-spacing: -0.067em;
  line-height: 0.98;
}

.hero h1 em,
.chat-intro h1 em {
  display: inline-block;
  color: var(--violet);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5.4vw, 60px);
  font-weight: 400;
  letter-spacing: -0.055em;
}

.hero p,
.chat-intro > p:last-child {
  max-width: 650px;
  margin: 23px auto 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}

.studio {
  width: min(920px, calc(100% - 40px));
}

.step-card,
.result-card {
  position: relative;
  padding: 42px;
  overflow: hidden;
  border: 1px solid rgba(52, 47, 39, 0.09);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.step-card::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 180px;
  height: 180px;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle at 100% 0%, rgba(10, 169, 156, 0.065), transparent 67%);
}

.step-heading {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 20px;
  margin-bottom: 32px;
}

.step-number {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(10, 169, 156, 0.17);
  border-radius: 14px;
  color: var(--violet);
  background: var(--violet-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.step-kicker {
  margin: 0 0 3px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.step-heading h2,
.result-heading h2,
.processing-card h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 690;
  letter-spacing: -0.045em;
}

.step-description {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.step-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--ink-faint);
  background: rgba(43, 39, 31, 0.045);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.step-state span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #aaa59c;
}

.step-state.complete {
  color: var(--mint);
  background: var(--mint-soft);
}

.step-state.complete span {
  background: #45a280;
}

.mode-switcher {
  position: relative;
  z-index: 30;
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(240, 237, 229, 0.65);
}

.mode-tab {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 15px;
  border: 0;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 670;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.mode-tab:hover {
  color: var(--ink);
}

.mode-tab.active {
  color: var(--ink);
  background: var(--paper-solid);
  box-shadow: 0 1px 3px rgba(35, 31, 24, 0.08), 0 4px 14px rgba(35, 31, 24, 0.035);
}

.mode-tab:active {
  transform: scale(0.985);
}

.mode-tab svg,
.search-field svg,
.drop-icon svg,
.convert-button svg,
.icon-button svg,
.download-button svg,
.trust-icon svg,
.audio-action svg,
.waveform-command svg,
.waveform-zoom svg,
.audio-play svg,
.portrait-tab svg,
.portrait-drop-icon svg,
.video-generate-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mode-panel {
  position: relative;
  z-index: 1;
  padding-top: 22px;
  animation: panel-in 260ms var(--ease) both;
}

.mode-panel.filter-menu-open {
  z-index: 200;
}

.step-card.filter-menu-open {
  z-index: 200;
  overflow: visible;
}

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

.library-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 11px;
}

.search-field {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  height: 45px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.55);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-field:focus-within {
  border-color: rgba(10, 169, 156, 0.42);
  background: white;
  box-shadow: 0 0 0 3px rgba(10, 169, 156, 0.08);
}

.search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
}

.search-field input::placeholder {
  color: #a5a097;
}

.search-field kbd {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-faint);
  background: #f6f3ec;
  font-family: inherit;
  font-size: 9px;
}

.library-count {
  flex: none;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 650;
}

.library-summary {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
}

.library-info {
  position: relative;
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: none;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-faint);
  cursor: help;
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 700;
}

.library-info:focus-visible {
  outline: 3px solid rgba(10, 169, 156, .15);
  outline-offset: 2px;
}

.library-info-tooltip {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 9px);
  left: 50%;
  width: min(340px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  background: var(--paper-solid);
  box-shadow: 0 14px 36px rgba(9, 38, 34, 0.16), var(--shadow-sm);
  font-family: Inter, ui-sans-serif, sans-serif;
  font-size: 11px;
  font-weight: 560;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, -3px);
  transition: opacity 150ms ease, transform 150ms ease;
  visibility: hidden;
}

.library-info:hover .library-info-tooltip,
.library-info:focus .library-info-tooltip,
.mode-tab:focus-visible .library-info-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.library-filters {
  position: relative;
  z-index: 201;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 13px;
}

.filter-picker {
  position: relative;
}

.filter-picker-trigger {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 9px 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: rgba(255,255,255,.56);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.filter-picker-trigger:hover,
.filter-picker-trigger[aria-expanded="true"] {
  border-color: rgba(10, 169, 156, .38);
  background: white;
}

.filter-picker-trigger:focus-visible {
  outline: 3px solid rgba(10, 169, 156, .12);
  outline-offset: 1px;
}

.filter-picker-trigger svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 150ms ease;
}

.filter-picker-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.filter-picker-count {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--violet-dark);
  font-size: 8px;
}

.filter-picker-count[hidden] {
  display: none;
}

.filter-picker-menu {
  position: absolute;
  z-index: 202;
  top: calc(100% + 6px);
  left: 0;
  width: min(270px, calc(100vw - 38px));
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-solid);
  box-shadow: 0 14px 36px rgba(9, 38, 34, .15), var(--shadow-sm);
}

.filter-picker:nth-of-type(3) .filter-picker-menu {
  right: 0;
  left: auto;
}

.filter-picker-search {
  display: flex;
  height: 34px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.filter-picker-search:focus-within {
  border-color: rgba(10, 169, 156, .42);
  box-shadow: 0 0 0 3px rgba(10, 169, 156, .07);
}

.filter-picker-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 11px;
}

.filter-picker-options {
  display: grid;
  gap: 2px;
  max-height: 210px;
  margin-top: 5px;
  overflow-y: auto;
  scrollbar-color: rgba(90, 83, 73, .22) transparent;
  scrollbar-width: thin;
}

.filter-picker-option {
  display: flex;
  min-height: 31px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 620;
  text-align: left;
}

.filter-picker-option:hover,
.filter-picker-option:focus-visible {
  outline: 0;
  color: var(--ink);
  background: rgba(10, 169, 156, .08);
}

.filter-picker-option[aria-selected="true"] {
  color: var(--violet-dark);
  background: rgba(10, 169, 156, .12);
  font-weight: 740;
}

.filter-picker-option-check {
  color: var(--mint);
  font-size: 12px;
}

.filter-picker-empty {
  padding: 13px 8px;
  color: var(--ink-faint);
  font-size: 10px;
  text-align: center;
}

.active-voice-filters {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.active-voice-filters[hidden] {
  display: none;
}

.active-filter-chip {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 5px;
  padding: 0 7px 0 9px;
  border: 1px solid rgba(10, 169, 156, .24);
  border-radius: 999px;
  color: var(--violet-dark);
  background: rgba(10, 169, 156, .08);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 710;
}

.active-filter-chip:hover {
  border-color: rgba(10, 169, 156, .42);
  background: rgba(10, 169, 156, .14);
}

.active-filter-chip[data-filter="country"] {
  min-width: 38px;
  justify-content: center;
  padding-left: 8px;
  font-size: 14px;
}

.active-filter-remove {
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.voice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  max-height: 143px;
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-color: rgba(90, 83, 73, 0.22) transparent;
  scrollbar-width: thin;
}

.voice-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 67px;
  padding: 10px 66px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.44);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.voice-card:focus-visible {
  outline: 3px solid rgba(10, 169, 156, 0.18);
  outline-offset: 2px;
}

.voice-card:hover {
  z-index: 1;
  border-color: rgba(10, 169, 156, 0.29);
  background: white;
  box-shadow: 0 7px 18px rgba(52, 45, 34, 0.06);
  transform: translateY(-1px);
}

.voice-card.selected {
  border-color: rgba(10, 169, 156, 0.48);
  background: #eaf8f5;
  box-shadow: inset 0 0 0 1px rgba(10, 169, 156, 0.07);
}

.voice-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: rgba(34, 31, 27, 0.67);
  background: var(--avatar-bg, #e9e3d8);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: -0.02em;
  overflow: hidden;
}

.voice-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.voice-info {
  min-width: 0;
}

.voice-info strong,
.voice-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-info strong {
  font-size: 12px;
  font-weight: 720;
}

.voice-info small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 620;
}

.voice-check {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: transparent;
  font-size: 11px;
  line-height: 1;
}

.voice-uses {
  position: absolute;
  top: 7px;
  right: 7px;
  display: inline-flex;
  min-width: 38px;
  height: 21px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-faint);
  background: rgba(255,255,255,.83);
  font-size: 8px;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

.voice-card.selected .voice-check {
  border-color: var(--violet);
  color: white;
  background: var(--violet);
}

.empty-library {
  padding: 32px;
  color: var(--ink-soft);
  text-align: center;
}

.empty-library span,
.empty-library small { display: block; }
.empty-library span { font-weight: 700; }
.empty-library small { margin-top: 3px; color: var(--ink-faint); }

.drop-zone {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  border: 1.5px dashed rgba(82, 76, 67, 0.22);
  border-radius: var(--radius-md);
  background: rgba(247, 244, 237, 0.55);
  cursor: pointer;
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: rgba(10, 169, 156, 0.55);
  background: rgba(221, 244, 240, 0.62);
}

.drop-zone.dragging {
  transform: scale(0.995);
}

.drop-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 15px;
  place-items: center;
  border: 1px solid rgba(10, 169, 156, 0.12);
  border-radius: 15px;
  color: var(--violet);
  background: var(--violet-soft);
}

.drop-title {
  font-size: 15px;
  font-weight: 720;
}

.drop-copy {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.drop-copy strong {
  color: var(--violet-dark);
  font-weight: 700;
}

.drop-note {
  margin-top: 14px;
  color: var(--ink-faint);
  font-size: 10px;
}

.community-publish {
  margin-top: 16px;
  border: 1px solid rgba(10, 169, 156, .18);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(221,244,240,.5));
  overflow: hidden;
}

.community-publish.picker-menu-open {
  position: relative;
  z-index: 202;
  overflow: visible;
}

.community-publish-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.community-publish-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 20px;
  border: 0;
  outline: none;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.community-publish-toggle:hover {
  background: rgba(255,255,255,.36);
}

.community-publish-toggle:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(10, 169, 156, .18);
}

.community-publish-toggle > span:first-child {
  display: grid;
  gap: 2px;
}

.community-publish-toggle strong {
  margin: 2px 0 0;
  font-size: 18px;
}

.community-publish-toggle strong small {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 580;
}

.community-publish-toggle-end {
  display: flex;
  align-items: center;
  gap: 9px;
}

.community-publish-chevron {
  width: 18px;
  fill: none;
  stroke: var(--ink-soft);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform .18s ease;
}

.community-publish.expanded .community-publish-chevron {
  transform: rotate(180deg);
}

.community-badge {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--violet-dark);
  background: var(--violet-soft);
  font-size: 8px;
  font-weight: 780;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.community-publish-copy {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

#community-publish-body {
  padding: 0 20px 20px;
}

.community-publish-confirmation {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 20px;
}

.community-publish-check {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--mint);
  font-size: 14px;
  font-weight: 800;
}

.community-publish-confirmation > span:nth-child(2) {
  display: grid;
  flex: 1;
  gap: 2px;
}

.community-publish-confirmation strong {
  font-size: 13px;
}

.community-publish-confirmation small {
  color: var(--ink-soft);
  font-size: 10px;
}

.community-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.community-field {
  display: grid;
  gap: 6px;
}

.community-picker {
  width: 100%;
}

.community-picker .community-picker-trigger {
  width: 100%;
  min-height: 42px;
  justify-content: space-between;
  padding: 0 11px 0 12px;
  border-radius: 11px;
  background: rgba(255,255,255,.76);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}

.community-picker .community-picker-trigger:not(.has-value) {
  color: var(--ink-faint);
}

.community-picker-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-picker .community-picker-menu {
  z-index: 204;
  width: min(300px, calc(100vw - 78px));
}

.community-fields > .community-field:nth-child(3) .community-picker-menu {
  right: 0;
  left: auto;
}

.community-picker .filter-picker-search input {
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  font-size: 11px;
}

.community-field .community-picker-native {
  display: none;
}

.community-field-wide {
  grid-column: 1 / -1;
}

.community-visibility {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.58);
  cursor: pointer;
}

.community-visibility-copy {
  display: grid;
  gap: 2px;
}

.community-visibility-copy strong {
  color: var(--ink);
  font-size: 11px;
}

.community-visibility-copy small {
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.4;
}

.community-visibility input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.community-visibility-switch {
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  padding: 3px;
  border-radius: 999px;
  background: #cbc8c2;
  transition: background .18s ease;
}

.community-visibility-switch span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(34, 30, 24, .18);
  transition: transform .18s ease;
}

.community-visibility input:checked + .community-visibility-switch {
  background: var(--mint);
}

.community-visibility input:checked + .community-visibility-switch span {
  transform: translateX(16px);
}

.community-visibility input:focus-visible + .community-visibility-switch {
  box-shadow: 0 0 0 3px rgba(10, 169, 156, .16);
}

.community-field > span,
.community-tags legend {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.community-field input,
.community-field select,
.community-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255,255,255,.76);
  font: inherit;
  font-size: 12px;
}

.community-field input,
.community-field select {
  height: 42px;
  padding: 0 12px;
}

.community-field textarea {
  min-height: 78px;
  padding: 11px 12px;
  resize: vertical;
}

.community-field input:focus,
.community-field select:focus,
.community-field textarea:focus {
  border-color: rgba(10, 169, 156, .42);
  box-shadow: 0 0 0 3px rgba(10, 169, 156, .08);
}

.community-field small {
  color: var(--ink-faint);
  font-size: 9px;
}

.community-field small.valid {
  color: var(--mint);
}

.community-tags {
  margin: 15px 0 0;
  padding: 0;
  border: 0;
}

.community-tags legend {
  margin-bottom: 8px;
}

#community-tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.community-tag-option input {
  position: absolute;
  opacity: 0;
}

.community-tag-option span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255,255,255,.55);
  cursor: pointer;
  font-size: 9px;
  font-weight: 680;
}

.community-tag-option input:checked + span {
  border-color: var(--violet);
  color: white;
  background: var(--violet);
}

.community-system-tag span {
  cursor: default;
}

.community-system-tag input:checked + span {
  border-color: rgba(10, 169, 156, .32);
  background: var(--mint);
}

.community-publish-footer {
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid rgba(10, 169, 156, .12);
}

#community-upload-status {
  color: var(--ink-faint);
  font-size: 10px;
}

#community-upload-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: var(--violet);
  cursor: pointer;
  font-size: 10px;
  font-weight: 740;
}

#community-upload-button:disabled {
  color: #98948d;
  background: #e4e1db;
  cursor: not-allowed;
}

#community-upload-button svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.recorder {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 190px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(120deg, rgba(243, 240, 232, 0.72), rgba(249, 247, 242, 0.62));
}

.record-visual {
  position: relative;
  display: grid;
  width: 132px;
  height: 112px;
  place-items: center;
  overflow: hidden;
}

.record-orb {
  position: absolute;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 28%, #edfffc 0 5%, #a9e2da 24%, #16ad9f 64%, #08736c 100%);
  box-shadow:
    0 11px 30px rgba(7, 118, 109, .24),
    0 0 0 calc(var(--level, 0) * 18px) rgba(10, 169, 156, .1),
    inset -8px -9px 18px rgba(4, 61, 56, .2);
  transform: scale(calc(1 + var(--level, 0) * .16));
  transition: transform 80ms linear, box-shadow 100ms linear;
}

.record-orb span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ef6458;
  box-shadow: 0 0 0 calc(4px + var(--level, 0) * 7px) rgba(239,100,88,.16);
  opacity: .58;
  transform: scale(.72);
  transition: opacity 160ms ease, transform 80ms linear, box-shadow 100ms linear;
}

.recorder.recording .record-orb span {
  opacity: 1;
  transform: scale(calc(.9 + var(--level, 0) * .3));
}

.record-content {
  min-width: 0;
}

.record-label {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.record-time {
  display: block;
  margin: 3px 0 4px;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 590;
  letter-spacing: -0.05em;
}

.record-content p {
  max-width: 320px;
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.record-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--paper-solid);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(36, 31, 24, 0.04);
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.record-button:hover {
  border-color: rgba(10, 169, 156, 0.35);
  color: var(--violet-dark);
}

.record-button:active { transform: scale(0.97); }

.record-button-icon {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(233, 120, 95, 0.1);
}

.recording .record-button-icon {
  border-radius: 2px;
}

.script-field {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.5);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.script-field:focus-within {
  border-color: rgba(10, 169, 156, 0.38);
  background: white;
  box-shadow: 0 0 0 3px rgba(10, 169, 156, 0.07);
}

.script-toolbar,
.script-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 18px;
}

.script-toolbar {
  height: 42px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.script-language {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.script-language select {
  min-width: 105px;
  padding: 5px 24px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--violet-dark);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.script-language select:focus-visible {
  border-color: rgba(10, 169, 156, 0.5);
  box-shadow: 0 0 0 2px rgba(10, 169, 156, 0.09);
}

.text-button {
  padding: 3px;
  border: 0;
  color: var(--violet-dark);
  background: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.text-button:disabled {
  color: var(--ink-faint);
  cursor: default;
  opacity: 0.55;
}

.script-field textarea {
  display: block;
  width: 100%;
  min-height: 178px;
  padding: 18px;
  resize: vertical;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
  line-height: 1.75;
}

.script-field textarea::placeholder {
  color: #aaa59c;
}

.script-footer {
  min-height: 42px;
  gap: 15px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 10px;
}

.script-footer strong {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.audio-selection {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  animation: panel-in 300ms var(--ease) both;
}

.selection-label {
  margin: 0 0 9px 2px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.audio-player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 84px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(250, 248, 242, 0.85);
}

.audio-play {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.audio-play:hover { background: var(--violet-dark); }
.audio-play:active { transform: scale(0.94); }
.audio-play svg { width: 16px; height: 16px; fill: currentColor; stroke-width: 0; transform: translateX(1px); }
.audio-player.playing .audio-play svg { transform: none; }

.audio-main {
  min-width: 0;
}

.audio-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.audio-name {
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-time {
  flex: none;
  color: var(--ink-faint);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.waveform-viewport {
  position: relative;
  height: 38px;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 5px;
  cursor: pointer;
  overscroll-behavior-x: contain;
  scrollbar-color: rgba(10, 169, 156, .38) transparent;
  scrollbar-width: thin;
}

.waveform-track {
  position: relative;
  width: 100%;
  min-width: 100%;
  height: 30px;
}

.waveform-track canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.waveform-selection {
  position: absolute;
  inset-block: 0;
  min-width: 2px;
  border-inline: 2px solid var(--violet);
  background: rgba(10, 169, 156, .16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.34);
  pointer-events: none;
}

.waveform-selection::before,
.waveform-selection::after {
  position: absolute;
  top: 50%;
  width: 4px;
  height: 16px;
  border-radius: 3px;
  background: var(--violet);
  content: "";
  transform: translateY(-50%);
}

.waveform-selection::before { left: -3px; }
.waveform-selection::after { right: -3px; }

.waveform-tools {
  display: flex;
  min-height: 31px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
}

.waveform-selection-time {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waveform-tool-actions,
.waveform-zoom {
  display: flex;
  align-items: center;
}

.waveform-tool-actions {
  flex: none;
  gap: 5px;
}

.waveform-zoom {
  gap: 6px;
  margin-right: 3px;
  color: var(--ink-faint);
}

.waveform-zoom svg {
  width: 14px;
  height: 14px;
}

.waveform-zoom span {
  min-width: 17px;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.waveform-zoom-slider {
  width: 84px;
  height: 3px;
  margin: 0;
  accent-color: var(--violet);
  cursor: ew-resize;
}

.waveform-command {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-faint);
  background: rgba(255,255,255,.68);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.waveform-command svg {
  width: 14px;
  height: 14px;
}

.waveform-command:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.waveform-command:active:not(:disabled) { transform: scale(.94); }

.waveform-delete:hover:not(:disabled) {
  border-color: rgba(189, 71, 59, .25);
  color: var(--danger);
  background: rgba(189, 71, 59, .06);
}

.waveform-keep:hover:not(:disabled) {
  border-color: rgba(10, 169, 156, .28);
  color: var(--violet-dark);
  background: rgba(10, 169, 156, .07);
}

.audio-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.audio-action,
.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink-faint);
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.audio-action:hover,
.icon-button:hover {
  border-color: var(--line);
  color: var(--danger);
  background: white;
}

.audio-action svg { width: 16px; height: 16px; }

.audio-loading {
  position: relative;
}

.audio-loading::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 15px;
  margin: -8px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: white;
  border-radius: 50%;
  content: "";
  animation: spin .7s linear infinite;
}

.audio-loading svg { opacity: 0; }

@keyframes spin { to { transform: rotate(360deg); } }

.step-bridge {
  display: flex;
  justify-content: center;
  height: 52px;
}

.step-bridge::before {
  width: 1px;
  height: 100%;
  content: "";
  background: linear-gradient(var(--line-strong), rgba(10, 169, 156, 0.32), var(--line-strong));
}

.step-bridge span {
  position: absolute;
  width: 7px;
  height: 7px;
  margin-top: 22px;
  border: 2px solid var(--ivory);
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 1px rgba(10, 169, 156, 0.22);
}

.convert-stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 42px 0;
}

.convert-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line-strong);
}

.convert-button {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  width: min(380px, calc(100% - 30px));
  min-height: 76px;
  padding: 13px 17px;
  border: 0;
  border-radius: 20px;
  color: white;
  background: linear-gradient(135deg, #12b5a8, #08766f);
  cursor: pointer;
  box-shadow: 0 15px 35px rgba(7, 112, 104, 0.27), inset 0 1px rgba(255,255,255,0.18);
  text-align: left;
  transition: transform 200ms var(--ease), box-shadow 200ms ease, filter 200ms ease;
}

.convert-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 19px 40px rgba(7, 112, 104, 0.33), inset 0 1px rgba(255,255,255,0.18);
  filter: saturate(1.06);
}

.convert-button:not(:disabled):active { transform: translateY(0) scale(0.99); }

.convert-button:disabled {
  color: #96918a;
  background: #dedbd3;
  cursor: not-allowed;
  box-shadow: none;
}

.convert-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,0.14);
}

.convert-button:disabled .convert-icon {
  background: rgba(255,255,255,0.34);
}

.convert-copy strong,
.convert-copy small { display: block; }
.convert-copy strong { font-size: 14px; font-weight: 740; }
.convert-copy small { margin-top: 2px; color: rgba(255,255,255,.68); font-size: 10px; }
.convert-button:disabled .convert-copy small { color: #aaa59d; }
.convert-spark { padding-right: 6px; font-size: 16px; opacity: .7; }

.result-card {
  padding: 38px 42px;
  border-color: rgba(10, 169, 156, 0.18);
  background: linear-gradient(135deg, rgba(252,255,253,.96), rgba(221,244,240,.88));
  box-shadow: var(--shadow-lg);
  animation: result-in 500ms var(--ease) both;
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.result-glow {
  position: absolute;
  top: -180px;
  right: -100px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: rgba(10, 169, 156, 0.1);
  filter: blur(30px);
  pointer-events: none;
}

.result-heading {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 23px;
}

.success-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--mint);
  background: var(--mint-soft);
}

.success-mark svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-card .audio-player {
  position: relative;
  border-color: rgba(10, 169, 156, 0.13);
  background: rgba(255,255,255,.68);
}

.result-card .audio-play {
  background: var(--violet);
}

.result-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
}

.result-details {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 620;
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.detail-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #bbb6ac;
}

.download-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid rgba(10, 169, 156, 0.2);
  border-radius: 11px;
  color: var(--violet-dark);
  background: white;
  box-shadow: 0 3px 10px rgba(7, 112, 104, 0.07);
  font-size: 11px;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.download-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(7, 112, 104, 0.12);
}

.download-button svg { width: 16px; height: 16px; }

.video-creator {
  position: relative;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid rgba(10, 169, 156, 0.15);
}

.video-creator-heading,
.video-result-heading,
.video-result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.video-creator-heading h3,
.video-result-heading h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 690;
  letter-spacing: -0.04em;
}

.video-creator-heading > div > p:last-child {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.video-badge {
  flex: none;
  padding: 6px 10px;
  border: 1px solid rgba(10, 169, 156, .17);
  border-radius: 999px;
  color: var(--violet-dark);
  background: rgba(221, 244, 240, .7);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.portrait-inputs {
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid rgba(10, 169, 156, .13);
  border-radius: 17px;
  background: rgba(255, 255, 255, .52);
}

.portrait-switcher {
  display: flex;
  padding: 5px;
  border-bottom: 1px solid var(--line);
  background: rgba(240, 246, 242, .75);
}

.portrait-tab {
  display: inline-flex;
  min-height: 39px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  border: 0;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 690;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.portrait-tab:hover { color: var(--ink); }

.portrait-tab.active {
  color: var(--ink);
  background: var(--paper-solid);
  box-shadow: 0 1px 3px rgba(35, 31, 24, .07), 0 4px 12px rgba(35, 31, 24, .03);
}

.portrait-panel { padding: 14px; }

.portrait-default-choice {
  display: flex;
  width: 100%;
  min-height: 94px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid rgba(10, 169, 156, .2);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(239, 249, 246, .62);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.portrait-default-choice:hover {
  border-color: rgba(10, 169, 156, .5);
  background: rgba(221, 244, 240, .78);
  transform: translateY(-1px);
}

.portrait-default-choice:disabled {
  cursor: wait;
  opacity: .64;
}

.portrait-default-choice img {
  width: 72px;
  height: 72px;
  flex: none;
  border-radius: 12px;
  background: var(--paper-solid);
  object-fit: cover;
}

.portrait-default-choice strong,
.portrait-default-choice small { display: block; }
.portrait-default-choice strong { font-size: 12px; }
.portrait-default-choice small { margin-top: 3px; color: var(--ink-faint); font-size: 9px; }

.portrait-drop {
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 17px;
  border: 1.5px dashed rgba(10, 169, 156, .24);
  border-radius: 13px;
  background: rgba(239, 249, 246, .62);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.portrait-drop:hover,
.portrait-drop.dragging {
  border-color: rgba(10, 169, 156, .56);
  background: rgba(221, 244, 240, .78);
}

.portrait-drop.dragging { transform: scale(.995); }

.portrait-drop-icon {
  display: grid;
  width: 43px;
  height: 43px;
  flex: none;
  place-items: center;
  border-radius: 13px;
  color: var(--violet-dark);
  background: var(--violet-soft);
}

.portrait-drop strong,
.portrait-drop small { display: block; }
.portrait-drop strong { font-size: 12px; }
.portrait-drop small { margin-top: 2px; color: var(--ink-faint); font-size: 9px; }

.portrait-url-form > label,
.youtube-source-form > label {
  display: block;
  margin: 0 0 7px 2px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.portrait-url-form > div,
.youtube-source-form > div {
  display: flex;
  gap: 8px;
}

.portrait-url-form input,
.youtube-source-form input {
  min-width: 0;
  height: 43px;
  flex: 1;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: white;
  font-size: 11px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.portrait-url-form input:focus,
.youtube-source-form input:focus {
  border-color: rgba(10, 169, 156, .42);
  box-shadow: 0 0 0 3px rgba(10, 169, 156, .08);
}

.portrait-url-form button,
.youtube-source-form button {
  padding: 0 15px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: var(--violet-dark);
  cursor: pointer;
  font-size: 10px;
  font-weight: 720;
}

.portrait-url-form button:disabled,
.youtube-source-form button:disabled { cursor: wait; opacity: .64; }

.portrait-url-form > small,
.youtube-source-form > small {
  display: block;
  margin: 8px 2px 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.youtube-clip-editor {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(12, 47, 42, .08);
}

.youtube-player-shell {
  width: 100%;
  min-height: 200px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 13px;
  background: #07110f;
}

.youtube-player-shell.tiktok-player-shell {
  width: min(100%, 420px);
  min-height: 420px;
  margin-inline: auto;
  aspect-ratio: 9 / 16;
}

.youtube-player-shell.uploaded-video-player-shell {
  width: min(100%, var(--uploaded-video-preview-width, 100%));
  min-height: 0;
  margin-inline: auto;
  aspect-ratio: var(--uploaded-video-preview-aspect, 16 / 9);
}

.youtube-player-shell iframe,
.youtube-player-shell > div,
.uploaded-video-player-shell video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.uploaded-video-player-shell video {
  object-fit: contain;
}

.youtube-clip-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.youtube-clip-controls > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.youtube-clip-actions {
  display: flex;
  flex: none;
  gap: 8px;
}

.youtube-clip-controls strong {
  color: var(--ink);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.youtube-clip-controls small {
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.5;
}

.youtube-clip-controls button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--violet-dark);
  cursor: pointer;
  font-size: 10px;
  font-weight: 720;
}

.youtube-clip-controls button {
  flex: none;
  background: linear-gradient(135deg, #12b5a8, #08766f);
  box-shadow: 0 8px 18px rgba(8, 118, 111, .16);
}

.youtube-clip-controls .youtube-fetch-audio {
  background: var(--violet-dark);
  box-shadow: 0 8px 18px rgba(61, 45, 104, .16);
}

.youtube-clip-controls .clip-secondary {
  color: var(--ink-soft);
  background: var(--paper-solid);
  box-shadow: inset 0 0 0 1px var(--line);
}

.youtube-instructions {
  padding: 14px 15px;
  border: 1px solid rgba(10, 169, 156, .2);
  border-radius: 12px;
  background: rgba(227, 248, 244, .56);
}

.youtube-instructions strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.youtube-instructions p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.youtube-instructions.selected {
  border: 1px solid rgba(198, 125, 20, .18);
  background: rgba(255, 242, 211, .52);
}

.youtube-instructions.selected strong { color: #6f4a12; }
.youtube-instructions.selected p { color: #7b5416; }

.youtube-audio-fetching {
  display: grid;
  min-height: 220px;
  margin-top: 14px;
  place-items: center;
  align-content: center;
  gap: 9px;
  border: 1px solid rgba(10, 169, 156, .18);
  border-radius: 14px;
  background: rgba(227, 248, 244, .42);
  text-align: center;
}

.youtube-audio-fetching strong {
  color: var(--ink);
  font-size: 14px;
}

.youtube-audio-fetching small {
  color: var(--ink-faint);
  font-size: 10px;
}

.youtube-audio-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(10, 169, 156, .18);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.youtube-clip-controls button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.portrait-selection {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 10px;
  border: 1px solid rgba(10, 169, 156, .16);
  border-radius: 16px;
  background: rgba(255, 255, 255, .7);
  animation: panel-in 260ms var(--ease) both;
}

.portrait-selection-preview {
  display: block;
  width: 70px;
  height: 70px;
  border-radius: 12px;
  background: #dce7e3;
  overflow: hidden;
}

.portrait-selection-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-selection strong,
.portrait-selection small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portrait-selection strong { font-size: 12px; }
.portrait-selection small { margin-top: 3px; color: var(--ink-faint); font-size: 9px; }

.video-advanced {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(10, 169, 156, .14);
  border-radius: 15px;
  background: rgba(255, 255, 255, .52);
}

.video-advanced.inactive {
  opacity: .56;
  pointer-events: none;
}

.video-advanced.inactive summary { cursor: not-allowed; }

.video-advanced summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.video-advanced summary::-webkit-details-marker { display: none; }
.video-advanced summary > span,
.video-setting > span:first-child {
  display: grid;
  gap: 2px;
}
.video-advanced summary strong,
.video-setting strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 720;
}
.video-advanced summary small,
.video-setting small {
  color: var(--ink-faint);
  font-size: 9px;
}
.video-advanced summary svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transition: transform 160ms ease;
}
.video-advanced[open] summary svg { transform: rotate(180deg); }

.video-advanced-body {
  display: grid;
  gap: 1px;
  padding: 0 14px 12px;
}

.video-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 42%);
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid rgba(12, 47, 42, .08);
}

.video-setting select {
  width: 100%;
  height: 38px;
  padding: 0 32px 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: var(--paper-solid);
  font-size: 10px;
}

.video-setting select:focus-visible {
  border-color: rgba(10, 169, 156, .42);
  box-shadow: 0 0 0 3px rgba(10, 169, 156, .08);
}

.video-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
}

.video-range input {
  width: 100%;
  accent-color: var(--violet-dark);
}

.video-range output {
  color: var(--ink-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

.video-advanced-body > p {
  margin: 5px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.video-advanced :disabled {
  cursor: not-allowed;
  opacity: .58;
}

.video-generate-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: min(390px, 100%);
  min-height: 66px;
  align-items: center;
  gap: 13px;
  margin: 20px auto 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 17px;
  color: white;
  background: linear-gradient(135deg, #12b5a8, #08766f);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(7, 112, 104, .23), inset 0 1px rgba(255,255,255,.16);
  text-align: left;
  transition: transform 180ms var(--ease), box-shadow 180ms ease;
}

.video-generate-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(7, 112, 104, .29), inset 0 1px rgba(255,255,255,.16);
}

.video-generate-button:disabled {
  color: #96918a;
  background: #dedbd3;
  cursor: not-allowed;
  box-shadow: none;
}

.video-generate-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: rgba(255,255,255,.14);
}

.video-generate-button:disabled .video-generate-icon { background: rgba(255,255,255,.34); }
.video-generate-button strong,
.video-generate-button small { display: block; }
.video-generate-button strong { font-size: 13px; font-weight: 740; }
.video-generate-button small { margin-top: 2px; color: rgba(255,255,255,.69); font-size: 9px; }
.video-generate-button:disabled small { color: #aaa59d; }

.video-result {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid rgba(10, 169, 156, .15);
  animation: result-in 420ms var(--ease) both;
}

.video-result-heading { margin-bottom: 14px; }

.video-result video {
  display: block;
  width: min(100%, var(--video-preview-width, 100%));
  height: auto;
  max-width: 100%;
  max-height: 540px;
  aspect-ratio: var(--video-preview-aspect, auto);
  margin-inline: auto;
  border-radius: 17px;
  background: #07110f;
  box-shadow: 0 12px 32px rgba(7, 35, 32, .14);
}

.video-result-footer {
  margin-top: 14px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 620;
}

.trust-note {
  display: flex;
  width: min(920px, calc(100% - 40px));
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 31px 0 12px;
  color: var(--ink-faint);
  font-size: 11px;
  text-align: center;
}

.trust-note p { margin: 0; }
.trust-note strong { color: var(--ink-soft); }
.trust-icon { display: grid; width: 24px; height: 24px; place-items: center; color: var(--mint); }
.trust-icon svg { width: 17px; height: 17px; }

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px 28px;
  min-height: 130px;
  padding: 40px 0 24px;
  color: var(--ink-faint);
  font-size: 10px;
}

.site-footer-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.site-footer-copy span:first-child {
  color: var(--ink-soft);
  font-weight: 750;
}

.footer-mobile {
  display: flex;
  align-items: center;
  justify-self: center;
}

.footer-store-links {
  display: flex;
  align-items: center;
  gap: 7px;
}

.store-badge {
  display: flex;
  min-width: 112px;
  height: 34px;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  color: white;
  background: #050505;
  text-decoration: none;
  transition: opacity 150ms ease, transform 150ms ease;
}

.store-badge.play {
  min-width: 126px;
}

.store-badge:hover,
.store-badge:focus-visible {
  opacity: 0.82;
  transform: translateY(-1px);
}

.store-badge-icon {
  width: 20px;
  height: 22px;
  flex: none;
}

.store-badge-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.store-badge-copy small {
  color: rgba(255, 255, 255, 0.88);
  font-size: 6px;
  letter-spacing: 0.01em;
}

.store-badge-copy strong {
  margin-top: 2px;
  color: white;
  font-size: 12px;
  font-weight: 620;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 8px 18px;
}

.footer-links a,
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--violet-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(31, 28, 24, 0.35);
  backdrop-filter: blur(12px);
  animation: fade-in 220ms ease both;
}

@keyframes fade-in { from { opacity: 0; } }

.processing-card {
  width: min(440px, 100%);
  padding: 45px 40px 30px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 27px;
  background: #fffefa;
  box-shadow: 0 30px 90px rgba(27, 22, 17, .24);
  text-align: center;
}

.processing-orb {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 26px;
}

.processing-orb span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.processing-orb span:nth-child(1) {
  background: radial-gradient(circle at 32% 26%, #fff 0 4%, #bce9e3 19%, #12aa9d 60%, #076960 100%);
  box-shadow: 0 14px 35px rgba(8, 118, 110, .28), inset -9px -10px 20px rgba(4, 67, 61, .22);
  animation: orb-breathe 2s ease-in-out infinite;
}

.processing-orb span:nth-child(2),
.processing-orb span:nth-child(3) {
  border: 1px solid rgba(10, 169, 156, .23);
  animation: orb-ring 2s ease-out infinite;
}

.processing-orb span:nth-child(3) { animation-delay: 1s; }

@keyframes orb-breathe { 50% { transform: scale(.92); filter: saturate(1.2); } }
@keyframes orb-ring { to { opacity: 0; transform: scale(1.65); } }

.processing-card h2 { margin-top: 5px; font-size: 26px; }
.processing-card > p:not(.step-kicker) { min-height: 42px; margin: 8px auto 22px; color: var(--ink-soft); font-size: 12px; }

.processing-track {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #ebe8e1;
}

.processing-track span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0aa99c, #65cec3);
  transition: width 1.2s var(--ease);
}

.cancel-button {
  margin-top: 20px;
  color: var(--ink-faint);
}

.cancel-button:hover { color: var(--danger); }

.language-warning {
  width: min(420px, calc(100% - 32px));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  color: var(--ink);
  background: #fffefa;
  box-shadow: 0 30px 90px rgba(27, 22, 17, 0.24);
}

.language-warning::backdrop {
  background: rgba(31, 28, 24, 0.35);
  backdrop-filter: blur(9px);
}

.language-warning form {
  display: grid;
  justify-items: center;
  padding: 34px 32px 28px;
  text-align: center;
}

.language-warning-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 50%;
  color: #8b6218;
  background: #fff0c9;
  font-size: 21px;
  font-weight: 780;
}

.language-warning h2 {
  font-size: 23px;
}

.language-warning p {
  max-width: 330px;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.language-warning-actions {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}

.language-warning-actions button {
  min-width: 88px;
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 730;
}

.language-warning-cancel {
  color: var(--ink-soft);
  background: transparent;
}

.language-warning-confirm {
  border-color: var(--violet) !important;
  color: white;
  background: var(--violet);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  display: flex;
  max-width: min(400px, calc(100% - 44px));
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 13px;
  color: white;
  background: #292622;
  box-shadow: 0 12px 40px rgba(27,22,16,.24);
  font-size: 12px;
  animation: toast-in 260ms var(--ease) both;
}

.toast.error { background: #713a34; }
.toast.success { background: #2d6152; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 1080px); }
  .site-header { height: 70px; }
  .header-meta { display: none; }
  .header-actions { gap: 8px; }
  .site-nav a { min-width: 52px; padding-inline: 7px; }
  .account-identity { display: none; }
  .account-logout-label { display: none; }
  .account-logout { width: 32px; justify-content: center; padding: 0; }
  .hero,
  .chat-intro { padding: 45px 8px 43px; }
  .hero h1,
  .chat-intro h1 { font-size: clamp(43px, 13vw, 62px); }
  .hero p,
  .chat-intro > p:last-child { margin-top: 22px; font-size: 15px; }
  .studio,
  .trust-note { width: min(100% - 20px, 920px); }
  .step-card,
  .result-card { padding: 27px 20px; border-radius: 23px; }
  .step-heading { grid-template-columns: auto 1fr; gap: 14px; }
  .step-state { display: none; }
  .step-heading h2,
  .result-heading h2 { font-size: 22px; }
  .step-description { font-size: 12px; }
  .mode-tab { padding-inline: 8px; font-size: 11px; }
  .mode-tab svg { display: none; }
  .library-toolbar { align-items: stretch; flex-direction: column; gap: 9px; }
  .library-summary { justify-content: space-between; }
  .library-count { padding-left: 3px; }
  .community-fields { grid-template-columns: 1fr; }
  .community-field-wide { grid-column: auto; }
  .community-publish-footer { align-items: stretch; flex-direction: column; }
  #community-upload-button { justify-content: center; }
  .voice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 143px; }
  .recorder { grid-template-columns: 90px 1fr; gap: 14px; padding: 20px 15px; }
  .record-visual { width: 90px; height: 100px; }
  .record-orb { width: 55px; height: 55px; }
  .record-button { grid-column: 1 / -1; justify-content: center; }
  .drop-zone { min-height: 195px; }
  .script-footer span:first-child { display: none; }
  .script-footer { justify-content: flex-end; }
  .audio-player { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 11px; }
  .audio-play { width: 38px; height: 38px; }
  .result-footer { align-items: stretch; flex-direction: column; }
  .result-actions { width: 100%; }
  .result-actions .download-button { flex: 1; justify-content: center; }
  .download-button { justify-content: center; }
  .video-creator-heading { align-items: flex-start; }
  .portrait-selection { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 11px; }
  .portrait-selection-preview { width: 60px; height: 60px; }
  .video-result-footer { align-items: stretch; flex-direction: column; }
  .trust-note { align-items: flex-start; padding-inline: 18px; }
  .site-footer { display: flex; align-items: flex-start; flex-direction: column; justify-content: center; gap: 14px; padding-bottom: 28px; }
  .footer-mobile,
  .footer-links { justify-self: auto; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .site-nav { gap: 0; padding: 3px; }
  .site-nav a { min-width: 0; padding: 6px 5px; font-size: 10px; }
}

@media (max-width: 520px) {
  .brand > span { display: none; }
  .header-actions { gap: 6px; }
  .account-user { gap: 6px; }
  .footer-store-links { flex-wrap: wrap; }
}

@media (max-width: 380px) {
  .site-header.shell { width: calc(100% - 16px); }
  .site-nav a { min-width: 42px; padding-inline: 5px; font-size: 10px; }
  .account-status,
  .credit-badge,
  .account-logout { display: none; }
}

@media (max-width: 460px) {
  .version-pill { display: none; }
  .hero,
  .chat-intro { padding-top: 38px; }
  .hero h1,
  .chat-intro h1 { font-size: 43px; }
  .voice-grid { grid-template-columns: 1fr; }
  .mode-switcher { flex-wrap: wrap; overflow: visible; }
  .mode-tab { min-width: max-content; }
  .step-number { width: 39px; height: 39px; }
  .step-heading { gap: 11px; }
  .step-description { grid-column: 1 / -1; }
  .recorder { grid-template-columns: 1fr; text-align: center; }
  .record-visual { width: 100%; height: 92px; }
  .record-content p { margin-inline: auto; }
  .audio-topline { align-items: flex-start; flex-direction: column; gap: 1px; }
  .audio-player { grid-template-columns: auto minmax(0, 1fr); }
  .audio-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: -7px; }
  .waveform-tools { justify-content: flex-end; }
  .waveform-selection-time { display: none; }
  .waveform-zoom-slider { width: 58px; }
  .result-heading { grid-template-columns: auto 1fr auto; }
  .video-creator-heading { flex-direction: column; gap: 10px; }
  .portrait-url-form > div,
  .youtube-source-form > div { align-items: stretch; flex-direction: column; }
  .portrait-url-form button,
  .youtube-source-form button { min-height: 41px; }
  .youtube-clip-controls { align-items: stretch; flex-direction: column; }
  .youtube-clip-actions { flex-direction: column; }
  .youtube-clip-controls button { width: 100%; }
  .portrait-drop { justify-content: flex-start; }
  .video-setting { grid-template-columns: 1fr; gap: 9px; }
  .video-generate-button { grid-template-columns: auto minmax(0, 1fr); }
  .video-generate-button .convert-spark { display: none; }
  .processing-card { padding: 39px 25px 27px; }
}

@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;
  }
}
