/* Robo Phonix v24.9 CSS Split
   Extracted from index.html. */

:root {
  --bg: #050505;
  --bg-2: #101010;
  --panel: rgba(255, 255, 255, .78);
  --panel-2: rgba(255, 255, 255, .72);
  --field: rgba(255, 255, 255, .88);
  --text: #0a0a0a;
  --muted: rgba(10, 10, 10, .72);
  --line: rgba(10, 10, 10, .16);
  --line-strong: rgba(255, 0, 174, .48);
  --accent: #ff8a24;
  --accent-2: #f26900;
  --accent-soft: rgba(193, 255, 26, .18);
  --danger: #d91c52;
  --shadow: 0 24px 80px rgba(0, 0, 0, .22);
  --inner: inset 0 1px 0 rgba(255, 255, 255, .35);
  --radius: 28px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(rgba(0,0,0,.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.11) 1px, transparent 1px),
    radial-gradient(circle at 17% 18%, rgba(255,255,255,.35), transparent 12rem),
    radial-gradient(circle at 82% 22%, rgba(255,255,255,.18), transparent 14rem),
    linear-gradient(180deg, #f26900 0%, #f26900 48%, #ff8a24 48%, #ff8a24 100%);
  background-size: 40px 40px, 40px 40px, auto, auto, auto;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 24%, rgba(255,255,255,.16) 0, rgba(255,255,255,.16) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, transparent 0 112px, rgba(255,255,255,.22) 113px, transparent 114px),
    radial-gradient(circle at 50% 50%, transparent 0 250px, rgba(255,255,255,.12) 251px, transparent 252px);
  opacity: .26;
  mix-blend-mode: screen;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 6%, rgba(255,255,255,.18) 6.1%, transparent 6.2%),
    linear-gradient(90deg, transparent 93%, rgba(255,255,255,.18) 93.1%, transparent 93.2%),
    linear-gradient(transparent 10%, rgba(255,255,255,.16) 10.1%, transparent 10.2%),
    linear-gradient(transparent 90%, rgba(255,255,255,.16) 90.1%, transparent 90.2%);
  opacity: .22;
}

main {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  padding: 26px 30px 28px;
  background:
    radial-gradient(circle at 88% 20%, rgba(255,255,255,.24), transparent 10rem),
    radial-gradient(circle at 12% 84%, rgba(255,255,255,.16), transparent 12rem),
    linear-gradient(135deg, rgba(242,105,0,.92) 0%, rgba(242,105,0,.92) 54%, rgba(255,138,36,.92) 54%, rgba(255,138,36,.92) 100%);
  border: 1px solid rgba(10,10,10,.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--inner);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0,0,0,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.12) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity: .44;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 55%, transparent 0 86px, rgba(255,255,255,.3) 87px, transparent 88px),
    radial-gradient(circle at 50% 55%, transparent 0 170px, rgba(255,255,255,.18) 171px, transparent 172px),
    radial-gradient(circle at 50% 55%, transparent 0 255px, rgba(255,255,255,.12) 256px, transparent 257px),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.06));
  opacity: .72;
  z-index: -1;
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(transparent calc(50% - 1px), rgba(255,255,255,.22) 50%, transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.22) 50%, transparent calc(50% + 1px));
  opacity: .45;
}

.hero-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.92);
  background: rgba(255,255,255,.98);
  box-shadow: 0 0 0 3px rgba(0,0,0,.12);
}

.hero-corner-tl { top: 18px; left: 18px; }
.hero-corner-tr { top: 18px; right: 18px; }
.hero-corner-bl { bottom: 18px; left: 18px; }
.hero-corner-br { bottom: 18px; right: 18px; }

.hero-topline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  color: rgba(0,0,0,.72);
  font-size: 14px;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(6px);
}

.hero-mark {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: #050505;
  font-weight: 900;
  font-size: 12px;
}

.hero-mini {
  letter-spacing: .02em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  color: #0a0a0a;
  background: rgba(255,255,255,.26);
  font-size: 13px;
  letter-spacing: .04em;
  box-shadow: var(--inner);
  text-transform: uppercase;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(6px);
}

h1 {
  margin: 0;
  font-family: Orbitron, Inter, sans-serif;
  font-size: clamp(34px, 5vw, 66px);
  line-height: .98;
  letter-spacing: -.03em;
  color: #ffffff;
  text-shadow: 0 3px 18px rgba(0,0,0,.2);
  position: relative;
  z-index: 2;
}

h1 span {
  font-weight: 500;
  color: #ffffff;
  opacity: 1;
}

.hero p {
  max-width: 520px;
  margin: 0;
  color: rgba(0,0,0,.8);
  font-size: 15px;
  line-height: 1.55;
  position: relative;
  z-index: 2;
  font-weight: 600;
}



.route-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  position: relative;
  z-index: 2;
}

.route-button {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 13px 14px;
  border-radius: 20px;
  color: rgba(0,0,0,.76);
  background: rgba(255,255,255,.44);
  border: 1px solid rgba(10,10,10,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 10px 24px rgba(0,0,0,.08);
  text-align: left;
  letter-spacing: 0;
  text-transform: none;
  backdrop-filter: blur(8px);
}

.route-button strong {
  font-family: Orbitron, Inter, sans-serif;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #050505;
}

.route-button small {
  font-size: 11px;
  line-height: 1.25;
  color: rgba(0,0,0,.66);
  font-weight: 800;
}

.route-button.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, #151515 0%, #050505 100%);
  border-color: rgba(255,255,255,.42);
  box-shadow: 0 16px 34px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,138,36,.3);
  transform: translateY(-1px);
}

.route-button.is-active strong {
  color: #ff8a24;
}

.route-button.is-active small {
  color: rgba(255,255,255,.78);
}

body .engine-mode-lab {
  display: none !important;
}

