/* SecretWare Voice — tema terang oranye + teal. */
:root {
  --orange: #f26b12;
  --orange-deep: #d9560a;
  --orange-soft: #fff1e6;
  --orange-line: #ffd8bd;
  --teal: #0f9f97;
  --teal-deep: #0a7a74;
  --teal-soft: #e6f6f4;
  --teal-line: #bfe7e2;
  --ink: #12282c;
  --ink-2: #3a5458;
  --muted: #6c8386;
  --bg: #fffaf4;
  --surface: #ffffff;
  --surface-2: #fbf6f0;
  --line: #f0e3d4;
  --danger: #d6343c;
  --danger-soft: #fdecec;
  --ok: #0f9f6e;
  --grad: #f26b12;     /* tanpa gradasi: semua aksen warna solid */
  --grad-btn: #e8600c;
  --radius: 20px;
  --shadow-sm: 0 1px 2px rgba(18, 40, 44, 0.06);
  --shadow: 0 2px 6px rgba(18, 40, 44, 0.05), 0 16px 40px -12px rgba(18, 40, 44, 0.16);
  --shadow-orange: 0 10px 28px -10px rgba(242, 107, 18, 0.55);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--teal-deep); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.error { color: var(--danger); font-size: 14px; min-height: 1.2em; margin: 10px 0 0; }

/* ---------------------------------------------------------------- Navigasi */
.nav, .topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(255, 250, 244, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(240, 227, 212, 0.8);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 600; }
.brand img { width: 34px; height: 34px; transition: transform 0.5s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.brand b { font-weight: 800; color: var(--orange); }
.brand em { font-style: normal; font-weight: 600; color: var(--muted); font-size: 15px; }
.nav-links { display: flex; gap: 6px; }
.nav-links a, .top-actions a {
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 8px 14px; border-radius: 999px; transition: background 0.2s;
}
.nav-links a:hover { background: var(--orange-soft); color: var(--orange-deep); }
.nav-session, .top-actions { display: flex; align-items: center; gap: 10px; }
.user-chip {
  font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.status-chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-deep);
  white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis;
}
.status-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; position: relative; flex: none; }
.status-chip .dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor;
  animation: ping 1.8s ease-out infinite;
}
.status-chip.busy, .status-chip.cpu { background: var(--orange-soft); color: var(--orange-deep); }
.status-chip.off { background: var(--danger-soft); color: var(--danger); }
.status-chip.off .dot::after { animation: none; }
@keyframes ping { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(1.8); opacity: 0; } }
@media (max-width: 720px) {
  .user-chip { display: none; }
  .brand em { display: none; }
  #nav-public a:first-child { display: none; }
  .status-chip { max-width: 170px; }
}
@media (max-width: 560px) {
  body.in-studio .brand span { display: none; } /* di studio cukup logo, supaya status & Keluar muat */
  .nav { gap: 8px; }
}

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 40px; }
.site-footer, footer {
  text-align: center; font-size: 13px; color: var(--muted); padding: 22px 16px 28px;
  border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.5);
}

