/* Deck — visual sóbrio, escuro, de app nativo. Um acento (azul); cores só para estados. */
:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --ink: #f5f5f7;
  --mute: #98989f;
  --dim: #636366;
  --line: rgba(255, 255, 255, .08);
  --cyan: 10, 132, 255;     /* acento */
  --ok: 48, 209, 88;
  --warn: 255, 159, 10;
  --crit: 255, 69, 58;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable", "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --k: 120px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); overflow: hidden; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; -webkit-user-select: text; user-select: text; }
[hidden] { display: none !important; }
#bg { display: none; }

/* ---------- Estrutura ---------- */
#app { position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

#top { display: flex; align-items: center; gap: 14px; padding: 14px 22px 6px; }
.brand { display: none; }

/* abas: controle segmentado, como no iOS */
#tabs { display: flex; gap: 2px; padding: 3px; background: var(--surface); border-radius: 11px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
#tabs::-webkit-scrollbar { display: none; }
.tab { padding: 7px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--mute); white-space: nowrap; transition: background .2s, color .2s; display: flex; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); background: var(--surface-3); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.tab.add { color: rgb(var(--cyan)); padding: 7px 12px; }
body.editing .tab.on { background: rgb(var(--cyan)); color: #fff; }

.right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.now { font: 600 15px var(--sans); color: var(--mute); margin-right: 6px; font-variant-numeric: tabular-nums; }
.iconbtn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--ink); transition: background .15s, transform .15s; }
.iconbtn:hover { background: var(--surface-2); }
.iconbtn:active { transform: scale(.92); }
.iconbtn.on { background: rgb(var(--cyan)); color: #fff; }
.iconbtn em { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: rgb(var(--crit)); color: #fff; font: 700 11px/18px var(--sans); text-align: center; font-style: normal; }

/* ---------- Grade ---------- */
#stage { position: relative; display: grid; place-items: center; padding: 10px 22px 12px; min-height: 0; }
#grid { display: grid; gap: 14px; justify-content: center; align-content: center; animation: pagein .28s ease; }
@keyframes pagein { from { opacity: 0; transform: scale(.985); } }

.key, .slot { position: relative; width: var(--k); height: var(--k); border-radius: calc(var(--k) * .2); }

.key {
  --c: var(--cyan);
  color: var(--ink); text-align: left; overflow: hidden;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), inset 0 1px 0 rgba(255, 255, 255, .06);
  display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--k) * .12);
  transition: transform .12s ease, background .2s, box-shadow .2s, opacity .3s;
}
.key:active, .key.pressed { transform: scale(.965); background: var(--surface-2); }

