:root {
  --paper: #f4efe6;
  --paper-2: #e9e2d6;
  --card: #fffdf8;
  --ink: #1c1915;
  --mute: #6b645b;
  --line: #e4dcd0;
  --mint: #128a62;
  --mint-ink: #06281d;
  --logo: #3ddc97;
  --spark: #a78bfa;
  --mark: #141816;
  --shadow: 0 16px 40px rgba(28, 25, 21, 0.06);
  --sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  color-scheme: light;
}
html.dark {
  --paper: #101311;
  --paper-2: #181c19;
  --card: #171b18;
  --ink: #f4efe6;
  --mute: #b1aa9e;
  --line: #2c332e;
  --mint: #3ddc97;
  --mint-ink: #06281d;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}
button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.4; }
img { max-width: 100%; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.logo {
  width: 32px;
  height: 32px;
  flex: none;
  background: url("../assets/favicon.svg") center / contain no-repeat;
}
.top, .wrap, .foot { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
}
.brand strong { display: block; font-size: 14px; line-height: 1; }
.brand small { display: block; margin-top: 4px; color: var(--mute); font-size: 12px; }
.nav { display: none; gap: 20px; margin-left: 18px; }
.nav a { color: var(--mute); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--ink); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn, .send {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  flex: none;
}
.send { background: var(--mint); border-color: transparent; }
.btn {
  height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
}
.btn-mint { background: var(--mint); color: var(--mint-ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn.wide { width: calc(100% - 24px); margin: 0 12px; }
.hero {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 56px;
  display: grid;
  gap: 28px;
}
.kicker { margin: 0; color: var(--mint); font-size: 14px; font-weight: 600; }
h1, h2 { font-family: var(--display); font-weight: 560; letter-spacing: -0.03em; line-height: 1.08; }
h1 { margin: 10px 0 0; font-size: 40px; }
h1 em { font-style: italic; color: var(--mint); }
h2 { margin: 0; font-size: 32px; }
.lede, .sub { color: var(--mute); }
.lede { font-size: 17px; max-width: 38rem; }
.cta-row { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.fine { color: var(--mute); font-size: 13px; }
.fine.center { text-align: center; margin: 8px 0 0; }
.panel, .card, .voice-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.panel { padding: 12px; }
.panel-head, .voice-top, .rail-top, .stage-bar { display: flex; align-items: center; gap: 10px; }
.panel-head { padding: 6px 6px 10px; }
.panel-head strong, .panel-head small { display: block; }
.panel-head small { color: var(--mute); font-size: 12px; }
.dot { width: 8px; height: 8px; margin-left: auto; border-radius: 99px; background: var(--mint); }
.log, .thread { overflow-y: auto; }
.log { height: 280px; padding: 8px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 92%; animation: rise 360ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.msg.user { margin-left: auto; }
.who { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--mint); }
.msg.user .who { text-align: right; color: var(--mute); }
.bubble { margin: 0; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.msg.user .bubble { background: var(--ink); color: var(--paper); border-radius: 18px; padding: 10px 12px; }
.composer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  padding: 6px;
}
.composer textarea {
  flex: 1;
  min-height: 44px;
  max-height: 140px;
  resize: none;
  border: 0;
  background: transparent;
  padding: 10px 8px;
  outline: none;
}
.chips, .pills { display: flex; gap: 8px; overflow-x: auto; padding: 10px 4px 2px; }
.chips button, .pills button, .pick {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--mute);
  border-radius: 999px;
}
.chips button { font-size: 12px; padding: 8px 12px; text-align: left; }
.pills button { height: 40px; padding: 0 14px; flex: none; font-size: 14px; }
.pills button[aria-checked="true"], .pick[aria-checked="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.pick {
  border-radius: 16px;
  text-align: left;
  padding: 12px 14px;
  color: var(--ink);
}
.pick strong { display: block; font-size: 14px; }
.pick span { display: block; margin-top: 4px; color: var(--mute); font-size: 14px; line-height: 1.45; }
.pick[aria-checked="true"] { background: var(--paper-2); color: var(--ink); border-color: var(--mint); }
.pick[aria-checked="true"] span { color: var(--mute); }
.band { border-top: 1px solid var(--line); padding: 56px 0; }
.band.alt { background: var(--paper-2); }
.picks { display: grid; gap: 10px; margin-top: 18px; }
.quote { font-family: var(--display); font-size: 20px; }
.cards, .features { display: grid; gap: 12px; margin-top: 18px; }
.card, .features article {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 20px;
  padding: 18px;
}
.card h3, .features h3 { margin: 0 0 6px; font-size: 16px; }
.card p, .features p { margin: 0; color: var(--mute); font-size: 14px; }
.foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--mute);
  font-size: 14px;
}
#studio[hidden], .voice[hidden], #stop[hidden], .scrim[hidden] { display: none; }
#studio {
  display: flex;
  height: 100dvh;
  background: var(--paper);
}
.rail {
  display: none;
  width: 288px;
  flex: none;
  flex-direction: column;
  gap: 12px;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 8px 0 12px;
}
.rail.open {
  display: flex;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: min(320px, 86vw);
  box-shadow: var(--shadow);
}
.scrim { position: fixed; inset: 0; background: rgba(16, 19, 17, 0.45); z-index: 25; }
.history { flex: 1; overflow-y: auto; padding: 0 8px; }
.hist {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  border-radius: 16px;
  padding: 0;
}
.hist.on, .hist:hover { background: var(--paper-2); }
.hist button.open {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: none;
  border: 0;
  padding: 10px 12px;
}
.hist .t { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist .m { display: block; margin-top: 2px; color: var(--mute); font-size: 12px; }
.rail-foot { border-top: 1px solid var(--line); padding: 12px; }
.label { margin: 0 0 8px; color: var(--mute); font-size: 12px; font-weight: 600; }
.picks.compact .pick span { display: none; }
.stage { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.stage-bar { border-bottom: 1px solid var(--line); padding: 8px; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.thread { flex: 1; padding: 22px 16px 12px; }
.thread-inner { width: min(680px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.empty h1 { font-size: 32px; }
.prompt {
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  margin-top: 8px;
}
.prompt:hover { border-color: var(--mint); }
.dock { border-top: 1px solid var(--line); padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
.dock .composer { width: min(680px, 100%); margin: 0 auto; }
.dea-name { display: flex; align-items: center; gap: 8px; color: var(--mint); font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.typing { display: flex; gap: 5px; padding: 6px 0; }
.typing i {
  width: 6px; height: 6px; border-radius: 99px; background: var(--mint);
  animation: blink 1.1s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: 150ms; }
.typing i:nth-child(3) { animation-delay: 300ms; }
.voice {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 19, 17, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}
.voice-card { width: min(440px, 100%); padding: 18px; }
.orb {
  width: 148px;
  height: 148px;
  margin: 28px auto;
  border-radius: 999px;
  border: 1px solid var(--mint);
  display: grid;
  place-items: center;
  background: var(--paper-2);
  animation: pulse 2.6s ease-in-out infinite;
}
.orb span {
  width: 84px; height: 84px; border-radius: 999px; background: var(--mint);
  display: grid; place-items: center;
}
.voice-note { min-height: 48px; text-align: center; color: var(--mute); font-size: 14px; }
.i-moon, .i-sun, .i-mic, .i-send, .i-x, .i-menu {
  width: 18px; height: 18px; display: block; background: currentColor;
}
html.dark .i-moon, html:not(.dark) .i-sun { display: none; }
.i-moon {
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M21 14.5A8.5 8.5 0 0 1 9.5 3 7 7 0 1 0 21 14.5z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M21 14.5A8.5 8.5 0 0 1 9.5 3 7 7 0 1 0 21 14.5z'/></svg>") center / contain no-repeat;
}
.i-sun {
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='4' fill='black'/><path stroke='black' stroke-width='2' d='M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M19.1 4.9l-1.4 1.4M6.3 17.7l-1.4 1.4'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='4' fill='black'/><path stroke='black' stroke-width='2' d='M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M19.1 4.9l-1.4 1.4M6.3 17.7l-1.4 1.4'/></svg>") center / contain no-repeat;
}
.i-mic {
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3zm-7-3h2a5 5 0 0 0 10 0h2a7 7 0 0 1-6 6.9V21h3v2H8v-2h3v-3.1A7 7 0 0 1 5 11z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3zm-7-3h2a5 5 0 0 0 10 0h2a7 7 0 0 1-6 6.9V21h3v2H8v-2h3v-3.1A7 7 0 0 1 5 11z'/></svg>") center / contain no-repeat;
}
.i-send {
  background: var(--mint-ink);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M3 11.5 21 3l-8.2 18-2.3-7.2z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M3 11.5 21 3l-8.2 18-2.3-7.2z'/></svg>") center / contain no-repeat;
}
.i-x {
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path stroke='black' stroke-width='2' d='M6 6l12 12M18 6 6 18'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path stroke='black' stroke-width='2' d='M6 6l12 12M18 6 6 18'/></svg>") center / contain no-repeat;
}
.i-menu {
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path stroke='black' stroke-width='2' d='M4 7h16M4 12h16M4 17h16'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path stroke='black' stroke-width='2' d='M4 7h16M4 12h16M4 17h16'/></svg>") center / contain no-repeat;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@media (min-width: 720px) {
  .nav { display: flex; }
  .cta-row { flex-direction: row; align-items: center; }
  .hero { grid-template-columns: 1.05fr 0.95fr; align-items: center; margin-top: 64px; }
  h1 { font-size: 60px; }
  .picks { grid-template-columns: repeat(3, 1fr); }
  .cards, .features { grid-template-columns: 1fr 1fr; }
  .foot { flex-direction: row; justify-content: space-between; }
  .rail { display: flex; }
  .only-mobile { display: none; }
  .voice { align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .msg, .orb, .typing i { animation: none; }
}

/* ---------- Login (lembar masuk) ---------- */
.login-card { max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; }
.login-card form { display: grid; gap: 10px; margin-top: 10px; }
.login-card input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.login-card input:focus { outline: 2px solid var(--mint); outline-offset: 1px; }
.login-card button:disabled, .login-card input:disabled { opacity: 0.55; }
.login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.login-or { margin: 14px 0 0; text-align: center; color: var(--mute); font-size: 13px; }
.login-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.login-msg { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; border: 1px solid #d9534f66; color: #c0392b; font-size: 14px; }
.login-msg.ok { border-color: var(--line); background: var(--paper); color: var(--ink); }
.login-msg[hidden], #login-main[hidden], #login-recovery[hidden], #login-akun[hidden] { display: none; }
.wide-btn { width: 100%; margin-top: 12px; }
.login-card .fine a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.stage-bar [data-auth] { height: 44px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 720px) { #login.voice { align-items: center; } }

.login-grid .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.login-grid .btn svg { width: 18px; height: 18px; flex: none; }
