/* ================= Studio VULPINE ================= */
body.studio { height: 100vh; height: 100dvh; overflow: hidden; }

.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.boot img { opacity: .5; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .9; transform: scale(1.04); } }

/* ---------- belum masuk ---------- */
.signin {
  position: fixed; inset: 0; overflow: auto; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(60% 50% at 18% 85%, rgba(94, 230, 214, .10), transparent 70%),
    radial-gradient(50% 40% at 85% 10%, rgba(110, 120, 255, .08), transparent 70%),
    var(--bg);
}
.signin-card {
  width: min(880px, 100%); display: grid; grid-template-columns: 340px 1fr; border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(21, 26, 44, .7), rgba(15, 18, 32, .9)); box-shadow: 0 0 0 1px var(--line), 0 40px 120px -40px rgba(0, 0, 0, .8);
  overflow: hidden;
}
.signin-art { position: relative; min-height: 520px; background: radial-gradient(90% 70% at 50% 100%, rgba(94, 230, 214, .16), transparent 70%), linear-gradient(180deg, #0c1024, #0a0d1c); border-right: 1px solid var(--line); overflow: hidden; }
.signin-art .cutout { position: absolute; left: 50%; bottom: -8px; height: 96%; width: auto; max-width: none; transform: translateX(-50%); filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .5)); }
.signin-art .dance { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.signin-art-caption { z-index: 1; }
.signin-art-caption { position: absolute; left: 18px; top: 16px; font-size: 10.5px; letter-spacing: .2em; color: var(--dim); }
.signin-body { padding: 36px 36px 28px; display: flex; flex-direction: column; }
.signin-body .brand { margin-bottom: 34px; }
.signin-body h1 { font-size: clamp(28px, 4vw, 36px); line-height: 1.08; margin: 12px 0 12px; }
.signin-body .lede { color: var(--muted); font-size: 15px; max-width: 42ch; margin-bottom: 24px; }
.wallet-list { display: grid; gap: 8px; }
.wallet-btn {
  display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 14px; border-radius: var(--r); cursor: pointer; text-decoration: none;
  background: var(--bg-2); border: 1px solid var(--line-strong); color: var(--text); font-size: 14.5px; font-weight: 500; text-align: left; width: 100%;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.wallet-btn:hover { border-color: rgba(94, 230, 214, .5); background: var(--surface); box-shadow: 0 0 0 4px rgba(94, 230, 214, .06); }
.wallet-btn img, .wallet-btn .wi { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.wallet-btn .wi { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.wallet-btn .wi svg { width: 16px; height: 16px; }
.wallet-btn .grow { flex: 1; }
.wallet-btn .tag { font: 500 11px var(--font-mono); color: var(--dim); }
.wallet-btn.busy { pointer-events: none; border-color: rgba(94, 230, 214, .5); }
.wallet-btn.busy .tag { color: var(--fire); }
.wallet-empty { color: var(--muted); font-size: 13.5px; padding: 4px 2px 6px; }
.signin-msg { min-height: 20px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.signin-msg.err { color: var(--ember); }
.facts { list-style: none; padding: 0; margin: 10px 0 24px; display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.facts li { display: flex; align-items: center; gap: 10px; }
.facts b { color: var(--text); font-weight: 500; }
.signin-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chain-line { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
@media (max-width: 760px) {
  .signin { place-items: start center; }
  .signin-card { grid-template-columns: 1fr; }
  .signin-art { min-height: 0; height: 230px; border-right: 0; border-bottom: 1px solid var(--line); }
  .signin-art .cutout { height: auto; width: 62%; bottom: auto; top: 18px; }
  .signin-art { height: 300px; }
  .signin-art .dance { object-position: 50% 42%; }
  .signin-art-caption { display: none; }
  .signin-body { padding: 24px 20px 20px; }
  .signin-body .brand { margin-bottom: 20px; }
}

/* ---------- kerangka ---------- */
.app { height: 100%; display: grid; grid-template-rows: 52px minmax(0, 1fr); }
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); background: var(--bg); min-width: 0; }
.topbar .brand img { width: 24px; height: 24px; }
.topbar .brand b { font-size: 13px; }
.tb-sep { width: 1px; height: 20px; background: var(--line-strong); }
.titlebox { display: flex; align-items: center; gap: 6px; min-width: 0; }
.name-input {
  min-width: 60px; field-sizing: content; max-width: 320px; height: 32px; padding: 0 8px; border-radius: 8px;
  background: transparent; border: 1px solid transparent; font-weight: 600; font-size: 14px; text-overflow: ellipsis; outline: none;
}
.name-input:hover { border-color: var(--line); }
.name-input:focus { border-color: rgba(94, 230, 214, .5); background: var(--bg-2); }
.ver-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 6px 0 9px; white-space: nowrap; flex: none; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); font: 500 12px var(--font-mono); color: var(--muted);
}
.ver-btn svg { width: 13px; height: 13px; }
.ver-btn:hover:not(:disabled) { color: var(--text); border-color: rgba(160, 180, 255, .32); }
.ver-btn:disabled { opacity: .5; cursor: default; }
.grow { flex: 1; }
.demo-badge { cursor: help; }

/* meter kuota */
.usage { display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 10px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.usage:hover { border-color: var(--line); background: rgba(160, 180, 255, .04); }
.usage b { color: var(--text); font-weight: 600; }
.usage .when { color: var(--dim); }
.meter { display: inline-flex; gap: 3px; }
.meter i { width: 9px; height: 4px; border-radius: 2px; background: rgba(160, 180, 255, .16); }
.meter i.on { background: var(--fire); box-shadow: 0 0 6px rgba(94, 230, 214, .45); }
.meter.bar { width: 48px; height: 4px; border-radius: 2px; background: rgba(160, 180, 255, .16); overflow: hidden; display: block; }
.meter.bar span { display: block; height: 100%; background: var(--fire); }
.usage.empty-q b { color: var(--ember); }

.publish-btn .pub-dot { display: none; width: 7px; height: 7px; border-radius: 50%; background: var(--fire); box-shadow: 0 0 0 3px rgba(94, 230, 214, .15); }
.publish-btn.is-live .pub-dot { display: inline-block; }

.wallet-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font: 500 12.5px var(--font-mono); color: var(--text); }
.wallet-chip:hover { border-color: rgba(160, 180, 255, .32); }
.addr-orb { width: 24px; height: 24px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }

.mtabs { display: none; }

.workspace { display: grid; grid-template-columns: 384px minmax(0, 1fr); min-height: 0; }

/* ---------- rel kiri ---------- */
.rail { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--bg-2); }
.rail-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 12px; border-bottom: 1px solid var(--line); }
.proj-switch { flex: 1; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; color: var(--text); font-size: 13px; min-width: 0; }
.proj-switch:hover { border-color: var(--line-strong); }
.proj-switch svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.proj-switch .ps-label { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-count { font: 500 11px var(--font-mono); color: var(--dim); }
.new-btn svg { width: 15px; height: 15px; }

.thread { flex: 1; overflow: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 18px; overscroll-behavior: contain; }
.msg { display: flex; flex-direction: column; gap: 6px; animation: rise .25s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
.msg.user { align-items: flex-end; }
.msg.user .bubble { max-width: 88%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px 14px 4px 14px; padding: 9px 12px; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .who { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.msg .who b { color: var(--text); font-weight: 600; font-size: 12.5px; }
.msg .who time { color: var(--dim); font-family: var(--font-mono); font-size: 11px; margin-left: auto; }
.msg.agent .body { margin-left: 30px; display: grid; gap: 10px; font-size: 13.5px; }
.msg.agent .body p { color: var(--text); }
.msg.agent .body p.muted { color: var(--muted); }
.plan { list-style: none; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); display: grid; gap: 7px; }
.plan-h { display: flex; justify-content: space-between; align-items: center; font: 500 10.5px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 2px; }
.plan-h .elapsed { letter-spacing: 0; text-transform: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); transition: color .2s; }
.plan li i { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid rgba(160, 180, 255, .25); flex: none; margin-top: 2px; position: relative; }
.plan li.doing { color: var(--text); }
.plan li.doing i { border-color: rgba(94, 230, 214, .25); border-top-color: var(--fire); animation: spin .8s linear infinite; }
.plan li.done { color: var(--text); }
.plan li.done i { border-color: var(--fire); background: var(--fire); }
.plan li.done i::after { content: ""; position: absolute; left: 4px; top: 1.5px; width: 3.5px; height: 7px; border: solid #04211f; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.plan li.skip i { border-style: dashed; }
@keyframes spin { to { transform: rotate(360deg); } }
.status-line { display: flex; align-items: center; gap: 8px; font: 12px var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.status-line .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--fire); animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.err-box { border: 1px solid rgba(255, 179, 92, .3); background: var(--ember-soft); color: #ffd9ad; border-radius: var(--r); padding: 9px 12px; font-size: 13px; }
.err-box .btn { margin-top: 8px; }
.welcome-tpls { display: flex; flex-wrap: wrap; gap: 6px; }
.welcome-tpls .chip { height: 28px; padding: 0 11px; cursor: pointer; background: var(--bg); font-family: var(--font-ui); font-size: 12.5px; color: var(--text); }
.welcome-tpls .chip:hover { border-color: rgba(94, 230, 214, .45); }
.sys-line { font: 12px var(--font-mono); color: var(--dim); display: flex; gap: 8px; align-items: center; margin-left: 30px; }
.sys-line .chip { height: 20px; }

.composer { padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.usage-inline { display: none; }
.composer-box { border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg); transition: border-color .18s, box-shadow .18s; }
.composer-box:focus-within { border-color: rgba(94, 230, 214, .5); box-shadow: 0 0 0 4px rgba(94, 230, 214, .06); }
.composer textarea { display: block; width: 100%; min-height: 76px; max-height: 240px; resize: none; border: 0; outline: none; background: transparent; padding: 12px 14px 4px; font-size: 14px; line-height: 1.5; }
.composer textarea::placeholder { color: var(--dim); }
.composer-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px 14px; }
.composer .hint { font-size: 11px; color: var(--dim); margin-right: auto; }
kbd { font: inherit; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px; border: 1px solid var(--line-strong); margin-right: 2px; color: var(--muted); }
.char-count { font-size: 11px; color: var(--dim); }
.char-count.over { color: var(--ember); }
.build-btn { min-width: 76px; }
.app.building .build-btn { display: none; }

/* ---------- panggung ---------- */
.stage-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.stage-bar { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 12px; border-bottom: 1px solid var(--line); min-width: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.seg button { height: 26px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
.seg button:hover { color: var(--text); }
.device-seg button { padding: 0 8px; }
.device-seg svg { width: 16px; height: 16px; }
.stage-status { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-status .live { color: var(--fire); }
.stage-actions { display: flex; align-items: center; gap: 4px; }
.stage-actions .btn.icon svg { width: 16px; height: 16px; }
.zip-ico svg { width: 15px; height: 15px; display: block; }
.edit-bar { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ember); }

.stage { position: relative; flex: 1; min-height: 0; background-color: var(--bg); background-image: radial-gradient(rgba(160, 180, 255, .07) 1px, transparent 1px); background-size: 22px 22px; }
.pane { position: absolute; inset: 0; }
.preview-pane { display: flex; align-items: center; justify-content: center; padding: 14px; overflow: hidden; }
.device-box { position: relative; width: 100%; height: 100%; }
.device { position: absolute; left: 0; top: 0; transform-origin: 0 0; transition: box-shadow .2s; }
.device iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.device.desktop { width: 100%; height: 100%; border-radius: var(--r); overflow: hidden; box-shadow: 0 0 0 1px var(--line-strong), 0 30px 80px -40px rgba(0, 0, 0, .9); }
.device.tablet, .device.phone { padding: 10px; background: #0b0e19; box-shadow: 0 0 0 1px var(--line-strong), 0 40px 90px -30px rgba(0, 0, 0, .95); }
.device.tablet { border-radius: 30px; }
.device.tablet iframe { border-radius: 20px; }
.device.phone { border-radius: 46px; }
.device.phone iframe { border-radius: 36px; }
.device.blank iframe { background: transparent; }
.device.dim { opacity: .28; filter: saturate(.6); }

.version-banner { position: absolute; z-index: 4; top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--surface-2); box-shadow: var(--shadow-pop); font-size: 12.5px; white-space: nowrap; }

.build-overlay { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; }
.bo-inner { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 22px 28px; border-radius: var(--r-lg); background: rgba(10, 12, 22, .82); backdrop-filter: blur(8px); box-shadow: 0 0 0 1px var(--line), 0 30px 80px -30px #000; min-width: 260px; }
.bo-orb { position: relative; width: 64px; height: 64px; margin-bottom: 10px; }
.bo-orb .avatar { width: 64px; height: 64px; }
.bo-ring { position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid rgba(94, 230, 214, .12); border-top-color: var(--fire); animation: spin 1.1s linear infinite; filter: drop-shadow(0 0 6px rgba(94, 230, 214, .5)); }
.bo-title { font: 600 15px var(--font-display); letter-spacing: -.01em; }
.bo-sub { font-size: 11.5px; color: var(--muted); }

.code-pane { display: flex; flex-direction: column; background: var(--bg-2); }
.editor-host { flex: 1; min-height: 0; position: relative; }
.code-foot { display: flex; justify-content: space-between; gap: 12px; height: 28px; align-items: center; padding: 0 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--dim); }
.code-foot .live { color: var(--fire); }

/* editor */
.ed { position: relative; }
.editor-host.ed { position: relative; }
.ed-scroll { position: absolute; inset: 0; overflow: auto; display: flex; align-items: flex-start; }
.ed-gutter, .ed-hl, .ed-ta { font: 12.5px/1.65 var(--font-mono); tab-size: 2; letter-spacing: 0; font-variant-ligatures: none; }
.ed-gutter { position: sticky; left: 0; z-index: 2; margin: 0; padding: 14px 12px 40px 14px; min-height: 100%; text-align: right; color: var(--dim); background: var(--bg-2); border-right: 1px solid var(--line); user-select: none; min-width: 52px; opacity: .8; }
.ed-body { position: relative; flex: 1; min-width: max-content; min-height: 100%; }
.ed-hl { margin: 0; padding: 14px 20px 40px 16px; color: #c9d1ee; white-space: pre; min-height: 100%; pointer-events: none; }
.ed-ta { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 14px 20px 40px 16px; border: 0; outline: none; resize: none; overflow: hidden; white-space: pre; background: transparent; color: transparent; caret-color: var(--fire); -webkit-text-fill-color: transparent; }
.ed-ta::selection { background: rgba(94, 230, 214, .22); -webkit-text-fill-color: transparent; }
.ed.ro .ed-ta { caret-color: transparent; }
.t-tag { color: #7fd9ff; }
.t-attr { color: #b7a6ff; }
.t-str { color: #ffd7a3; }
.t-com { color: #56607f; font-style: italic; }
.t-kw { color: var(--fire); }
.t-num { color: #f5b0d8; }
.t-prop { color: #9fe3c9; }

/* ---------- kosong / sapaan ---------- */
.empty { position: absolute; inset: 0; z-index: 2; overflow: auto; background: var(--bg); background-image: radial-gradient(70% 50% at 50% 0%, rgba(94, 230, 214, .06), transparent 70%); }
.empty-inner { max-width: 860px; margin: 0 auto; padding: clamp(28px, 6vh, 64px) 24px 48px; }
.greet { display: flex; gap: 18px; align-items: center; margin-bottom: 30px; }
.greet .avatar { width: 64px; height: 64px; box-shadow: inset 0 0 0 1px var(--line-strong), 0 0 0 6px rgba(94, 230, 214, .05); }
.greet h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.08; }
.greet p { color: var(--muted); margin-top: 6px; font-size: 14.5px; max-width: 58ch; }
.tpl-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tpl { background: var(--bg-2); border: 0; padding: 14px 16px 16px; text-align: left; cursor: pointer; color: var(--text); display: grid; gap: 4px; transition: background .2s; }
.tpl:hover { background: var(--surface); }
.tpl:hover .thumb { border-color: rgba(94, 230, 214, .35); }
.tpl:hover .use { color: var(--fire); }
.tpl .thumb { height: 92px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); margin-bottom: 10px; overflow: hidden; transition: border-color .2s; }
.tpl .thumb svg { width: 100%; height: 100%; display: block; }
.tpl b { font-weight: 600; font-size: 14px; }
.tpl span { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.tpl .use { font: 500 11px var(--font-mono); color: var(--dim); margin-top: 6px; transition: color .2s; }
.empty-foot { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; margin-top: 18px; color: var(--dim); font-size: 12.5px; }
.empty-foot a { color: var(--muted); }

/* popover isi khusus */
.proj-pop { width: 340px; padding: 8px; }
.proj-pop .input { height: 34px; margin-bottom: 6px; }
.proj-list { max-height: 360px; overflow: auto; display: grid; gap: 1px; }
.proj-row { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; border-radius: 8px; cursor: pointer; }
.proj-row:hover, .proj-row.active { background: rgba(160, 180, 255, .07); }
.proj-row .pn { flex: 1; min-width: 0; }
.proj-row .pn b { display: block; font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-row .pn small { color: var(--dim); font: 11px var(--font-mono); }
.proj-row .acts { display: flex; opacity: 0; transition: opacity .15s; }
.proj-row:hover .acts, .proj-row.active .acts { opacity: 1; }
.proj-row .acts button { width: 26px; height: 26px; border: 0; background: none; color: var(--muted); border-radius: 6px; cursor: pointer; display: grid; place-items: center; }
.proj-row .acts button:hover { background: rgba(160, 180, 255, .1); color: var(--text); }
.proj-row .acts svg { width: 14px; height: 14px; }
.proj-empty { color: var(--dim); font-size: 12.5px; padding: 14px 10px; }
.ver-pop { width: 360px; }
.ver-row { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ver-row:hover, .ver-row.active { background: rgba(160, 180, 255, .07); }
.ver-row .vn { font: 600 12px var(--font-mono); color: var(--fire); min-width: 28px; }
.ver-row .vd { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ver-row .vm { grid-column: 2 / 4; font: 11px var(--font-mono); color: var(--dim); }
.ver-row .vs { font: 11px var(--font-mono); white-space: nowrap; }
.ver-row .vs .plus { color: var(--fire); }
.ver-row .vs .minus { color: var(--muted); }
.usage-pop { width: 320px; padding: 14px; }
.usage-pop h4 { font: 600 14px var(--font-display); margin: 0 0 4px; }
.usage-pop p { color: var(--muted); font-size: 12.5px; }
.tier-table { margin-top: 12px; display: grid; gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.tier-table div { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 8px 10px; background: var(--bg-2); font-size: 12.5px; }
.tier-table div.cur { background: var(--surface-2); }
.tier-table div.cur b { color: var(--fire); }
.tier-table span { font-family: var(--font-mono); color: var(--muted); font-size: 11.5px; }
.wallet-pop .addr-full { font: 11.5px var(--font-mono); color: var(--muted); word-break: break-all; padding: 4px 10px 8px; }
.pub-modal .link-row { display: flex; gap: 8px; }
.pub-modal .link-row .input { font: 12.5px var(--font-mono); }
.pub-modal .meta { display: flex; gap: 12px; color: var(--dim); font: 11.5px var(--font-mono); margin-top: 10px; flex-wrap: wrap; }
.pub-modal .note { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }

/* ---------- responsif ---------- */
@media (max-width: 1180px) {
  .workspace { grid-template-columns: 340px minmax(0, 1fr); }
  .usage .when { display: none; }
  .zip-label { display: none; }
  .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-rows: 52px 42px minmax(0, 1fr); }
  .topbar { gap: 8px; padding: 0 10px; }
  .topbar .brand b, .tb-sep, .usage, .demo-badge { display: none; }
  .name-input { width: 100%; min-width: 0; max-width: none; font-size: 14px; padding: 0 6px; }
  .ver-btn:disabled { display: none; }
  .titlebox { flex: 1; }
  .topbar .grow { display: none; }
  .wallet-chip { padding: 0 4px; }
  .wallet-chip .wc-addr { display: none; }
  .publish-btn { padding: 0 10px; }
  .mtabs { display: flex; gap: 4px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--bg); align-items: center; }
  .mtabs button { flex: 1; height: 30px; border: 0; background: none; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 13px; cursor: pointer; position: relative; }
  .mtabs button[aria-selected="true"] { color: var(--text); background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong); }
  .mtabs button .badge { position: absolute; top: 7px; margin-left: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--fire); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .workspace[data-tab="chat"] .stage-wrap { display: none; }
  .workspace:not([data-tab="chat"]) .rail { display: none; }
  .rail { border-right: 0; }
  .view-seg, .device-seg { display: none; }
  .stage-bar { padding: 0 8px; gap: 6px; }
  .usage-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 0 2px 8px; }
  .usage-inline b { color: var(--text); }
  .usage-inline .chip { height: 20px; font-size: 10.5px; }
  .usage-inline button.chip { background: none; cursor: pointer; }
  .usage-inline .grow { flex: 1; }
  .preview-pane { padding: 0; }
  .device.desktop { border-radius: 0; box-shadow: none; }
  .composer .hint { display: none; }
  .composer-row { justify-content: flex-end; }
  .char-count { margin-right: auto; }
  .tpl-grid { grid-template-columns: minmax(0, 1fr); }
  .tpl { grid-template-columns: 112px minmax(0, 1fr); column-gap: 14px; align-items: center; }
  .tpl .thumb { grid-row: 1 / 4; height: 76px; margin: 0; }
  .greet { align-items: flex-start; }
  .greet .avatar { width: 52px; height: 52px; }
  .empty-inner { padding: 22px 16px 32px; }
  .proj-pop { width: calc(100vw - 32px); }
  .ver-pop { width: calc(100vw - 32px); }
}