/* ---------------------------------------------------------------- Tombol */
.btn, button.primary, button.ghost, button {
  font: inherit; cursor: pointer; border: 0; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, color 0.2s;
}
button { padding: 10px 16px; font-weight: 600; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
button:hover { border-color: var(--orange-line); }
button:disabled { opacity: 0.65; cursor: progress; }
.btn-primary, button.primary {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--grad-btn); color: #fff; font-weight: 700; border: 0;
  padding: 12px 20px; box-shadow: var(--shadow-orange);
}
.btn-primary:hover:not(:disabled), button.primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(242, 107, 18, 0.7); }
.btn-primary:active:not(:disabled), button.primary:active:not(:disabled) { transform: translateY(0) scale(0.99); }
button.primary { width: 100%; margin-top: 16px; }
.btn-ghost, button.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
.btn-ghost:hover, button.ghost:hover { background: var(--surface); border-color: var(--orange-line); color: var(--orange-deep); }
.btn-soft { background: var(--teal-soft); color: var(--teal-deep); border: 1px solid var(--teal-line); font-weight: 700; padding: 9px 14px; }
.btn-soft:hover { background: #d8f1ee; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.btn-xl { padding: 17px 24px; font-size: 17px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn svg, button svg { width: 18px; height: 18px; flex: none; }
.link-btn { background: none; border: 0; padding: 0 2px; color: var(--teal-deep); font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid rgba(15, 159, 151, 0.45); outline-offset: 2px; }

/* ---------------------------------------------------------------- Form */
label { display: block; font-weight: 700; font-size: 14px; margin: 16px 0 7px; color: var(--ink); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:hover, select:hover, textarea:hover { border-color: var(--orange-line); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15, 159, 151, 0.14); }
textarea { resize: vertical; }
select {
  appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230a7a74' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input[type="checkbox"] { width: auto; accent-color: var(--orange); }

.field {
  display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-weight: 500;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 0 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15, 159, 151, 0.14); }
.field svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.field input { border: 0; padding: 14px 0; background: transparent; box-shadow: none !important; }
.field.locked { background: var(--surface-2); }
.field.locked input { color: var(--ink-2); }
#code { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 22px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase; }
#code::placeholder { font-family: "Plus Jakarta Sans", sans-serif; letter-spacing: 0; font-size: 15px; font-weight: 500; text-transform: none; }

.alert {
  display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding: 11px 14px; border-radius: 14px;
  background: var(--danger-soft); color: var(--danger); border: 1px solid #f7c9cb; font-size: 14px; font-weight: 600;
  animation: shake 0.45s var(--ease);
}
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* ---------------------------------------------------------------- Landing */
.hero { display: grid; place-items: center; min-height: calc(100vh - 160px); padding: 32px 0; }
.access-card { width: 100%; max-width: 460px; }
/* Layar sempit: kotak akses langsung di bawah judul, gelombang & fitur sesudahnya. */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { display: contents; }
  .hero .eyebrow { order: 1; justify-self: start; }
  .hero h1 { order: 2; }
  .hero .lead { order: 3; }
  .access-card { order: 4; margin-top: 24px; }
  .wave-demo { order: 5; }
  .feature-row { order: 6; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--teal-deep);
  background: var(--surface); border: 1px solid var(--teal-line); padding: 6px 14px 6px 10px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.hero h1 { font-size: clamp(34px, 5.2vw, 58px); font-weight: 800; margin: 18px 0 16px; }
.grad-text {
  background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s ease-in-out infinite alternate;
}
@keyframes shine { to { background-position: 100% 0; } }
.lead { font-size: clamp(15px, 1.4vw, 17px); color: var(--ink-2); max-width: 560px; margin: 0; }

.wave-demo {
  display: flex; align-items: center; gap: 5px; height: 74px; margin: 28px 0 26px; padding: 0 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  max-width: 560px; position: relative;
}
.wave-demo .play-orb {
  width: 46px; height: 46px; border-radius: 50%; flex: none; margin-right: 10px;
  display: grid; place-items: center; color: #fff; background: var(--grad-btn); box-shadow: var(--shadow-orange);
  animation: pulse 2.4s ease-in-out infinite;
}
.wave-demo .play-orb svg { width: 18px; height: 18px; margin-left: 2px; }
.wave-demo .bar {
  flex: 1; min-width: 3px; height: 30%; border-radius: 999px; background: var(--grad); background-size: 1200% 100%;
  animation: wave 1.3s ease-in-out infinite; animation-delay: calc(var(--i) * -0.09s);
  background-position: calc(var(--i) * 4%) 0;
}
@keyframes wave { 0%, 100% { height: 18%; } 50% { height: var(--h, 80%); } }
@media (max-width: 560px) {
  .wave-demo { gap: 3px; padding: 0 12px; }
  .wave-demo .bar { min-width: 2px; }
  #wave-bars .bar:nth-child(n + 27) { display: none; }
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 107, 18, 0.45); } 50% { box-shadow: 0 0 0 12px rgba(242, 107, 18, 0); } }

