:root {
  --bg: #eef7f9;
  --surface: #ffffff;
  --surface-soft: #f5fbfc;
  --surface-cyan: #edfbfd;
  --teal: #0db4b9;
  --teal-strong: #0799a2;
  --teal-deep: #076672;
  --cyan: #48d9df;
  --cyan-soft: #dff9fc;
  --ink: #0d1720;
  --ink-soft: #33464f;
  --muted: #76868e;
  --line: #dce9ec;
  --line-soft: #edf3f4;
  --orange: #f47b20;
  --orange-soft: #fff3e8;
  --gold: #f6bd38;
  --green: #18a968;
  --green-soft: #ebf8f1;
  --blue: #438dd8;
  --blue-soft: #edf5fd;
  --purple: #7958d6;
  --danger: #d94f50;
  --danger-soft: #fff0f0;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 8px 20px rgba(30, 72, 87, .06);
  --shadow-md: 0 18px 42px rgba(26, 73, 88, .09);
  --shadow-lg: 0 28px 70px rgba(28, 75, 91, .13);
  --content-max: 1120px;
  font-family: Inter, "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; margin: 0; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(circle at 5% 10%, rgba(61, 211, 222, .12), transparent 30%),
    radial-gradient(circle at 92% 80%, rgba(246, 189, 56, .08), transparent 28%),
    #f4fafb;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, audio { max-width: 100%; }
button, input, textarea, select { max-width: 100%; font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(13, 180, 185, .22);
  outline-offset: 2px;
}
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }
.grid-child, .flex-child { min-width: 0; }

.ambient { position: fixed; pointer-events: none; border-radius: 999px; filter: blur(1px); z-index: 0; }
.ambient-one { width: 420px; height: 420px; left: -290px; top: 180px; border: 1px solid rgba(28, 197, 207, .16); box-shadow: 0 0 0 42px rgba(28, 197, 207, .025); }
.ambient-two { width: 520px; height: 520px; right: -380px; bottom: 100px; border: 1px solid rgba(244, 123, 32, .12); box-shadow: 0 0 0 56px rgba(244, 123, 32, .018); }

.app-shell {
  width: min(100%, var(--content-max));
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 0 80px rgba(35, 76, 91, .08);
  overflow: clip;
}

.topbar {
  min-height: 76px;
  padding: 12px clamp(16px, 3vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .93);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(18px);
}
.brand {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.brand img { width: 38px; height: 38px; flex: 0 0 auto; }
.brand-copy { display: flex; align-items: baseline; gap: 3px; white-space: nowrap; }
.brand-copy b { font-size: 21px; color: var(--teal); font-weight: 900; letter-spacing: -.9px; }
.brand-copy strong { font-size: 18px; font-weight: 900; letter-spacing: -.45px; }
.top-actions { display: flex; align-items: center; gap: 9px; min-width: 0; }
.credit-pill {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 6px 13px 6px 9px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(29, 68, 82, .04);
}
.credit-icon { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--cyan-soft); color: var(--teal-strong); font-size: 11px; }
.credit-pill > span:last-child { display: grid; text-align: left; line-height: 1.1; }
.credit-pill small { font-size: 9px; color: var(--muted); font-weight: 600; }
.credit-pill b { font-size: 12px; font-weight: 900; margin-top: 2px; }
.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-dot { position: absolute; right: 8px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: #f25555; box-shadow: 0 0 0 2px #fff; }
.online { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); flex: 0 0 auto; }