body.route-tts .robot-tuning-lab,
body.route-tts .mic-record-lab,
body.route-tts .auto-mic-lab,
body.route-tts .audio-upload-lab,
body.route-tts .vocoder-control,
body.route-tts .vocoder-tweak-lab,
body.route-tts .custom-vocoder-preset-lab {
  display: none !important;
}

body.route-input .tts-text-lab,
body.route-input .local-voice-preset-lab,
body.route-input .tts-control,
body.route-input .tts-actions,
body.route-input .vocoder-control,
body.route-input .vocoder-tweak-lab,
body.route-input .custom-vocoder-preset-lab {
  display: none !important;
}

body.route-vocoder .voice-control,
body.route-vocoder .tts-text-lab,
body.route-vocoder .local-voice-preset-lab,
body.route-vocoder .tts-control,
body.route-vocoder .robot-tuning-lab,
body.route-vocoder .tts-actions {
  display: none !important;
}

body.route-vocoder .vocoder-control,
body.route-vocoder .vocoder-tweak-lab,
body.route-vocoder .custom-vocoder-preset-lab {
  display: grid !important;
}

@media (max-width: 720px) {
  .route-menu {
    grid-template-columns: 1fr;
  }

  .route-button {
    min-height: 0;
  }
}

.hero-rails {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  position: relative;
  z-index: 2;
}

.rail {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  text-shadow: 0 0 26px rgba(255,255,255,.28);
}

.app {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  align-items: start;
}

.card {
  background:
    radial-gradient(circle at 88% 22%, rgba(242,105,0,.16), transparent 9rem),
    radial-gradient(circle at 12% 80%, rgba(255,138,36,.18), transparent 10rem),
    linear-gradient(135deg, rgba(255,255,255,.82) 0%, rgba(255,255,255,.78) 60%, rgba(255,255,255,.74) 100%);
  border: 1px solid rgba(10,10,10,.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--inner);
  overflow: hidden;
  backdrop-filter: blur(12px);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 12px, rgba(0,0,0,.045) 12px 13px, transparent 13px),
    linear-gradient(transparent 0 12px, rgba(0,0,0,.035) 12px 13px, transparent 13px);
  opacity: .16;
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(10,10,10,.12);
  background: linear-gradient(90deg, rgba(242,105,0,.2), rgba(255,138,36,.2));
  position: relative;
  z-index: 1;
}

.card-header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: .02em;
  color: #0a0a0a;
  text-transform: uppercase;
  font-family: Orbitron, Inter, sans-serif;
}

.card-body {
  padding: 22px;
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 1;
}

label {
  display: grid;
  gap: 8px;
  color: #0a0a0a;
  font-weight: 800;
  font-size: 14px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

textarea,
select,
input[type="range"],
input[type="number"] {
  width: 100%;
}

textarea,
select,
input[type="number"],
.voice-search {
  color: #0a0a0a;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(10,10,10,.16);
  border-radius: 16px;
  outline: none;
  padding: 13px 14px;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 18px 44px rgba(255, 255, 255, .06);
}

textarea {
  min-height: 240px;
  line-height: 1.6;
  resize: vertical;
}

textarea:focus,
select:focus,
input[type="number"]:focus,
.voice-search:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(242,105,0,.14), inset 0 18px 44px rgba(255, 255, 255, .06);
}

option {
  color: #0a0a0a;
  background: #ffffff;
}

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

.slider-row {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 12px;
  align-items: center;
}

input[type="range"] {
  accent-color: #f26900;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button,
.download {
  appearance: none;
  border: 1px solid rgba(10,10,10,.12);
  border-radius: 999px;
  padding: 13px 18px;
  color: #0a0a0a;
  background: linear-gradient(180deg, #f7d8bd 0%, #ff8a24 100%);
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease, filter .15s ease, box-shadow .15s ease;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, .16),
    0 0 18px rgba(255,138,36,.22),
    inset 0 1px 0 rgba(255, 255, 255, .6);
}

button.secondary,
.download.secondary,
.icon-button {
  color: #ffffff;
  background: linear-gradient(180deg, #ff8a24 0%, #f26900 100%);
  border: 1px solid rgba(242,105,0,.24);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, .14),
    0 0 18px rgba(242,105,0,.18),
    inset 0 1px 0 rgba(255,255,255,.24);
}

button:hover,
.download:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

button:disabled,
.download.disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  filter: none;
}

.status {
  min-height: 48px;
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.46);
  border: 1px solid rgba(10,10,10,.12);
  color: #0a0a0a;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}

.status strong {
  color: #f26900;
}

.status.error strong {
  color: var(--danger);
}

audio {
  width: 100%;
  filter: none;
}

.voice-control {
  display: grid;
  gap: 8px;
}

.voice-label {
  color: #0a0a0a;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-family: Orbitron, Inter, sans-serif;
}

.voice-selected {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
  border-radius: 20px;
  padding: 16px 18px;
  color: #0a0a0a;
  background:
    linear-gradient(135deg, rgba(242,105,0,.22) 0%, rgba(255,255,255,.54) 50%, rgba(255,138,36,.24) 100%);
  border: 1px solid rgba(10,10,10,.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}

.voice-selected strong {
  display: block;
  font-size: 18px;
  letter-spacing: -.02em;
  margin-bottom: 4px;
}

.voice-selected small {
  display: block;
  color: rgba(0,0,0,.7);
  font-size: 13px;
  font-weight: 650;
}

.voice-selected em {
  font-style: normal;
  color: #050505;
  background: linear-gradient(180deg, #f7d8bd 0%, #ff8a24 100%);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
  white-space: nowrap;
}

.voice-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, .32);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .2s ease;
}

.voice-overlay.is-open {
  opacity: 1;
}