.feature-row { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 600px; }
@media (max-width: 560px) { .feature-row { grid-template-columns: 1fr; } }
.feature-row li {
  background: rgba(255, 255, 255, 0.8); border: 1px solid var(--line); border-radius: 18px; padding: 14px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}
.feature-row li:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--orange-line); }
.feature-row b { display: block; font-size: 14px; margin-top: 10px; }
.feature-row small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 2px; }
.f-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
.f-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.f-ico.orange { background: var(--orange-soft); color: var(--orange-deep); }
.f-ico.teal { background: var(--teal-soft); color: var(--teal-deep); }
.f-ico.mix { background: var(--teal-soft); color: var(--ink); }

/* Kartu akses + stepper */
.access-card {
  position: relative; background: var(--surface); border-radius: 28px; padding: 28px clamp(20px, 3vw, 32px) 26px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.access-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.access-card .muted { margin: 0 0 18px; font-size: 14px; }
.stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.step span {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
  background: var(--surface-2); border: 1.5px solid var(--line); transition: all 0.4s var(--ease);
}
.step.is-active { color: var(--ink); }
.step.is-active span { background: var(--grad-btn); color: #fff; border-color: transparent; box-shadow: var(--shadow-orange); }
.step.is-done span { background: var(--teal); color: #fff; border-color: transparent; }
.step-line { flex: 1; height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.step-line i { display: block; height: 100%; width: 0; background: var(--grad); transition: width 0.6s var(--ease); }
.stepper[data-step="2"] .step-line i { width: 100%; }
.pane { animation: pane-in 0.5s var(--ease); }
@keyframes pane-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.hint-sm { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; display: flex; gap: 6px; align-items: center; justify-content: center; }
.link-sm { display: block; text-align: center; font-size: 13px; font-weight: 600; margin-top: 14px; }

/* Cara kerja */
.how { padding: 36px 0 12px; }
.how > h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; text-align: center; }
.how > p { text-align: center; color: var(--muted); margin: 6px 0 0; }
.how-steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
@media (max-width: 760px) { .how-steps { grid-template-columns: 1fr; } }
.how-steps li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; position: relative;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.how-steps li:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.how-steps .num {
  width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff;
  background: var(--grad-btn); box-shadow: var(--shadow-orange); margin-bottom: 14px;
}
.how-steps li:nth-child(2) .num { background: var(--orange); }
.how-steps li:nth-child(3) .num { background: var(--teal); box-shadow: 0 10px 28px -10px rgba(15, 159, 151, 0.6); }
.how-steps b { font-size: 16px; }
.how-steps p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }

/* Animasi muncul saat discroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- Studio */
.studio { padding-top: 26px; animation: pane-in 0.5s var(--ease); }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 980px) { .studio-grid { grid-template-columns: 1fr; } }
.panel, .card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 26px); box-shadow: var(--shadow);
}
.results { position: sticky; top: 84px; }
@media (max-width: 980px) { .results { position: static; } }

