:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --soft: #f5f5f4;
  --soft-2: #efefed;
  --line: #e8e8e6;
  --ink: #0d0d0d;
  --ink-2: #4a4a48;
  --ink-3: #8a8a86;
  --solid: #0d0d0d;
  --solid-ink: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px -12px rgba(0,0,0,.16);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.06), 0 18px 50px -20px rgba(0,0,0,.24);
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --bad: #b42318;
  --bad-bg: #fef3f2;
}

body.dark {
  --bg: #0b0b0b;
  --panel: #121212;
  --soft: #171717;
  --soft-2: #1e1e1e;
  --line: #262626;
  --ink: #f2f2f0;
  --ink-2: #a8a8a4;
  --ink-3: #6f6f6b;
  --solid: #f2f2f0;
  --solid-ink: #0b0b0b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
  --shadow-md: 0 1px 3px rgba(0,0,0,.6), 0 8px 24px -12px rgba(0,0,0,.8);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.6), 0 18px 50px -20px rgba(0,0,0,.9);
  --ok: #6ee7a8;
  --ok-bg: rgba(22,163,74,.12);
  --bad: #fca5a5;
  --bad-bg: rgba(220,38,38,.14);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.hidden { display: none !important; }
.mt-8{margin-top:8px}.mt-10{margin-top:10px}.mt-12{margin-top:12px}.mt-14{margin-top:14px}
.mt-16{margin-top:16px}.mt-18{margin-top:18px}.mt-20{margin-top:20px}.mt-22{margin-top:22px}.mt-24{margin-top:24px}
.row-8{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

/* marks & type */
.mark { display: inline-flex; align-items: center; gap: 9px; }
.mark-z {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; font-family: var(--serif); font-size: 21px; line-height: 1;
  color: var(--ink); letter-spacing: 0;
}
.mark-z.sm { width: 19px; height: 19px; font-size: 18px; }
.mark-name { font-size: 13px; font-weight: 550; letter-spacing: -.01em; }

.h-serif {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: 34px; line-height: 1.08; letter-spacing: -.01em;
}
.home-shell { position: relative; }
.hero-wrap { position: relative; padding-top: 4px; }
.hero-halftone {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 560px); height: 300px; pointer-events: none; opacity: .38;
  background-image: radial-gradient(currentColor .8px, transparent .8px);
  background-size: 10px 10px; color: var(--ink-3);
  -webkit-mask-image: radial-gradient(ellipse 55% 62% at 50% 12%, #000 0%, rgba(0,0,0,.35) 46%, transparent 76%);
  mask-image: radial-gradient(ellipse 55% 62% at 50% 12%, #000 0%, rgba(0,0,0,.35) 46%, transparent 76%);
}
.hero-eyebrow {
  position: relative; display: block; margin-bottom: 9px;
  font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-2);
}
.hero {
  position: relative; margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: 42px; line-height: 1.03; letter-spacing: -.02em; max-width: 13ch;
}
.hero-sub { position: relative; margin: 10px 0 0; color: var(--ink-2); font-size: 13.5px; max-width: 34ch; line-height: 1.55; }
.muted { margin: 0; color: var(--ink-3); font-size: 13px; line-height: 1.55; }
.muted-sm { color: var(--ink-3); font-size: 11.5px; }
.hint { color: var(--ink-3); font-size: 11px; }
.section-label {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin: 22px 0 11px;
}

/* panel & chip */
.panel { background: var(--panel); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 30px 26px; }
.center-shell {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; padding: 24px;
  background: var(--bg);
}
.center-card { width: 100%; max-width: 400px; }
.chip-soft {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: 999px; background: var(--soft); color: var(--ink-2);
  font-size: 10.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}

/* form */
.stack { display: flex; flex-direction: column; gap: 10px; }
.code-input {
  width: 100%; height: 50px; border: 0; border-radius: 14px; background: var(--soft);
  color: var(--ink); text-align: center; font-family: var(--mono); font-size: 15px;
  letter-spacing: .16em; text-transform: uppercase; outline: none;
  transition: box-shadow .15s, background .15s;
}
.code-input::placeholder { letter-spacing: .12em; color: var(--ink-3); }
.code-input:focus { background: var(--panel); box-shadow: 0 0 0 1.5px var(--ink); }
.code-field { display: flex; flex-direction: column; gap: 7px; }
.code-label { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.mark + .h-serif { margin-top: 16px; }

.btn-solid {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--solid); color: var(--solid-ink);
  font-family: inherit; font-size: 13.5px; font-weight: 500; letter-spacing: -.005em;
  transition: opacity .15s, transform .1s;
}
.btn-solid:active { transform: scale(.985); }
.btn-solid:disabled { opacity: .38; cursor: not-allowed; }
.btn-solid.full { width: 100%; }
.btn-ghost {
  height: 36px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink-2); font-family: inherit; font-size: 12.5px;
}
.btn-ghost:hover { background: var(--soft); }