.voice-drawer {
  position: fixed;
  inset: 18px auto 18px 18px;
  z-index: 90;
  width: min(460px, calc(100vw - 36px));
  display: grid;
  grid-template-rows: auto auto 1fr;
  background:
    linear-gradient(rgba(0,0,0,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(242,105,0,.9) 0%, rgba(242,105,0,.9) 44%, rgba(255,255,255,.92) 44%, rgba(255,138,36,.9) 100%);
  background-size: 34px 34px, 34px 34px, auto;
  border: 1px solid rgba(10,10,10,.12);
  border-radius: 30px;
  box-shadow: 0 34px 110px rgba(0, 0, 0, .26), var(--inner);
  transform: translateX(calc(-100% - 34px));
  transition: transform .24s ease;
  overflow: hidden;
}

.voice-drawer.is-open {
  transform: translateX(0);
}

.voice-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(10,10,10,.14);
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
}

.voice-drawer-head p {
  margin: 0 0 5px;
  color: rgba(0,0,0,.72);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.voice-drawer-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -.02em;
  font-family: Orbitron, Inter, sans-serif;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,.16);
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  font-size: 26px;
  line-height: 1;
}

.voice-search-wrap {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(10,10,10,.12);
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
}

.voice-search::placeholder {
  color: rgba(0,0,0,.45);
}

.voice-list {
  overflow: auto;
  padding: 14px;
  display: grid;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(242,105,0,.65) rgba(255,255,255,.35);
}

.voice-card {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  text-align: left;
  padding: 15px 16px;
  color: #0a0a0a;
  background: rgba(255,255,255,.64);
  border: 1px solid rgba(10,10,10,.12);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24);
  backdrop-filter: blur(8px);
}

.voice-card:hover {
  transform: none;
  filter: brightness(1.04);
  border-color: rgba(242,105,0,.32);
}

.voice-card.is-selected {
  background:
    linear-gradient(135deg, rgba(242,105,0,.26), rgba(255,255,255,.7), rgba(255,138,36,.28));
  border-color: rgba(10,10,10,.16);
  box-shadow: 0 0 0 1px rgba(255,255,255,.24);
}

.voice-card-title {
  display: block;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}

.voice-card-desc {
  display: block;
  color: rgba(0,0,0,.68);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  margin-bottom: 9px;
}

.voice-card-code {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  color: #ffffff;
  background: linear-gradient(180deg, #ff8a24 0%, #f26900 100%);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-card-check {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #050505;
  background: transparent;
  font-weight: 1000;
}

.voice-card.is-selected .voice-card-check {
  background: linear-gradient(180deg, #f7d8bd 0%, #ff8a24 100%);
}

.voice-empty {
  color: rgba(0,0,0,.7);
  text-align: center;
  padding: 28px 16px;
  font-weight: 700;
}

body.voice-drawer-open {
  overflow: hidden;
}


.hero-robot-stage {
  position: absolute;
  right: clamp(34px, 6vw, 92px);
  top: 8px;
  bottom: 4px;
  width: clamp(190px, 26vw, 330px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.hero-robot {
  position: absolute;
  bottom: 0;
  max-width: 100%;
  max-height: 105%;
  object-fit: contain;
  filter:
    drop-shadow(0 18px 30px rgba(0, 0, 0, .24))
    drop-shadow(0 0 18px rgba(255, 0, 174, .18));
  transform-origin: 50% 86%;
  animation: robotFloat 4.6s ease-in-out infinite;
}

.hero-robot-one {
  opacity: 1;
  animation-name: robotOneBlink, robotFloat;
  animation-duration: 2.4s, 4.6s;
  animation-timing-function: steps(1, end), ease-in-out;
  animation-iteration-count: infinite, infinite;
}

.hero-robot-two {
  opacity: 0;
  animation-name: robotTwoBlink, robotFloat;
  animation-duration: 2.4s, 4.6s;
  animation-timing-function: steps(1, end), ease-in-out;
  animation-iteration-count: infinite, infinite;
}

@keyframes robotOneBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes robotTwoBlink {
  0%, 49% { opacity: 0; }
  50%, 100% { opacity: 1; }
}

@keyframes robotFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-14px) scale(1.025); }
}

@media (min-width: 861px) {
  .hero {
    min-height: 292px;
    padding-right: clamp(330px, 36vw, 430px);
  }
}


.preset-lab {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(242,105,0,.16), rgba(255,255,255,.44), rgba(255,138,36,.18));
  border: 1px solid rgba(10,10,10,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}

.preset-lab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #0a0a0a;
}