.notice {
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; padding: 13px 15px;
  border-radius: 16px; font-size: 13.5px; animation: pane-in 0.45s var(--ease);
}
.notice.cpu { background: var(--orange-soft); border: 1px solid var(--orange-line); color: #8a3a06; }
.notice b { display: block; font-size: 14px; color: var(--orange-deep); }
.notice p { margin: 3px 0 0; line-height: 1.5; }
.notice p b { display: inline; font-size: inherit; }
.notice-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--orange-deep); }
.notice-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.mode-switch {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; margin-bottom: 20px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px;
}
.mode-switch button {
  position: relative; z-index: 1; background: transparent; border: 0; color: var(--ink-2); font-weight: 700; padding: 11px 10px;
}
.mode-switch button[aria-selected="true"] { color: #fff; }
.mode-indicator {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 12px;
  background: var(--grad-btn); box-shadow: var(--shadow-orange); transition: transform 0.45s var(--ease), background 0.45s;
}
.mode-switch[data-active="clone"] .mode-indicator { transform: translateX(100%); background: var(--teal-deep); box-shadow: 0 10px 28px -10px rgba(15, 159, 151, 0.6); }

.editor-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.editor-head label { margin: 0; font-size: 15px; }
.editor-tools { display: flex; align-items: center; gap: 8px; }
.chip-btn { font-size: 12.5px; padding: 6px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-weight: 700; }
.chip-btn:hover { background: var(--orange-soft); color: var(--orange-deep); border-color: var(--orange-line); }
.counter { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ring { width: 22px; height: 22px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--teal); stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 94.25; transition: stroke-dashoffset 0.3s, stroke 0.3s; }
.counter.near .ring-fg { stroke: var(--orange); }
.counter.near { color: var(--orange-deep); }
#text { min-height: 170px; font-size: 15.5px; line-height: 1.65; border-radius: 16px; padding: 14px 16px; }

.select-field { margin: 16px 0 0; }
.select-field select { margin-top: 7px; font-weight: 500; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }
.mode-pane { animation: pane-in 0.45s var(--ease); }

.chip-group { margin-top: 18px; }
.group-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { margin: 0; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-2);
  transition: all 0.25s var(--ease);
}
.chip:hover span { border-color: var(--orange-line); transform: translateY(-1px); }
.chip input:checked + span { background: var(--orange-soft); border-color: var(--orange); color: var(--orange-deep); box-shadow: 0 6px 16px -10px rgba(242, 107, 18, 0.8); }
.chip input:focus-visible + span { outline: 3px solid rgba(15, 159, 151, 0.45); outline-offset: 2px; }
.chip-hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }

/* Dropzone + rekam */
.dropzone {
  border: 2px dashed var(--teal-line); border-radius: 20px; background: #f6fcfb;
  padding: 22px; text-align: center; transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.dropzone.drag { border-color: var(--orange); background: var(--orange-soft); transform: scale(1.01); }
.dz-icon { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 18px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-deep); }
.dz-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dropzone b { display: block; font-size: 15px; }
.dz-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 12px 0 10px; }
.dropzone small { color: var(--muted); font-size: 12.5px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); display: inline-block; }
.btn-rec .rec-dot { box-shadow: 0 0 0 3px rgba(214, 52, 60, 0.18); }
.dz-recording { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rec-visual { display: flex; align-items: center; gap: 4px; height: 40px; }
.rec-visual i { width: 4px; border-radius: 999px; background: var(--danger); height: 20%; animation: wave 0.9s ease-in-out infinite; animation-delay: calc(var(--i) * -0.12s); --h: 95%; }
.rec-time { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 18px; }
.rec-time small { font-weight: 600; }
.dz-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; }
.file-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-btn); color: #fff; }
.file-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dz-file b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.dz-file small { display: block; }
.dz-file audio { grid-column: 1 / -1; width: 100%; height: 38px; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 18px; line-height: 1; }

/* Checkbox asli disembunyikan tanpa menghalangi klik; label + kotak tampilan yang menerima klik. */
.consent input, .switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.consent { position: relative; display: flex; gap: 12px; align-items: flex-start; font-weight: 500; font-size: 13.5px; color: var(--ink-2); cursor: pointer; margin-top: 16px; }
.consent .box {
  width: 22px; height: 22px; flex: none; border-radius: 7px; border: 2px solid var(--teal-line); background: var(--surface);
  display: grid; place-items: center; transition: all 0.2s var(--ease); margin-top: 1px;
}
.consent .box::after { content: ""; width: 10px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) scale(0); transition: transform 0.2s var(--ease); margin-top: -3px; }
.consent input:checked + .box { background: var(--teal); border-color: var(--teal); }
.consent input:checked + .box::after { transform: rotate(-45deg) scale(1); }
.consent input:focus-visible + .box { outline: 3px solid rgba(15, 159, 151, 0.45); outline-offset: 2px; }

