@import url("/type.css");
:root {
  --ink: #202920;
  --muted: #637064;
  --dim: #768176;
  --border: #dcdfd5;
  --line: #e6e8e1;
  --accent: #204b3b;
  --dark: #173b2e;
  --wash: #eef2e9;
  --page: #fcfcf9;
  --panel: #fff;
  --rail: 217px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font:
    14px/1.5 "Be Vietnam Pro",
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
select,
a {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #81a88a;
  outline-offset: 3px;
}
svg {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button span[data-icon],
span[data-icon] {
  display: inline-flex;
  align-items: center;
}
h1,
h2,
h3,
p {
  margin: 0;
}
p {
  color: var(--muted);
}
h2 {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.55px;
}
h3 {
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.3px;
}
.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 20;
  padding: 10px;
  background: white;
}
.skip:focus {
  top: 10px;
}
.layout {
  min-height: 100vh;
}
.rail {
  width: var(--rail);
  height: 100dvh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 4;
  background: #f4f5ef;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0 15px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 29px 12px 34px;
  font-size: 28px;
  line-height: 1;
  font-weight: 600;
  font-family: "Xanh Mono", Georgia, serif;
  color: #1d4033;
  letter-spacing: -1.45px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 29px;
  height: 32px;
  color: #29533e;
}
.brand-mark i {
  width: 3.5px;
  border-radius: 3px;
  background: currentColor;
  height: 11px;
}
.brand-mark i:nth-child(2) {
  height: 21px;
}
.brand-mark i:nth-child(3) {
  height: 30px;
}
.brand-mark i:nth-child(4) {
  height: 19px;
}
.brand-mark i:nth-child(5) {
  height: 11px;
}
.rail-body {
  flex: 1;
  overflow: auto;
}
.group-label {
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 1.62px;
  font-weight: 700;
  color: #717b6c;
  margin: 0 12px 10px;
}
.group-label.secondary {
  margin-top: 32px;
}
.rail nav {
  display: grid;
  gap: 4px;
}
.nav-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  font-size: 13px;
  font-weight: 485;
  color: #4c574d;
  line-height: 20px;
  min-height: 39px;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: left;
}
.nav-button svg {
  width: 17px;
  height: 17px;
}
.nav-button:hover,
.icon-button:hover {
  background: #e9ece3;
}
.nav-button.active {
  background: #e1e9da;
  color: #204933;
  font-weight: 650;
}
.rail-bottom {
  padding: 10px 0 16px;
}
.account {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 6px 0;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  text-align: left;
}
.account > span:nth-child(2) {
  flex: 1;
  overflow: hidden;
}
.account strong,
.account small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account strong {
  font-size: 12px;
}
.account small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.account-icon {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #e3e8dd;
  color: #40533e;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 650;
}
.workspace {
  margin-left: var(--rail);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 57px;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(24px, 3.4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  gap: 14px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb > span > svg {
  width: 15px;
  height: 15px;
}
.breadcrumb strong {
  font-weight: 550;
  color: var(--ink);
}
.crumb-divider {
  color: #a0a99c;
}
.credit-pill {
  border: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fbfcf9;
  border-radius: 24px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 550;
}
.credit-pill svg {
  width: 13px;
  height: 13px;
}
.credit-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #789668;
}
.icon-button {
  border-radius: 6px;
  padding: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.icon-button svg {
  width: 17px;
  height: 17px;
}
#open-menu,
#menu-cover {
  display: none;
}
main {
  width: 100%;
  max-width: 1550px;
  margin: 0 auto;
  padding: 27px clamp(24px, 3.4vw, 56px) 42px;
  flex: 1;
}
.hero {
  min-height: 177px;
  border: 1px solid #cdd3c0;
  border-radius: 13px;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #eeeddf url("/assets/song-nui.webp") center 52% / cover no-repeat;
}
.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(244, 242, 225, 0.62),
    rgba(244, 242, 225, 0.24) 44%,
    transparent 65%
  );
}
.hero-inner {
  padding: 24px 30px;
  width: 61%;
}
.hero h1,
.page-head h1 {
  font-family: "Xanh Mono", Georgia, serif;
  letter-spacing: -2.2px;
  font-size: clamp(38px, 3.9vw, 62px);
  font-weight: 500;
  line-height: 1.12;
  color: #1b392b;
}
.hero p {
  font-size: 13px;
  color: #344b39;
  line-height: 1.65;
  margin-top: 7px;
  max-width: 400px;
}
.language {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  background: #f6f6e9b8;
  color: #44553d;
  border: 1px solid #a5b19a8c;
  border-radius: 20px;
  padding: 2px 8px;
  margin-bottom: 10px;
  font-weight: 550;
}
.language svg {
  width: 12px;
  height: 12px;
}
.tabs {
  display: flex;
  align-items: stretch;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  margin: 15px 0 20px;
  overflow-x: auto;
}
.tab {
  position: relative;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  color: #647064;
  font-size: 13px;
  padding: 13px 0 12px;
}
.tab svg {
  width: 16px;
  height: 16px;
}
.tab.active {
  color: var(--dark);
  font-weight: 650;
}
.tab.active:after {
  content: "";
  height: 2px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent);
}
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(265px, 0.94fr);
  gap: 17px;
  align-items: stretch;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 0;
}
.editor {
  display: flex;
  flex-direction: column;
}
.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 19px 13px;
}
.panel-title {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.panel-title svg {
  color: #54644f;
  width: 16px;
  height: 16px;
}
.counter {
  font-size: 10px;
  white-space: nowrap;
  color: #647064;
  font-variant-numeric: tabular-nums;
}
.textfield {
  border: 0;
  resize: vertical;
  background: transparent;
  color: #313c32;
  width: 100%;
  outline: 0;
  line-height: 1.8;
  font-size: 15px;
  padding: 4px 19px;
  flex: 1;
  min-height: 136px;
}
.textfield:focus-visible {
  outline-offset: -3px;
}
.editor-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 19px 14px;
  flex-wrap: wrap;
}
.mini,
.btn-outline,
.primary,
.select-btn,
.soft-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 550;
}
.mini,
.btn-outline,
.select-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
}
.mini {
  padding: 4px 8px;
  font-size: 11px;
  color: #596459;
}
.mini svg {
  width: 13px;
  height: 13px;
}
.mini:hover,
.btn-outline:hover,
.select-btn:hover {
  background: #f2f5ef;
}
.editor-action {
  margin-top: auto;
  padding: 14px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
}
.estimate {
  font-size: 11px;
  color: #687469;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.estimate svg {
  width: 14px;
  height: 14px;
}
.primary {
  background: var(--dark);
  color: #fff;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 13px;
}
.primary:hover {
  background: #2d5542;
}
.primary svg {
  width: 16px;
  height: 16px;
}
.settings {
  padding: 16px 17px;
}
.settings h2 {
  font-size: 16px;
}
.settings .panel-title {
  margin-bottom: 13px;
}
.field {
  display: block;
  margin-bottom: 11px;
}
.field-label,
.fieldline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 550;
  color: #596458;
  margin-bottom: 5px;
}
.fieldline output {
  font-weight: 600;
  color: #34503e;
  font-variant-numeric: tabular-nums;
}
.select-btn {
  width: 100%;
  justify-content: flex-start;
  padding: 7px 9px;
  text-align: left;
  font-size: 12px;
  min-height: 35px;
}
.select-btn > svg:last-child {
  margin-left: auto;
  width: 13px;
  height: 13px;
}
.select-btn strong {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.select-wrap {
  position: relative;
}
.select-wrap:after {
  content: "⌄";
  position: absolute;
  right: 10px;
  top: 5px;
  pointer-events: none;
}
.select-wrap select,
.dialog-form select,
.form-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 7px 24px 7px 9px;
  font-size: 12px;
  min-height: 34px;
}
.select-wrap select {
  appearance: none;
}
.slider {
  margin: 2px 0 10px;
}
.slider input {
  width: 100%;
  height: 4px;
  display: block;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 8px 0;
}
.advanced {
  font-size: 11px;
  color: #5c695b;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.advanced summary {
  cursor: pointer;
}
.advanced[open] summary {
  margin-bottom: 12px;
}
.advanced label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.advanced input {
  accent-color: var(--accent);
}
.section-head,
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.section-head {
  margin: 23px 0 12px;
}
.text-link {
  font-size: 12px;
  color: #435b47;
  padding: 3px 0;
}
.text-link svg {
  width: 14px;
  height: 14px;
}
.voice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}
.voice-card {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  min-width: 0;
}
.voice-data {
  display: grid;
  text-align: left;
  padding: 0;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.voice-data strong,
.voice-data small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.voice-data strong {
  font-size: 13px;
}
.voice-data small {
  font-size: 11px;
  color: var(--muted);
}
.orb {
  --c: #e1ba83;
  --d: #624b33;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 15% 5%, #ffffffb0, transparent 58%),
    repeating-radial-gradient(
      ellipse at 0% 115%,
      transparent 0 3%,
      #fff8 4%,
      var(--d) 5%,
      var(--c) 8%,
      transparent 12%
    ),
    linear-gradient(145deg, var(--c) 5%, var(--d) 100%);
  display: inline-block;
  flex: none;
  box-shadow: inset 0 0 0 1px #0000000c;
}
.orb.small {
  width: 24px;
  height: 24px;
}
.round-play {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-content: center;
  background: var(--page);
  flex: none;
}
.round-play svg {
  width: 12px;
  height: 12px;
}
.round-play.playing {
  background: var(--accent);
  color: white;
}
.round-play:hover {
  border-color: #87a68f;
}
.foot {
  margin: 0 clamp(24px, 3.4vw, 56px);
  padding: 13px 0 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  font-size: 10px;
  color: var(--dim);
}
.foot a svg {
  width: 11px;
  height: 11px;
}
.page-head {
  margin: 12px 0 22px;
  align-items: flex-end;
}
.page-head h1 {
  font-size: 42px;
}
.page-head p {
  margin-top: 7px;
  max-width: 650px;
}
.page-head-actions,
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-outline,
.soft-btn {
  font-size: 12px;
  padding: 8px 11px;
}
.soft-btn {
  border-radius: 6px;
  color: #304d36;
  background: #edf2e9;
}
.library-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 20px 0;
}
.library-controls input {
  font-size: 14px;
  max-width: 450px;
  padding: 10px 12px;
}
.library-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.library-grid .voice-card {
  padding: 14px;
  align-items: center;
}
.library-grid .voice-data small {
  white-space: normal;
}
.note {
  padding: 12px 14px;
  color: #55634f;
  background: #eff3e9;
  border: 1px solid #dce4d6;
  border-radius: 8px;
  font-size: 12px;
}
.note.error {
  color: #833828;
  background: #fbf1ec;
  border-color: #ebd4ca;
}
.result {
  margin-top: 15px;
  padding: 16px 18px;
}
.result audio,
.history-item audio {
  display: block;
  width: 100%;
  height: 34px;
  margin: 10px 0;
}
.result .row a {
  font-size: 12px;
  font-weight: 550;
}
.muted,
.small-note {
  color: var(--muted);
  font-size: 12px;
}
.empty {
  padding: 32px;
  text-align: center;
}
.empty > svg {
  width: 28px;
  height: 28px;
  color: #697f69;
  margin-bottom: 8px;
}
.empty p {
  margin: 7px auto 15px;
  max-width: 470px;
}
.form-grid {
  display: grid;
  gap: 12px;
}
.form-grid label {
  font-size: 12px;
  color: #52614f;
}
.form-grid input,
.form-grid textarea {
  display: block;
  margin-top: 4px;
}
.turns {
  padding: 0 18px 12px;
  display: grid;
  gap: 9px;
  max-height: 380px;
  overflow: auto;
}
.turn {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px;
  background: #fcfdf9;
}
.turn .row {
  flex-wrap: nowrap;
}
.turn .select-wrap {
  flex: 1;
}
.turn textarea {
  margin: 6px 0 0;
  width: 100%;
  border: 0;
  min-height: 42px;
  resize: vertical;
  background: transparent;
}
.file-zone {
  border: 1px dashed #a8b6a2;
  background: #f7f9f4;
  color: #37543d;
  border-radius: 8px;
  min-height: 103px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  margin: 0 18px;
  text-align: center;
  padding: 10px;
}
.file-zone > svg {
  width: 26px;
  height: 26px;
}
.file-zone small {
  font-size: 11px;
}
.changer-body {
  padding: 0 18px 12px;
}
.changer-body .note {
  margin-top: 9px;
}
.changer-body .row {
  margin-top: 10px;
}
.wallet-summary {
  padding: 22px;
  background: #eef3e8;
  margin-bottom: 15px;
}
.wallet-summary strong {
  font-family: "Xanh Mono", Georgia, serif;
  font-size: 34px;
  font-weight: 500;
}
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.pack {
  padding: 18px;
}
.pack .price {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 13px 0 1px;
}
.pack .primary {
  margin-top: 18px;
  width: 100%;
}
.history-list,
.project-list {
  display: grid;
  gap: 12px;
}
.history-item,
.project-item {
  padding: 16px;
}
.history-item p,
.project-item p {
  font-size: 12px;
  margin: 4px 0 8px;
}
.project-controls {
  margin: 12px 0 18px;
}
.chapter {
  margin: 10px 0;
  padding: 15px;
}
.chapter .form-input {
  flex: 1;
}
.chapter textarea {
  width: 100%;
  margin: 10px 0 5px;
  min-height: 85px;
}
.chapter audio {
  max-width: 100%;
  height: 35px;
  margin: 5px 0;
}
.online-msg {
  margin-top: 12px;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 0;
  color: var(--ink);
  width: min(490px, calc(100vw - 28px));
  max-height: 82dvh;
  box-shadow: 0 24px 80px #18342338;
}
dialog::backdrop {
  background: #23352ba1;
  backdrop-filter: blur(2px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
#modal-body {
  padding: 16px 20px 20px;
}
.dialog-form {
  display: grid;
  gap: 12px;
}
.voice-list {
  display: grid;
  gap: 5px;
  margin-top: 12px;
}
.voice-list-item {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
}
.voice-list-item.selected {
  border-color: #75927a;
  background: #f2f6ef;
}
.voice-list-item strong {
  font-size: 13px;
}
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  background: #253e30;
  box-shadow: 0 4px 20px #16302129;
  z-index: 7;
  max-width: 90vw;
  text-align: center;
}
.inline-status {
  margin: 10px 0;
}
.voice-count {
  font-size: 11px;
  font-weight: 450;
  border-radius: 12px;
  padding: 1px 7px;
  background: #edf1e7;
  color: #4d624e;
  margin-left: 5px;
  vertical-align: middle;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1450px) {
  :root {
    --rail: 237px;
  }
  main {
    padding-top: 32px;
  }
  .hero {
    min-height: 201px;
  }
  .hero-inner {
    padding-left: 36px;
  }
  .studio-grid {
    gap: 22px;
  }
  .settings {
    padding: 20px 22px;
  }
  .panel-top {
    padding: 20px 22px 15px;
  }
  .textfield {
    min-height: 163px;
  }
  .voice-card {
    padding: 16px;
  }
  .tabs {
    margin: 19px 0 22px;
  }
}
@media (max-width: 1120px) {
  :root {
    --rail: 185px;
  }
  .rail {
    padding: 0 10px;
  }
  .brand {
    font-size: 26px;
  }
  .topbar {
    padding: 0 24px;
  }
  main {
    padding: 22px 24px;
  }
  .studio-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(237px, 1fr);
    gap: 12px;
  }
  .voice-grid:not(.library-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .voice-grid:not(.library-grid) .voice-card:nth-child(3) {
    display: none;
  }
  .hero-inner {
    width: 67%;
  }
  .panel-top {
    padding: 14px 15px 10px;
  }
  .editor-tools,
  .editor-action {
    padding-left: 15px;
    padding-right: 15px;
  }
  .settings {
    padding: 14px;
  }
  .textfield {
    padding-left: 15px;
    padding-right: 15px;
  }
}
@media (max-width: 820px) {
  :root {
    --rail: 0px;
  }
  .rail {
    width: 224px;
    transform: translateX(-105%);
    transition: transform 0.18s ease;
  }
  .rail.open {
    transform: translateX(0);
  }
  #menu-cover:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: #13271b66;
    z-index: 3;
  }
  #open-menu {
    display: inline-flex;
  }
  .breadcrumb > span:first-of-type {
    display: none;
  }
  .hero {
    min-height: 160px;
  }
  .hero-inner {
    padding: 20px 24px;
  }
  .foot {
    margin: 0 20px;
  }
}
@media (max-width: 610px) {
  .topbar {
    height: 51px;
    padding: 0 13px;
  }
  .breadcrumb {
    gap: 6px;
    font-size: 11px;
  }
  main {
    padding: 15px 13px 28px;
  }
  .hero {
    min-height: 158px;
    background-position: 63% 55%;
  }
  .hero:before {
    background: linear-gradient(
      90deg,
      #f2f0ddf5 0%,
      #f2f1decc 35%,
      #f2f1de50 58%,
      transparent 83%
    );
  }
  .hero-inner {
    padding: 15px 16px;
    width: 77%;
  }
  .hero h1 {
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -1.6px;
  }
  .hero p {
    font-size: 12px;
    max-width: 245px;
  }
  .language {
    margin-bottom: 6px;
  }
  .tabs {
    gap: 18px;
    margin: 8px 0 13px;
  }
  .tab {
    font-size: 12px;
    gap: 5px;
    padding: 12px 0 10px;
  }
  .tab svg {
    width: 14px;
    height: 14px;
  }
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .textfield {
    min-height: 138px;
  }
  .settings .panel-title {
    margin-bottom: 10px;
  }
  .settings .field {
    margin-bottom: 10px;
  }
  .section-head {
    margin: 18px 0 9px;
  }
  .voice-grid:not(.library-grid) {
    grid-template-columns: 1fr;
  }
  .voice-grid:not(.library-grid) .voice-card:nth-child(3) {
    display: flex;
  }
  .voice-grid {
    gap: 8px;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-head h1 {
    font-size: 34px;
  }
  .history-item .row,
  .project-item .row {
    align-items: flex-start;
  }
  .pack-grid {
    grid-template-columns: 1fr;
  }
  .panel-top {
    padding: 14px 15px;
  }
  .foot {
    margin: 0 14px;
  }
  .credit-pill {
    font-size: 10px;
  }
  .crumb-parent {
    max-width: 95px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .rail-bottom {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.crumb-brand {
  display: none;
}
@media (max-width: 610px) {
  .breadcrumb .crumb-parent {
    display: none;
  }
  .breadcrumb .crumb-brand {
    display: inline;
    color: var(--dark);
    font-family: "Xanh Mono", Georgia, serif;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.6px;
  }
}
.brand {
  white-space: nowrap;
}
.brand-mark {
  flex: none;
}

.brand {
  font-size: 25px;
  letter-spacing: -1.6px;
}
.hero h1,
.page-head h1 {
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.063em;
}
.library-heading {
  padding-block: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.voice-tools {
  display: grid;
  grid-template-columns: minmax(175px, 1fr) minmax(0, 1.5fr);
  gap: 16px;
  align-items: end;
}
.voice-search {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
}
.voice-search input {
  border: 0;
  background: transparent;
  width: 100%;
  min-width: 0;
  font-size: 13px;
  outline-offset: 0;
}
.voice-facets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.voice-facets label span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
  margin-bottom: 3px;
}
.voice-facets select,
.payment-method select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  padding: 0 7px;
  color: var(--ink);
  font-size: 13px;
}
.voice-filter-meta {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.compact-filter .voice-tools {
  display: block;
}
.compact-filter .voice-facets {
  margin-top: 10px;
}
.compact-filter .voice-filter-meta {
  min-height: 26px;
}
.compact-filter .voice-facets select {
  height: 36px;
}
.library-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.library-tile {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 15px 18px 13px;
  min-width: 0;
}
.voice-tile-top {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 13px;
}
.voice-tile-top > span:not(.orb) {
  font-size: 11px;
  color: var(--muted);
}
.voice-tile-top .round-play {
  margin-left: auto;
  width: 33px;
  height: 33px;
}
.library-tile h2 {
  font:
    400 27px/1.18 "Xanh Mono",
    Georgia,
    serif;
  letter-spacing: -1.7px;
  color: var(--dark);
}
.library-tile p {
  font-size: 12px;
  line-height: 1.65;
  margin: 6px 0 10px;
  flex: 1;
}
.voice-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 0 0 13px;
}
.voice-tags span {
  font-size: 10px;
  border-radius: 4px;
  background: #f2f4ed;
  color: #475e4b;
  padding: 2px 6px;
}
.library-tile > .text-link {
  align-self: flex-start;
  font-size: 12px;
}
.wallet-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.wallet-summary strong {
  font-size: 32px;
  letter-spacing: -1.5px;
}
.wallet-summary p {
  font-size: 13px;
}
.payment-method {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.payment-method select {
  width: auto;
  height: 35px;
}
.script-original {
  white-space: pre-line;
  font-size: 12px;
  margin-top: 8px;
}
.pronunciation-result {
  resize: vertical;
  min-height: 155px;
  font-size: 14px;
  line-height: 1.65;
}
@media (max-width: 1050px) {
  .voice-tools {
    grid-template-columns: 1fr;
  }
  .brand {
    font-size: 23px;
    gap: 8px;
  }
}
@media (max-width: 610px) {
  .voice-tools {
    gap: 9px;
  }
  .voice-facets select {
    font-size: 12px;
  }
  .library-grid {
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 8px;
  }
  .library-tile {
    padding: 12px;
  }
  .voice-tile-top {
    gap: 4px;
  }
  .voice-tile-top .orb {
    width: 25px;
    height: 25px;
  }
  .library-tile h2 {
    font-size: 22px;
  }
  .library-tile p {
    font-size: 11px;
  }
  .voice-tile-top .round-play {
    width: 27px;
    height: 27px;
  }
  .hero h1 {
    font-size: 31px;
  }
  .voice-facets {
    gap: 5px;
  }
  .voice-facets label span {
    font-size: 10px;
  }
  .wallet-summary strong {
    font-size: 25px;
  }
}

.audition {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  padding: 10px 12px;
  box-shadow: 0 6px 22px #2337251a;
}
.audition small,
.audition strong {
  display: block;
}
.audition small {
  font-size: 10px;
  color: var(--muted);
}
.audition strong {
  font-size: 13px;
}
.audition audio {
  width: 210px;
  height: 33px;
}
.audition .icon-button {
  align-self: center;
}
@media (max-width: 610px) {
  .audition {
    left: 8px;
    right: 8px;
    bottom: 8px;
    gap: 8px;
    padding: 8px;
  }
  .audition audio {
    flex: 1;
    min-width: 0;
  }
}