.preset-lab-head span {
  font-family: Orbitron, Inter, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.preset-lab-head small {
  color: rgba(0,0,0,.62);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.preset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-lab details {
  display: grid;
  gap: 10px;
}

.preset-lab summary {
  cursor: pointer;
  list-style: none;
}

.preset-lab summary::-webkit-details-marker {
  display: none;
}

.preset-lab summary::after {
  content: "Show";
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
  color: rgba(0,0,0,.72);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.preset-lab details[open] summary::after {
  content: "Hide";
}

.preset-lab-body {
  display: grid;
  gap: 10px;
}

.preset-lab-note {
  margin: 0;
  color: rgba(0,0,0,.64);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.42;
}

.micro-button {
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1;
}


.robot-tuning-lab {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(141,174,188,.12), rgba(255,255,255,.45), rgba(255,138,36,.14));
  border: 1px solid rgba(10,10,10,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}

.robot-tuning-details {
  display: grid;
  gap: 12px;
}

.robot-tuning-details > summary {
  cursor: pointer;
  list-style: none;
}

.robot-tuning-details > summary::-webkit-details-marker {
  display: none;
}

.robot-tuning-details > summary::after {
  content: "Show";
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
  color: rgba(0,0,0,.72);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.robot-tuning-details[open] > summary::after {
  content: "Hide";
}

.robot-tuning-body {
  display: grid;
  gap: 12px;
}

.robot-tuning-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #0a0a0a;
}

.robot-tuning-head span {
  font-family: Orbitron, Inter, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.robot-tuning-head small {
  color: rgba(0,0,0,.62);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.robot-tuning-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 850;
  color: rgba(0,0,0,.72);
}

.robot-tuning-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #8daebc;
}

.robot-tuning-admin {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: center;
}

.robot-tuning-admin input {
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.16);
  background: rgba(255,255,255,.66);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.robot-tuning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.robot-tuning-grid label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  font-weight: 850;
  color: rgba(0,0,0,.68);
}

.robot-tuning-grid input {
  min-width: 0;
}

.robot-tuning-note {
  margin: 0;
  font-size: 11px;
  color: rgba(0,0,0,.58);
  line-height: 1.45;
}

body.engine-vocoder .robot-tuning-lab {
  display: none;
}

@media (max-width: 620px) {
  .robot-tuning-grid,
  .robot-tuning-admin {
    grid-template-columns: 1fr;
  }
}

.voice-card.is-custom .voice-card-code {
  background: linear-gradient(180deg, #f7d8bd 0%, #ff8a24 100%);
  color: #050505;
}

.voice-card-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
  align-items: center;
}

.voice-card-delete {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding: 0;
  color: #ffffff;
  background: linear-gradient(180deg, #ff8a24 0%, #f26900 100%);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: none;
  font-size: 16px;
  line-height: 1;
}

.voice-card-delete:hover {
  transform: none;
  filter: brightness(1.06);
}


.audio-upload-lab {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255,138,36,.18), rgba(255,255,255,.44), rgba(242,105,0,.16));
  border: 1px solid rgba(10,10,10,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}

.audio-upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #0a0a0a;
}

.audio-upload-head span {
  font-family: Orbitron, Inter, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.audio-upload-head small {
  color: rgba(0,0,0,.62);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.audio-drop {
  display: grid;
  gap: 5px;
  padding: 16px;
  border-radius: 18px;
  color: #0a0a0a;
  background: rgba(255,255,255,.58);
  border: 1px dashed rgba(10,10,10,.28);
  cursor: pointer;
  transition: filter .15s ease, border-color .15s ease, transform .15s ease;
}

.audio-drop:hover,
.audio-drop.is-dragover {
  filter: brightness(1.03);
  border-color: rgba(242,105,0,.45);
  transform: translateY(-1px);
}

.audio-drop strong {
  font-size: 15px;
  font-weight: 900;
}

.audio-drop small {
  color: rgba(0,0,0,.66);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.audio-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}


.mic-record-lab {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(242,105,0,.18), rgba(255,255,255,.42), rgba(255,138,36,.16));
  border: 1px solid rgba(10,10,10,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}

.mic-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #0a0a0a;
}

.mic-record-head span {
  font-family: Orbitron, Inter, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mic-record-head small {
  min-width: 48px;
  color: rgba(0,0,0,.62);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.mic-record-display {
  display: grid;
  gap: 5px;
  padding: 16px;
  border-radius: 18px;
  color: #0a0a0a;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(10,10,10,.12);
}

.mic-record-display.is-recording {
  background:
    radial-gradient(circle at 92% 50%, rgba(242,105,0,.18), transparent 8rem),
    rgba(255,255,255,.62);
  border-color: rgba(242,105,0,.34);
}

.mic-record-display strong {
  font-size: 15px;
  font-weight: 900;
}

.mic-record-display small {
  color: rgba(0,0,0,.66);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.mic-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}


.auto-mic-lab {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 18%, rgba(255,138,36,.24), transparent 8rem),
    linear-gradient(135deg, rgba(5,5,5,.9), rgba(255,255,255,.34), rgba(242,105,0,.18));
  border: 1px solid rgba(10,10,10,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24);
  color: #0a0a0a;
}

.auto-mic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #0a0a0a;
}

.auto-mic-head span {
  font-family: Orbitron, Inter, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.auto-mic-head small {
  color: #050505;
  background: linear-gradient(180deg, #f7d8bd 0%, #ff8a24 100%);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.auto-mic-display {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  color: #0a0a0a;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(10,10,10,.12);
}

.auto-mic-display.is-listening {
  background:
    radial-gradient(circle at 92% 50%, rgba(255,138,36,.22), transparent 8rem),
    rgba(255,255,255,.62);
  border-color: rgba(255,138,36,.44);
}

.auto-mic-display.is-capturing {
  background:
    radial-gradient(circle at 92% 50%, rgba(242,105,0,.2), transparent 8rem),
    rgba(255,255,255,.66);
  border-color: rgba(242,105,0,.38);
}

.auto-mic-display strong {
  font-size: 15px;
  font-weight: 900;
}

.auto-mic-display small {
  color: rgba(0,0,0,.66);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.auto-mic-meter {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(10,10,10,.12);
  border: 1px solid rgba(10,10,10,.08);
}

.auto-mic-meter-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8a24, #ffffff, #f26900);
  transition: width .08s linear;
}

.auto-mic-actions,
.auto-mic-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.auto-mic-settings label {
  flex: 1 1 128px;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.auto-mic-settings input[type="range"] {
  margin-top: 2px;
}

.auto-mic-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(10,10,10,.12);
  color: rgba(0,0,0,.76);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.auto-mic-toggle input {
  accent-color: #f26900;
}


.engine-mode-lab {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(242,105,0,.18), rgba(255,255,255,.48), rgba(255,138,36,.18));
  border: 1px solid rgba(10,10,10,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}

.engine-mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #0a0a0a;
}

.engine-mode-head span {
  font-family: Orbitron, Inter, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.engine-mode-head small {
  color: #050505;
  background: linear-gradient(180deg, #f7d8bd 0%, #ff8a24 100%);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.engine-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.engine-mode-button {
  padding: 11px 12px;
  border-radius: 999px;
  color: #0a0a0a;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(10,10,10,.12);
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.engine-mode-button.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, #ff8a24 0%, #f26900 100%);
  border-color: rgba(255,255,255,.24);
  box-shadow: 0 12px 28px rgba(242,105,0,.18);
}

.engine-mode-meta {
  color: rgba(0,0,0,.66);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.vocoder-control,
.vocoder-tweak-lab,
.custom-vocoder-preset-lab {
  display: none;
  gap: 8px;
}

.vocoder-selected {
  background:
    linear-gradient(135deg, rgba(255,138,36,.26) 0%, rgba(255,255,255,.56) 48%, rgba(242,105,0,.22) 100%);
}

.vocoder-tweak-lab,
.custom-vocoder-preset-lab {
  padding: 14px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255,138,36,.2), rgba(255,255,255,.46), rgba(242,105,0,.18));
  border: 1px solid rgba(10,10,10,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}

.vocoder-tweak-head,
.custom-vocoder-preset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #0a0a0a;
}

.vocoder-tweak-head span,
.custom-vocoder-preset-head span {
  font-family: Orbitron, Inter, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.vocoder-tweak-head small,
.custom-vocoder-preset-head small {
  color: rgba(0,0,0,.62);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.vocoder-tweak-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.vocoder-tweak-grid label:first-child {
  grid-column: 1 / -1;
}

.vocoder-slider-row {
  display: grid;
  grid-template-columns: 1fr 68px;
  gap: 12px;
  align-items: center;
}

.vocoder-readout {
  color: rgba(0,0,0,.66);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

body.engine-vocoder .tts-text-lab,
body.engine-vocoder .voice-control,
body.engine-vocoder .preset-lab {
  display: none;
}

body.engine-vocoder .vocoder-control,
body.engine-vocoder .vocoder-tweak-lab,
body.engine-vocoder .custom-vocoder-preset-lab {
  display: grid;
}

body.engine-vocoder .grid label:nth-child(1),
body.engine-vocoder .grid label:nth-child(2),
body.engine-vocoder .grid label:nth-child(3) {
  display: none;
}

body.engine-vocoder #generateBtn,
body.engine-vocoder #demoBtn {
  display: none;
}

.voice-card.is-vocoder .voice-card-code {
  background: linear-gradient(180deg, #ff8a24 0%, #f26900 100%);
  color: #ffffff;
}

.voice-card.is-vocoder.is-custom .voice-card-code {
  background: linear-gradient(180deg, #f7d8bd 0%, #ff8a24 100%);
  color: #050505;
}

.playback-volume-lab {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.52);
  border: 1px solid rgba(10,10,10,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}

.playback-volume-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #0a0a0a;
  font-family: Orbitron, Inter, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.playback-volume-head small {
  color: #050505;
  background: linear-gradient(180deg, #f7d8bd 0%, #ff8a24 100%);
  border-radius: 999px;
  padding: 5px 9px;
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.playback-volume-row {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 12px;
  align-items: center;
}

.playback-volume-row input[type="number"] {
  padding: 9px 10px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
}


.signal-visualizer {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 22px;
  color: #ffffff;
  background:
    radial-gradient(circle at 12% 12%, rgba(255,138,36,.22), transparent 9rem),
    radial-gradient(circle at 88% 4%, rgba(242,105,0,.24), transparent 10rem),
    linear-gradient(135deg, rgba(5,5,5,.92), rgba(14,14,14,.88));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow:
    0 18px 34px rgba(0,0,0,.16),
    inset 0 1px 0 rgba(255,255,255,.12);
  overflow: hidden;
  position: relative;
}

.signal-visualizer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: .2;
  pointer-events: none;
}

.signal-visualizer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.signal-visualizer-head span {
  font-family: Orbitron, Inter, sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.signal-visualizer-head small {
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.visualizer-canvas {
  width: 100%;
  display: block;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
  border: 1px solid rgba(255,255,255,.12);
  position: relative;
  z-index: 1;
}

.waveform-canvas {
  height: 150px;
}

.spectrum-canvas {
  height: 112px;
}


.mic-core-hud {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 72;
  width: min(360px, calc(100vw - 28px));
  aspect-ratio: 1;
  color: #050505;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.9);
  opacity: 0;
  transition: opacity .16s ease, transform .16s ease;
  filter:
    drop-shadow(0 0 30px rgba(242,105,0,.38))
    drop-shadow(0 0 26px rgba(255,138,36,.28));
}

.mic-core-hud.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.mic-core-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.mic-core-canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 999px;
}

.mic-core-center {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  align-content: center;
  width: 208px;
  height: 208px;
  border-radius: 999px;
  text-align: center;
  color: #050505;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.92), rgba(255,255,255,.58) 58%, rgba(255,255,255,.34) 100%);
  border: 1px solid rgba(255,255,255,.92);
  box-shadow:
    0 0 46px rgba(255,255,255,.38),
    0 0 18px rgba(242,105,0,.14),
    inset 0 1px 0 rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
}

.mic-core-state {
  font-family: Orbitron, Inter, sans-serif;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(5,5,5,.72);
  line-height: 1;
  margin-bottom: 6px;
}

.mic-core-value {
  display: block;
  font-family: Orbitron, Inter, sans-serif;
  font-size: 48px;
  line-height: .95;
  font-weight: 1000;
  letter-spacing: -.05em;
  color: #050505;
}

.mic-core-subvalue {
  display: block;
  margin-top: 7px;
  font-size: 18px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -.02em;
  color: rgba(5,5,5,.84);
}

.mic-core-mode {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: #050505;
  background: linear-gradient(180deg, #f7d8bd 0%, #ff8a24 100%);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(255,138,36,.22);
}

.mic-core-stop {
  position: absolute;
  left: 50%;
  bottom: -28px;
  transform: translateX(-50%);
  pointer-events: auto;
  appearance: none;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 999px;
  padding: 10px 15px;
  color: #050505;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(214,255,104,.92));
  font-family: Orbitron, Inter, sans-serif;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 22px rgba(242,105,0,.22), 0 0 20px rgba(255,138,36,.28);
  cursor: pointer;
}

.mic-core-stop:active {
  transform: translateX(-50%) scale(.96);
}

@media (max-width: 560px) {
  .mic-core-hud {
    width: min(270px, calc(100vw - 34px));
  }

  .mic-core-center {
    width: 156px;
    height: 156px;
  }

  .mic-core-state {
    font-size: 11px;
    margin-bottom: 5px;
  }

  .mic-core-value {
    font-size: 34px;
  }

  .mic-core-subvalue {
    font-size: 16px;
    margin-top: 7px;
  }

  .mic-core-mode {
    bottom: 16px;
  }


  .mic-core-stop {
    bottom: -24px;
    padding: 9px 13px;
    font-size: 10px;
  }
}

@media (max-width: 860px) {
  .hero-robot-stage {
    opacity: .28;
    right: 12px;
    top: 18px;
    width: 190px;
  }
}

@media (max-width: 560px) {
  .hero-robot-stage {
    opacity: .16;
    width: 155px;
  }
}

@media (max-width: 860px) {
  main {
    padding-top: 18px;
  }

  .hero {
    padding: 22px;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 200px;
  }
}

@media (max-width: 560px) {
  .voice-drawer {
    inset: 10px;
    width: auto;
    border-radius: 24px;
  }

  .voice-drawer-head h2 {
    font-size: 22px;
  }

  .voice-selected {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 34px;
  }

  .hero-rails {
    display: none;
  }
}

/* Robo Phonix light cream soft UI theme overrides */

:root {
  --bg: #dedad3;
  --bg-2: #cfc8bd;
  --panel: #dedad3;
  --panel-2: #e8e4dd;
  --field: #e8e4dd;
  --text: #1d2532;
  --muted: rgba(29, 37, 50, .64);
  --line: rgba(29, 37, 50, .12);
  --line-strong: rgba(242, 105, 0, .36);
  --accent: #f26900;
  --accent-2: #8daebc;
  --accent-soft: rgba(242, 105, 0, .18);
  --accent-deep: #b85000;
  --danger: #cf766d;
  --cream: #dedad3;
  --cream-hi: #f3f0ea;
  --cream-soft: #e8e4dd;
  --cream-low: #b9b3aa;
  --ink: #1d2532;
  --ink-soft: rgba(29, 37, 50, .64);
  --soft-shadow: -.72rem -.72rem 1.55rem rgba(255,255,255,.58), .9rem .9rem 1.9rem rgba(76,68,60,.22), inset .26rem .26rem .56rem rgba(255,255,255,.5), inset -.3rem -.3rem .72rem rgba(86,77,68,.12);
  --soft-inset: inset .45rem .45rem .95rem rgba(87,78,69,.18), inset -.38rem -.38rem .9rem rgba(255,255,255,.7);
  --button-shadow: -.46rem -.46rem .95rem rgba(255,255,255,.7), .55rem .55rem 1.05rem rgba(82,74,65,.22), inset .2rem .2rem .42rem rgba(255,255,255,.54), inset -.24rem -.24rem .5rem rgba(89,80,70,.1);
  --button-pressed: inset .5rem .5rem 1rem rgba(86,77,68,.2), inset -.38rem -.38rem .9rem rgba(255,255,255,.72), .18rem .18rem .5rem rgba(83,75,66,.12);
  --action-shadow: -.4rem -.4rem .8rem rgba(255,255,255,.64), .48rem .48rem .95rem rgba(127,61,12,.2), inset .18rem .18rem .36rem rgba(255,255,255,.42), inset -.22rem -.22rem .48rem rgba(128,55,0,.18);
  --shadow: 0 22px 58px rgba(82,74,65,.2);
  --inner: inset 0 1px 0 rgba(255,255,255,.64);
  --radius: 34px;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 20% 12%, rgba(255,255,255,.82), transparent 28rem),
    radial-gradient(circle at 82% 24%, rgba(242,105,0,.12), transparent 24rem),
    linear-gradient(135deg, #ece8e1 0%, var(--cream) 48%, #cfc8bd 100%);
  background-size: auto;
}

body::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='5' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.25'/%3E%3C/svg%3E");
  opacity: .22;
  mix-blend-mode: multiply;
}

body::after,
.hero-grid,
.hero-corner,
.hero::before,
.hero::after,
.card::before,
.signal-visualizer::before {
  opacity: 0 !important;
}

main {
  padding-top: 30px;
}

.hero,
.card,
.voice-drawer,
.preset-lab,
.robot-tuning-lab,
.audio-upload-lab,
.mic-record-lab,
.auto-mic-lab,
.engine-mode-lab,
.vocoder-tweak-lab,
.custom-vocoder-preset-lab,
.playback-volume-lab,
.signal-visualizer,
.voice-card,
.voice-selected,
.audio-drop,
.mic-record-display,
.auto-mic-display,
.status {
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255,255,255,.54), rgba(255,255,255,.08)),
    var(--cream) !important;
  border: 1px solid rgba(255,255,255,.5) !important;
  box-shadow: var(--soft-shadow) !important;
  backdrop-filter: none;
}

.hero {
  padding: 30px;
  border-radius: 44px;
}

.hero-topline,
.badge,
.auto-mic-toggle {
  color: var(--ink-soft);
  background: var(--cream) !important;
  border: 1px solid rgba(255,255,255,.52) !important;
  box-shadow: var(--soft-inset) !important;
  backdrop-filter: none;
}

.hero-mark {
  color: var(--ink);
  background: var(--cream-soft);
  box-shadow: var(--button-shadow);
}

h1,
h1 span,
.card-header h2,
.voice-drawer-head h2 {
  color: var(--ink) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.62);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.055em;
}

.hero h1 {
  color: var(--accent) !important;
}

.hero h1 span {
  color: var(--ink) !important;
}

.hero p,
.route-button small,
.voice-selected small,
.voice-card-desc,
.preset-lab-note,
.robot-tuning-note,
.engine-mode-meta,
.vocoder-readout,
.hint,
.audio-drop small,
.mic-record-display small,
.auto-mic-display small,
.signal-visualizer-head small {
  color: var(--ink-soft) !important;
}

.rail {
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255,255,255,.62);
}

.card-header,
.voice-drawer-head,
.voice-search-wrap {
  background: rgba(232,228,221,.52) !important;
  border-color: rgba(29,37,50,.08) !important;
}

label,
.voice-label,
.preset-lab-head,
.robot-tuning-head,
.audio-upload-head,
.mic-record-head,
.auto-mic-head,
.engine-mode-head,
.vocoder-tweak-head,
.custom-vocoder-preset-head,
.playback-volume-head,
.signal-visualizer-head {
  color: var(--ink) !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif !important;
  letter-spacing: .08em;
}

.route-menu,
.engine-toggle {
  gap: 12px;
}

.route-button,
.engine-mode-button,
.mode-btn,
button,
.download,
.icon-button,
.micro-button,
.voice-card-delete,
.mic-core-stop {
  color: var(--ink-soft) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.62), rgba(255,255,255,.08)),
    var(--cream) !important;
  border: 1px solid rgba(255,255,255,.5) !important;
  box-shadow: var(--button-shadow) !important;
  text-shadow: none !important;
}

.route-button:hover,
.engine-mode-button:hover,
button:hover,
.download:hover,
.voice-card:hover,
.audio-drop:hover,
.audio-drop.is-dragover {
  color: var(--ink) !important;
  filter: none !important;
  transform: translateY(-2px);
}

button:active,
.download:active,
.route-button:active,
.engine-mode-button:active,
.route-button.is-active,
.engine-mode-button.is-active,
.voice-card.is-selected,
.voice-selected:active {
  color: var(--ink) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.56), rgba(255,255,255,.08)),
    var(--cream-soft) !important;
  box-shadow: var(--button-pressed) !important;
  transform: translateY(3px);
}

.route-button.is-active,
.engine-mode-button.is-active,
.voice-card.is-selected {
  border-color: rgba(242,105,0,.38) !important;
  box-shadow:
    inset .48rem .48rem .95rem rgba(128,55,0,.12),
    inset -.36rem -.36rem .86rem rgba(255,255,255,.72),
    0 0 0 3px rgba(242,105,0,.12) !important;
}

.route-button.is-active strong,
.engine-mode-button.is-active,
.voice-card.is-selected .voice-card-title {
  color: var(--accent) !important;
}

.route-button strong,
.voice-selected strong,
.audio-drop strong,
.mic-record-display strong,
.auto-mic-display strong,
.preset-lab-head span,
.robot-tuning-head span,
.audio-upload-head span,
.mic-record-head span,
.auto-mic-head span,
.engine-mode-head span,
.vocoder-tweak-head span,
.custom-vocoder-preset-head span,
.playback-volume-head {
  color: var(--ink) !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif !important;
  letter-spacing: .08em;
}

button.secondary,
.download.secondary,
.icon-button,
.voice-card-delete {
  color: var(--ink) !important;
}

#generateBtn,
#demoBtn,
#startRecordingBtn,
#processRecordingBtn,
#startAutoMicBtn,
#processAudioBtn,
#robotTuningCaptureBtn,
button[data-action="play"],
button[data-action="rec"] {
  color: #ffffff !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.04)),
    var(--accent) !important;
  border-color: rgba(242,105,0,.52) !important;
  box-shadow: var(--action-shadow), 0 0 0 3px rgba(242,105,0,.1) !important;
}

#generateBtn:hover,
#demoBtn:hover,
#startRecordingBtn:hover,
#processRecordingBtn:hover,
#startAutoMicBtn:hover,
#processAudioBtn:hover,
#robotTuningCaptureBtn:hover {
  color: #ffffff !important;
  transform: translateY(-2px);
}

.voice-selected em,
.voice-card-code,
.voice-card-check,
.voice-card.is-selected .voice-card-check,
.auto-mic-head small,
.engine-mode-head small,
.playback-volume-head small,
.preset-lab summary::after,
.robot-tuning-details > summary::after,
.mic-core-mode {
  color: var(--ink) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.54), rgba(255,255,255,.08)),
    #f7d8bd !important;
  border: 1px solid rgba(242,105,0,.22);
  box-shadow: var(--button-shadow) !important;
}