/* Pengaturan lanjutan */
.advanced { margin-top: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.advanced summary {
  cursor: pointer; list-style: none; padding: 13px 16px; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 10px;
}
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary svg { width: 18px; height: 18px; fill: none; stroke: var(--teal-deep); stroke-width: 2; stroke-linecap: round; }
.advanced summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--muted); transition: transform 0.3s var(--ease); }
.advanced[open] summary::after { transform: rotate(45deg); }
.adv-body { padding: 0 16px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
@media (max-width: 560px) { .adv-body { grid-template-columns: 1fr; } }
.adv-body .full { grid-column: 1 / -1; }
.range-field { margin: 10px 0 0; font-size: 13px; }
.range-field .rf-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.range-field output { font-size: 12px; font-weight: 800; color: var(--orange-deep); background: var(--orange-soft); padding: 2px 9px; border-radius: 999px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; padding: 0; height: 6px; border: 0; border-radius: 999px; box-shadow: none !important;
  background: linear-gradient(90deg, var(--orange) var(--fill, 50%), var(--line) var(--fill, 50%));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--orange);
  box-shadow: 0 2px 8px rgba(242, 107, 18, 0.35); cursor: grab; transition: transform 0.15s;
}
input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.18); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--orange); }
.switch { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; font-size: 13.5px; margin: 12px 0 0; cursor: pointer; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background 0.25s; }
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.25s var(--ease);
}
.switch input:checked + .track { background: var(--teal); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid rgba(15, 159, 151, 0.45); outline-offset: 2px; }
.switch small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }

/* Tombol generate */
.generate { margin-top: 22px; }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i { width: 3px; border-radius: 2px; background: #fff; height: 30%; animation: wave 0.8s ease-in-out infinite; animation-delay: calc(var(--i) * -0.15s); --h: 100%; }
.gen-busy { display: inline-flex; align-items: center; gap: 10px; }

/* ---------------------------------------------------------------- Hasil */
.results-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.results-head h2 { font-size: 18px; font-weight: 800; }
.count-pill { font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-deep); }
.empty { text-align: center; padding: 30px 10px 26px; }
.empty .mini-wave { display: flex; justify-content: center; align-items: center; gap: 4px; height: 56px; margin-bottom: 12px; }
.empty .mini-wave i { width: 5px; border-radius: 999px; background: var(--grad); background-size: 900% 100%; background-position: calc(var(--i) * 12%) 0; height: 20%; animation: wave 1.6s ease-in-out infinite; animation-delay: calc(var(--i) * -0.14s); --h: 90%; opacity: 0.85; }
.empty b { display: block; font-size: 15px; }
.empty p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-height: calc(100vh - 200px); overflow-y: auto; padding-right: 2px; }
@media (max-width: 980px) { .result-list { max-height: none; } }
.result {
  border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: var(--surface);
  animation: result-in 0.6s var(--ease);
}
.result.fresh { border-color: var(--orange-line); box-shadow: 0 0 0 4px var(--orange-soft); }
@keyframes result-in { from { opacity: 0; transform: translateY(-14px) scale(0.97); } to { opacity: 1; transform: none; } }
.result-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.tag { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--orange-soft); color: var(--orange-deep); }
.tag.teal { background: var(--teal-soft); color: var(--teal-deep); }
.tag.plain { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.snippet { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.player { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.play-btn {
  width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 0; color: #fff; background: var(--grad-btn);
  box-shadow: var(--shadow-orange);
}
.play-btn:hover { transform: scale(1.06); }
.play-btn svg { width: 18px; height: 18px; }
.play-btn .i-pause { display: none; }
.player.playing .play-btn .i-play { display: none; }
.player.playing .play-btn .i-pause { display: block; }
.wave-canvas { width: 100%; height: 46px; cursor: pointer; display: block; }
.p-time { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 74px; text-align: right; }
.result-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.result-actions a, .result-actions button {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; text-decoration: none;
  padding: 7px 12px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-deep); border: 1px solid var(--teal-line);
}
.result-actions svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- Toast */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 36px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 16px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600; box-shadow: 0 16px 40px -12px rgba(18, 40, 44, 0.5);
  animation: toast-in 0.45s var(--ease);
}
.toast.ok { background: var(--teal-deep); }
.toast.err { background: var(--danger); }
.toast.out { animation: toast-out 0.35s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* ---------------------------------------------------------------- Admin & halaman lain */
.narrow { max-width: 440px; margin: 10vh auto 0; }
.card h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.card h2 { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.pill { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--teal-soft); color: var(--teal-deep); }
.pill.warn { background: var(--orange-soft); color: var(--orange-deep); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; margin-top: 26px; }
@media (max-width: 860px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-grid h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#panel > .card { margin-top: 20px !important; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.steps-list { padding-left: 18px; margin: 12px 0 0; }
.steps-list li { margin: 4px 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.card-head input { max-width: 260px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; }
tbody tr { transition: background 0.2s; }
tbody tr:hover { background: var(--surface-2); }
td code { font-size: 13px; }
.webhook-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.webhook-list li { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--surface-2); }
.webhook-list .meta { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.webhook-list .pill { white-space: normal; }
.webhook-list summary { cursor: pointer; font-size: 13px; margin-top: 6px; }
.webhook-list pre { font-size: 12px; overflow-x: auto; background: var(--surface); padding: 10px; border-radius: 10px; max-height: 320px; border: 1px solid var(--line); }
.prose { max-width: 780px; margin: 30px auto 0; }
.prose h1 { margin-bottom: 14px; }
.prose h2 { margin-top: 24px; }
.prose li { margin: 6px 0; }

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

/* Halaman login hanya berisi kotak akses. */
body:not(.in-studio) .site-footer { display: none; }

/* ---------------------------------------------------------------- Dropdown kustom (selalu membuka ke bawah) */
.dd { position: relative; margin-top: 7px; }
.dd.open { z-index: 30; }
.dd-native { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.dd-toggle {
  width: 100%; justify-content: space-between; text-align: left; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 11px 14px; font-weight: 500; color: var(--ink);
}
.dd-toggle:hover { border-color: var(--orange-line); }
.dd.open .dd-toggle, .dd-toggle:focus-visible { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15, 159, 151, 0.14); }
.dd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-chevron { width: 12px !important; height: 8px !important; fill: none; stroke: var(--teal-deep); stroke-width: 2; stroke-linecap: round; transition: transform 0.25s var(--ease); }
.dd.open .dd-chevron { transform: rotate(180deg); }
.dd-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 220px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px;
  box-shadow: 0 18px 40px -12px rgba(18, 40, 44, 0.25); animation: dd-in 0.18s var(--ease);
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.dd-search {
  display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px;
  background: var(--surface-2); border: 1.5px solid var(--line);
}
.dd-search:focus-within { border-color: var(--teal); }
.dd-search svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.dd-search input { border: 0; background: transparent; padding: 10px 0; box-shadow: none !important; font-size: 14px; }
.dd-list { list-style: none; margin: 6px 0 0; padding: 0 2px 0 0; max-height: 288px; overflow-y: auto; overscroll-behavior: contain; }
.dd-group {
  position: sticky; top: 0; z-index: 1; background: var(--surface);
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  padding: 10px 10px 5px;
}
.dd-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; border-radius: 10px; font-size: 14px; cursor: pointer; color: var(--ink-2);
}
.dd-option.active { background: var(--orange-soft); color: var(--ink); }
.dd-option[aria-selected="true"] { color: var(--orange-deep); font-weight: 700; }
.dd-option[aria-selected="true"]::after {
  content: ""; width: 10px; height: 5px; flex: none; margin-top: -3px;
  border: 2px solid currentColor; border-top: 0; border-right: 0; transform: rotate(-45deg);
}
.dd-empty { margin: 4px 0 2px; padding: 14px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* Tombol reset pengaturan lanjutan */
.adv-actions { display: flex; justify-content: flex-end; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.adv-actions svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