.err-box {
  padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--bad);
  font-size: 12.5px; line-height: 1.45;
}

/* home */
.home-shell {
  height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column;
  background: var(--bg);
}
.home-top {
  position: relative; z-index: 2; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; width: 100%; max-width: 760px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 20px 14px;
}
.home-link {
  border: 0; background: transparent; padding: 4px 2px; cursor: pointer;
  font-family: inherit; font-size: 12px; color: var(--ink-3);
}
.home-link:hover { color: var(--ink); }
.lk-arw { font-size: 11px; }
.home-body {
  position: relative; z-index: 1; flex: 1; min-height: 0; overflow-y: auto;
  padding: 8px 20px 28px; max-width: 760px; width: 100%; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: flex-start;
}

/* galeri gaya */
.preset-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px;

}
.preset-card {
  position: relative; display: flex; flex-direction: column; gap: 0; padding: 0;
  border: 0; border-radius: 16px; background: var(--soft); overflow: hidden;
  box-shadow: 0 0 0 1.5px transparent;
  cursor: pointer; text-align: left; color: inherit; font-family: inherit;
  transition: transform .16s ease, box-shadow .16s ease;
}
.preset-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.preset-card.active { box-shadow: 0 0 0 1.5px var(--ink); }
.preset-card.active .pc-swatch::after {
  content: '✓'; position: absolute; top: 10px; right: 10px; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--ink); color: var(--bg); font-size: 10px; font-weight: 700;
  box-shadow: 0 0 0 2px var(--bg);
}