.voice-card.is-selected .voice-card-check,
.mic-core-mode {
  color: #ffffff !important;
  background: var(--accent) !important;
}

textarea,
select,
input[type="number"],
.voice-search,
.robot-tuning-admin input {
  color: var(--ink) !important;
  background: var(--cream) !important;
  border: 1px solid rgba(255,255,255,.5) !important;
  box-shadow: var(--soft-inset) !important;
}

textarea:focus,
select:focus,
input[type="number"]:focus,
.voice-search:focus,
.robot-tuning-admin input:focus {
  border-color: rgba(242,105,0,.32) !important;
  box-shadow:
    0 0 0 4px rgba(242,105,0,.14),
    var(--soft-inset) !important;
}

option {
  color: var(--ink);
  background: var(--cream-hi);
}

input[type="range"] {
  appearance: none;
  height: 18px;
  border-radius: 999px;
  background: var(--cream) !important;
  box-shadow: var(--soft-inset) !important;
  accent-color: var(--accent);
  padding: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 18px;
  border-radius: 999px;
  background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -5px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.62);
  background: linear-gradient(145deg, #ff8a24, var(--accent));
  box-shadow:
    -.24rem -.24rem .48rem rgba(255,255,255,.7),
    .28rem .28rem .55rem rgba(127,61,12,.22),
    inset .12rem .12rem .25rem rgba(255,255,255,.3),
    inset -.16rem -.16rem .32rem rgba(128,55,0,.18);
  cursor: pointer;
}

