: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; }

/* Saklar pencatatan obrolan di jendela profil */
.chatlog-set { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.chatlog-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.chatlog-txt { display: grid; gap: 2px; font-size: 14px; }
.chatlog-txt small { color: var(--mute); font-size: 12.5px; }
.login-card .chatlog-row input { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; padding: 0; border: 0; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; }
.login-card .chatlog-row input::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.login-card .chatlog-row input:checked { background: var(--mint); }
.login-card .chatlog-row input:checked::after { transform: translateX(18px); }
.chatlog-set .fine { margin: 8px 0 0; }

/* ===== Halaman awal ala Felo (tahap 1) — semua di bawah #home / .h-* ===== */
#home[hidden], .h-scrim[hidden], .h-sub[hidden], .h-chip-extra[hidden], .h-compat { display: none; }
.h-app {
  --hb: #ffffff; --hs: #f7f7f7; --hl: #e8e8ea; --ht: #18181b; --hm: #71717a;
  --hp: #ec4899; --hp2: #8b5cf6; --hpsoft: #fdf2f8;
  --hf: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  display: flex; min-height: 100vh; min-height: 100dvh;
  background: var(--hb); color: var(--ht); font-family: var(--hf);
}
html.dark .h-app { --hb: #0f0f12; --hs: #17171b; --hl: #2a2a31; --ht: #f4f4f5; --hm: #a1a1aa; --hpsoft: #2a1424; }
.h-app button, .h-app textarea { font-family: inherit; }
.lu { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.h-side {
  width: 240px; flex: none; background: var(--hs); border-right: 1px solid var(--hl);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh;
  padding: 14px 12px; transition: margin-left .2s ease;
}
.h-app.collapsed .h-side { margin-left: -240px; }
.h-side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 14px; }
.h-brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; font-size: 18px; }
.h-logo { width: 30px; height: 30px; }
.h-ico {
  width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent;
  color: var(--hm); border-radius: 10px; cursor: pointer;
}
.h-ico:hover { background: var(--hl); color: var(--ht); }
.h-menu { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.h-item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px;
  border: 0; background: transparent; color: var(--ht); border-radius: 10px;
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; text-align: left;
}
.h-item:hover { background: var(--hl); }
.h-item.sm { height: 34px; font-weight: 500; padding-left: 20px; color: var(--hm); }
.h-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-new { background: var(--hb); border: 1px solid var(--hl); margin-bottom: 6px; }
.h-new kbd {
  font: 500 11px ui-monospace, monospace; color: var(--hm); border: 1px solid var(--hl);
  border-radius: 6px; padding: 1px 5px; background: var(--hs);
}
.h-chev { width: 14px; height: 14px; color: var(--hm); }
#h-more[aria-expanded="true"] .h-chev { transform: rotate(180deg); }
.h-label { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; padding: 0 10px; font-size: 14px; font-weight: 600; }
.h-hist { display: flex; flex-direction: column; gap: 1px; }
.h-hist button {
  height: 34px; padding: 0 10px 0 38px; border: 0; background: transparent; color: var(--hm);
  border-radius: 8px; text-align: left; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
.h-hist button:hover { background: var(--hl); color: var(--ht); }
.h-hist p { margin: 0; padding: 4px 10px 0 38px; font-size: 12px; color: var(--hm); }
.h-side-foot { display: flex; align-items: center; gap: 4px; padding-top: 12px; border-top: 1px solid var(--hl); }
.h-me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.h-me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-avatar { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; background: #e4e4e7; color: #fff; flex: none; }
.h-avatar.sm { width: 24px; height: 24px; }
.h-avatar .lu { width: 15px; height: 15px; }
.i-m, .i-s { display: none; }
html:not(.dark) .i-m, html.dark .i-s { display: block; }
.h-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.h-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; }
#h-open { display: none; }
.h-app.collapsed #h-open { display: grid; }
.h-top-r { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.h-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px;
  background: var(--hs); color: var(--ht); font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--hl);
}
.h-pill .lu { width: 14px; height: 14px; }
.h-pill.h-dark { background: #18181b; color: #fff; border-color: #18181b; }
html.dark .h-pill.h-dark { background: #f4f4f5; color: #18181b; border-color: #f4f4f5; }
.h-login { padding: 0 4px 0 12px; gap: 8px; }
.h-login button { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; padding: 0; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 20px 40px; text-align: center; }
.h-title { margin: 0; font: 700 32px/1.2 var(--hf); letter-spacing: -0.02em; }
.h-sub-title { margin: 8px 0 0; color: var(--hm); font-size: 14px; }
.h-badge {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  background: var(--hb); border: 1px solid var(--hl); border-radius: 99px; color: var(--hm);
  font-size: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.05); cursor: pointer;
}
.h-badge b { color: var(--ht); font-weight: 600; }
.h-badge .lu:first-child { color: var(--hp); width: 14px; height: 14px; }
.h-badge .lu:last-child { width: 12px; height: 12px; }
.h-box {
  width: min(720px, 100%); margin-top: 22px; background: var(--hb); border: 1px solid var(--hl);
  border-radius: 16px; box-shadow: 0 6px 24px rgba(24,24,27,.07); padding: 12px 12px 10px; text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.h-box:focus-within { border-color: var(--hp); box-shadow: 0 6px 28px rgba(236,72,153,.16); }
.h-box textarea {
  width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: var(--ht);
  font-size: 15px; line-height: 1.5; min-height: 48px; max-height: 180px; padding: 4px 6px;
}
.h-box textarea::placeholder { color: var(--hm); }
.h-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.h-bar-l, .h-bar-r { display: flex; align-items: center; gap: 6px; }
.h-round {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 99px; flex: none;
  border: 1px solid var(--hl); background: var(--hb); color: var(--ht); cursor: pointer;
}
.h-round.plain { border-color: transparent; color: var(--hm); }
.h-round .lu { width: 16px; height: 16px; }
.h-tool {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px;
  border: 1px solid var(--hl); background: var(--hb); color: var(--ht); font-size: 13px; font-weight: 500; cursor: pointer;
}
.h-tool.icon { width: 32px; padding: 0; justify-content: center; }
.h-tool .lu { width: 15px; height: 15px; }
.h-tool[aria-pressed="true"], .h-tool.on { color: var(--hp); border-color: var(--hp); background: var(--hpsoft); }
.h-pro-l { font-size: 13px; font-weight: 600; margin-left: 4px; }
.h-switch { width: 36px; height: 20px; border-radius: 99px; border: 0; background: #d4d4d8; padding: 2px; cursor: pointer; flex: none; }
.h-switch i { display: block; width: 16px; height: 16px; border-radius: 99px; background: #fff; transition: transform .15s; }
.h-switch[aria-checked="true"] { background: var(--hp); }
.h-switch[aria-checked="true"] i { transform: translateX(16px); }
.h-send {
  width: 34px; height: 34px; border-radius: 99px; border: 0; display: grid; place-items: center; flex: none;
  background: var(--hp); color: #fff; cursor: pointer; margin-left: 2px;
}
.h-send:hover { background: #db2777; }
.h-send .lu { width: 17px; height: 17px; stroke-width: 2.4; }
.h-hint {
  width: min(720px, 100%); margin-top: 6px; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-radius: 10px; background: #fffbeb; color: #b45309; font-size: 13px; text-align: left;
}
html.dark .h-hint { background: #2a2208; color: #fbbf24; }
.h-hint button { border: 0; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; padding: 0; }
.h-hint .lu { width: 14px; height: 14px; }
.h-chips { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 720px; }
.h-chip-extra { display: contents; }
.h-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px;
  background: var(--hb); border: 1px solid var(--hl); color: var(--ht); font-size: 13px; font-weight: 500; cursor: pointer;
}
.h-chip:hover { border-color: var(--hp); background: var(--hpsoft); }
.h-chip .lu { width: 15px; height: 15px; color: var(--hm); }
.h-chip.icon { width: 40px; padding: 0; justify-content: center; }
.h-chip em { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.h-chip em.hot { color: #dc2626; background: #fee2e2; }
.h-chip em.new { color: #7c3aed; background: #ede9fe; }
.h-foot { padding: 16px 20px 20px; text-align: center; color: var(--hm); font-size: 12px; }
.h-foot p { margin: 0 0 6px; }
.h-foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; }
.h-foot-links span, .h-foot-links a { color: var(--hm); text-decoration: none; padding: 0 10px; border-left: 1px solid var(--hl); }
.h-foot-links > :first-child { border-left: 0; }
.h-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #18181b; color: #fff;
  padding: 10px 16px; border-radius: 12px; font: 500 13px var(--hf, sans-serif); z-index: 40; max-width: calc(100% - 32px);
}
.h-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 19; }
@media (max-width: 860px) {
  .h-side { position: fixed; left: 0; top: 0; z-index: 20; margin-left: -260px; width: 250px; transition: margin-left .22s ease; }
  .h-app.drawer .h-side { margin-left: 0; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .h-app.collapsed .h-side { margin-left: -260px; }
  .h-app.drawer.collapsed .h-side { margin-left: 0; }
  #h-open { display: grid; }
  .h-hide-sm { display: none; }
  .h-top { padding: 12px 14px; }
  .h-center { justify-content: flex-start; padding-top: 12vh; }
  .h-title { font-size: 28px; }
  .h-bar-r .h-pro-l { display: none; }
}

/* ===== Halaman thread ala Felo (tahap 2) — di bawah #studio ===== */
#studio {
  --hb: #ffffff; --hs: #f7f7f7; --hl: #e8e8ea; --ht: #18181b; --hm: #71717a;
  --hp: #ec4899; --hpsoft: #fdf2f8;
  --hf: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  background: var(--hb); color: var(--ht); font-family: var(--hf);
}
html.dark #studio { --hb: #0f0f12; --hs: #17171b; --hl: #2a2a31; --ht: #f4f4f5; --hm: #a1a1aa; --hpsoft: #2a1424; }
#studio button, #studio textarea { font-family: inherit; }
/* sidebar */
#studio .rail { background: var(--hs); border-right: 1px solid var(--hl); width: 240px; padding: 14px 12px; gap: 4px; }
#studio .rail.open { width: min(300px, 86vw); }
#studio .rail-top { justify-content: space-between; padding: 2px 4px 10px; }
#studio .rail .brand { gap: 10px; font-size: 18px; }
#studio .rail .brand strong { font-size: 18px; }
#studio .rail .rail-x { display: none; border: 0; background: transparent; }
#studio .rail.open .rail-x { display: grid; }
#studio .rail .btn.wide {
  width: 100%; margin: 0 0 4px; height: 40px; display: flex; align-items: center; gap: 10px; justify-content: flex-start;
  border-radius: 10px; background: var(--hb); border: 1px solid var(--hl); color: var(--ht); font-size: 14px;
}
.r-link, .r-label { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 14px; font-weight: 600; }
.r-link { height: 40px; border-radius: 10px; color: var(--ht); text-decoration: none; }
.r-link:hover { background: var(--hl); }
.r-label { margin: 12px 0 2px; }
#studio .history { padding: 0; }
#studio .hist { border-radius: 10px; }
#studio .hist.on, #studio .hist:hover { background: var(--hl); }
#studio .hist button.open { padding: 8px 6px 8px 10px; }
#studio .hist .t { font-size: 13px; font-weight: 500; color: var(--ht); }
#studio .hist .m { font-size: 11px; }
#studio .hist .icon-btn { width: 28px; height: 28px; border: 0; background: transparent; color: var(--hm); opacity: .65; }
#studio .rail-foot { border-top: 1px solid var(--hl); }
/* header thread */
#studio .stage-bar { flex-wrap: wrap; background: var(--hb); border-bottom: 0; padding: 12px 16px 4px; gap: 8px; }
#studio .stage-bar .pills { order: 10; flex: 1 0 100%; padding: 4px 0 0; }
#studio .pills button { height: 32px; padding: 0 14px; font-size: 13px; background: var(--hb); border-color: var(--hl); color: var(--hm); }
#studio .pills button[aria-checked="true"] { background: var(--hpsoft); color: var(--hp); border-color: var(--hp); }
.s-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; cursor: pointer;
  background: var(--hs); border: 1px solid var(--hl); color: var(--ht); font-size: 13px; font-weight: 600; flex: none;
}
.s-pill .lu { width: 15px; height: 15px; }
.s-pill.s-accent { background: var(--hp); border-color: var(--hp); color: #fff; margin-left: auto; }
.s-pill.s-sq { width: 34px; padding: 0; justify-content: center; }
.s-short { display: none; }
#studio .stage-bar #open-rail + .pills + #stop { order: 0; }
.s-menu-wrap, .a-wrap { position: relative; }
.s-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; z-index: 30; padding: 6px;
  background: var(--hb); border: 1px solid var(--hl); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14);
}
.s-menu[hidden] { display: none; }
.a-wrap .s-menu { right: auto; left: 0; }
.s-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ht); font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer;
}
.s-menu button:hover { background: var(--hs); }
.s-menu button.danger { color: #dc2626; }
.s-menu .lu { color: var(--hm); }
.s-menu button.danger .lu { color: #dc2626; }
.s-login { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 4px 0 12px; border-radius: 99px; background: var(--hs); border: 1px solid var(--hl); flex: none; }
.s-login button { border: 0; background: transparent; color: var(--ht); font: 600 13px var(--hf); cursor: pointer; padding: 0; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#studio .stage-bar [data-auth] { height: auto; max-width: 100px; }
#studio .s-theme { width: 34px; height: 34px; border-color: var(--hl); background: var(--hb); color: var(--ht); }
/* isi thread */
#studio .thread { background: var(--hb); padding: 8px 20px 16px; }
#studio .thread-inner { width: min(760px, 100%); gap: 0; }
#studio .msg.user { max-width: 100%; margin: 30px 0 0; animation: none; }
#studio .thread-inner > .msg.user:first-child { margin-top: 10px; }
#studio .msg.user .who { display: none; }
#studio .msg.user .bubble { background: none; color: var(--ht); padding: 0; border-radius: 0; font: 700 26px/1.3 var(--hf); letter-spacing: -0.01em; }
.t-tabs { margin-top: 14px; border-bottom: 1px solid var(--hl); }
.t-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.t-list { display: flex; gap: 18px; }
.t-list button {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 0 10px; border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: var(--hm); font-size: 14px; font-weight: 500; cursor: pointer; margin-bottom: -1px;
}
.t-list button.on { color: var(--ht); border-bottom-color: var(--ht); font-weight: 600; }
.t-list .lu { width: 15px; height: 15px; }
.t-src { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--hm); font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.t-src .lu { width: 13px; height: 13px; }
.t-panel { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--hs); color: var(--hm); font-size: 13px; }
.t-panel[hidden] { display: none; }
#studio .msg:not(.user) { max-width: 100%; margin-top: 18px; }
#studio .dea-name { color: var(--hm); font-size: 12px; font-weight: 500; margin-bottom: 4px; }
#studio .dea-name .logo { display: none; }
#studio .msg:not(.user) .bubble { font-size: 15.5px; line-height: 1.75; color: var(--ht); }
#studio .bubble strong { font-weight: 700; }
sup.cite {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin: 0 2px; padding: 0 3px; border-radius: 99px;
  background: var(--hs); border: 1px solid var(--hl); color: var(--hm); font: 600 10px var(--hf); vertical-align: 2px;
}
.t-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--hl); }
.a-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--hl); background: var(--hb); color: var(--ht); font-size: 13px; font-weight: 500;
}
.a-btn .lu { width: 15px; height: 15px; }
.a-btn.pri { color: var(--hp); border-color: #f9a8d4; background: var(--hpsoft); }
.a-right { margin-left: auto; display: flex; gap: 2px; }
.a-ico { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; color: var(--hm); border-radius: 10px; cursor: pointer; }
.a-ico:hover { background: var(--hs); color: var(--ht); }
#studio .empty h1 { font: 700 28px/1.25 var(--hf); letter-spacing: -0.01em; }
#studio .prompt { background: var(--hb); border-color: var(--hl); color: var(--ht); }
#studio .prompt:hover { border-color: var(--hp); background: var(--hpsoft); }
#studio .typing i { background: var(--hp); }
/* kotak ketik */
#studio .dock { border-top: 0; background: var(--hb); }
#studio .dock .composer { width: min(760px, 100%); border-radius: 16px; border-color: var(--hl); background: var(--hb); box-shadow: 0 6px 24px rgba(24,24,27,.07); }
#studio .composer:focus-within { border-color: var(--hp); }
#studio .composer textarea { color: var(--ht); }
#studio .composer .icon-btn { border-color: transparent; background: transparent; color: var(--hm); }
#studio .send { background: var(--hp); }
#studio .i-send { background: #fff; }
#studio .fine { color: var(--hm); }
@media (max-width: 719px) {
  #studio .s-theme { display: none; }
  .s-long { display: none; }
  .s-short { display: inline; }
  .s-pill.s-accent { padding: 0 12px; }
  #studio .msg.user .bubble { font-size: 22px; }
}
#studio .picks.compact { grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 0; }
#studio .pick { padding: 8px 4px; border-radius: 10px; background: var(--hb); border-color: var(--hl); color: var(--ht); text-align: center; }
#studio .pick strong { font-size: 12.5px; }
#studio .pick[aria-checked="true"] { background: var(--hpsoft); border-color: var(--hp); color: var(--hp); }
#studio .icon-btn.only-mobile { width: 34px; height: 34px; background: var(--hs); border-color: var(--hl); color: var(--ht); }
.a-btn { padding: 0 12px; }
@media (max-width: 719px) { .a-right { margin-left: 0; } }

/* kartu sumber */
.t-cards { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 10px; }
.t-card { flex: 0 0 180px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 10px; border-radius: 10px; background: var(--hs); color: inherit; text-decoration: none; font-size: 12.5px; line-height: 1.35; }
.t-card span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-card small { color: var(--hm); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