.pc-name { display: block; }
.pc-swatch { display: block; height: 92px; width: 100%; position: relative; }
.pc-name { display: block; padding: 9px 11px 10px; font-size: 11px; color: var(--ink-2); letter-spacing: -.005em; }
.pc-vercel { background: linear-gradient(150deg, #ffffff 0 46%, #0d0d0d 46% 100%); }
.pc-linear { background: linear-gradient(150deg, #14141a 0 58%, #3a3a4c 58% 100%); }
.pc-editorial { background: linear-gradient(150deg, #f6f1e6 0 55%, #c4b69c 55% 100%); }
.pc-neo { background: linear-gradient(150deg, #ffe14d 0 58%, #101010 58% 100%); }
.pc-mono { background: linear-gradient(150deg, #ffffff 0 50%, #d8d8d4 50% 100%); }

/* composer */
.composer-wrap {
  position: relative; flex-shrink: 0;
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--bg);
}
.pane-chat .composer-wrap { padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); }
.composer {
  max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 2px;
  background: var(--panel); border-radius: 22px; padding: 10px 12px 8px;
  box-shadow: var(--shadow-md), 0 0 0 1px var(--line);
}
.proj-input {
  width: 100%; border: 0; background: transparent; color: var(--ink);
  font-family: inherit; font-size: 14px; font-weight: 500; outline: none;
}
.proj-input::placeholder { color: var(--ink-3); font-weight: 400; letter-spacing: 0; opacity: .78; }
.field-label {
  font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2);
  display: block; margin-bottom: 5px;
}
.setup-card {
  max-width: 720px; margin: 0 auto; display: flex; flex-direction: column;
  background: var(--panel); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-md), 0 0 0 1px var(--line);
}
.setup-row { padding: 12px 16px 13px; }
.setup-row + .setup-row { border-top: 1px solid var(--line); }
.setup-row-grow { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.setup-row-grow textarea { flex: 1 1 auto; min-height: 74px; }
.setup-row .field-label { margin-bottom: 7px; }
.setup-foot {
  padding: 13px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.setup-row .proj-input, .setup-row .composer-input { font-size: 14px; padding: 0; }
.setup-row .proj-input { height: 22px; }
.proj-input { padding-bottom: 2px; }

.composer-input {
  width: 100%; border: 0; background: transparent; color: var(--ink);
  font-family: inherit; font-size: 14.5px; line-height: 1.55; padding: 2px 2px 4px;
  outline: none; resize: none; max-height: 160px; min-height: 26px;
  display: block; overflow-y: auto; field-sizing: content;
}
.composer-input::placeholder { color: var(--ink-3); }
.composer-tools { display: flex; align-items: center; gap: 8px; padding-bottom: 2px; }
.round-btn {
  width: 30px; height: 30px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--ink-2); font-size: 16px; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.round-btn:hover { background: var(--soft); }
.model-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 46%; overflow: hidden;
  border: 0; background: transparent; border-radius: 999px; padding: 5px 8px;
  font-family: inherit; font-size: 11.5px; color: var(--ink-2); cursor: pointer;
  white-space: nowrap; text-overflow: ellipsis;
}
.model-chip:hover { background: var(--soft); }
.model-chip #modelChipLabel { font-family: var(--mono); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.model-dot { width: 5px; height: 5px; border-radius: 50%; background: #16a34a; flex: 0 0 auto; }
.caret { opacity: .5; font-size: 11px; margin-left: -1px; }
.send-btn {
  margin-left: auto; width: 32px; height: 32px; flex: 0 0 auto; border: 0; border-radius: 50%;
  background: var(--solid); color: var(--solid-ink); font-size: 15px; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: opacity .15s, transform .1s;
}
.send-btn:active { transform: scale(.94); }
.send-btn:disabled { opacity: .3; cursor: not-allowed; }

/* workspace */
.studio-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.topbar {
  position: relative; z-index: 20; flex-shrink: 0; height: calc(46px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.tb-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tb-right { display: flex; align-items: center; gap: 0; min-width: 0; }
.tb-role { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.tb-meta { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-right: 4px; white-space: nowrap; }
.tb-right { gap: 0; }
.tb-sep { font-style: normal; opacity: .45; margin: 0 1px; }
.tb-panes {
  display: none; align-items: center; gap: 2px; margin-left: 12px;
  padding: 2px; border-radius: 999px; background: var(--soft);
}
.tb-pane {
  height: 24px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent;
  color: var(--ink-3); font-family: inherit; font-size: 11.5px; font-weight: 500; cursor: pointer;
}
.tb-pane.active { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-sm); }
.more-pop {
  position: absolute; top: calc(100% + 6px); right: 8px; z-index: 60;
  min-width: 158px; padding: 5px; display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14);
}
.mp-stats { padding: 6px 10px 8px; display: flex; flex-direction: column; gap: 3px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.mp-stats div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; font-size: 11.5px; color: var(--ink-3); }
.mp-row { height: 36px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); }
.mp-row input {
  width: 54px; padding: 3px 6px; border: 0; border-radius: 6px; background: var(--soft);
  color: var(--ink-2); font-family: var(--mono); font-size: 11.5px; text-align: right; outline: none;
}
.mp-row input::-webkit-outer-spin-button, .mp-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mp-stats b { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.more-pop button, .more-pop a {
  height: 36px; padding: 0 10px; display: flex; align-items: center; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-2); font-family: inherit; font-size: 13px; text-decoration: none;
  cursor: pointer; text-align: left;
}
.more-pop button:hover, .more-pop a:hover { background: var(--soft); color: var(--ink); }
.meter-k { color: var(--ink-3); font-size: 9.5px; letter-spacing: .04em; }
.meter-v { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.icon-btn {
  width: 30px; height: 30px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-2);
  font-size: 14px; line-height: 1; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--soft); }

.mob-pane-btn {
  flex: 0 0 auto; height: 30px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-3);
  font-family: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.mob-pane-btn.active { background: var(--soft); color: var(--ink); }

.split-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 440px minmax(0, 1fr); }
.pane-chat { display: flex; flex-direction: column; min-height: 0; background: var(--bg); border-right: 1px solid var(--line); }

.chat-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 16px 26px; display: flex; flex-direction: column; gap: 14px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 12px);
}
.chat-scroll::-webkit-scrollbar { width: 6px; }
.chat-scroll::-webkit-scrollbar-thumb { background: var(--soft-2); border-radius: 99px; }

/* pesan */
.msg-bubble { flex: 0 0 auto; font-size: 14px; line-height: 1.62; white-space: pre-wrap; word-break: break-word; }
.msg-user {
  align-self: flex-end; max-width: 84%; background: var(--soft); color: var(--ink);
  padding: 10px 14px; border-radius: 18px 18px 5px 18px; font-size: 13.5px; line-height: 1.5;
}
.msg-ai { align-self: stretch; max-width: 100%; color: var(--ink); padding: 0 2px; }
.msg-ai strong { font-weight: 600; }
.trace-card {
  align-self: stretch; padding: 8px 10px; border-radius: 10px; background: var(--soft);
  font-family: var(--mono); font-size: 11px; color: var(--ink-2); line-height: 1.5;
}
.trace-ok { color: var(--ok); }
.trace-err { color: var(--bad); }

/* langkah agent */
.steps-group {
  flex: 0 0 auto; flex-shrink: 0; align-self: stretch;
  border-radius: 12px; background: var(--soft); overflow: hidden;
}
.steps-head {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px;
  background: transparent; border: 0; cursor: pointer; text-align: left; color: var(--ink-2);
  font-family: inherit; font-size: 12px;
}
.steps-head:hover { background: var(--soft-2); }
.steps-ico { font-size: 9px; opacity: .55; width: 9px; }
.steps-label { font-weight: 500; letter-spacing: -.005em; }
.steps-body { display: none; padding: 2px 12px 10px; }
.steps-group.open .steps-body { display: block; }
.steps-group.open .steps-head { color: var(--ink); }
.step-row {
  display: flex; align-items: baseline; gap: 7px; padding: 4px 0;
  font-size: 11px; flex-wrap: wrap; border-top: 1px solid var(--line);
}
.step-row:first-child { border-top: 0; }
.step-name { font-family: var(--mono); font-size: 10px; color: var(--ink); }
.step-arg { flex: 1 1 110px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-family: var(--mono); font-size: 10px; }
.step-state { font-size: 9px; letter-spacing: .05em; text-transform: uppercase; padding: 1px 5px; border-radius: 4px; }
.step-state.running { background: var(--soft-2); color: var(--ink-2); }
.step-state.ok { background: var(--ok-bg); color: var(--ok); }
.step-state.fail { background: var(--bad-bg); color: var(--bad); }
.step-preview { flex: 1 1 100%; font-size: 10px; color: var(--ink-3); padding-top: 2px; }

/* preview */
.pane-preview { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.preview-toolbar {
  flex-shrink: 0; min-height: 46px; padding: 8px 12px; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.subtab-group { display: flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; background: var(--soft); }
.subtab {
  height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent;
  color: var(--ink-3); font-family: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
}
.subtab.active { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-sm); }
.preview-controls { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.vp-btn {
  height: 26px; padding: 0 7px 0 9px; display: inline-flex; align-items: center; gap: 3px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--ink-2); font-family: inherit; font-size: 11.5px; font-weight: 500; cursor: pointer;
}
.vp-btn .caret { font-size: 9px; opacity: .7; }
.vp-btn:hover { background: var(--soft); color: var(--ink); }

.rtab-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.iframe-stage { flex: 1; min-height: 0; display: flex; justify-content: center; align-items: stretch; padding: 12px; }
.iframe-stage iframe {
  width: 100%; height: 100%; border: 0; border-radius: 14px; background: #fff;
  box-shadow: var(--shadow-md), 0 0 0 1px var(--line); transition: width .2s ease;
}
.iframe-stage.mobile-mode iframe { width: 390px; max-width: 100%; }

.files-split { display: grid; grid-template-columns: 210px minmax(0, 1fr); }
.file-tree {
  overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 1px;
  font-family: var(--mono); font-size: 11.5px; border-right: 1px solid var(--line);
}
.file-item { padding: 6px 8px; border-radius: 7px; cursor: pointer; color: var(--ink-2); word-break: break-all; }
.file-item:hover, .file-item.active { background: var(--soft); color: var(--ink); }
.file-viewer {
  margin: 0; padding: 14px 16px; overflow: auto; font-family: var(--mono);
  font-size: 11.5px; line-height: 1.6; color: var(--ink-2); background: var(--bg);
}
.media-grid { padding: 14px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; align-content: start; }
.media-card { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-md), 0 0 0 1px var(--line); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.media-card video, .media-card img { width: 100%; border-radius: 8px; background: #000; max-height: 220px; object-fit: contain; }

/* sheet model */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.34);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadein .16s ease;
}
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
.sheet-card {
  width: 100%; max-width: 480px; background: var(--panel);
  border-radius: 22px 22px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg); animation: slideup .22s cubic-bezier(.32,.72,0,1);
}
@keyframes slideup { from { transform: translateY(18px); opacity: .6 } to { transform: none; opacity: 1 } }
.sheet-grab { width: 34px; height: 4px; border-radius: 99px; background: var(--soft-2); margin: 6px auto 14px; }
.sheet-title { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.sheet-list { display: flex; flex-direction: column; gap: 1px; }
.sheet-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 11px 10px; border: 0; border-radius: 12px; background: transparent;
  color: inherit; cursor: pointer; text-align: left; font-family: inherit;
}
.sheet-item:hover { background: var(--soft); }
.sheet-item.active { background: var(--soft); }
.si-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.si-name { font-family: var(--mono); font-size: 12.5px; }
.si-desc { font-size: 11px; color: var(--ink-3); }
.si-check { font-size: 13px; color: var(--ink); }
.sheet-note { font-size: 10.5px; color: var(--ink-3); margin-top: 12px; line-height: 1.5; }

/* markdown */
.md-pre {
  margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: var(--soft);
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  overflow-x: auto; white-space: pre; color: var(--ink-2);
}
.md-code { font-family: var(--mono); font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--soft); }
.md-h { font-weight: 600; margin-top: 12px; font-size: 13.5px; }
.md-ul { margin: 8px 0; padding: 0; list-style: none; }
.md-ul li { position: relative; padding-left: 15px; margin-top: 5px; }
.md-ul li:first-child { margin-top: 0; }
.md-ul li::before { content: '•'; position: absolute; left: 3px; color: var(--ink-3); }
.md-code { margin: 0 1px; }

/* responsive */
@media (max-width: 900px) {
  .mark-name { display: none; }
  .home-shell .mark-name { display: inline; }
  .hero { font-size: 36px; }
  .split-main { grid-template-columns: 1fr; }
  .pane-chat { border-right: 0; }
  .pane-chat.mob-hidden, .pane-preview.mob-hidden { display: none; }
  .files-split { grid-template-columns: 1fr; grid-template-rows: 150px 1fr; }
  .pane-preview .subtab-group { display: none; }
  .iframe-stage { padding: 8px; }
  .iframe-stage iframe { border-radius: 12px; }
  .iframe-stage.mobile-mode iframe { width: 100%; }
  .preview-toolbar { min-height: 40px; padding: 6px 10px; justify-content: flex-end; }
  .preview-toolbar .subtab-group { display: none; }
  .preset-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pc-swatch { height: 84px; }
  .chat-scroll { padding: 14px 14px 6px; gap: 12px; }
  .panel { padding: 26px 22px; }
  .h-serif { font-size: 30px; }
}

@media (max-width: 380px) {
  .hero { font-size: 32px; }
  .preset-gallery { grid-template-columns: 1fr; }
}

/* aksi jawaban */
.msg-actions { display: flex; align-items: center; gap: 2px; margin-top: 6px; opacity: 0; transition: opacity .15s; }
.msg-bubble:hover .msg-actions, .msg-actions.show { opacity: 1; }
.msg-act {
  width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 7px; background: transparent; color: var(--ink-3);
  font-size: 12px; cursor: pointer; line-height: 1;
}
.msg-act:hover { background: var(--soft); color: var(--ink); }
@media (max-width: 900px) { .msg-actions { opacity: 1; } }

.msg-ai-label {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}
.msg-ai-label .d { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }

@media (min-width: 901px) {
  .preset-gallery { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .home-top, .home-body { max-width: 768px; }
  .composer { max-width: 728px; }
  .pc-swatch { height: 104px; }
  .hero { font-size: 54px; max-width: 11ch; }
  .hero-sub { font-size: 14px; margin-top: 12px; }
  .hero-halftone { width: min(100%, 640px); height: 340px; opacity: .34; }
  .section-label { margin: 26px 0 12px; }
}

.md-kbd {
  display: inline-block; padding: 1px 5px; margin: 0 1px; border-radius: 5px;
  background: var(--soft); box-shadow: inset 0 -1px 0 var(--soft-2), 0 0 0 1px var(--line);
  font-family: var(--mono); font-size: 10.5px; line-height: 1.5; color: var(--ink-2);
}

@media (max-width: 900px) {
  .tb-panes { display: flex; }
  .topbar { padding-left: 10px; padding-right: 8px; }
  .preview-toolbar { min-height: 42px; padding: 7px 10px; }
}
@media (max-width: 370px) {
  .tb-meta { font-size: 9px; }
}