input[type="range"]::-moz-range-track {
  height: 18px;
  border-radius: 999px;
  background: transparent;
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.62);
  background: linear-gradient(145deg, #ff8a24, var(--accent));
  box-shadow: .28rem .28rem .55rem rgba(127,61,12,.22);
  cursor: pointer;
}

input[type="checkbox"] {
  accent-color: var(--accent);
}

.status strong {
  color: var(--accent) !important;
}

.status.error strong {
  color: var(--danger) !important;
}

.audio-drop {
  border-style: dashed !important;
  border-color: rgba(29,37,50,.16) !important;
}

.audio-drop:hover,
.audio-drop.is-dragover,
.auto-mic-display.is-listening,
.auto-mic-display.is-capturing,
.mic-record-display.is-recording {
  border-color: rgba(242,105,0,.36) !important;
  background:
    radial-gradient(circle at 92% 50%, rgba(242,105,0,.14), transparent 8rem),
    var(--cream) !important;
}

.auto-mic-meter,
.meter,
.playback-volume-row input[type="range"] {
  background: var(--cream) !important;
  border: 1px solid rgba(255,255,255,.48) !important;
  box-shadow: var(--soft-inset) !important;
}

.auto-mic-meter-bar {
  background: linear-gradient(90deg, #8daebc, var(--accent), #ff8a24) !important;
  box-shadow: 0 0 16px rgba(242,105,0,.22);
}

.voice-overlay {
  background: rgba(29,37,50,.2) !important;
  backdrop-filter: blur(5px);
}

.voice-drawer {
  background:
    linear-gradient(145deg, rgba(255,255,255,.54), rgba(255,255,255,.08)),
    var(--cream) !important;
}

.voice-list {
  scrollbar-color: rgba(242,105,0,.65) rgba(232,228,221,.5);
}

.signal-visualizer {
  color: var(--ink) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.54), rgba(255,255,255,.08)),
    var(--cream) !important;
}