.key.s-ok .led { background: rgb(var(--ok)); }
.key.s-warn { --c: var(--warn); background: #2b2113; box-shadow: inset 0 0 0 1px rgba(var(--warn), .45); }
.key.s-crit { --c: var(--crit); background: #2d1614; box-shadow: inset 0 0 0 1px rgba(var(--crit), .55); }
.key.s-off { opacity: .45; }

/* ícone dentro de uma "pastilha" colorida suave, como app do iOS */
.key .ico { width: calc(var(--k) * .3); height: calc(var(--k) * .3); border-radius: 28%; background: rgba(var(--c), .16); color: rgb(var(--c)); display: grid; place-items: center; }
.key .ico svg { width: 62%; height: 62%; display: block; }
.key .top { display: flex; justify-content: space-between; align-items: flex-start; }
.key .led { width: calc(var(--k) * .065); height: calc(var(--k) * .065); border-radius: 50%; background: rgb(var(--c)); margin: calc(var(--k) * .02); }
.key.s-crit .led { animation: blink 1.4s ease-in-out infinite; }
.key.s-info .led { background: var(--dim); }
.key .badge { min-width: calc(var(--k) * .2); height: calc(var(--k) * .2); padding: 0 calc(var(--k) * .05); border-radius: 99px; background: rgb(var(--crit)); color: #fff; font: 700 calc(var(--k) * .1) / calc(var(--k) * .2) var(--sans); text-align: center; }
.key .bot { display: flex; flex-direction: column; gap: calc(var(--k) * .015); min-width: 0; }
.key .val { font: 700 calc(var(--k) * .25) / 1.05 var(--sans); letter-spacing: -.02em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.key .val.long { font-size: calc(var(--k) * .165); letter-spacing: -.01em; }
.key .sub { font: 500 calc(var(--k) * .09) var(--sans); color: var(--mute); }
.key .lbl { font: 500 calc(var(--k) * .105) var(--sans); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.key .bar { position: absolute; left: calc(var(--k) * .12); right: calc(var(--k) * .12); bottom: calc(var(--k) * .06); height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .08); }
.key .bar i { display: block; height: 100%; border-radius: 2px; background: rgb(var(--c)); transition: width .8s ease; }

/* tecla de ação: ícone centralizado */
.key.act { align-items: center; justify-content: center; gap: calc(var(--k) * .09); text-align: center; }
.key.act .ico { width: calc(var(--k) * .42); height: calc(var(--k) * .42); }
.key.act .lbl { color: var(--ink); font-weight: 600; max-width: 100%; }

/* feedback de ação */
.key .fx { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(var(--ok), .92); color: #04200c; opacity: 0; pointer-events: none; transition: opacity .2s; }
.key .fx svg { width: 36%; height: 36%; }
.key.flash-ok .fx { animation: fx .9s ease forwards; }
.key.flash-err .fx { background: rgba(var(--crit), .94); color: #fff; animation: fx 1.2s ease forwards; }
.key.busy { animation: busy 1s ease-in-out infinite; }
@keyframes fx { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@keyframes busy { 50% { background: var(--surface-2); } }
@keyframes blink { 50% { opacity: .25; } }

/* espaços vazios: invisíveis; só aparecem ao editar */
.slot { display: grid; place-items: center; color: transparent; }
.slot::after { display: none; }
body.editing .slot { border: 1.5px dashed rgba(255, 255, 255, .16); color: var(--dim); cursor: pointer; transition: .15s; }
body.editing .slot:hover, .slot.drop { background: rgba(var(--cyan), .12); border-color: rgb(var(--cyan)); color: rgb(var(--cyan)); }
.slot svg { width: 28%; height: 28%; }
body.editing .key { cursor: grab; }
body.editing .key.sel { box-shadow: 0 0 0 3px rgb(var(--cyan)); }
.key.dragging { opacity: .35; }

/* ---------- Rodapé: uma linha discreta ---------- */
#devbar { display: flex; align-items: center; gap: 18px; padding: 4px 24px 14px; min-height: 34px; font-size: 12px; color: var(--dim); overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
#devbar::-webkit-scrollbar { display: none; }
.pill { display: flex; align-items: center; gap: 7px; font: 500 12px var(--sans); color: var(--mute); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.pill.on i { background: rgb(var(--ok)); }
#devs { display: flex; gap: 18px; }
.dev { display: flex; align-items: center; gap: 6px; color: var(--dim); }
.dev i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); }
.dev.on i { background: rgb(var(--ok)); }
.dev b { font-weight: 600; color: var(--mute); }
.dev span { font-variant-numeric: tabular-nums; }
.dev.off { opacity: .6; }
#viewers { margin-left: auto; color: var(--dim); }
#viewers b { color: var(--mute); font-weight: 600; }

/* ---------- Painel lateral (editor / notificações) ---------- */
.drawer { position: fixed; z-index: 30; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); transform: translateX(105%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  background: #121214; border-left: 1px solid var(--line); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); box-shadow: -20px 0 50px rgba(0, 0, 0, .5); }
.drawer.open { transform: none; }
.dhead { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.dhead h2 { margin: 0; font-size: 17px; font-weight: 700; flex: 1; }
.dbody { flex: 1; overflow-y: auto; padding: 16px 18px 30px; -webkit-overflow-scrolling: touch; }
.dbody::-webkit-scrollbar { width: 6px; } .dbody::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 3px; }

.sec { margin: 0 0 24px; }
.sec > h3 { margin: 0 0 10px; font-size: 13px; color: var(--mute); font-weight: 600; }
.f { margin-bottom: 12px; }
.f > label { display: block; font-size: 12px; color: var(--mute); margin-bottom: 5px; }
.f input[type=text], .f input[type=number], .f select, .f textarea, .f input:not([type]) {
  width: 100%; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid transparent; color: var(--ink); outline: none; font-size: 15px; transition: border-color .15s; }
.f textarea { font: 13px/1.45 var(--mono); min-height: 84px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: rgb(var(--cyan)); }
.f select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #98989f 50%), linear-gradient(135deg, #98989f 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.f select option { background: #1c1c1e; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chk { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 8px 0; cursor: pointer; }
.chk input { width: 20px; height: 20px; accent-color: rgb(var(--cyan)); }

.icons { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.icons button { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: var(--surface); color: var(--mute); transition: .12s; }
.icons button svg { width: 55%; height: 55%; }
.icons button:hover { color: var(--ink); background: var(--surface-2); }
.icons button.on { color: #fff; background: rgb(var(--cyan)); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.swatches button.on { box-shadow: 0 0 0 2px #121214, 0 0 0 4px #fff; }
.swatches input[type=color] { width: 32px; height: 32px; border: 0; background: none; padding: 0; border-radius: 50%; overflow: hidden; cursor: pointer; }

.rule { display: grid; grid-template-columns: 74px 1fr 100px; gap: 6px; margin-bottom: 8px; padding: 8px; border-radius: 12px; background: var(--surface); }
.rule .full { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 34px; gap: 6px; }
.rule select, .rule input { width: 100%; padding: 8px; border-radius: 8px; background: var(--surface-2); border: 0; color: var(--ink); font-size: 14px; outline: none; min-width: 0; appearance: none; -webkit-appearance: none; }
.rule select option { background: #1c1c1e; }

.btn { padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; background: var(--surface-2); transition: .12s; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn.pri { background: rgb(var(--cyan)); color: #fff; }
.btn.danger { color: rgb(var(--crit)); }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.note { font-size: 13px; color: var(--mute); line-height: 1.5; padding: 11px 13px; border-radius: 10px; background: var(--surface); }
.note code, .code { font: 12px/1.5 var(--mono); color: #9ecbff; word-break: break-all; }
.code { display: block; padding: 9px 11px; border-radius: 8px; background: #000; margin: 8px 0; user-select: text; -webkit-user-select: text; white-space: pre-wrap; }

/* notificações no painel */
.n { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 13px 14px; border-radius: 14px; background: var(--surface); margin-bottom: 8px; }
.n .d { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: rgb(var(--cyan)); }
.n.ok .d { background: rgb(var(--ok)); } .n.warn .d { background: rgb(var(--warn)); } .n.crit .d { background: rgb(var(--crit)); }
.n b { display: block; font-size: 15px; font-weight: 600; }
.n p { margin: 3px 0 0; font-size: 13.5px; color: var(--mute); line-height: 1.4; word-break: break-word; }
.n time { display: block; margin-top: 5px; font-size: 12px; color: var(--dim); }
.empty { text-align: center; color: var(--dim); padding: 50px 10px; font-size: 14px; }

/* avisos que aparecem na tela */
#toasts { position: fixed; z-index: 50; top: calc(env(safe-area-inset-top) + 64px); right: 18px; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 36px)); pointer-events: none; }
.toast { --c: var(--cyan); pointer-events: auto; display: grid; grid-template-columns: 4px 1fr; gap: 12px; padding: 13px 16px 13px 0; border-radius: 14px; overflow: hidden; background: #242426; box-shadow: 0 10px 30px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .06); animation: toastin .35s cubic-bezier(.2, .9, .3, 1.1); }
.toast.ok { --c: var(--ok); } .toast.warn { --c: var(--warn); } .toast.crit { --c: var(--crit); }
.toast::before { content: ""; background: rgb(var(--c)); }
.toast b { display: block; font-size: 15px; font-weight: 600; }
.toast p { margin: 2px 0 0; font-size: 13.5px; color: var(--mute); }
.toast.out { animation: toastout .3s ease forwards; }
@keyframes toastin { from { transform: translateY(-14px) scale(.97); opacity: 0; } }
@keyframes toastout { to { transform: translateY(-10px); opacity: 0; } }

#modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(0, 0, 0, .6); }
.card { width: min(380px, calc(100vw - 40px)); padding: 24px; border-radius: 20px; background: #242426; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: toastin .25s ease; }
.card h3 { margin: 0 0 6px; font-size: 19px; } .card p { margin: 0 0 20px; color: var(--mute); font-size: 15px; line-height: 1.45; }
.card .btns { justify-content: flex-end; }

#hint { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 52px); max-width: min(520px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 14px; background: #2c2c2e; font-size: 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
#lock { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: var(--bg); padding: 30px; }

/* ---------- Painel Claude ---------- */
body.view-claude #grid { display: none; }
#claude { width: 100%; max-width: 1100px; height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 22px; padding: 2px 0 4px; align-self: stretch; }
.col { min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.col > h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.col > h3 em { font-style: normal; font: 600 13px var(--sans); padding: 3px 10px; border-radius: 99px; background: rgba(var(--warn), .18); color: rgb(var(--warn)); }
.scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; -webkit-overflow-scrolling: touch; }
.scroll::-webkit-scrollbar { width: 6px; } .scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 3px; }

.panel { --c: var(--cyan); padding: 16px 18px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.panel.working { --c: var(--cyan); } .panel.waiting { --c: var(--warn); } .panel.idle { --c: var(--ok); }
.panel .hd { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.panel .hd b { font-size: 17px; font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel .tag { font: 600 12px var(--sans); padding: 3px 10px; border-radius: 99px; background: rgba(var(--c), .16); color: rgb(var(--c)); }
.panel .tag.working::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; animation: blink 1.2s infinite; vertical-align: 1px; }
.panel .meta { font-size: 13px; color: var(--dim); margin-bottom: 8px; }
.panel p { margin: 0; font-size: 14.5px; line-height: 1.5; color: #c7c7cc; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }

.ask { --c: var(--warn); background: #231c10; box-shadow: inset 0 0 0 1.5px rgba(var(--c), .6); }
.ask.done { background: var(--surface); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); opacity: .65; }
.ask .tool { font: 700 13px var(--sans); color: rgb(var(--warn)); }
.ask pre { margin: 10px 0 14px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .55); font: 13.5px/1.5 var(--mono); color: var(--ink); white-space: pre-wrap; word-break: break-all; max-height: 150px; overflow: auto; user-select: text; -webkit-user-select: text; }
.ask .cnt { font: 600 13px var(--sans); color: var(--mute); font-variant-numeric: tabular-nums; }
.ask .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.big { padding: 17px 12px; border-radius: 14px; font-size: 17px; font-weight: 650; transition: .12s; }
.big:active { transform: scale(.97); }
.big.ok { background: rgb(var(--ok)); color: #04200c; }
.big.no { background: var(--surface-2); color: rgb(var(--crit)); }
.res { font: 600 13px var(--sans); }
.res.allow { color: rgb(var(--ok)); } .res.deny { color: rgb(var(--crit)); } .res.expired { color: var(--mute); }

#approve { position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 14px); width: min(620px, calc(100vw - 24px)); animation: toastin .35s cubic-bezier(.2, .9, .3, 1.1); filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .7)); }
.more { font: 600 13px var(--sans); color: rgb(var(--warn)); margin: 0 0 6px 4px; }

@media (max-width: 900px) { #claude { grid-template-columns: 1fr; overflow-y: auto; } .col { min-height: auto; } .scroll { overflow: visible; } }
@media (max-width: 760px) {
  #top { padding: 10px 12px 4px; flex-wrap: wrap; }
  .now { display: none; }
  #stage { padding: 6px 12px 8px; }
  #grid { gap: 10px; }
  .drawer { width: 100vw; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Modo remoto, conversa e resposta ---------- */
.chip { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 99px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--mute); transition: .15s; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.chip.on { background: rgba(var(--cyan), .2); color: #7cb8ff; }
.chip.on i { background: rgb(var(--cyan)); }
.remote { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface); cursor: pointer; }
.remote div { flex: 1; } .remote b { display: block; font-size: 16px; margin-bottom: 2px; } .remote span { font-size: 13px; color: var(--mute); line-height: 1.35; }
.remote .sw { width: 46px; height: 28px; border-radius: 14px; background: var(--surface-3); position: relative; transition: .2s; flex: none; }
.remote .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; }
.remote.on .sw { background: rgb(var(--ok)); } .remote.on .sw::after { left: 21px; }
.panel { cursor: default; } .panel.sel { box-shadow: inset 0 0 0 2px rgb(var(--cyan)); }
.panel.replying { --c: var(--ok); background: #14231a; box-shadow: inset 0 0 0 1.5px rgba(var(--ok), .55); }
.convo { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; margin: 10px 0 4px; padding-right: 4px; }
.bub { padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.45; max-width: 92%; white-space: pre-wrap; word-break: break-word; user-select: text; -webkit-user-select: text; }
.bub.user { align-self: flex-end; background: rgb(var(--cyan)); color: #fff; border-bottom-right-radius: 5px; }
.bub.assistant { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 5px; }
.composer { margin-top: 12px; }
.composer .quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.q { padding: 8px 14px; border-radius: 99px; background: var(--surface-2); font-size: 14px; font-weight: 600; }
.q:active { transform: scale(.96); background: var(--surface-3); }
.composer .row { display: flex; gap: 8px; }
.composer input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; color: var(--ink); font-size: 16px; outline: none; user-select: text; -webkit-user-select: text; }
.composer input:focus { border-color: rgb(var(--cyan)); }
.panel .tag.replying { background: rgba(var(--ok), .18); color: rgb(var(--ok)); }

/* contexto do pedido de aprovação */
.ctx { margin: 10px 0 4px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .35); max-height: 210px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.ctxh { font: 600 12px var(--sans); color: var(--mute); margin-bottom: 2px; }
.ctx .bub { font-size: 13px; padding: 8px 11px; max-width: 96%; }
.ask .why { font-size: 14px; color: #e6d3a8; margin: 10px 0 0; line-height: 1.4; }
.ask .file { font: 600 12.5px var(--mono); color: var(--mute); margin: 10px 0 0; word-break: break-all; }
.ask pre.diff { padding: 10px 12px; }
.diff .del { display: block; color: #ff8a82; background: rgba(var(--crit), .12); margin: 0 -12px; padding: 0 12px; }
.diff .add { display: block; color: #6fe08e; background: rgba(var(--ok), .12); margin: 0 -12px; padding: 0 12px; }
#approve { max-height: calc(100vh - 90px); overflow-y: auto; border-radius: 18px; }
#approve .ask .acts { position: sticky; bottom: 0; padding-top: 8px; background: linear-gradient(180deg, transparent, #231c10 30%); }

/* ---------- Modo ilha (/island): janelinha compacta só com aprovações, respostas e estado ---------- */
body.island #top, body.island #devbar, body.island #grid, body.island #claude, body.island #hint { display: none !important; }
body.island #app { display: none; }
body.island #approve { position: fixed; inset: 0; transform: none; width: auto; max-height: none; padding: 12px; overflow: auto; filter: none; animation: none; display: flex; flex-direction: column; gap: 10px; border-radius: 0; }
body.island #approve .panel { margin: 0; }
body.island #toasts { top: auto; bottom: 12px; right: 12px; }