main { min-height: calc(100vh - 76px); padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
.screen { display: none; padding: 20px clamp(14px, 3vw, 32px) 34px; }
.screen.active { display: block; animation: screenIn .18s ease-out; }
@keyframes screenIn { from { opacity: .55; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.section-block { margin-top: 24px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading.compact { margin-bottom: 10px; }
.section-heading > div { min-width: 0; }
.section-heading h2, .card-heading h2 { margin: 2px 0 0; font-size: clamp(18px, 2.8vw, 22px); line-height: 1.25; letter-spacing: -.35px; overflow-wrap: anywhere; }
.section-kicker, .eyebrow { color: var(--teal-deep); font-size: 9px; font-weight: 900; letter-spacing: 1.15px; text-transform: uppercase; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--cyan-soft); }
.section-link { min-height: 36px; border: 0; background: transparent; color: var(--teal-strong); padding: 6px 2px; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.result-count { color: var(--muted); font-size: 11px; white-space: nowrap; }

.btn {
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn:not(:disabled):active { transform: translateY(0); }
.btn.primary { color: #fff; background: linear-gradient(180deg, #18c9c6 0%, #08aeb6 100%); box-shadow: 0 10px 24px rgba(7, 174, 181, .20); }
.btn.primary:not(:disabled):hover { box-shadow: 0 14px 28px rgba(7, 174, 181, .25); }
.btn.secondary { color: var(--ink-soft); background: #fff; border: 1px solid var(--line); box-shadow: 0 5px 14px rgba(23, 59, 72, .04); }
.btn.text { min-height: 38px; color: var(--teal-deep); background: transparent; padding-inline: 7px; }
.btn.compact { min-height: 40px; font-size: 12px; padding: 9px 13px; }
.btn.wide { width: 100%; }
.btn.big { min-height: 50px; font-size: 15px; }

/* Home */
.hero-card {
  min-height: 318px;
  border: 1px solid #c8edf1;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 78% 42%, rgba(73, 214, 224, .14), transparent 33%),
    linear-gradient(135deg, #f8feff 0%, #eafafd 62%, #f4fcfd 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  overflow: hidden;
  position: relative;
}
.hero-card::after { content: ""; position: absolute; inset: auto -80px -105px auto; width: 280px; height: 280px; border: 1px solid rgba(10, 174, 182, .13); border-radius: 50%; box-shadow: 0 0 0 30px rgba(18, 190, 199, .028), 0 0 0 62px rgba(18, 190, 199, .018); pointer-events: none; }
.hero-copy { position: relative; z-index: 2; padding: clamp(24px, 5vw, 44px); min-width: 0; align-self: center; }
.hero-copy h1 { margin: 10px 0 12px; font-size: clamp(30px, 5.4vw, 48px); line-height: 1.04; letter-spacing: -1.2px; font-weight: 950; overflow-wrap: anywhere; word-break: normal; }
.hero-copy h1 em { color: var(--teal); font-style: normal; }
.hero-copy p { max-width: 520px; margin: 0; color: var(--ink-soft); font-size: clamp(13px, 1.7vw, 15px); line-height: 1.75; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.hero-trust { margin-top: 15px; display: flex; flex-wrap: wrap; gap: 6px 12px; color: #63767e; font-size: 10px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 4px; }
.hero-art { margin: 0; min-width: 0; position: relative; display: grid; place-items: center; padding: 12px; overflow: hidden; }
.hero-art > img { width: min(100%, 390px); position: relative; z-index: 2; filter: drop-shadow(0 20px 25px rgba(17, 119, 139, .13)); }
.hero-orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(15, 174, 184, .20); pointer-events: none; }
.orbit-one { width: 215px; height: 215px; }
.orbit-two { width: 285px; height: 285px; opacity: .62; }
.sound-pill { position: absolute; z-index: 3; min-width: 48px; height: 33px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.86); color: var(--teal); display: grid; place-items: center; font-size: 8px; letter-spacing: 2px; box-shadow: var(--shadow-sm); backdrop-filter: blur(8px); }
.sound-left { left: 5%; bottom: 24%; transform: rotate(-5deg); }
.sound-right { right: 6%; top: 22%; transform: rotate(4deg); }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metric-card { min-width: 0; min-height: 116px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); display: flex; align-items: flex-start; gap: 12px; }
.metric-icon { flex: 0 0 auto; width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; }
.metric-icon svg, .stat-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.metric-icon.orange, .stat-icon.orange { background: var(--orange-soft); color: var(--orange); }
.metric-icon.teal, .stat-icon.teal { background: var(--cyan-soft); color: var(--teal-strong); }
.metric-icon.blue, .stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.metric-card > div:last-child { min-width: 0; }
.metric-card small { display: block; color: var(--muted); font-size: 10px; line-height: 1.35; }
.metric-card strong { display: block; margin-top: 5px; font-size: clamp(16px, 2.5vw, 21px); font-weight: 950; letter-spacing: -.35px; overflow-wrap: anywhere; }
.metric-card.income-card strong { color: var(--orange); }
.metric-card span { display: block; margin-top: 5px; color: #8a989e; font-size: 9px; }

.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.quick-card { min-height: 92px; min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 12px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; text-align: left; cursor: pointer; box-shadow: 0 6px 18px rgba(27, 63, 76, .035); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.quick-card:hover { border-color: #bfe7ea; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.quick-icon { width: 34px; height: 34px; border-radius: 11px; background: var(--cyan-soft); color: var(--teal-strong); display: grid; place-items: center; }
.quick-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quick-card > span:nth-child(2) { min-width: 0; }
.quick-card b { display: block; font-size: 12px; overflow-wrap: anywhere; }
.quick-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; }
.quick-card > i { font-style: normal; color: var(--teal); }

.creator-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 1px 1px 5px; overflow: visible; }
.home-market-card { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; box-shadow: 0 8px 22px rgba(30, 67, 80, .055); }
.home-market-photo { aspect-ratio: 4 / 3; min-height: 0; position: relative; background: linear-gradient(145deg, #eef6f7, #e8f3f5); overflow: hidden; }
.home-market-photo .profile-img, .home-market-photo .profile-placeholder { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.home-market-play { position: absolute; right: 9px; bottom: 9px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(8, 26, 33, .88); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 5px 14px rgba(0,0,0,.16); }
.home-market-body { padding: 11px; min-width: 0; }
.home-market-body h3 { margin: 0; font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-market-body small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-market-footer { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.home-market-footer b { color: var(--orange); font-size: 11px; }

.market-promo { margin-top: 28px; min-height: 230px; border: 1px solid #d8e8ff; border-radius: 24px; background: #f7fbff; overflow: hidden; position: relative; display: grid; align-items: stretch; isolation: isolate; box-shadow: 0 12px 32px rgba(54, 91, 148, .07); }
.market-promo::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(247,251,255,.98) 0%, rgba(247,251,255,.94) 36%, rgba(247,251,255,.60) 57%, rgba(247,251,255,.04) 78%); }
.market-promo-copy { padding: clamp(22px, 4vw, 34px); width: min(56%, 650px); min-width: 0; position: relative; z-index: 3; align-self: center; }
.market-promo h2 { margin: 4px 0 6px; color: #173d86; font-size: clamp(24px, 3.6vw, 34px); }
.market-promo p { max-width: 520px; margin: 0; color: #4f6282; font-size: 12px; line-height: 1.65; }
.promo-points { display: flex; flex-wrap: wrap; gap: 7px 12px; margin: 13px 0 15px; color: #60718e; font-size: 10px; }
.promo-points b { color: #2e65dc; font-size: 13px; }
.market-promo-visual { position: absolute; inset: 0; z-index: 0; margin: 0; overflow: hidden; }
.market-promo-visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transform: none; }

/* Page heading */
.page-heading { display: flex; align-items: flex-start; gap: 13px; margin: 2px 0 18px; }
.page-heading > div { flex: 1; min-width: 0; }
.page-heading h1 { margin: 2px 0 4px; font-size: clamp(24px, 4.2vw, 32px); line-height: 1.15; letter-spacing: -.6px; overflow-wrap: anywhere; }
.page-heading p { max-width: 720px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.back-button, .page-action-button { flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 14px; background: #fff; display: grid; place-items: center; cursor: pointer; }
.back-button { font-size: 22px; }
.page-action-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.page-badge { flex: 0 0 auto; min-width: 40px; height: 32px; padding: 0 10px; border-radius: 999px; display: grid; place-items: center; background: var(--cyan-soft); color: var(--teal-deep); font-size: 10px; font-weight: 900; }
.market-page-heading { align-items: center; }

/* Clone */
.studio-intro { border: 1px solid #cfecef; border-radius: 20px; background: linear-gradient(135deg, #f8feff, #ecfbfd); display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(160px, .55fr); align-items: center; overflow: hidden; min-height: 180px; }
.studio-intro > div { padding: 20px 0 20px 22px; min-width: 0; }
.studio-intro h2 { margin: 7px 0 7px; font-size: clamp(20px, 3.4vw, 28px); line-height: 1.25; }
.studio-intro p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.studio-intro img { align-self: end; justify-self: center; width: min(100%, 230px); }
.clone-layout { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; align-items: stretch; }
.workflow-card { min-width: 0; min-height: 100%; border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 15px; box-shadow: 0 6px 18px rgba(26, 64, 77, .035); }
.step-head { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 13px; }
.step-head > span { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(180deg, #19c7c5, #08aeb6); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 900; box-shadow: 0 6px 14px rgba(6, 165, 173, .17); }
.step-head div { min-width: 0; }
.step-head b { display: block; font-size: 13px; line-height: 1.35; }
.step-head small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.upload-zone { min-height: 180px; border: 1.5px dashed #b9dfe3; border-radius: 15px; background: linear-gradient(180deg, #fbfeff, #f7fcfd); padding: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--teal); background: #f0fcfd; }
.upload-zone.dragging { transform: scale(.995); }
.upload-icon { width: 72px; height: 58px; display: grid; place-items: center; margin-bottom: 6px; }
.upload-icon img { width: 72px; height: auto; }
.upload-zone strong { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.upload-zone small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.wave-preview { min-height: 58px; margin-top: 9px; border: 1px solid #d8ecee; border-radius: 13px; background: #f9feff; padding: 8px 10px; display: grid; grid-template-columns: 30px 1fr 66px; align-items: center; gap: 8px; }
.file-state { width: 30px; height: 30px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-weight: 900; }
.wave-preview div { min-width: 0; }
.wave-preview b { display: block; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wave-preview small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wave-mini { height: 20px; background: repeating-linear-gradient(90deg, var(--teal) 0 2px, transparent 2px 5px); mask-image: linear-gradient(0deg, transparent 4%, #000 30% 70%, transparent 96%); opacity: .75; }
.field-label, .field-group > span { display: block; margin-bottom: 6px; color: #5d6d74; font-size: 10px; font-weight: 800; }
.field-count { position: relative; }
.field-count input { padding-right: 58px; }
.field-count > span { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 9px; pointer-events: none; }
.clone-transcript-label { margin-top: 14px; }
.clone-transcript-help { display:block; margin-top:6px; color:var(--muted); font-size:9px; line-height:1.55; }
input, select, textarea { width: 100%; border: 1px solid #d9e5e8; border-radius: 12px; background: #fff; padding: 11px 12px; color: var(--ink); outline: 0; transition: border-color .15s ease, box-shadow .15s ease; }
input, select { min-height: 44px; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: #66d1d6; box-shadow: 0 0 0 3px rgba(13,180,185,.10); }
input::placeholder, textarea::placeholder { color: #a4afb4; }
.consent { display: flex; align-items: flex-start; gap: 9px; color: #5f7178; font-size: 9.5px; line-height: 1.55; cursor: pointer; }
.consent input { width: 18px; min-height: 18px; height: 18px; padding: 0; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--teal); }
.consent-card .btn { margin-top: 14px; }
.security-note { margin: 10px 0 0; color: #78898f; font-size: 8.5px; line-height: 1.45; display: flex; gap: 6px; align-items: flex-start; }
.security-note svg { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: var(--teal-strong); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.voice-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.voice-gallery.full { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.voice-row { min-width: 0; border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 12px; display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: start; }
.voice-wave { width: 42px; height: 42px; border-radius: 13px; background: var(--cyan-soft); color: var(--teal-strong); display: grid; place-items: center; font-size: 20px; }
.voice-meta { min-width: 0; }
.voice-meta b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-meta small { display: block; margin-top: 3px; color: var(--muted); font-size: 8.5px; line-height: 1.35; }
.voice-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; }
.mini { min-height: 32px; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 5px 8px; color: #566a73; font-size: 9px; font-weight: 750; cursor: pointer; }
.mini.active { background: var(--cyan-soft); border-color: #bce8ea; color: var(--teal-deep); }
.mini.danger { color: var(--danger); }

.btn.danger {
  background: linear-gradient(135deg, #ef6464, #d94444);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(230, 83, 83, .22);
}

.btn.danger:hover { filter: brightness(.98); }
.tts-panel { margin-top: 24px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, #fff, #fbfefe); padding: clamp(16px, 3vw, 24px); box-shadow: var(--shadow-sm); }
.tts-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tts-heading h2 { margin: 2px 0 4px; font-size: clamp(19px, 3vw, 24px); }
.tts-heading p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.counter { flex: 0 0 auto; padding: 6px 8px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 9px; }
.tts-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 12px; align-items: start; }
.text-field { grid-column: 2; grid-row: 1 / span 2; }
.credit-est { display: flex; justify-content: space-between; gap: 10px; margin: 9px 2px 12px; color: #6c7d84; font-size: 10px; }
.credit-est b { color: var(--ink); }
.audio-result { margin-top: 13px; border: 1px solid #d7eee4; border-radius: 14px; background: #fbfffd; padding: 12px; display: grid; gap: 10px; }
.result-heading { display: flex; gap: 8px; align-items: center; }
.success-dot { width: 29px; height: 29px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-weight: 900; }
.result-heading b { display: block; font-size: 11px; }
.result-heading small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.audio-result audio { width: 100%; }

/* Marketplace */
.market-hero { min-height: 220px; border: 1px solid #ceeef1; border-radius: 22px; background: linear-gradient(135deg, #f7feff, #ebfbfd); display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; overflow: hidden; }
.market-hero > div { padding: 22px 0 22px 24px; min-width: 0; position: relative; z-index: 2; }
.market-hero h2 { margin: 8px 0 8px; font-size: clamp(22px, 3.8vw, 31px); line-height: 1.23; }
.market-hero p { margin: 0 0 15px; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.market-hero > img { width: min(100%, 440px); justify-self: center; }
.market-control-card { margin-top: 14px; border: 1px solid var(--line); border-radius: 17px; background: #fff; padding: 12px; }
.market-tools { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 8px; }
.searchbox { min-height: 44px; border: 1px solid #d9e5e8; border-radius: 12px; background: #fff; display: flex; align-items: center; gap: 8px; padding: 0 11px; }
.searchbox svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: #788a91; stroke-width: 1.8; stroke-linecap: round; }
.searchbox input { border: 0; box-shadow: none; padding: 0; min-height: 42px; }
.searchbox input:focus { box-shadow: none; }
.category-select { position: relative; }
.category-select > span { position: absolute; left: 11px; top: 4px; z-index: 2; color: var(--muted); font-size: 7px; pointer-events: none; }
.category-select select { padding-top: 13px; }
.filter-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 9px; overscroll-behavior-inline: contain; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-row button { min-height: 34px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #6a7b82; padding: 6px 11px; font-size: 9.5px; font-weight: 750; cursor: pointer; }
.filter-row button.active { background: var(--cyan-soft); border-color: #bfeaed; color: var(--teal-deep); }
.earn-banner { margin-top: 14px; border: 1px solid #f0e1c9; border-radius: 18px; background: linear-gradient(135deg, #fffaf3, #fff); padding: 14px; display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.earn-visual { width: 70px; height: 70px; border-radius: 18px; background: #fff7e8; display: grid; place-items: center; }
.earn-visual img { width: 62px; }
.earn-banner > div:nth-child(2) { min-width: 0; }
.earn-banner > div:nth-child(2) > b { display: block; margin-top: 3px; font-size: 14px; }
.earn-banner p { margin: 3px 0 7px; color: #7a6d5c; font-size: 9.5px; line-height: 1.45; }
.earn-number { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.earn-number strong { color: var(--orange); font-size: 17px; }
.earn-number span { color: #8d7b67; font-size: 8.5px; }
.earn-number span b { color: var(--green); }
.market-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.market-card { min-width: 0; border: 1px solid var(--line); border-radius: 17px; background: #fff; padding: 10px; display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 10px; box-shadow: 0 6px 18px rgba(28, 64, 77, .035); }
.market-card > .profile-img, .market-card > .profile-placeholder { grid-row: span 2; width: 86px; height: 108px; border-radius: 12px; object-fit: cover; background: #edf4f5; }
.profile-placeholder { display: grid; place-items: center; color: #819197; font-weight: 900; }
.market-info { min-width: 0; }
.market-info h3 { margin: 1px 0 3px; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.market-info .creator { color: var(--muted); font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tags span { padding: 3px 6px; border-radius: 999px; background: var(--surface-soft); color: #708088; font-size: 7.5px; }
.mini-wave { height: 17px; margin-top: 6px; display: flex; align-items: center; gap: 2px; }
.mini-wave i { width: 2px; border-radius: 2px; background: var(--teal); }
.mini-wave i:nth-child(1), .mini-wave i:nth-child(10) { height: 5px; }
.mini-wave i:nth-child(2), .mini-wave i:nth-child(9) { height: 9px; }
.mini-wave i:nth-child(3), .mini-wave i:nth-child(8) { height: 7px; }
.mini-wave i:nth-child(4), .mini-wave i:nth-child(7) { height: 13px; }
.mini-wave i:nth-child(5), .mini-wave i:nth-child(6) { height: 16px; }
.market-actions { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.market-actions .price { color: var(--orange); font-size: 12px; font-weight: 900; white-space: nowrap; }
.market-actions .price small { display: block; color: var(--muted); font-size: 7px; font-weight: 600; }
.market-actions .btn { min-height: 34px; border-radius: 9px; padding: 6px 9px; font-size: 9px; }
.market-actions .preview { width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 50%; background: var(--surface-soft); color: var(--teal-deep); border: 1px solid var(--line); }
.creator-bottom-cta { margin-top: 14px; border: 1px solid #d3ebee; border-radius: 17px; background: linear-gradient(90deg, #effdff, #fff); padding: 12px; display: grid; grid-template-columns: 43px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.cta-icon { width: 43px; height: 43px; border-radius: 13px; background: linear-gradient(180deg, #16c7c6, #08aeb6); color: #fff; display: grid; place-items: center; }
.cta-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.creator-bottom-cta b { display: block; font-size: 11px; }
.creator-bottom-cta p { margin: 2px 0 0; color: var(--muted); font-size: 8.5px; line-height: 1.4; }

/* Creator */
.creator-hero-card { min-height: 210px; border: 1px solid #ccecef; border-radius: 22px; background: linear-gradient(135deg, #effdff, #fbfeff); overflow: hidden; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; }
.creator-hero-card > div { padding: 22px 0 22px 24px; min-width: 0; }
.creator-hero-card h2 { margin: 8px 0 7px; font-size: clamp(22px, 3.8vw, 30px); line-height: 1.22; }
.creator-hero-card p { margin: 0; color: var(--ink-soft); font-size: 10.5px; line-height: 1.6; }
.creator-hero-card img { width: min(100%, 340px); justify-self: center; transform: translateY(18px); }
.creator-stats { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.creator-stats article { min-width: 0; border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 12px; display: grid; grid-template-columns: 33px 1fr; column-gap: 8px; align-items: center; }
.stat-icon { grid-row: span 2; width: 33px; height: 33px; border-radius: 10px; display: grid; place-items: center; }
.creator-stats small { color: var(--muted); font-size: 8.5px; }
.creator-stats b { font-size: 14px; overflow-wrap: anywhere; }
.creator-form-layout { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.form-card { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 16px; margin-top: 12px; box-shadow: 0 5px 16px rgba(28, 65, 78, .025); }
.creator-form-layout .form-card { margin-top: 0; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.card-heading > div { min-width: 0; }
.card-heading p { max-width: 260px; margin: 0; color: var(--muted); font-size: 8.5px; line-height: 1.45; text-align: right; }
.card-heading.inline { align-items: center; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.form-grid label { min-width: 0; color: #5d6d74; font-size: 9.5px; font-weight: 750; }
.form-grid label > input, .form-grid label > select, .form-grid label > textarea { margin-top: 5px; font-weight: 500; }
.form-grid .full { grid-column: 1 / -1; }
.avatar-upload { grid-row: span 2; }
.avatar-upload > input { display: block; padding: 8px; font-size: 8.5px; }
.avatar-preview { width: 92px; height: 108px; margin-top: 7px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(145deg, #f5f9fa, #edf4f5); display: grid; place-items: center; overflow: hidden; }
.avatar-preview span { font-size: 32px; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload small { display: block; margin-top: 5px; color: var(--muted); font-size: 7.5px; }
.creator-listings, .orders { display: grid; gap: 7px; }
.creator-listing { min-width: 0; border: 1px solid var(--line-soft); border-radius: 12px; background: #fcfefe; padding: 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.creator-listing > div { min-width: 0; }
.creator-listing b { font-size: 10px; }
.creator-listing small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.35; }

/* Account */
.system-warning { margin-bottom: 12px; border: 1px solid #f4cf9f; border-radius: 14px; background: #fff8ee; color: #75501f; padding: 12px; font-size: 10px; line-height: 1.55; }
.auth-card { max-width: 620px; margin: 0 auto; border: 1px solid var(--line); border-radius: 22px; background: #fff; padding: clamp(17px, 4vw, 25px); box-shadow: var(--shadow-sm); }
.auth-visual { display: flex; align-items: center; gap: 13px; padding-bottom: 16px; }
.auth-visual img { width: 58px; height: 58px; }
.auth-visual > div { min-width: 0; }
.auth-visual h2 { margin: 3px 0 3px; font-size: 20px; }
.auth-visual p { margin: 0; color: var(--muted); font-size: 9.5px; line-height: 1.45; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border-radius: 13px; background: #f3f7f8; margin-bottom: 12px; }
.auth-tabs button { min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: #738289; font-size: 11px; font-weight: 800; cursor: pointer; }
.auth-tabs button.active { background: #fff; color: var(--teal-deep); box-shadow: 0 4px 12px rgba(24, 57, 69, .06); }
.auth-card form { display: grid; gap: 10px; }
.auth-card form label { color: #5d6d74; font-size: 9.5px; font-weight: 750; }
.auth-card form label input { margin-top: 5px; font-weight: 500; }
.auth-card form > small { color: var(--muted); font-size: 8px; text-align: center; line-height: 1.45; }
.form-message { border: 1px solid #ffc8c8; border-radius: 11px; background: var(--danger-soft); color: #aa3434; padding: 10px; font-size: 9.5px; line-height: 1.45; }
.form-message.success { border-color: #c7ebd8; background: var(--green-soft); color: #1c7548; }
.account-card { border: 1px solid #cfeaec; border-radius: 20px; background: linear-gradient(135deg, #f0fdff, #fff); padding: 16px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr) auto; gap: 14px; align-items: center; }
.account-profile { min-width: 0; display: flex; align-items: center; gap: 11px; }
.account-avatar { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(145deg, #1ac7c4, #079aa4); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 950; box-shadow: 0 9px 20px rgba(8, 157, 166, .18); }
.account-profile > div { min-width: 0; }
.account-profile small { display: block; color: var(--muted); font-size: 8px; }
.account-profile b { display: block; margin-top: 2px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-profile span:last-child { display: inline-flex; margin-top: 4px; padding: 3px 7px; border-radius: 999px; background: var(--cyan-soft); color: var(--teal-deep); font-size: 8px; font-weight: 800; }
.account-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.account-metrics article { min-width: 0; border: 1px solid rgba(189, 228, 232, .9); border-radius: 12px; background: rgba(255,255,255,.72); padding: 9px; }
.account-metrics small { display: block; color: var(--muted); font-size: 7.5px; }
.account-metrics b { display: block; margin-top: 2px; font-size: 15px; }
.account-metrics span { color: var(--muted); font-size: 7px; }
.account-card > .btn { width: auto; min-width: 120px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.plan { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 14px; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.plan.popular { border-color: #9edfe3; box-shadow: 0 12px 28px rgba(7, 171, 180, .10); }
.plan .ribbon { position: absolute; right: 10px; top: 10px; border-radius: 999px; background: var(--orange-soft); color: var(--orange); padding: 4px 7px; font-size: 7.5px; font-weight: 900; }
.plan-top { display: flex; gap: 10px; align-items: center; min-width: 0; }
.plan-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--cyan-soft); color: var(--teal-deep); }
.plan-icon.orange { background: var(--orange-soft); color: var(--orange); }
.plan-icon.purple { background: #f1edff; color: var(--purple); }
.plan-icon.blue { background: var(--blue-soft); color: var(--blue); }
.plan-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.plan h3 { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.plan .price { margin: 12px 0 2px; color: var(--teal-deep); font-size: 25px; line-height: 1; font-weight: 950; letter-spacing: -.5px; }
.plan .price small { color: var(--muted); font-size: 8px; font-weight: 600; }
.plan ul { margin: 10px 0 13px; padding: 0; list-style: none; display: grid; gap: 6px; color: #687b83; font-size: 9px; line-height: 1.35; }
.plan li { display: flex; gap: 6px; }
.plan li::before { content: "✓"; color: var(--green); font-weight: 900; }
.plan .btn { margin-top: auto; }
.order { border: 1px solid var(--line-soft); border-radius: 12px; background: #fcfefe; padding: 10px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 9px; }
.order > div { min-width: 0; }
.order b { font-size: 10px; }
.order small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.status { padding: 4px 7px; border-radius: 999px; background: #f3f6f7; color: #687980; font-size: 8px; font-weight: 800; white-space: nowrap; }
.status.paid { background: var(--green-soft); color: var(--green); }

/* Empty/loading states */
.empty-state, .empty, .loading-card { grid-column: 1 / -1; min-width: 0; border: 1px dashed #cfdde0; border-radius: 15px; background: #fbfdfd; padding: 22px; text-align: center; color: #819197; font-size: 10px; line-height: 1.55; }
.empty-state img { display: block; width: min(150px, 60%); margin: 0 auto 10px; }
.empty-state b { display: block; color: var(--ink-soft); font-size: 12px; margin-bottom: 2px; }
.empty-state .btn { margin-top: 10px; }
.compact-empty { padding: 16px; }
.skeleton-card, .market-skeleton, .plan-skeleton { min-height: 190px; border-radius: 16px; background: linear-gradient(90deg, #f0f4f5 25%, #f8fafb 37%, #f0f4f5 63%); background-size: 400% 100%; animation: shimmer 1.25s ease infinite; }
.market-skeleton { min-height: 130px; }
.plan-skeleton { min-height: 220px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* Modal and dialog */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(8, 26, 33, .52); padding: 14px; display: grid; place-items: end center; backdrop-filter: blur(5px); }
.modal[hidden] { display: none; }
.modal-card { width: min(100%, 560px); max-height: min(88vh, 760px); overflow: auto; overscroll-behavior: contain; border-radius: 22px 22px 16px 16px; background: #fff; padding: 18px; position: relative; box-shadow: 0 30px 90px rgba(8, 25, 32, .25); }
.modal-close, .dialog-close { position: absolute; right: 12px; top: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f2f6f7; color: #4a6068; cursor: pointer; font-size: 20px; }
.modal-profile { display: flex; align-items: center; gap: 11px; padding-right: 36px; }
.modal-profile .profile-img, .modal-profile .profile-placeholder { width: 66px; height: 78px; object-fit: cover; border-radius: 12px; background: #edf4f5; flex: 0 0 auto; }
.modal-profile > div { min-width: 0; }
.modal-profile h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.modal-profile small { color: var(--muted); font-size: 9px; }
.modal-voice > p { color: #5f727a; font-size: 10px; line-height: 1.55; }
.modal-voice textarea { margin: 8px 0 10px; min-height: 128px; }
.license-note { border-radius: 11px; background: var(--surface-soft); color: #60737b; padding: 9px; margin-bottom: 10px; font-size: 9px; line-height: 1.5; }
.voice-dialog { width: min(calc(100% - 28px), 430px); border: 0; border-radius: 20px; padding: 0; color: var(--ink); box-shadow: 0 30px 90px rgba(8, 25, 32, .24); }
.voice-dialog::backdrop { background: rgba(8, 26, 33, .52); backdrop-filter: blur(5px); }
.voice-dialog form { padding: 20px; position: relative; }
.voice-dialog h2 { margin: 5px 34px 5px 0; font-size: 20px; }
.voice-dialog p { margin: 0 34px 14px 0; color: var(--muted); font-size: 9.5px; line-height: 1.5; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(82px + env(safe-area-inset-bottom)); z-index: 100; width: max-content; max-width: min(calc(100vw - 28px), 460px); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; border-radius: 999px; background: #16333b; color: #fff; padding: 10px 14px; text-align: center; font-size: 10px; line-height: 1.4; box-shadow: 0 14px 35px rgba(7, 27, 34, .24); transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.bottom-nav { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 60; width: min(100%, var(--content-max)); min-height: 72px; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line-soft); background: rgba(255,255,255,.96); display: grid; grid-template-columns: repeat(4, 1fr); backdrop-filter: blur(18px); }
.bottom-nav button { min-width: 0; min-height: 70px; border: 0; background: transparent; color: #96a2a7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; position: relative; }
.bottom-nav button.active { color: var(--teal-strong); }
.bottom-nav button.active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 999px 999px; background: var(--teal); }
.nav-icon { width: 21px; height: 21px; display: block; }
.nav-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav small { font-size: 8.5px; font-weight: 700; white-space: nowrap; }

/* Responsive */
@media (max-width: 900px) {
  .app-shell { max-width: 620px; }
  .bottom-nav { max-width: 620px; }
  .hero-card { grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 82px; align-items: center; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .creator-cards { grid-auto-columns: minmax(154px, 42%); }
  .clone-layout { grid-template-columns: 1fr; }
  .workflow-card { min-height: 0; }
  .voice-gallery, .voice-gallery.full { grid-template-columns: 1fr 1fr; }
  .tts-grid { grid-template-columns: 1fr; }
  .text-field { grid-column: auto; grid-row: auto; }
  .market-list { grid-template-columns: 1fr; }
  .creator-form-layout { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr 1fr; }
  .account-card { grid-template-columns: 1fr; }
  .account-card > .btn { width: 100%; }
}


@media (max-width: 900px) and (min-width: 561px) {
  .creator-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}

@media (max-width: 560px) {
  .app-shell { width: 100%; }
  .topbar { min-height: 72px; padding: 10px 14px; }
  .brand { gap: 7px; }
  .brand img { width: 34px; height: 34px; }
  .brand-copy b { font-size: 18px; }
  .brand-copy strong { font-size: 15px; }
  .credit-pill { min-height: 40px; padding: 5px 9px 5px 7px; gap: 6px; }
  .credit-icon { width: 24px; height: 24px; }
  .credit-pill b { font-size: 10px; }
  .icon-button { width: 40px; height: 40px; border-radius: 12px; }
  .online { width: 9px; height: 9px; }
  .screen { padding: 16px 14px 28px; }
  .hero-card { min-height: 292px; grid-template-columns: minmax(0, 1.1fr) minmax(120px, .9fr); border-radius: 22px; }
  .hero-copy { padding: 23px 0 20px 18px; }
  .hero-copy h1 { font-size: clamp(28px, 8.2vw, 36px); letter-spacing: -.85px; }
  .hero-copy p { max-width: 245px; font-size: 11px; line-height: 1.65; }
  .hero-actions { margin-top: 15px; align-items: flex-start; flex-direction: column; }
  .hero-actions .btn.primary { min-height: 42px; font-size: 10px; padding: 9px 11px; }
  .hero-actions .btn.text { min-height: 30px; font-size: 9px; padding: 3px 4px; }
  .hero-trust { display: none; }
  .hero-art { padding: 4px; }
  .hero-art > img { width: 145%; max-width: none; transform: translateX(-8%); }
  .orbit-one { width: 170px; height: 170px; }
  .orbit-two { width: 220px; height: 220px; }
  .sound-pill { min-width: 38px; height: 27px; padding: 0 7px; font-size: 6px; }
  .sound-left { left: -7px; }
  .sound-right { right: 4px; top: 19%; }
  .section-block { margin-top: 20px; }
  .section-heading { align-items: center; }
  .section-heading h2 { font-size: 18px; }
  .metric-grid { gap: 8px; }
  .metric-card { min-height: 76px; padding: 11px; border-radius: 14px; }
  .metric-icon { width: 36px; height: 36px; }
  .metric-card strong { font-size: 17px; }
  .quick-grid { gap: 7px; }
  .quick-card { min-height: 84px; padding: 10px; grid-template-columns: 31px 1fr; }
  .quick-card > i { display: none; }
  .quick-icon { width: 31px; height: 31px; }
  .quick-card b { font-size: 10.5px; }
  .quick-card small { font-size: 8px; }
  /* Home recommended voices: keep 3 cards per row even on phones */
  .creator-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding-inline: 0;
  }
  .home-market-card { border-radius: 14px; }
  .home-market-photo { aspect-ratio: 1 / 1; height: auto; }
  .home-market-body { padding: 7px 6px 8px; }
  .home-market-body h3 {
    font-size: 9.5px;
    line-height: 1.25;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 24px;
  }
  .home-market-body small {
    margin-top: 3px;
    font-size: 7px;
    line-height: 1.3;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 18px;
  }
  .home-market-footer { margin-top: 6px; }
  .home-market-footer b { font-size: 8.5px; line-height: 1.2; }
  .home-market-play { width: 27px; height: 27px; right: 5px; bottom: 5px; font-size: 8px; }
  .market-promo { min-height: 210px; border-radius: 18px; }
  .market-promo::after { background: linear-gradient(90deg, rgba(247,251,255,.98) 0%, rgba(247,251,255,.92) 58%, rgba(247,251,255,.25) 100%); }
  .market-promo-copy { width: 66%; padding: 16px 0 14px 16px; }
  .market-promo h2 { font-size: 20px; }
  .market-promo p { font-size: 9px; line-height: 1.5; }
  .promo-points { margin: 8px 0 10px; gap: 4px; font-size: 7.7px; flex-direction: column; }
  .promo-points b { font-size: 10px; }
  .market-promo-visual img { object-position: 66% center; }
  .page-heading { margin-bottom: 15px; gap: 10px; }
  .page-heading h1 { font-size: 23px; }
  .page-heading p { font-size: 9.5px; }
  .back-button, .page-action-button { width: 40px; height: 40px; border-radius: 12px; }
  .studio-intro { grid-template-columns: 1.3fr .7fr; min-height: 158px; border-radius: 18px; }
  .studio-intro > div { padding: 17px 0 17px 16px; }
  .studio-intro h2 { font-size: 18px; }
  .studio-intro p { font-size: 8.5px; }
  .studio-intro img { width: 150%; max-width: none; transform: translateX(-9%); }
  .workflow-card { padding: 13px; border-radius: 16px; }
  .upload-zone { min-height: 150px; }
  .voice-gallery, .voice-gallery.full { grid-template-columns: 1fr; }
  .tts-panel { padding: 14px; border-radius: 17px; }
  .tts-heading { display: block; }
  .counter { display: inline-block; margin-top: 8px; }
  .credit-est { font-size: 9px; }
  .market-hero { grid-template-columns: 1.18fr .82fr; min-height: 190px; border-radius: 18px; }
  .market-hero > div { padding: 17px 0 17px 16px; }
  .market-hero h2 { font-size: 19px; }
  .market-hero p { font-size: 8.5px; }
  .market-hero > img { width: 155%; max-width: none; transform: translateX(-14%); }
  .market-tools { grid-template-columns: 1fr; }
  .category-select { display: none; }
  .earn-banner { grid-template-columns: 60px minmax(0,1fr); padding: 11px; }
  .earn-visual { width: 58px; height: 58px; }
  .earn-visual img { width: 53px; }
  .earn-banner > .btn { grid-column: 1 / -1; width: 100%; }
  .market-card { grid-template-columns: 74px minmax(0, 1fr); gap: 8px; padding: 8px; }
  .market-card > .profile-img, .market-card > .profile-placeholder { width: 74px; height: 94px; border-radius: 10px; }
  .market-info h3 { font-size: 10.5px; }
  .market-actions { gap: 5px; }
  .market-actions .btn { min-height: 32px; padding: 5px 8px; }
  .creator-bottom-cta { grid-template-columns: 40px minmax(0,1fr); }
  .creator-bottom-cta > .btn { grid-column: 1 / -1; width: 100%; }
  .creator-hero-card { min-height: 180px; grid-template-columns: 1.2fr .8fr; border-radius: 18px; }
  .creator-hero-card > div { padding: 17px 0 17px 16px; }
  .creator-hero-card h2 { font-size: 19px; }
  .creator-hero-card p { font-size: 8.5px; }
  .creator-hero-card img { width: 165%; max-width: none; transform: translate(-14%, 18px); }
  .creator-stats { gap: 7px; }
  .creator-stats article { padding: 9px; grid-template-columns: 28px 1fr; gap: 6px; }
  .stat-icon { width: 28px; height: 28px; }
  .creator-stats small { font-size: 7px; }
  .creator-stats b { font-size: 11px; }
  .form-card { padding: 13px; border-radius: 16px; }
  .card-heading { display: block; }
  .card-heading p { margin-top: 3px; max-width: none; text-align: left; }
  .card-heading.inline { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .avatar-upload { grid-row: auto; }
  .creator-listing { grid-template-columns: minmax(0,1fr) auto; }
  .creator-listing .mini { grid-column: 1 / -1; width: 100%; }
  .account-card { padding: 13px; border-radius: 17px; }
  .account-metrics { gap: 6px; }
  .plans { grid-template-columns: 1fr; }
  .plan { border-radius: 16px; }
  .order { grid-template-columns: minmax(0,1fr) auto; }
  .order .status { grid-column: 1 / -1; width: max-content; }
  .modal { padding: 8px; }
  .modal-card { border-radius: 20px 20px 12px 12px; padding: 15px; }
}

@media (max-width: 390px) {
  .screen { padding-inline: 12px; }
  .topbar { padding-inline: 12px; }
  .brand-copy strong { font-size: 14px; }
  .credit-pill small { display: none; }
  .credit-pill > span:last-child { display: block; }
  .credit-pill b { font-size: 9.5px; }
  .hero-card { min-height: 280px; grid-template-columns: 1.12fr .88fr; }
  .hero-copy { padding-left: 14px; }
  .hero-copy h1 { font-size: 26px; }
  .hero-copy p { font-size: 9.8px; }
  .creator-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-columns: auto;
    gap: 6px;
  }
  .home-market-body { padding: 6px 5px 7px; }
  .home-market-body h3 { font-size: 9px; min-height: 23px; }
  .home-market-body small { font-size: 6.6px; min-height: 17px; }
  .home-market-footer b { font-size: 8px; }
  .home-market-play { width: 25px; height: 25px; right: 4px; bottom: 4px; }
  .quick-card { min-height: 80px; grid-template-columns: 29px 1fr; padding: 8px; }
  .quick-icon { width: 29px; height: 29px; }
  .quick-card small { display: none; }
  .market-promo-copy { padding-left: 13px; }
  .market-promo h2 { font-size: 18px; }
  .market-promo .btn { font-size: 9px; padding: 7px 9px; min-height: 36px; }
  .creator-stats { grid-template-columns: 1fr; }
  .creator-stats article { grid-template-columns: 30px 1fr; }
  .credit-est { flex-direction: column; gap: 3px; }
}

@media (min-width: 1121px) {
  .app-shell { margin-block: 14px; min-height: calc(100vh - 28px); border-radius: 30px; box-shadow: var(--shadow-lg); }
  .topbar { border-radius: 30px 30px 0 0; }
  .bottom-nav { bottom: 14px; border-radius: 0 0 30px 30px; }
}

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

/* =========================================================
   v4.3 VISUAL PRODUCTION THEME — cinematic blue / violet
   Keeps the v4.2 DOM/API contract while upgrading presentation.
   ========================================================= */
:root {
  --bg: #f3f6ff;
  --surface: #ffffff;
  --surface-soft: #f7f9ff;
  --surface-cyan: #eef7ff;
  --teal: #2563ff;
  --teal-strong: #1e54e8;
  --teal-deep: #173b86;
  --cyan: #19c8ff;
  --cyan-soft: #e8f7ff;
  --ink: #101b3f;
  --ink-soft: #33446e;
  --muted: #7180a3;
  --line: #dfe6f5;
  --line-soft: #edf1fa;
  --blue: #326cff;
  --blue-soft: #eef3ff;
  --purple: #7554ff;
  --orange: #ff8b3d;
  --green: #11b981;
  --shadow-sm: 0 8px 24px rgba(31, 62, 132, .07);
  --shadow-md: 0 18px 50px rgba(31, 62, 132, .10);
  --shadow-lg: 0 30px 80px rgba(20, 49, 112, .16);
  --content-max: 1240px;
  font-family: "Noto Sans Thai", "Leelawadee UI", Inter, "Segoe UI", Tahoma, sans-serif;
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(61, 139, 255, .14), transparent 26%),
    radial-gradient(circle at 92% 6%, rgba(123, 84, 255, .11), transparent 25%),
    linear-gradient(180deg, #f7f9ff 0%, #f1f5ff 56%, #f7f9ff 100%);
}

.ambient-one { border-color: rgba(51, 116, 255, .16); box-shadow: 0 0 0 42px rgba(51, 116, 255, .025); }
.ambient-two { border-color: rgba(120, 84, 255, .14); box-shadow: 0 0 0 56px rgba(120, 84, 255, .022); }

.app-shell {
  background: rgba(255,255,255,.965);
  box-shadow: 0 0 90px rgba(26, 52, 112, .10);
}

.topbar {
  min-height: 82px;
  padding-block: 14px;
  border-bottom-color: rgba(223,230,245,.82);
  background: rgba(255,255,255,.90);
  box-shadow: 0 8px 30px rgba(28,54,117,.035);
}
.brand img { width: 42px; height: 42px; filter: hue-rotate(92deg) saturate(1.35) brightness(1.05); }
.brand-copy b {
  color: #168cf7;
  font-size: 23px;
  background: linear-gradient(135deg,#13b8f2 0%,#326cff 52%,#7554ff 100%);
  -webkit-background-clip: text;
  color: transparent;
}
.brand-copy strong { color: #0f1e4a; font-size: 19px; }
.credit-pill, .icon-button {
  border-color: #e0e7f7;
  box-shadow: 0 7px 20px rgba(32,65,142,.06);
}
.credit-icon { background: linear-gradient(135deg,#e9f7ff,#eef0ff); color:#326cff; }
.online { box-shadow: 0 0 0 4px #e7fbf3; }

.screen { padding-top: 18px; }
.section-kicker, .eyebrow { color: #326cff; }
.eyebrow i { background: #4b75ff; box-shadow: 0 0 0 4px #edf1ff; }
.section-link { color: #2d61ed; }

.btn.primary {
  background: linear-gradient(135deg,#0eb9ff 0%,#326cff 52%,#7b47ff 100%);
  box-shadow: 0 12px 28px rgba(50,108,255,.23);
}
.btn.primary:not(:disabled):hover { box-shadow: 0 16px 34px rgba(50,108,255,.30); }
.btn.secondary { border-color:#d9e1f4; color:#283c73; }
.btn.text { color:#326cff; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline-color: rgba(50,108,255,.28);
}

/* Cinematic image heroes generated specifically for each production screen. */
.visual-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 24px;
  background: #071a51;
  box-shadow: 0 22px 55px rgba(20,47,112,.18);
  isolation: isolate;
  margin-bottom: 22px;
}
.visual-hero::after {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border:1px solid rgba(255,255,255,.15);
  border-radius:inherit;
  box-shadow: inset 0 0 0 1px rgba(80,154,255,.08);
}
.visual-hero > img {
  display:block;
  width:100%;
  height:auto;
  aspect-ratio: 3 / 1;
  object-fit:cover;
  object-position:center;
}
.hero-hotspot {
  position:absolute;
  z-index:4;
  border:0;
  border-radius:999px;
  background:transparent;
  cursor:pointer;
  color:transparent;
  padding:0;
}
.hero-hotspot:hover { background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 2px rgba(255,255,255,.28); }
.hero-hotspot:focus-visible { outline:3px solid rgba(255,255,255,.95); outline-offset:3px; background:rgba(255,255,255,.06); }
.home-primary { left:5.4%; top:65.5%; width:24.8%; height:15.2%; }
.home-secondary { left:30.3%; top:65.5%; width:16.3%; height:15.2%; }
.clone-primary { left:4.3%; top:62.8%; width:26.2%; height:15.3%; }
.market-primary { left:4.4%; top:67.5%; width:28.7%; height:16.1%; }

/* Retire the v4.2 decorative hero blocks only; functional content remains intact. */
[data-screen="home"] > .hero-card,
[data-screen="clone"] > .page-heading,
[data-screen="clone"] > .studio-intro,
[data-screen="market"] > .page-heading,
[data-screen="market"] > .market-hero,
[data-screen="myvoices"] > .page-heading,
[data-screen="creator"] > .page-heading,
[data-screen="creator"] > .creator-hero-card,
[data-screen="account"] > .page-heading {
  display:none !important;
}

/* White production cards modeled after the approved dashboard references. */
.metric-card,
.quick-card,
.workflow-card,
.tts-panel,
.market-control-card,
.earn-banner,
.market-list-section,
.creator-bottom-cta,
.form-card,
.account-card,
.auth-card,
.plan,
.voice-card,
.market-card {
  border-color:#e0e7f5 !important;
  box-shadow:0 10px 28px rgba(30,61,128,.065) !important;
}
.metric-card:hover,
.quick-card:hover,
.voice-card:hover,
.market-card:hover {
  border-color:#c8d6f5 !important;
  box-shadow:0 16px 36px rgba(30,61,128,.10) !important;
}
.metric-icon.teal, .quick-icon { background:linear-gradient(135deg,#e7f9ff,#edf0ff); color:#316cff; }
.metric-icon.blue { background:#eef2ff; color:#7554ff; }

.quick-card { border-radius:18px; background:linear-gradient(180deg,#fff,#fafbff); }
.quick-card i { color:#3868ef; }
.workflow-card, .form-card, .tts-panel, .market-control-card { border-radius:20px; background:#fff; }
.step-head > span { background:linear-gradient(135deg,#326cff,#7554ff); color:#fff; box-shadow:0 8px 18px rgba(60,93,239,.19); }
.upload-zone { border-color:#b9c9f4; background:linear-gradient(180deg,#fbfdff,#f5f8ff); }
.upload-zone:hover, .upload-zone.dragging { border-color:#567eff; background:#f1f5ff; }

input, textarea, select {
  border-color:#dbe3f4 !important;
  background:#fbfcff !important;
}
input:focus, textarea:focus, select:focus {
  border-color:#6b89ff !important;
  box-shadow:0 0 0 3px rgba(64,106,255,.10) !important;
}

.market-control-card { background:linear-gradient(180deg,#ffffff,#fafbff); }
.filter-row button.active { background:linear-gradient(135deg,#326cff,#7554ff); color:#fff; border-color:transparent; }
.earn-banner { background:linear-gradient(135deg,#eef7ff,#f7f1ff); }
.creator-stats article { border-color:#e1e8f6; box-shadow:0 10px 25px rgba(31,62,130,.055); }

.account-card { background:linear-gradient(135deg,#ffffff,#f7f9ff); }
.account-avatar { background:linear-gradient(135deg,#16c1ff,#326cff 55%,#7650ff); box-shadow:0 10px 24px rgba(50,108,255,.18); }
.plan.popular { border-color:#9eb1ff !important; box-shadow:0 18px 40px rgba(74,88,240,.13) !important; }
.ribbon { background:linear-gradient(135deg,#326cff,#7554ff) !important; }

/* Bottom navigation: larger touch targets and clearer active state. */
.bottom-nav {
  background:rgba(255,255,255,.94);
  border-top-color:#e2e8f6;
  box-shadow:0 -14px 35px rgba(25,52,115,.09);
  backdrop-filter:blur(22px);
}
.bottom-nav button { min-height:64px; }
.bottom-nav button.active { color:#326cff; }
.bottom-nav button.active .nav-icon {
  background:linear-gradient(135deg,#e9f7ff,#eeefff);
  box-shadow:0 6px 18px rgba(50,108,255,.11);
}

/* Screen-specific spacing once the cinematic hero replaces the old headings. */
[data-screen="clone"] .clone-layout,
[data-screen="market"] .market-control-card,
[data-screen="creator"] .creator-stats,
[data-screen="account"] #systemWarning,
[data-screen="account"] #authCard,
[data-screen="account"] #accountCard,
[data-screen="myvoices"] #myVoicesFull {
  margin-top:0;
}

/* Mobile: crop the 3:1 hero slightly taller so the Thai headline remains readable. */
@media (max-width: 720px) {
  .topbar { min-height:70px; padding:10px 14px; }
  .brand img { width:36px; height:36px; }
  .brand-copy b { font-size:20px; }
  .brand-copy strong { font-size:16px; }
  .credit-pill { padding-right:10px; }
  .visual-hero { border-radius:18px; margin-bottom:16px; box-shadow:0 15px 36px rgba(20,47,112,.16); }
  .visual-hero > img { aspect-ratio: 2.35 / 1; object-position:center; }
  .visual-hero-home > img,
  .visual-hero-clone > img,
  .visual-hero-market > img,
  .visual-hero-account > img,
  .visual-hero-creator > img { object-position:47% center; }
  .home-primary { left:3.8%; top:65.5%; width:29%; height:16%; }
  .home-secondary { left:33.5%; top:65.5%; width:19%; height:16%; }
  .clone-primary { left:3.3%; top:63%; width:31.5%; height:16%; }
  .market-primary { left:3.2%; top:67%; width:34%; height:17%; }
  .section-block { margin-top:18px; }
}

@media (max-width: 430px) {
  .screen { padding:12px 10px 25px; }
  .visual-hero { border-radius:16px; }
  .visual-hero > img { aspect-ratio: 2.05 / 1; object-position:48% center; }
  .top-actions { gap:6px; }
  .credit-pill { min-height:40px; }
  .icon-button { width:40px; height:40px; border-radius:12px; }
  .online { display:none; }
  .brand-copy strong { font-size:15px; }
  .metric-card, .quick-card, .workflow-card, .tts-panel, .form-card { border-radius:16px; }
}


/* =========================================================
   v4.4 MOBILE SAFE PATCH
   Fixes cinematic hero cropping on phones and Marketplace
   empty-state CTA/text collisions without changing backend/API.
   ========================================================= */

/* Marketplace empty state gets explicit layout so the CTA can never
   share the same line/flow as its explanatory copy. */
.market-empty-state {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: start;
  gap: 14px;
  padding: clamp(24px, 5vw, 42px) 20px;
}
.market-empty-state .market-empty-art {
  width: min(190px, 58vw);
  min-width: 0;
}
.market-empty-state .market-empty-art img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}
.market-empty-state .market-empty-copy {
  width: min(100%, 520px);
  min-width: 0;
  text-align: center;
}
.market-empty-state .market-empty-copy b {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: clamp(16px, 2.8vw, 20px);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.market-empty-state .market-empty-copy p {
  margin: 7px auto 0;
  color: var(--muted);
  font-size: clamp(12px, 2vw, 14px);
  line-height: 1.65;
  max-width: 460px;
  overflow-wrap: anywhere;
}
.market-empty-state .market-empty-actions {
  width: min(100%, 280px);
  display: flex;
  justify-content: center;
  margin-top: 2px;
}
.market-empty-state .market-empty-actions .btn {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 11px 18px;
  white-space: normal;
  line-height: 1.3;
}

/* Keep generic empty-state buttons from joining text on narrow screens. */
.empty-state > .btn,
.compact-empty > .btn {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* The generated hero artwork already contains its headline and visual CTA.
   On phones it must therefore be shown at its native 3:1 composition.
   Never crop it to a taller aspect ratio with object-fit: cover. */
@media (max-width: 720px) {
  .visual-hero {
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
  }

  .visual-hero > img {
    display: block;
    width: 100%;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  /* Hotspots stay percentage-based against the complete uncropped image. */
  .home-primary { left:5.4%; top:65.5%; width:24.8%; height:15.2%; }
  .home-secondary { left:30.3%; top:65.5%; width:16.3%; height:15.2%; }
  .clone-primary { left:4.3%; top:62.8%; width:26.2%; height:15.3%; }
  .market-primary { left:4.4%; top:67.5%; width:28.7%; height:16.1%; }

  .market-empty-state {
    gap: 12px;
    padding: 28px 16px;
  }

  .market-empty-state .market-empty-art {
    width: min(165px, 52vw);
  }

  .market-empty-state .market-empty-actions {
    width: min(100%, 260px);
  }
}

@media (max-width: 430px) {
  .screen {
    padding-left: 12px;
    padding-right: 12px;
  }

  .visual-hero {
    border-radius: 16px;
    margin-bottom: 16px;
  }

  .visual-hero > img {
    width: 100%;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .market-empty-state {
    padding: 24px 14px 26px;
    border-radius: 18px;
  }

  .market-empty-state .market-empty-copy b {
    font-size: 17px;
  }

  .market-empty-state .market-empty-copy p {
    font-size: 13px;
    line-height: 1.6;
  }

  .market-empty-state .market-empty-actions,
  .market-empty-state .market-empty-actions .btn {
    width: 100%;
  }

  .market-empty-state .market-empty-actions .btn {
    min-height: 50px;
    border-radius: 14px;
  }
}


/* v4.5 Voice Avatar Library */
.avatar-step-card { display: flex; flex-direction: column; gap: 10px; }
.avatar-selected-panel { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 10px; border: 1px solid #dbe7f6; border-radius: 16px; background: linear-gradient(135deg, #f7fbff, #f8f5ff); }
.avatar-selected-panel > img { width: 72px; height: 72px; object-fit: cover; border-radius: 15px; box-shadow: 0 7px 18px rgba(37, 70, 135, .12); }
.avatar-selected-panel > div { min-width: 0; }
.avatar-selected-panel b { display: block; color: #15244a; font-size: 12px; line-height: 1.35; }
.avatar-selected-panel small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.avatar-quick-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.avatar-quick { border: 2px solid transparent; border-radius: 13px; padding: 0; overflow: hidden; background: #eef3fb; aspect-ratio: 1; cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.avatar-quick img { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar-quick:hover { transform: translateY(-1px); }
.avatar-quick.selected { border-color: #5567ff; box-shadow: 0 0 0 3px rgba(85, 103, 255, .11); }

.avatar-dialog { width: min(920px, calc(100vw - 24px)); max-height: 88vh; padding: 0; border: 0; border-radius: 24px; background: transparent; }
.avatar-dialog::backdrop { background: rgba(8, 18, 50, .58); backdrop-filter: blur(6px); }
.avatar-dialog-card { position: relative; max-height: 88vh; overflow: auto; padding: 22px; border-radius: 24px; background: #fff; box-shadow: 0 30px 90px rgba(8, 23, 64, .28); }
.avatar-dialog-card h2 { margin: 4px 0 6px; color: #10204d; font-size: 24px; }
.avatar-dialog-card > p { margin: 0 42px 14px 0; color: #73809d; font-size: 11px; line-height: 1.55; }
.avatar-filter-row { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0 14px; }
.avatar-filter-row button { border: 1px solid #dce4f4; border-radius: 999px; background: #f8faff; color: #5d6885; padding: 8px 13px; font-size: 10px; font-weight: 800; cursor: pointer; }
.avatar-filter-row button.active { border-color: transparent; background: linear-gradient(135deg, #2cb6ff, #6b55ff); color: #fff; }
.avatar-library-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.avatar-choice { position: relative; border: 2px solid transparent; border-radius: 16px; padding: 0 0 8px; overflow: hidden; background: #f7f9fd; color: #263456; text-align: left; cursor: pointer; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.avatar-choice:hover { transform: translateY(-2px); }
.avatar-choice.selected { border-color: #5368ff; box-shadow: 0 8px 24px rgba(83, 104, 255, .15); }
.avatar-choice img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.avatar-choice span { display: block; min-height: 30px; padding: 7px 8px 0; font-size: 9px; font-weight: 800; line-height: 1.3; }
.avatar-choice.selected::after { content: "✓"; position: absolute; top: 7px; right: 7px; width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; background: #5368ff; color: #fff; font-size: 12px; font-weight: 900; box-shadow: 0 4px 12px rgba(25, 40, 120, .25); }

.voice-row-with-avatar { grid-template-columns: 58px 1fr; }
.voice-avatar { width: 58px; height: 58px; object-fit: cover; border-radius: 14px; background: #eef3f8; }
.voice-row-with-avatar .voice-meta { align-self: center; }

.publish-voice-avatar-note { margin-top: 8px; min-height: 46px; border: 1px solid #e2e8f5; border-radius: 12px; background: #f8faff; padding: 7px 9px; color: #7b86a0; font-size: 9px; line-height: 1.4; display: flex; align-items: center; gap: 9px; }
.publish-voice-avatar-note img { width: 38px; height: 38px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; }
.publish-voice-avatar-note span { min-width: 0; }
.publish-voice-avatar-note b { display: block; color: #203052; font-size: 10px; }
.publish-voice-avatar-note small { display: block; color: #7b86a0; margin-top: 2px; font-size: 8px; }

@media (max-width: 900px) {
  .avatar-library-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .avatar-selected-panel { grid-template-columns: 62px minmax(0, 1fr); }
  .avatar-selected-panel > img { width: 62px; height: 62px; }
  .avatar-selected-panel .btn { grid-column: 1 / -1; width: 100%; }
  .avatar-quick-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
  .avatar-library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .avatar-dialog { width: calc(100vw - 12px); max-height: 92vh; }
  .avatar-dialog-card { padding: 17px 13px; border-radius: 20px; }
  .avatar-dialog-card h2 { font-size: 20px; }
  .avatar-choice span { font-size: 8px; }
  .voice-row-with-avatar { grid-template-columns: 52px 1fr; }
  .voice-avatar { width: 52px; height: 52px; border-radius: 13px; }
}


/* v4.6 Marketplace avatar selector */
.publish-avatar-field { display:block; }
.publish-avatar-field > .field-label { display:block; margin-bottom:7px; color:#34415e; font-size:9px; font-weight:800; }
.publish-avatar-card { display:grid; grid-template-columns:64px minmax(0,1fr) auto; gap:11px; align-items:center; min-height:82px; padding:9px; border:1px solid #dce5f5; border-radius:15px; background:linear-gradient(135deg,#f7fbff,#f8f5ff); }
.publish-avatar-card > img { width:64px; height:64px; object-fit:cover; border-radius:13px; background:#eef3fb; box-shadow:0 6px 16px rgba(36,67,137,.10); }
.publish-avatar-card > div { min-width:0; }
.publish-avatar-card b { display:block; color:#1d2b50; font-size:10px; line-height:1.35; }
.publish-avatar-card small { display:block; margin-top:3px; color:#77839f; font-size:8px; line-height:1.45; }
.publish-avatar-card.is-empty { opacity:.72; }
.publish-avatar-card .btn { white-space:nowrap; }
@media (max-width:720px) {
  .publish-avatar-card { grid-template-columns:58px minmax(0,1fr); }
  .publish-avatar-card > img { width:58px; height:58px; }
  .publish-avatar-card .btn { grid-column:1 / -1; width:100%; min-height:44px; }
}


/* v4.6.1 Creator profile avatar selector */
.creator-avatar-field { grid-row: span 2; display:flex; flex-direction:column; gap:7px; }
.creator-avatar-card { display:grid; grid-template-columns:84px minmax(0,1fr); gap:11px; align-items:center; min-height:132px; padding:10px; border:1px solid #dce5f5; border-radius:15px; background:linear-gradient(135deg,#f7fbff,#f8f5ff); }
.creator-avatar-card > img { width:84px; height:96px; object-fit:cover; border-radius:13px; background:#eef3fb; box-shadow:0 6px 16px rgba(36,67,137,.10); }
.creator-avatar-card > div { min-width:0; }
.creator-avatar-card b { display:block; color:#1d2b50; font-size:10px; line-height:1.35; }
.creator-avatar-card small { display:block; margin-top:3px; color:#77839f; font-size:8px; line-height:1.45; }
.creator-avatar-card .btn { grid-column:1 / -1; width:100%; min-height:40px; }
.creator-avatar-note { color:#77839f; font-size:8px; line-height:1.45; }
@media (max-width:720px) {
  .creator-avatar-field { grid-row:auto; }
  .creator-avatar-card { grid-template-columns:66px minmax(0,1fr); min-height:0; }
  .creator-avatar-card > img { width:66px; height:72px; }
  .creator-avatar-card .btn { min-height:44px; }
}


/* v4.6.3 Marketplace listing edit controls */
.market-card.is-owned { border-color:#b9cbff; box-shadow:0 8px 24px rgba(66,91,210,.08); }
.market-edit-btn { color:#3855cf !important; border-color:#cbd6ff !important; background:#f5f7ff !important; }
.publish-form-actions { display:flex; gap:10px; align-items:center; }
.publish-form-actions .btn { flex:1; min-width:0; }
.creator-listing-actions { display:flex; align-items:center; justify-content:flex-end; gap:6px; }
.creator-listing-actions .mini { white-space:nowrap; }
.creator-listing-actions .danger-lite { color:#d94949; border-color:#ffd2d2; background:#fff7f7; }
@media (max-width:720px) {
  .publish-form-actions { flex-direction:column-reverse; }
  .publish-form-actions .btn { width:100%; }
  .creator-listing-actions { grid-column:1 / -1; width:100%; }
  .creator-listing-actions .mini { flex:1; min-height:40px; }
}


/* v4.6.7 Creator marketplace avatar cards */
.creator-listings { gap: 12px; }
.creator-listing-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(31, 66, 84, .05);
}
.creator-listing-media {
  position: relative;
  min-height: 148px;
  background: linear-gradient(180deg, #f0f8fb, #eaf1f5);
}
.creator-listing-avatar, .creator-listing-avatar-placeholder {
  width: 100%;
  height: 100%;
  min-height: 148px;
  display: block;
  object-fit: cover;
}
.creator-listing-avatar-placeholder {
  display: grid;
  place-items: center;
  color: #839199;
  font-size: 26px;
  font-weight: 900;
}
.creator-listing-status {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 24, 58, .72);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  backdrop-filter: blur(10px);
}
.creator-listing-card.status-published .creator-listing-status { background: rgba(18, 140, 119, .86); }
.creator-listing-card.status-unpublished .creator-listing-status { background: rgba(131, 145, 153, .88); }
.creator-listing-body {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 14px;
}
.creator-listing-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.creator-listing-main { min-width: 0; }
.creator-listing-main h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: #1b2a57;
  overflow-wrap: anywhere;
}
.creator-listing-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.45;
}
.creator-listing-price {
  flex: 0 0 auto;
  text-align: right;
  color: var(--orange);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}
.creator-listing-price small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
}
.creator-listing-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.creator-listing-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f5f8ff;
  border: 1px solid #dfe7ff;
  color: #57677b;
  font-size: 8px;
  font-weight: 700;
}
.creator-listing-wave { margin-top: -2px; }
.creator-listing-wave .mini-wave { margin-top: 0; }
.creator-listing-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.creator-listing-actions .mini {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: #3855cf;
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}
.creator-listing-actions .preview {
  width: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 50%;
  color: var(--teal-deep);
  background: var(--surface-soft);
}
.creator-listing-actions .preview.is-playing {
  color: #ffffff;
  background: linear-gradient(135deg, #16b6f0, #6a49ff);
  border-color: transparent;
}
.creator-listing-actions .danger-lite {
  color: #d94949;
  border-color: #ffd2d2;
  background: #fff7f7;
}
@media (max-width: 720px) {
  .creator-listing-card {
    grid-template-columns: 92px minmax(0, 1fr);
    border-radius: 16px;
  }
  .creator-listing-media, .creator-listing-avatar, .creator-listing-avatar-placeholder { min-height: 126px; }
  .creator-listing-body { padding: 11px; gap: 8px; }
  .creator-listing-top { flex-direction: column; gap: 6px; }
  .creator-listing-price { text-align: left; }
  .creator-listing-actions { justify-content: stretch; }
  .creator-listing-actions .mini { flex: 1 1 calc(50% - 8px); }
  .creator-listing-actions .preview { flex: 0 0 38px; }
}
@media (max-width: 480px) {
  .creator-listing-card { grid-template-columns: 86px minmax(0, 1fr); }
  .creator-listing-media, .creator-listing-avatar, .creator-listing-avatar-placeholder { min-height: 118px; }
  .creator-listing-actions .mini { flex: 1 1 100%; }
  .creator-listing-actions .preview { flex: 0 0 38px; }
}

/* ===== v5.0 Payments / Creator Wallet ===== */
.creator-finance-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(31, 65, 130, .055);
}
.wallet-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 9px;
}
.wallet-summary-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e1e8f6;
  border-radius: 15px;
  background: #fff;
}
.wallet-summary-grid small { display:block; color:var(--muted); font-size:8px; }
.wallet-summary-grid b { display:block; margin-top:5px; color:#192957; font-size:15px; overflow-wrap:anywhere; }
.wallet-summary-grid article.available { background:linear-gradient(135deg,#effdf8,#fff); border-color:#c7efe0; }
.wallet-summary-grid article.available b { color:#058b61; }
.wallet-finance-grid { margin-top:10px; display:grid; grid-template-columns:1fr 1fr; gap:10px; align-items:start; }
.wallet-panel { min-width:0; border:1px solid #e1e8f6; border-radius:16px; background:#fff; padding:13px; }
.wallet-panel.full { grid-column:1/-1; }
.wallet-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:10px; }
.wallet-panel-head b { display:block; color:#1b2a57; font-size:12px; }
.wallet-panel-head small { display:block; color:var(--muted); font-size:8px; margin-top:2px; }
.wallet-form { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.wallet-form .full { grid-column:1/-1; }
.wallet-form label,.withdraw-form label { min-width:0; color:#5e6e86; font-size:8.5px; font-weight:800; }
.wallet-form input,.wallet-form select,.withdraw-form input {
  width:100%; min-height:42px; margin-top:5px; border:1px solid #dce5f5; border-radius:11px; background:#fff; padding:9px 11px; color:#1a2851; font:inherit; outline:none;
}
.wallet-form input:focus,.wallet-form select:focus,.withdraw-form input:focus { border-color:#6f8dff; box-shadow:0 0 0 3px rgba(75,111,255,.09); }
.payout-account-current { display:grid; gap:3px; margin-bottom:10px; padding:10px 12px; border-radius:12px; background:#f5f8ff; border:1px solid #dfe7fa; }
.payout-account-current b { font-size:10px; color:#243660; }
.payout-account-current span,.payout-account-current small { color:var(--muted); font-size:8px; }
.withdraw-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:end; }
.withdraw-form .btn { min-height:42px; }
.payout-history { display:grid; gap:7px; }
.payout-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; padding:9px 10px; border:1px solid #e5ebf5; border-radius:12px; background:#fbfcff; }
.payout-row b { display:block; font-size:10px; }
.payout-row small { display:block; margin-top:2px; color:var(--muted); font-size:7.5px; }
.status.failed { background:#fff0f2 !important; color:#d64a5d !important; }

.payment-dialog { width:min(94vw,650px); max-height:90vh; padding:0; border:0; border-radius:24px; background:transparent; overflow:visible; }
.payment-dialog::backdrop { background:rgba(9,18,45,.56); backdrop-filter:blur(8px); }
.payment-dialog-card { position:relative; max-height:88vh; overflow:auto; padding:22px; border:1px solid rgba(255,255,255,.5); border-radius:24px; background:#fff; box-shadow:0 30px 90px rgba(13,29,76,.28); }
.payment-dialog-card h2 { margin:5px 0 12px; font-size:23px; color:#14234f; }
.payment-plan-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 14px; border:1px solid #dfe7f8; border-radius:15px; background:linear-gradient(135deg,#f5f8ff,#fff); }
.payment-plan-summary b,.payment-plan-summary small { display:block; }
.payment-plan-summary b { font-size:12px; color:#1d2e5f; }
.payment-plan-summary small { margin-top:3px; color:var(--muted); font-size:8px; }
.payment-plan-summary strong { font-size:18px; color:#326cff; white-space:nowrap; }
.payment-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:14px; padding:4px; border-radius:13px; background:#f0f4fb; }
.payment-tabs button { min-height:40px; border:0; border-radius:10px; background:transparent; color:#6a7899; font:inherit; font-size:10px; font-weight:800; cursor:pointer; }
.payment-tabs button.active { background:#fff; color:#3159d4; box-shadow:0 4px 14px rgba(43,76,155,.09); }
.payment-pane { display:none; margin-top:14px; }
.payment-pane.active { display:block; }
.payment-intro { padding:14px; border:1px solid #e2e9f7; border-radius:15px; background:#fbfcff; }
.payment-intro b { font-size:12px; color:#1b2a57; }
.payment-intro p { margin:5px 0 12px; color:var(--muted); font-size:9px; line-height:1.55; }
.promptpay-qr { display:grid; justify-items:center; gap:8px; padding:16px; border:1px solid #dce6f7; border-radius:16px; background:#fff; }
.promptpay-qr img { width:min(260px,75vw); aspect-ratio:1/1; object-fit:contain; border-radius:12px; background:#fff; }
.promptpay-qr b { color:#182a5a; font-size:20px; }
.promptpay-qr span { color:#677797; font-size:10px; }
.card-payment-form { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.card-payment-form .full { grid-column:1/-1; }
.card-payment-form label { min-width:0; color:#65738f; font-size:8.5px; font-weight:800; }
.card-payment-form input { width:100%; min-height:44px; margin-top:5px; border:1px solid #dbe4f5; border-radius:11px; padding:9px 11px; font:inherit; outline:none; }
.card-payment-form input:focus { border-color:#7390ff; box-shadow:0 0 0 3px rgba(65,105,255,.09); }
.payment-security { display:block; margin-top:9px; color:#7886a4; font-size:7.5px; line-height:1.5; }
.payment-message { min-height:18px; margin-top:11px; padding:0 2px; color:#687797; font-size:9px; line-height:1.5; }
.payment-message.success { color:#07865e; }
.payment-message.error { color:#d54a5a; }
.payment-message.info { color:#365fd2; }
.orders .order { grid-template-columns:minmax(0,1fr) auto auto auto; }
.orders .order .mini { min-height:32px; padding:5px 9px; font-size:8px; }

@media (max-width:720px) {
  .wallet-summary-grid { grid-template-columns:1fr 1fr; }
  .wallet-finance-grid { grid-template-columns:1fr; }
  .wallet-panel.full { grid-column:auto; }
  .wallet-form { grid-template-columns:1fr; }
  .wallet-form .full { grid-column:auto; }
  .withdraw-form { grid-template-columns:1fr; }
  .payment-dialog-card { padding:18px 14px; border-radius:20px; }
  .card-payment-form { grid-template-columns:1fr 1fr; }
  .card-payment-form label.full,.card-payment-form button.full { grid-column:1/-1; }
  .orders .order { grid-template-columns:minmax(0,1fr) auto; }
  .orders .order > .status,.orders .order > .mini { grid-column:auto; }
}
@media (max-width:430px) {
  .wallet-summary-grid { gap:7px; }
  .wallet-summary-grid article { padding:10px; }
  .wallet-summary-grid b { font-size:13px; }
  .payment-tabs { grid-template-columns:1fr; }
}
.wallet-highlight { background:linear-gradient(135deg,#effdf8,#fff) !important; border-color:#c7efe0 !important; }
.wallet-highlight b { color:#058b61 !important; }
.wallet-two-col { margin-top:10px; display:grid; grid-template-columns:1fr 1fr; gap:10px; align-items:start; }
.finance-provider-badge { display:inline-flex; align-items:center; min-height:26px; padding:5px 9px; border-radius:999px; background:#edf3ff; color:#326cff; font-size:8px; font-weight:900; }
.finance-note { display:block; margin-top:8px; color:#7a88a3; font-size:7.5px; line-height:1.5; }
@media(max-width:720px){.wallet-two-col{grid-template-columns:1fr}}

/* v5.1 — AI Voice Cast additive UI. No existing selectors/contracts changed. */
.voicecast-promo{margin-top:28px;min-height:270px;border:1px solid #d9dff8;border-radius:24px;background:linear-gradient(135deg,#f8f9ff 0%,#fff 55%,#f5f0ff 100%);display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);overflow:hidden;box-shadow:0 14px 36px rgba(62,70,135,.08)}
.voicecast-promo-copy{padding:clamp(22px,4vw,36px);align-self:center}.voicecast-promo h2{margin:5px 0 8px;font-size:clamp(25px,3.8vw,38px);line-height:1.08;color:#17233d}.voicecast-promo h2 em,.voicecast-builder-copy h2 em{font-style:normal;color:#6957e8}.voicecast-promo p{margin:0;max-width:680px;color:var(--muted);font-size:12px;line-height:1.7}.voicecast-usecases{display:flex;flex-wrap:wrap;gap:6px;margin:13px 0}.voicecast-usecases span{padding:6px 9px;border:1px solid #e1e3f5;border-radius:999px;background:#fff;font-size:9px;color:#4e5870}.voicecast-flow{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:12px 0 16px;font-size:9px;color:#5b6380}.voicecast-flow b{padding:6px 8px;border-radius:8px;background:#eeefff;color:#4f50ba}.voicecast-flow i{font-style:normal;color:#9aa0b8}.voicecast-stage{position:relative;min-height:270px;display:flex;flex-direction:column;justify-content:center;align-items:center;background:radial-gradient(circle at 50% 42%,rgba(114,89,238,.18),transparent 48%),linear-gradient(145deg,#141b35,#24214c);color:#fff;overflow:hidden}.cast-wave{font-size:28px;letter-spacing:4px;color:#b7adff;white-space:nowrap;opacity:.9}.cast-people{display:flex;margin:20px 0 14px}.cast-people span{width:52px;height:52px;margin-left:-7px;border:2px solid rgba(255,255,255,.72);border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#7568ef,#403d91);font-size:10px;font-weight:800;box-shadow:0 8px 18px rgba(0,0,0,.2)}.cast-people span:first-child{margin-left:0}.voicecast-stage strong{font-size:19px;letter-spacing:1.5px}.voicecast-stage small{margin-top:5px;font-size:8px;letter-spacing:1.5px;opacity:.62}
.voicecast-page-head{display:flex;gap:14px;align-items:flex-start;margin:0 0 18px}.voicecast-page-head h1{margin:3px 0 4px;font-size:clamp(26px,4vw,38px)}.voicecast-page-head p{margin:0;color:var(--muted);font-size:11px}.voicecast-back{width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:#fff;cursor:pointer;font-size:18px}.voicecast-builder-preview{display:grid;grid-template-columns:1.1fr .9fr;gap:18px;padding:clamp(20px,4vw,34px);border-radius:24px;background:linear-gradient(135deg,#151b35,#2c245a);color:#fff;box-shadow:0 18px 40px rgba(25,29,64,.16)}.voicecast-builder-copy h2{margin:8px 0;font-size:clamp(28px,4vw,42px);line-height:1.08}.voicecast-builder-copy p{max-width:650px;color:#c9cbe0;font-size:11px;line-height:1.7}.voicecast-flow.large b{background:rgba(255,255,255,.1);color:#ddd8ff}.voicecast-script-demo{display:grid;gap:9px;align-content:center}.voicecast-script-demo div{padding:12px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(255,255,255,.07)}.voicecast-script-demo span{font-size:8px;color:#afa5ff;font-weight:800}.voicecast-script-demo p{margin:4px 0 0;font-size:10px;color:#f4f4fa}.voicecast-plan-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.voicecast-plan-grid article{padding:18px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:0 8px 22px rgba(30,67,80,.045)}.voicecast-plan-grid article.featured{border-color:#9e91ff;background:linear-gradient(180deg,#fbfaff,#f5f2ff)}.voicecast-plan-grid article>span{font-size:8px;font-weight:800;letter-spacing:1px;color:#6858dd}.voicecast-plan-grid strong{display:block;margin-top:8px;font-size:34px;line-height:1;color:#1e2941}.voicecast-plan-grid h3{margin:3px 0 8px;font-size:13px}.voicecast-plan-grid p{min-height:44px;margin:0 0 12px;color:var(--muted);font-size:9px;line-height:1.55}.voicecast-plan-grid article>b{font-size:9px;color:#6957e8}.voicecast-note{margin:12px 0 0;color:var(--muted);font-size:8.5px}
@media(max-width:760px){.voicecast-promo{grid-template-columns:1fr}.voicecast-stage{min-height:190px}.voicecast-promo-copy{padding:18px}.voicecast-promo h2{font-size:25px}.voicecast-builder-preview{grid-template-columns:1fr;padding:18px;border-radius:18px}.voicecast-plan-grid{grid-template-columns:1fr 1fr}.voicecast-page-head p{font-size:9px}.cast-people span{width:44px;height:44px}.voicecast-flow{gap:5px}.voicecast-flow b{font-size:8px}}
@media(max-width:420px){.voicecast-plan-grid article{padding:13px}.voicecast-plan-grid p{font-size:8px}.voicecast-usecases span{font-size:8px}.voicecast-promo .hero-actions{align-items:flex-start;flex-direction:column}}

/* v5.1.1 — Voice Cast cinematic hero upgrade. Additive override only. */
.voicecast-promo{
  position:relative;
  min-height:350px;
  grid-template-columns:minmax(0,1fr);
  border:1px solid rgba(121,98,255,.28);
  background:#101327 url('/ai-voice-cast-hero.png') center center/cover no-repeat;
  box-shadow:0 18px 44px rgba(28,25,73,.18);
}
.voicecast-promo::before{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(8,13,27,.96) 0%,rgba(10,15,30,.90) 34%,rgba(12,16,31,.54) 58%,rgba(12,16,31,.10) 100%);
}
.voicecast-promo-copy{position:relative;z-index:2;width:min(58%,720px);padding:clamp(28px,4vw,48px)}
.voicecast-promo .section-kicker{color:#d1a9ff;letter-spacing:.14em;text-shadow:0 1px 12px rgba(182,110,255,.25)}
.voicecast-promo h2{font-family:"Noto Sans Thai","Leelawadee UI",Tahoma,sans-serif;font-size:clamp(32px,4.3vw,52px);font-weight:800;line-height:1.12;letter-spacing:-.025em;color:#fff;text-shadow:0 3px 18px rgba(0,0,0,.38)}
.voicecast-promo h2 em{font-weight:800;background:linear-gradient(90deg,#c36bff,#ff5fa2,#ff9b5b);-webkit-background-clip:text;background-clip:text;color:transparent}
.voicecast-promo p{max-width:620px;color:rgba(255,255,255,.83);font-size:12px;line-height:1.75;text-shadow:0 2px 8px rgba(0,0,0,.45)}
.voicecast-promo .voicecast-usecases span{border-color:rgba(255,255,255,.18);background:rgba(8,13,27,.62);backdrop-filter:blur(10px);color:#f3f4ff}
.voicecast-promo .voicecast-flow b{background:rgba(103,87,232,.22);border:1px solid rgba(171,153,255,.18);color:#ebe7ff;backdrop-filter:blur(8px)}
.voicecast-promo .voicecast-flow i{color:rgba(255,255,255,.65)}
.voicecast-promo .btn.text{color:#fff;background:rgba(11,15,31,.58);border:1px solid rgba(255,255,255,.2);backdrop-filter:blur(10px);padding:11px 16px;border-radius:12px}
.voicecast-promo .btn.primary{box-shadow:0 10px 28px rgba(93,76,255,.28)}
.voicecast-promo .voicecast-stage{display:none}
@media(max-width:760px){
  .voicecast-promo{min-height:430px;background-position:62% center}
  .voicecast-promo::before{background:linear-gradient(180deg,rgba(7,12,25,.82) 0%,rgba(8,13,27,.75) 35%,rgba(8,13,27,.95) 72%,rgba(8,13,27,.98) 100%)}
  .voicecast-promo-copy{width:100%;align-self:end;padding:22px 18px}
  .voicecast-promo h2{font-size:31px}
  .voicecast-promo p{font-size:10px}
}

/* v5.1.2 — Voice Cast page hero unified with homepage cinematic set. */
.voicecast-builder-preview{
  position:relative;
  isolation:isolate;
  min-height:360px;
  overflow:hidden;
  gap:18px;
  padding:clamp(26px,4vw,44px);
  border:1px solid rgba(181,151,255,.34);
  border-radius:24px;
  background:#101327 url('/ai-voice-cast-hero.png') center 43%/cover no-repeat;
  color:#fff;
  box-shadow:0 20px 46px rgba(28,22,62,.18);
}
.voicecast-builder-preview::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(90deg,rgba(7,11,25,.97) 0%,rgba(8,12,27,.90) 35%,rgba(9,12,28,.60) 58%,rgba(8,11,24,.38) 100%);
}
.voicecast-builder-preview::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(180deg,rgba(85,51,159,.06),rgba(0,0,0,.18));
}
.voicecast-builder-copy{position:relative;z-index:2;align-self:center;max-width:650px}
.voicecast-builder-copy .eyebrow{color:#d4afff;letter-spacing:.14em;text-shadow:0 2px 12px rgba(194,103,255,.22)}
.voicecast-builder-copy h2{
  margin:10px 0 12px;
  font-family:"Noto Sans Thai","Leelawadee UI",Tahoma,sans-serif;
  font-size:clamp(34px,4.5vw,52px);
  font-weight:800;
  line-height:1.12;
  letter-spacing:-.025em;
  color:#fff;
  text-shadow:0 3px 18px rgba(0,0,0,.48);
}
.voicecast-builder-copy h2 em{
  font-weight:800;
  background:linear-gradient(90deg,#c36bff,#ff5fa2,#ff9b5b);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.voicecast-builder-copy p{max-width:600px;color:rgba(255,255,255,.84);font-size:11px;line-height:1.8;text-shadow:0 2px 8px rgba(0,0,0,.45)}
.voicecast-builder-preview .voicecast-flow.large b{background:rgba(17,18,39,.66);border:1px solid rgba(255,255,255,.16);color:#f2efff;backdrop-filter:blur(9px);box-shadow:0 8px 18px rgba(0,0,0,.12)}
.voicecast-builder-preview .voicecast-flow.large i{color:rgba(255,255,255,.68)}
.voicecast-script-demo{position:relative;z-index:2;align-self:end;margin-top:auto;padding-top:150px}
.voicecast-script-demo div{border:1px solid rgba(255,255,255,.17);background:rgba(9,12,28,.64);backdrop-filter:blur(12px);box-shadow:0 10px 26px rgba(0,0,0,.16)}
.voicecast-script-demo span{color:#d3adff}.voicecast-script-demo p{color:#fff}
@media(max-width:760px){
  .voicecast-builder-preview{min-height:520px;background-position:63% center;padding:22px 18px;align-content:end}
  .voicecast-builder-preview::before{background:linear-gradient(180deg,rgba(7,11,25,.35) 0%,rgba(7,11,25,.58) 34%,rgba(7,11,25,.94) 64%,rgba(7,11,25,.98) 100%)}
  .voicecast-builder-copy{align-self:end;margin-top:180px}
  .voicecast-builder-copy h2{font-size:32px}
  .voicecast-script-demo{padding-top:0;margin-top:4px}
}

/* v5.1.3 — Voice Cast clean interactive hero. No baked UI/text used as background. */
.voicecast-builder-preview{position:relative;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);min-height:340px;gap:0;padding:0;overflow:hidden;border:1px solid rgba(126,104,238,.28);border-radius:24px;background:linear-gradient(135deg,#11162d 0%,#1c193d 58%,#11162d 100%);box-shadow:0 18px 42px rgba(26,28,64,.16)}
.voicecast-builder-preview::before,.voicecast-builder-preview::after{display:none!important;content:none!important}
.voicecast-builder-copy{position:relative;z-index:2;align-self:center;max-width:none;padding:42px 18px 42px 42px}
.voicecast-builder-copy h2{margin:10px 0 12px;font-family:"Noto Sans Thai","Leelawadee UI",Tahoma,sans-serif;font-size:clamp(34px,4.1vw,50px);font-weight:800;line-height:1.12;letter-spacing:-.025em;color:#fff;text-shadow:none}
.voicecast-builder-copy h2 em{font-style:normal;background:linear-gradient(90deg,#b969ff,#ff5ea8,#ff9362);-webkit-background-clip:text;background-clip:text;color:transparent}
.voicecast-builder-copy p{max-width:600px;color:#cdd1e5;font-size:11px;line-height:1.8;text-shadow:none}
.voicecast-builder-preview .voicecast-flow.large b{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);color:#f1efff;backdrop-filter:none}
.voicecast-photo{position:relative;min-height:340px;margin:0;overflow:hidden;background:#0d1226}
.voicecast-photo::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#181834 0%,rgba(24,24,52,.15) 22%,rgba(7,10,20,.04) 72%,rgba(7,10,20,.18) 100%)}
.voicecast-photo img{width:100%;height:100%;min-height:340px;display:block;object-fit:cover;object-position:center 38%}
.voicecast-hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.voicecast-hero-actions .btn.text{color:#fff;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.06)}
.voicecast-plan-grid article{transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.voicecast-plan-grid article.selected{border-color:#765cff;background:linear-gradient(180deg,#fbfaff,#f1edff);box-shadow:0 12px 28px rgba(93,76,255,.15);transform:translateY(-2px)}
.voicecast-plan-btn{width:100%;min-height:36px;margin-top:4px;border:1px solid #d9d5ff;border-radius:10px;background:#f5f3ff;color:#5c49d8;font:inherit;font-size:9px;font-weight:800;cursor:pointer}.voicecast-plan-btn:hover,.voicecast-plan-grid article.selected .voicecast-plan-btn{background:#6754e8;border-color:#6754e8;color:#fff}
@media(max-width:760px){.voicecast-builder-preview{grid-template-columns:1fr;min-height:0}.voicecast-builder-copy{padding:24px 18px}.voicecast-builder-copy h2{font-size:32px}.voicecast-photo{min-height:230px;order:-1}.voicecast-photo img{min-height:230px}.voicecast-photo::after{background:linear-gradient(180deg,rgba(12,15,30,.02) 55%,#171733 100%)}.voicecast-hero-actions{align-items:stretch}.voicecast-hero-actions .btn{flex:1 1 160px}}

/* v5.1.4 — Functional Voice Cast Studio */
.voicecast-workspace{margin-top:28px;padding:24px;border:1px solid #e0e3f4;border-radius:24px;background:linear-gradient(180deg,#fff,#fafaff);box-shadow:0 14px 36px rgba(31,37,77,.06)}
.voicecast-plan-badge,.voicecast-mini-badge{display:inline-flex;align-items:center;justify-content:center;padding:7px 11px;border-radius:999px;background:#efedff;color:#5b4bd6;font-size:9px;font-weight:800}
.voicecast-studio-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(320px,.92fr);gap:14px}.voicecast-panel{padding:20px;border:1px solid #e2e5f2;border-radius:18px;background:#fff}.voicecast-panel-head{display:flex;justify-content:space-between;gap:12px}.voicecast-label{display:block;margin-bottom:5px;font-size:13px;font-weight:800;color:#1c2740}.voicecast-help{margin:0 0 12px;color:#7a849b;font-size:9px;line-height:1.6}.voicecast-script-input{width:100%;min-height:230px;resize:vertical;padding:14px;border:1px solid #dce1ee;border-radius:14px;background:#fbfcff;color:#18223a;font:inherit;font-size:11px;line-height:1.7;outline:none}.voicecast-script-input:focus{border-color:#7662ef;box-shadow:0 0 0 3px rgba(118,98,239,.09)}.voicecast-script-meta{display:flex;justify-content:space-between;margin:7px 2px 12px;color:#8b94a8;font-size:8.5px}.voicecast-character-list{display:grid;gap:8px;max-height:330px;overflow:auto}.voicecast-character-row{display:grid;grid-template-columns:minmax(90px,.65fr) minmax(150px,1.35fr);gap:10px;align-items:center;padding:11px;border:1px solid #e5e7f2;border-radius:13px;background:#fbfbfe}.voicecast-character-name{font-size:10px;font-weight:800;color:#222d47}.voicecast-character-name small{display:block;margin-top:2px;color:#9299aa;font-size:8px;font-weight:500}.voicecast-character-row select{width:100%;min-height:36px;padding:0 10px;border:1px solid #dce0eb;border-radius:10px;background:#fff;color:#27314a;font:inherit;font-size:9px}.voicecast-empty{padding:35px 15px;text-align:center;border:1px dashed #d9ddeb;border-radius:14px;color:#939bad;font-size:9px}.voicecast-review,.voicecast-result{margin-top:20px;padding-top:20px;border-top:1px solid #e8eaf3}.voicecast-lines,.voicecast-audio-list{display:grid;gap:8px}.voicecast-line{display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px;padding:11px 13px;border:1px solid #e5e7f1;border-radius:12px;background:#fff}.voicecast-line strong{font-size:9px;color:#6957e8}.voicecast-line span{font-size:9.5px;color:#414b61;line-height:1.55}.voicecast-generate-bar{position:sticky;bottom:70px;z-index:5;display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:14px;padding:13px 15px;border:1px solid #ddd9ff;border-radius:15px;background:rgba(255,255,255,.95);box-shadow:0 12px 28px rgba(36,39,75,.12);backdrop-filter:blur(12px)}.voicecast-generate-bar strong{display:block;font-size:10px}.voicecast-generate-bar small{display:block;margin-top:2px;color:#8a92a5;font-size:8px}.voicecast-audio-item{display:grid;grid-template-columns:110px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 12px;border:1px solid #e5e7f1;border-radius:13px;background:#fff}.voicecast-audio-item strong{font-size:9px;color:#5d50ce}.voicecast-audio-item audio{width:100%;height:34px}.voicecast-audio-item a{font-size:9px;font-weight:800;color:#5d50ce;text-decoration:none}.voicecast-progress{height:6px;margin-top:9px;overflow:hidden;border-radius:99px;background:#eceefa}.voicecast-progress>i{display:block;width:0;height:100%;background:linear-gradient(90deg,#6b5cf0,#d95cff);transition:width .2s ease}
@media(max-width:760px){.voicecast-workspace{padding:16px;border-radius:18px}.voicecast-studio-grid{grid-template-columns:1fr}.voicecast-character-row{grid-template-columns:1fr}.voicecast-line{grid-template-columns:90px 1fr}.voicecast-generate-bar{bottom:74px;align-items:stretch;flex-direction:column}.voicecast-generate-bar .btn{width:100%}.voicecast-audio-item{grid-template-columns:1fr}.voicecast-audio-item audio{width:100%}}


/* v5.1.5 — Voice Cast uses the authenticated Voice Library directly. */
.voicecast-library-status{display:flex;align-items:center;gap:10px;padding:9px 11px;margin-bottom:9px;border:1px solid #dfe5fb;border-radius:12px;background:#f8faff;color:#17233d}.voicecast-library-status b{font-size:10px}.voicecast-library-status span{font-size:9px;color:var(--muted);margin-right:auto}.voicecast-empty b,.voicecast-empty span{display:block;margin-bottom:7px}.voicecast-character-row select{background-color:#fff;color:#17233d}

/* v5.1.6 Voice Cast Master Timeline */
.voicecast-result-sub{margin:5px 0 0;color:#7d879d;font-size:9px}.voicecast-master-card{padding:18px;border:1px solid #dedff0;border-radius:18px;background:linear-gradient(145deg,#fff,#faf9ff);box-shadow:0 12px 32px rgba(40,42,80,.07)}.voicecast-master-audio{display:block;width:100%;height:42px}.voicecast-timeline{display:flex;gap:3px;min-height:54px;margin:14px 0 16px;padding:8px;border-radius:13px;background:#f0f1f8;overflow:hidden}.voicecast-timeline-segment{position:relative;display:flex;align-items:flex-end;min-width:28px;padding:7px 6px;border:0;border-radius:9px;background:linear-gradient(135deg,#6a5cf0,#a75af1);color:#fff;cursor:pointer;overflow:hidden;transition:transform .15s ease,filter .15s ease}.voicecast-timeline-segment:nth-child(3n+2){background:linear-gradient(135deg,#16a8ef,#6a6cf4)}.voicecast-timeline-segment:nth-child(3n){background:linear-gradient(135deg,#d35bcf,#ff7c76)}.voicecast-timeline-segment:hover{transform:translateY(-2px);filter:brightness(1.05)}.voicecast-timeline-segment span{position:relative;z-index:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:8px;font-weight:800}.voicecast-master-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap}.voicecast-segment-details{margin-top:14px;border:1px solid #e4e5f0;border-radius:16px;background:#fff;overflow:hidden}.voicecast-segment-details>summary{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:15px 17px;cursor:pointer;list-style:none}.voicecast-segment-details>summary::-webkit-details-marker{display:none}.voicecast-segment-details>summary b{display:block;color:#222c45;font-size:10px}.voicecast-segment-details>summary small{display:block;margin-top:3px;color:#8b94a7;font-size:8px;font-weight:500}.voicecast-segment-details>summary>span:last-child{white-space:nowrap;color:#6557dc;font-size:9px;font-weight:800}.voicecast-segment-details[open]>summary{border-bottom:1px solid #ececf4}.voicecast-segment-details .voicecast-audio-list{padding:12px}.voicecast-audio-item{grid-template-columns:minmax(105px,.45fr) minmax(0,1fr) auto auto}.voicecast-audio-item .voicecast-regenerate{min-height:30px;padding:0 10px;border:1px solid #d9daf0;border-radius:9px;background:#f8f7ff;color:#5d50ce;font:inherit;font-size:8px;font-weight:800;cursor:pointer}.voicecast-audio-item.is-working{opacity:.6;pointer-events:none}
@media(max-width:760px){.voicecast-master-card{padding:13px}.voicecast-timeline{overflow-x:auto}.voicecast-timeline-segment{min-width:55px}.voicecast-master-actions{display:grid;grid-template-columns:1fr}.voicecast-master-actions .btn{width:100%}.voicecast-audio-item{grid-template-columns:1fr}.voicecast-segment-details>summary{align-items:flex-start}}

/* v5.1.7 — simple Auto Director surface; complex delivery logic stays behind the UI */
.voicecast-auto-director{display:flex;align-items:center;gap:10px;margin:12px 0 2px;padding:11px 13px;border:1px solid #e4defe;border-radius:13px;background:linear-gradient(135deg,#faf9ff,#fff8fc)}
.voicecast-auto-director>span{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#eee9ff;font-size:14px}.voicecast-auto-director div{min-width:0}.voicecast-auto-director b{display:block;font-size:9.5px;color:#312a61}.voicecast-auto-director small{display:block;margin-top:2px;color:#858da1;font-size:8px}.voicecast-auto-director em{margin-left:auto;padding:5px 8px;border-radius:999px;background:#ece9ff;color:#6554d9;font-size:7.5px;font-style:normal;font-weight:800;white-space:nowrap}
.voicecast-audio-item strong small{display:block;margin-top:3px;color:#8a82bc;font-size:7px;font-weight:600}
@media(max-width:760px){.voicecast-auto-director{align-items:flex-start}.voicecast-auto-director em{margin-top:3px}}

/* v5.2.2 RunPod transcript quality guard */
.transcript-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:6px; color:#7b8e95; font-size:10px; }
.transcript-status { font-weight:700; }
.transcript-status.ready, .voice-transcript-state.ready { color:#16826f; }
.transcript-status.warning, .voice-transcript-state.warning { color:#b86b18; }
.transcript-confirm { margin-top:10px; padding:10px 11px; border:1px solid #dce9e9; border-radius:12px; background:#f8fbfb; }
.voice-transcript-state { font-weight:700; }
.transcript-dialog { width:min(calc(100% - 28px), 560px); }
.transcript-dialog textarea { min-height:170px; margin-top:6px; }
.transcript-dialog .transcript-confirm { margin-top:12px; }
.transcript-dialog button:disabled { opacity:.5; cursor:not-allowed; }
@media (max-width: 640px) {
  .transcript-meta { align-items:flex-start; }
  .transcript-dialog textarea { min-height:150px; }
}


/* v5.2.3 Voice Modifier — light professional surface */
.voice-modifier{margin:18px 0 16px;padding:22px;border:1px solid #cfe6db;border-radius:22px;background:linear-gradient(145deg,#effaf5 0%,#e7f6ef 100%);box-shadow:0 16px 38px rgba(34,91,69,.10);overflow:hidden;position:relative;color:#18372d}
.voice-modifier:before{content:"";position:absolute;inset:0 auto auto 0;width:100%;height:3px;background:linear-gradient(90deg,transparent,#69c99a 18%,#42b77e 50%,#69c99a 82%,transparent)}
.voice-modifier .section-kicker{color:#2d9a6f}
.voice-modifier-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.voice-modifier-head h3{margin:3px 0 4px;font-size:1.12rem;color:#19382e}.voice-modifier-head p{margin:0;color:#687d75;font-size:.9rem;line-height:1.55}
.modifier-reset{border:1px solid #c8dfd5;background:rgba(255,255,255,.78);color:#3b6555;border-radius:12px;padding:9px 12px;cursor:pointer;white-space:nowrap;box-shadow:0 3px 10px rgba(43,98,77,.05);transition:background .16s ease,border-color .16s ease,transform .16s ease}.modifier-reset:hover{background:#fff;border-color:#9bcbb7;transform:translateY(-1px)}
.modifier-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.modifier-control{display:block;padding:15px;border:1px solid #d8e9e1;border-radius:16px;background:rgba(255,255,255,.88);box-shadow:0 8px 22px rgba(48,105,83,.055)}
.modifier-label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px}.modifier-label b{font-size:.94rem;color:#263d35}.modifier-label output{font-variant-numeric:tabular-nums;color:#247f5d;font-weight:800;background:#e9f8f1;border:1px solid #c8eadb;padding:4px 8px;border-radius:999px;min-width:58px;text-align:center}
.modifier-control input[type="range"]{width:100%;accent-color:#3fb17b;cursor:pointer}.modifier-scale{display:flex;justify-content:space-between;margin-top:7px;color:#80928b;font-size:.72rem}.modifier-scale i{font-style:normal}
.modifier-presets{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:14px}.modifier-presets>span{color:#71857d;font-size:.82rem;margin-right:2px}.modifier-preset{border:1px solid #d2e5dc;background:rgba(255,255,255,.82);color:#536d63;padding:7px 11px;border-radius:999px;cursor:pointer;font-size:.8rem;box-shadow:0 2px 8px rgba(48,105,83,.035);transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease}.modifier-preset:hover{border-color:#9fcfba;background:#f8fffb;color:#267a59;transform:translateY(-1px)}.modifier-preset.active{border-color:#79c6a5;background:#dff5ea;color:#18724f;font-weight:800}
.modifier-note{margin:12px 0 0;color:#74877f;font-size:.78rem;line-height:1.5}
@media(max-width:760px){.voice-modifier{padding:16px;border-radius:18px}.voice-modifier-head{align-items:center}.voice-modifier-head p{font-size:.8rem}.modifier-grid{grid-template-columns:1fr;gap:10px}.modifier-control{padding:12px}.modifier-reset{padding:8px 10px;font-size:.78rem}.modifier-presets{gap:6px}}


/* v5.2.4 Isan dialect phase 1 */
.dialect-label { margin-top: 14px; }
.dialect-select { font-weight: 750; }
.dialect-hint { margin-top: 8px; border: 1px solid #dce9e7; border-radius: 12px; background: #f8fcfb; padding: 9px 11px; display: flex; gap: 8px; align-items: flex-start; color: #60736f; font-size: 9px; line-height: 1.5; }
.dialect-hint b { flex: 0 0 auto; color: #166b5f; font-size: 9.5px; }
.dialect-hint.isan { border-color: #d6e7bc; background: linear-gradient(135deg,#fbfff6,#f4faea); }
.dialect-hint.isan b { color: #557522; }
.dialect-badge { display: inline-flex; vertical-align: middle; align-items: center; min-height: 20px; margin-left: 5px; padding: 2px 7px; border-radius: 999px; font-size: 7.5px; font-weight: 850; letter-spacing: .01em; }
.dialect-badge.central { background: #edf8f6; color: #176b60; }
.dialect-badge.isan { background: #f0f7df; color: #587424; }
.tts-dialect-hint { display: block; margin-top: 7px; color: #6b7d78; font-size: 8.5px; line-height: 1.5; }
.tts-dialect-hint b { color: #176b60; }
.tts-dialect-hint.isan { border-left: 3px solid #92b850; padding-left: 8px; color: #62734b; }
.tts-dialect-hint.isan b { color: #557522; }

#downloadBtn[aria-disabled="true"]{opacity:.5;cursor:wait;pointer-events:none}.modifier-control input[type="range"]{min-height:32px;touch-action:pan-y}.voice-modifier:before{pointer-events:none}

@font-face{font-family:'AIV Thai';font-style:normal;font-display:swap;font-weight:400;src:url('/assets/fonts/noto-sans-thai-thai-400-normal.woff2') format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'AIV Thai';font-style:normal;font-display:swap;font-weight:400;src:url('/assets/fonts/noto-sans-thai-latin-400-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+2000-206F}
@font-face{font-family:'AIV Thai';font-style:normal;font-display:swap;font-weight:700;src:url('/assets/fonts/noto-sans-thai-thai-700-normal.woff2') format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'AIV Thai';font-style:normal;font-display:swap;font-weight:700;src:url('/assets/fonts/noto-sans-thai-latin-700-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+2000-206F}
body.ui-v44-mobile-safe,body.ui-v44-mobile-safe button,body.ui-v44-mobile-safe input,body.ui-v44-mobile-safe textarea,body.ui-v44-mobile-safe select{font-family:"AIV Thai","Noto Sans Thai","Leelawadee UI",Tahoma,Arial,sans-serif}