.visualizer-canvas {
  background: var(--cream) !important;
  border: 1px solid rgba(242,105,0,.2) !important;
  box-shadow: var(--soft-inset), 0 0 0 3px rgba(242,105,0,.08) !important;
  filter: sepia(.42) saturate(.82) hue-rotate(342deg) brightness(1.03);
}

.mic-core-hud {
  filter:
    drop-shadow(1.15rem 1.15rem 1.65rem rgba(82,74,65,.24))
    drop-shadow(-.7rem -.7rem 1.2rem rgba(255,255,255,.54)) !important;
}

.mic-core-center {
  color: var(--ink) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.58), rgba(255,255,255,.14)),
    var(--cream) !important;
  border: 1px solid rgba(242,105,0,.18) !important;
  box-shadow: var(--soft-shadow), 0 0 0 3px rgba(242,105,0,.08) !important;
  backdrop-filter: none;
}

.mic-core-canvas {
  filter: sepia(.42) saturate(.82) hue-rotate(342deg) brightness(1.04);
}

.mic-core-state,
.mic-core-value,
.mic-core-subvalue {
  color: var(--ink) !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif !important;
}

.mic-core-state,
.mic-core-value {
  color: var(--accent) !important;
}

audio {
  border-radius: 18px;
  background: var(--cream);
  box-shadow: var(--soft-inset);
}

.hero-robot {
  bottom: 32px !important;
  width: 70% !important;
  max-width: 70% !important;
  max-height: 74% !important;
  filter:
    drop-shadow(0 18px 30px rgba(82,74,65,.2))
    drop-shadow(0 0 12px rgba(255,255,255,.16)) !important;
}

@media (min-width: 861px) {
  .hero-robot-stage {
    right: clamp(12px, 3vw, 46px);
    width: clamp(190px, 26vw, 330px);
  }
}

@media (max-width: 860px) {
  .hero-robot-stage {
    width: 190px;
  }

  .hero-robot {
    bottom: 22px !important;
  }
}

@media (max-width: 720px) {
  .hero,
  .card,
  .voice-drawer,
  .signal-visualizer {
    border-radius: 28px;
  }
}

/* UI cleanup: Auto Mic is the primary mic flow.
   The legacy manual recorder stays in the code, but is hidden from the main UI. */
.mic-record-lab {
  display: none !important;
}

.auto-mic-actions::after {
  content: "Live Monitor = hear your mic while speaking. Use headphones to avoid feedback.";
  flex: 1 0 100%;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  padding: 2px 4px 0;
}

.auto-mic-toggle:has(#autoMicLiveMonitor) {
  font-size: 0 !important;
}

.auto-mic-toggle:has(#autoMicLiveMonitor)::after {
  content: "Live Monitor";
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
}

/* Hero help button */
.hero {
  position: relative;
}

.hero-help-button {
  position: absolute;
  top: clamp(14px, 2vw, 22px);
  right: clamp(14px, 2vw, 22px);
  z-index: 6;
  width: clamp(38px, 4.8vw, 46px);
  height: clamp(38px, 4.8vw, 46px);
  display: inline-grid;
  place-items: center;
  color: var(--accent) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.62), rgba(255,255,255,.08)),
    var(--cream) !important;
  border: 1px solid rgba(255,255,255,.52) !important;
  border-radius: 50%;
  box-shadow: var(--button-shadow) !important;
  text-decoration: none;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,.68);
  transition: transform .18s ease, box-shadow .18s ease, color .18s ease;
}

.hero-help-button:hover {
  color: var(--accent-deep) !important;
  transform: translateY(-2px);
}

.hero-help-button:active {
  box-shadow: var(--button-pressed) !important;
  transform: translateY(2px);
}

.hero-help-button:focus-visible {
  outline: none;
  box-shadow:
    var(--button-shadow),
    0 0 0 4px rgba(242,105,0,.18) !important;
}

@media (max-width: 720px) {
  .hero-help-button {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
}
