/* A área de trabalho de exemplo (demo.js): uma tela de 1280 × 800 que encolhe para caber, com o design real do Capturei nos dois temas.
   As cores dos temas (.dlt claro, .ddk escuro) são as do app: brand/tokens.json e as telas do canvas de identidade. Nada aqui usa estilo na marcação:
   o que muda (posições, tamanhos) o script põe pelo CSSOM, que a política de segurança deixa. */

/* Barra de comandos (fora da tela) */
.d-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 16px; }
.d-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.d-pb { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 10px 18px; border-radius: 12px; border: 1.5px solid #4a4d5a; background: var(--tinta-2); color: var(--papel); font: 600 15px var(--texto); cursor: pointer; transition: border-color 0.15s; }
.d-pb:hover { border-color: var(--papel); }
.d-pb.pri { background: var(--verde); border-color: var(--verde); color: var(--tinta); font-weight: 700; }
.d-pb kbd { padding: 3px 7px; border-radius: 6px; background: var(--linha-escura); color: var(--prata); font-size: 12px; }
.d-pb.pri kbd { background: rgba(18, 20, 28, 0.14); color: var(--tinta); }
.d-pb svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.d-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.d-theme { display: flex; align-items: center; gap: 10px; }
.d-theme .mono { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--prata); }
.d-segd { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--tinta-2); border: 1px solid var(--linha-escura); }
.d-segd button { min-height: 34px; padding: 6px 14px; border-radius: 8px; border: 0; background: transparent; color: var(--papel); font: 600 14px var(--texto); cursor: pointer; }
.d-segd button[aria-pressed="true"] { background: var(--papel); color: var(--tinta); }
.d-tsw { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 14px 6px 10px; border-radius: 10px; background: var(--tinta-2); border: 1px solid var(--linha-escura); color: var(--papel); font: 600 14px var(--texto); cursor: pointer; }
.d-tsw .sw { position: relative; display: inline-block; width: 36px; height: 20px; border-radius: 10px; border: 1.5px solid var(--prata); }
.d-tsw .sw i { position: absolute; top: 3px; left: 3px; width: 11px; height: 11px; border-radius: 50%; background: var(--prata); transition: left 0.12s; }
.d-tsw[aria-checked="true"] .sw { border-color: var(--verde); background: var(--verde); }
.d-tsw[aria-checked="true"] .sw i { left: 19px; background: var(--tinta); }
.d-wrap { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #141b36; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--linha-escura); }
.d-hint { margin: 14px 2px 0; font-size: 15px; line-height: 1.5; color: var(--prata); min-height: 1.5em; }

/* A tela */
.dlt { --desk: #e7e4dc; --win: #f6f4ef; --pane: #fbfaf6; --card: #ffffff; --ctl: #ffffff; --ctlb: #d5d1c6; --line: #e7e4dc; --tx: #12141c; --tx2: #4a4d5a; --tx3: #6b6f7d; --hov: rgba(18, 20, 28, 0.06); --sel: rgba(18, 20, 28, 0.075); --dot: #0b8a5e; --pri: #12141c; --prit: #f6f4ef; --thumb: #e7e4dc; --focus: #12141c; --edge: rgba(18, 20, 28, 0.14); --shadow: 0 28px 64px rgba(18, 20, 28, 0.22), 0 2px 8px rgba(18, 20, 28, 0.1); --disk: #e7e4dc; --canvas: #ece9e2; --chip: #fbfaf6; --chipt: #12141c; --chipb: rgba(18, 20, 28, 0.12); --task: rgba(238, 236, 231, 0.92); }
.ddk { --desk: #2b2f3e; --win: #12141c; --pane: #171a25; --card: #1c1f2b; --ctl: #1c1f2b; --ctlb: #2b2f3e; --line: #2b2f3e; --tx: #f6f4ef; --tx2: #a8acba; --tx3: #a8acba; --hov: rgba(246, 244, 239, 0.06); --sel: rgba(246, 244, 239, 0.09); --dot: #2fd78b; --pri: #2fd78b; --prit: #12141c; --thumb: #1c1f2b; --focus: #f6f4ef; --edge: #2b2f3e; --shadow: 0 28px 64px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3); --disk: #2b2f3e; --canvas: #0d0f15; --chip: #12141c; --chipt: #f6f4ef; --chipb: #2b2f3e; --task: rgba(23, 26, 37, 0.92); }
.desk { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; transform-origin: 0 0; transform: scale(var(--s, 0.9)); overflow: hidden; user-select: none; -webkit-user-select: none; font: 14px/1.4 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; color: var(--tx); }
.desk *, .desk *::before, .desk *::after { box-sizing: border-box; }
.desk button, .desk input { font: inherit; color: inherit; }
.desk button { cursor: pointer; }
.desk [hidden] { display: none !important; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
svg.i .fl { fill: currentColor; stroke: none; }
.desk :focus-visible { outline: 2px solid var(--focus, #2fd78b); outline-offset: 2px; }
.dotc { fill: var(--dot); }

/* A cena: o papel de parede e a janela que você vai capturar (também usada, em escala, nas miniaturas e no editor) */
.sc { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; display: block; transform-origin: 0 0; transform: translate(calc(var(--tx, 0) * 1px), calc(var(--ty, 0) * 1px)) scale(var(--ts, 1)); }
.sc > * { position: absolute; display: block; }
.sc-bg { left: 0; top: 0; width: 1280px; height: 800px; background: radial-gradient(circle at 72% 18%, #3e5da8 0, #22305e 42%, #141b36 100%); }
.sc-win { left: 120px; top: 78px; width: 760px; height: 520px; border-radius: 8px; background: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); overflow: hidden; color: #374151; font: 17px "Segoe UI", system-ui, sans-serif; }
.sc-win > * { position: absolute; display: block; white-space: nowrap; }
.sc-bar { left: 0; top: 0; width: 760px; height: 36px; background: #f1f3f6; border-bottom: 1px solid #e3e6eb; }
.sc-dot { top: 13px; width: 10px; height: 10px; border-radius: 5px; background: #c8cdd6; }
.sc-dot.d1 { left: 16px; } .sc-dot.d2 { left: 33px; } .sc-dot.d3 { left: 50px; }
.sc-url { left: 84px; top: 8px; width: 320px; height: 20px; border-radius: 10px; background: #fff; border: 1px solid #e3e6eb; padding: 0 12px; font-size: 12px; line-height: 18px; color: #6b7280; }
.sc-h { left: 32px; top: 60px; font-size: 22px; font-weight: 600; line-height: 30px; color: #111827; }
.sc-r { left: 32px; line-height: 34px; }
.sc-r1 { top: 104px; } .sc-r2 { top: 138px; } .sc-r3 { top: 172px; } .sc-r4 { top: 206px; } .sc-r5 { top: 240px; font-weight: 600; color: #111827; }
.sc-lab, .sc-val { display: inline-block; }
.sc-lab.a { width: 74px; } .sc-lab.b { width: 88px; } .sc-val.a { width: 236px; } .sc-val.b { width: 132px; }
.sc-v { left: 440px; top: 64px; font-size: 15px; font-weight: 600; color: #111827; }
.sc-axis { left: 440px; top: 150px; width: 318px; height: 230px; border-bottom: 1px solid #e5e7eb; }
.sc-b { width: 38px; border-radius: 4px 4px 0 0; background: #4f7fdf; }
.sc-b.b1 { left: 440px; top: 280px; height: 100px; background: #6e95e6; }
.sc-b.b2 { left: 496px; top: 242px; height: 138px; }
.sc-b.b3 { left: 552px; top: 256px; height: 124px; }
.sc-b.b4 { left: 608px; top: 224px; height: 156px; }
.sc-b.b5 { left: 664px; top: 234px; height: 146px; }
.sc-n { left: 32px; top: 300px; font-size: 13px; color: #6b7280; }
.sc-hr { left: 32px; top: 340px; width: 380px; height: 1px; background: #e5e7eb; }
.sc-d { left: 32px; font-size: 13px; color: #6b7280; }
.sc-d.d1 { top: 356px; } .sc-d.d2 { top: 382px; } .sc-d.d3 { top: 408px; }
.d-note { position: absolute; left: 900px; top: 96px; width: 250px; font-size: 12px; line-height: 1.5; color: rgba(246, 244, 239, 0.78); }

/* Janelas */
.win { position: absolute; left: 80px; top: 36px; width: 1120px; height: 704px; z-index: 10; border-radius: 8px; overflow: hidden; background: var(--win); box-shadow: var(--shadow); outline: 1px solid var(--edge); display: flex; flex-direction: column; color: var(--tx); }
.win.ed { z-index: 12; }
.win.set { left: 340px; top: 150px; width: 600px; height: auto; z-index: 14; }
.w-tb { height: 32px; flex: 0 0 32px; display: flex; align-items: center; }
.w-tb .app { width: 16px; height: 16px; margin: 0 10px 0 14px; }
.w-tb .ttl { font-size: 12px; }
.w-tb .sp { flex: 1; }
.w-cap { width: 46px; height: 32px; border: 0; background: transparent; color: var(--tx); display: flex; align-items: center; justify-content: center; padding: 0; }
.w-cap svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1; }
button.w-cap:hover { background: var(--hov); }
.d-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 4px; border: 1px solid var(--ctlb); background: var(--ctl); color: var(--tx); font-size: 14px; line-height: 1; white-space: nowrap; }
.d-btn.pri { background: var(--pri); color: var(--prit); border-color: transparent; font-weight: 600; }
.d-btn:hover, .d-seg:hover { box-shadow: inset 0 0 0 40px var(--hov); }
.d-btn:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
.d-seg { height: 28px; padding: 0 14px; border: 0; border-radius: 4px; background: transparent; color: var(--tx); font-size: 13px; }
.d-seg.on, .d-seg[aria-pressed="true"] { background: var(--pri); color: var(--prit); font-weight: 600; }

/* Biblioteca */
.lib-body { flex: 1; min-height: 0; display: flex; }
.lib-nav { flex: 0 0 220px; padding: 8px 8px 12px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.lib-logo { height: 52px; display: flex; align-items: center; padding: 0 12px 6px; color: var(--tx); }
.lib-logo svg { width: 116px; height: 27px; }
.navlist { display: flex; flex-direction: column; gap: 2px; }
.nav-h { padding: 18px 12px 6px; font-size: 12px; font-weight: 600; color: var(--tx2); }
.d-nav { display: flex; align-items: center; gap: 12px; width: 100%; height: 36px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; color: var(--tx); font-size: 14px; text-align: left; position: relative; }
.d-nav:hover { background: var(--hov); }
.d-nav.on { background: var(--sel); font-weight: 600; }
.d-nav.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--dot); }
.d-nav span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-nav em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--tx2); }
.grow { flex: 1; }
.trial { margin: 0 4px 8px; padding: 12px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.trial b { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.trial b i { width: 8px; height: 8px; border-radius: 4px; background: var(--dot); }
.trial p { margin: 0; font-size: 12px; line-height: 1.4; color: var(--tx2); }
.trial .bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.trial .bar i { display: block; width: 36%; height: 100%; background: var(--tx); }
.lib-mainwrap { flex: 1; min-width: 0; display: flex; background: var(--pane); border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-top-left-radius: 8px; }
.lib-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lib-tools { padding: 18px 20px 14px; display: flex; align-items: center; gap: 8px; }
.lib-tools .d-btn { flex: none; }
.lib-search { flex: 1 1 100px; min-width: 0; max-width: 300px; margin-right: auto; height: 32px; border-radius: 4px; background: var(--ctl); border: 1px solid var(--ctlb); border-bottom-color: var(--tx3); display: flex; align-items: center; gap: 10px; padding: 0 12px; color: var(--tx3); }
.lib-search input { flex: 1; width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--tx); font-size: 14px; }
.lib-grid { flex: 1; min-height: 0; padding: 2px 20px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: max-content; gap: 16px 14px; align-content: start; overflow: hidden; }
.lib-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 0 40px 40px; text-align: center; }
.lib-empty .dk { width: 140px; height: 140px; border-radius: 70px; background: var(--disk); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.lib-empty .dk img { width: 100px; height: auto; margin-bottom: -6px; }
.lib-empty b { font-size: 18px; font-weight: 600; }
.lib-empty p { margin: 0; max-width: 360px; font-size: 14px; line-height: 1.5; color: var(--tx2); }
.lib-status { flex: 0 0 32px; margin-top: auto; display: flex; align-items: center; gap: 16px; padding: 0 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--tx2); }
.lib-status .ok { display: flex; align-items: center; gap: 6px; }
.lib-status .ok i { width: 6px; height: 6px; border-radius: 3px; background: var(--dot); }
.d-card { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: transparent; color: var(--tx); text-align: left; min-width: 0; }
.d-card .th { transition: box-shadow 0.12s; }
.d-card:hover .th { box-shadow: 0 0 0 1px var(--ctlb), 0 6px 16px rgba(18, 20, 28, 0.1); }
.d-card.on .th, .d-card.on:hover .th { box-shadow: 0 0 0 2px var(--dot); }
.th { position: relative; display: block; height: 128px; border-radius: 6px; overflow: hidden; background: var(--thumb); }
.th > img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.th .tx { position: absolute; inset: 0; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; font-size: 12px; line-height: 1.5; white-space: pre-line; color: var(--tx); overflow: hidden; display: block; }
.th .tb2 { position: absolute; right: 8px; bottom: 8px; height: 22px; padding: 0 7px; border-radius: 4px; background: rgba(18, 20, 28, 0.86); color: #f6f4ef; display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; }
.th .tb2 svg { width: 12px; height: 12px; stroke-width: 2.6; }
.th .play { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 18px; background: rgba(18, 20, 28, 0.62); border: 1px solid rgba(246, 244, 239, 0.45); display: flex; align-items: center; justify-content: center; }
.th .play svg { width: 14px; height: 14px; margin-left: 2px; fill: #f6f4ef; stroke: none; }
.th .dur { position: absolute; right: 8px; bottom: 8px; height: 20px; padding: 0 6px; border-radius: 4px; background: rgba(18, 20, 28, 0.86); color: #f6f4ef; display: flex; align-items: center; font: 500 11px "JetBrains Mono", ui-monospace, monospace; }
.ct { display: block; min-width: 0; }
.ct .t { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct .m { display: block; margin-top: 2px; font-size: 12px; color: var(--tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct .r { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 600; color: var(--tx); }
.insp { flex: 0 0 280px; border-left: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.insp .th { height: 150px; outline: 1px solid var(--line); }
.insp .th .tx { font-size: 13px; padding: 14px 16px; }
.insp h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: 0; }
.insp .kind { margin-top: 2px; font-size: 12px; color: var(--tx2); }
.insp .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.insp .sec { border-top: 1px solid var(--line); padding-top: 12px; }
.insp .sec b { display: block; font-size: 12px; font-weight: 600; color: var(--tx2); }
.insp dl { margin: 8px 0 0; display: grid; grid-template-columns: 72px 1fr; row-gap: 8px; font-size: 13px; line-height: 1.35; }
.insp dt { color: var(--tx2); }
.insp dd { margin: 0; }
.insp dd.u { text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }

/* Configurações */
.set .body { padding: 6px 28px 26px; background: var(--pane); border-top: 1px solid var(--line); }
.set h3 { margin: 18px 0 4px; font-size: 20px; font-weight: 600; letter-spacing: 0; }
.set .lead { margin: 0 0 14px; font-size: 13px; color: var(--tx2); }
.set .srows { padding: 16px 18px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); }
.set .rw { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.set .rw:first-child { border-top: 0; padding-top: 0; }
.set .rw:last-child { padding-bottom: 0; }
.set .rw .tt { flex: 1; }
.set .rw .tt b { display: block; font-size: 14px; font-weight: 600; }
.set .rw .tt span { display: block; font-size: 12px; color: var(--tx2); }
.set .segw { display: flex; gap: 2px; padding: 2px; border-radius: 6px; background: var(--ctl); border: 1px solid var(--ctlb); }
.set .swc { position: relative; width: 40px; height: 20px; flex: 0 0 40px; border-radius: 10px; padding: 0; border: 1px solid var(--tx2); background: transparent; }
.set .swc i { position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 6px; background: var(--tx2); }
.set .swc[aria-checked="true"] { background: var(--pri); border-color: var(--pri); }
.set .swc[aria-checked="true"] i { left: 23px; background: var(--prit); }
.set .val { font-size: 13px; color: var(--tx2); }

/* Editor */
.e-tools { height: 56px; flex: 0 0 56px; padding: 0 12px; display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); }
.e-tools .sepv { width: 1px; height: 24px; margin: 0 7px; background: var(--line); }
.e-tools .sp { flex: 1; }
.d-tb { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 4px; background: transparent; color: var(--tx); padding: 0; }
.d-tb svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.d-tb:hover { background: var(--hov); }
.d-tb.on, .d-tb.on:hover { background: var(--pri); color: var(--prit); }
.d-tb:disabled { color: var(--tx3); opacity: 0.55; cursor: default; }
.e-tools .d-btn.pri { margin-left: 10px; height: 34px; padding: 0 18px; }
.e-opts { flex: 0 0 auto; min-height: 52px; padding: 10px 16px; display: flex; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); }
.e-opts .inks { display: flex; align-items: center; gap: 8px; }
.d-sw { width: 24px; height: 24px; border-radius: 12px; border: 0; padding: 0; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.5); }
.d-sw.on { box-shadow: 0 0 0 2px var(--pane), 0 0 0 4px var(--tx); }
.e-opts label { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--tx2); }
.e-opts input[type="range"] { width: 112px; accent-color: var(--pri); }
.e-opts .mono { font: 400 12px "JetBrains Mono", ui-monospace, monospace; min-width: 40px; }
.e-opts .dica { flex: 1; font-size: 13px; color: var(--tx2); text-align: right; }
.e-canvas { flex: 1; min-height: 0; background: var(--canvas); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.e-frame { padding: 0; }
.e-frame.bg { border-radius: 16px; background: linear-gradient(135deg, #6e95e6, #8b5cf6); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }
.e-box { position: relative; overflow: hidden; background: #141b36; border-radius: 2px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35); }
.e-frame.bg .e-box { border-radius: 10px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4); }
.e-anns, .e-ov { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.e-ov { touch-action: none; }
.e-ov.draw { cursor: crosshair; }
.e-status { flex: 0 0 32px; display: flex; align-items: center; gap: 16px; padding: 0 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--tx2); }
.e-status .mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.e-status .sp { flex: 1; }
.an { position: absolute; display: block; pointer-events: none; }
.an.rect { border-style: solid; }
.an.blur { backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); background: rgba(128, 128, 128, 0.22); border-radius: 3px; }
.an.arrow { height: 0; transform-origin: 0 0; }
.an.arrow i { position: absolute; display: block; }
.an.arrow .ln { left: 0; }
.an.arrow .hd { right: 0; width: 0; height: 0; }
.an.num { display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; font-family: "Figtree", system-ui, sans-serif; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9); }

/* Cartões de prévia */
.shelf { position: absolute; right: 12px; bottom: 60px; z-index: 20; display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.shelf-card { position: relative; width: 300px; height: 176px; border-radius: 10px; overflow: hidden; background: #141b36; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); outline: 1px solid rgba(246, 244, 239, 0.14); }
.shelf-card .sl { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; background: linear-gradient(180deg, rgba(18, 20, 28, 0), rgba(18, 20, 28, 0.82)); display: flex; align-items: flex-end; padding: 0 12px 10px; font-size: 12px; font-weight: 600; color: #f6f4ef; }
.shelf-card .acts { position: absolute; right: 8px; top: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity 0.12s; }
.shelf-card:hover .acts, .shelf-card:focus-within .acts { opacity: 1; }
.d-act { width: 30px; height: 30px; border-radius: 15px; border: 0; padding: 0; display: flex; align-items: center; justify-content: center; background: rgba(18, 20, 28, 0.66); color: #f6f4ef; box-shadow: 0 0 0 1px rgba(246, 244, 239, 0.18); }
.d-act:hover { background: #12141c; }
.d-act svg { width: 15px; height: 15px; stroke-width: 2.4; }

/* Barra de tarefas, aba, painel */
.task { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; z-index: 25; background: var(--task); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--edge); display: flex; align-items: center; justify-content: center; gap: 8px; }
.task .ic { width: 28px; height: 28px; border-radius: 7px; background: var(--hov); border: 1px solid var(--edge); }
.task .st { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.task .st svg { width: 18px; height: 18px; fill: #4f7fdf; }
.task .tray { position: absolute; right: 14px; top: 0; height: 48px; display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--tx); text-align: right; line-height: 1.25; }
.tray-b { width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--tx); display: flex; align-items: center; justify-content: center; padding: 0; }
.tray-b:hover { background: var(--hov); }
.tray-b svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tray-b circle { fill: var(--dot); }
.tray-b.rec circle { fill: #e5383b; }
.tab { position: absolute; right: 0; top: 292px; width: 18px; height: 56px; z-index: 28; border: 0; padding: 0 0 0 4px; border-radius: 18px 0 0 18px; background: #12141c; box-shadow: -2px 0 10px rgba(0, 0, 0, 0.35), inset 0 0 0 1px #2b2f3e; display: flex; align-items: center; }
.tab i { display: block; width: 9px; height: 9px; border-radius: 5px; background: #2fd78b; }
.tab.rec i { background: #ff5252; }
.panel { position: absolute; right: 0; top: 36px; bottom: 60px; width: 322px; z-index: 40; border-radius: 14px 0 0 14px; background: #12141c; border: 1px solid #2b2f3e; border-right: 0; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; color: #f6f4ef; box-shadow: -14px 0 36px rgba(0, 0, 0, 0.4); font-family: "Figtree", system-ui, sans-serif; transform: translateX(110%); visibility: hidden; transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.3, 1), visibility 0s linear 0.2s; }
.panel.open { transform: none; visibility: visible; transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.3, 1), visibility 0s; }
.panel .hd { display: flex; align-items: center; gap: 10px; }
.panel .disk2 { width: 48px; height: 48px; border-radius: 24px; background: #2b2f3e; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.panel .disk2 img { width: 50px; height: auto; margin-bottom: -3px; }
.panel .hd .t { flex: 1; }
.panel .hd .t b { display: block; font-size: 15px; }
.panel .hd .t span { font-size: 12px; color: #a8acba; }
.pill2 { height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid #2b2f3e; background: transparent; color: #a8acba; font: 600 12px "Figtree", system-ui, sans-serif; }
.pill2[aria-pressed="true"] { border-color: #2fd78b; background: #2fd78b; color: #12141c; }
.xbtn { width: 28px; height: 28px; border-radius: 14px; border: 0; background: transparent; color: #a8acba; display: flex; align-items: center; justify-content: center; padding: 0; }
.xbtn:hover { background: #252937; }
.xbtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.psearch { height: 36px; border-radius: 8px; background: #1c1f2b; border: 1px solid #2b2f3e; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #a8acba; font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.d-tile { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px 8px; border-radius: 8px; background: #1c1f2b; color: #f6f4ef; border: 1px solid #2b2f3e; }
.d-tile:hover { background: #252937; }
.d-tile b { font-size: 13px; }
.d-tile small { font: 400 10px "JetBrains Mono", ui-monospace, monospace; color: #a8acba; }
.d-tile svg { width: 20px; height: 20px; stroke-width: 1.8; }
.panel .rh { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: #a8acba; }
.panel .rh button { border: 0; background: transparent; color: #a8acba; font: 400 12px "Figtree", system-ui, sans-serif; text-decoration: underline; text-underline-offset: 2px; padding: 4px; }
.recents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.recents > div { height: 66px; border-radius: 8px; position: relative; overflow: hidden; }
.recents img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.recents .cap { background: #1c1f2b; border: 1px solid #2b2f3e; padding: 9px 10px; font-size: 11px; line-height: 1.4; }
.recents .dur { position: absolute; right: 6px; top: 6px; padding: 1px 5px; border-radius: 3px; background: rgba(18, 20, 28, 0.86); font: 10px "JetBrains Mono", ui-monospace, monospace; color: #f6f4ef; }
.drop { flex: 1; min-height: 44px; border-radius: 12px; border: 1.5px dashed #4a4d5a; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #a8acba; text-align: center; padding: 0 10px; }

/* Gravação, aviso de baixo */
.recbar { position: absolute; left: 50%; bottom: 64px; z-index: 47; transform: translateX(-50%); height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 8px 0 18px; border-radius: 26px; background: var(--card); color: var(--tx); border: 1px solid var(--edge); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); }
.recbar i { width: 10px; height: 10px; border-radius: 5px; background: #e5383b; animation: dpulse 1.2s ease-in-out infinite; }
.recbar .mono { font: 500 15px "JetBrains Mono", ui-monospace, monospace; }
.recbar button { height: 36px; padding: 0 18px; border: 0; border-radius: 18px; background: #ff5252; color: #12141c; font-weight: 700; font-size: 14px; }
.toast { position: absolute; left: 50%; bottom: 66px; z-index: 48; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 10px 22px 10px 12px; border-radius: 12px; background: var(--card); color: var(--tx); border: 1px solid var(--edge); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); }
.toast .dk { width: 52px; height: 52px; border-radius: 26px; background: var(--disk); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; flex: 0 0 52px; }
.toast .dk img { width: 50px; height: auto; margin-bottom: -3px; }
.toast b { display: block; font-size: 15px; font-weight: 600; }
.toast span { display: block; margin-top: 2px; font-size: 13px; color: var(--tx2); }

/* O Tutu */
.pet { position: absolute; z-index: 45; cursor: grab; touch-action: none; transition: left 0.4s cubic-bezier(0.3, 1.25, 0.5, 1), top 0.4s cubic-bezier(0.3, 1.25, 0.5, 1), opacity 0.25s; }
.pet.dragging { cursor: grabbing; transition: opacity 0.25s; }
.pet.off { opacity: 0; pointer-events: none; }
.pet .sh { position: absolute; left: 50%; bottom: 2px; width: 60%; height: 10%; border-radius: 50%; background: rgba(0, 0, 0, 0.28); filter: blur(5px); transform: translateX(-50%); }
.pet .art { position: absolute; inset: 0; transform-origin: 50% 100%; }
.pet .art img { position: absolute; bottom: 0; left: 50%; max-width: none; transform-origin: 50% 100%; pointer-events: none; -webkit-user-drag: none; filter: drop-shadow(0 0 1.2px rgba(255, 255, 255, 0.55)) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35)); }
.pet .art img.f-red { filter: hue-rotate(208deg) saturate(1.15) drop-shadow(0 0 1.2px rgba(255, 255, 255, 0.55)) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35)); }
.pet .art img.f-gray { filter: saturate(0) drop-shadow(0 0 1.2px rgba(255, 255, 255, 0.55)) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35)); }
.bubble { position: absolute; z-index: 46; max-width: 272px; min-width: 96px; padding: 10px 14px; border-radius: 12px; background: var(--card); color: var(--tx); border: 1px solid var(--edge); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3); pointer-events: none; opacity: 0; transform: translateY(6px) scale(0.97); transition: opacity 0.18s, transform 0.18s; }
.bubble.show { opacity: 1; transform: none; }
.bubble b { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; line-height: 1.3; }
.bubble b i { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 4px; background: var(--dot); }
.bubble b i.err { background: #8a8d99; }
.bubble b i.rec { background: #e5383b; }
.bubble span { display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--tx2); }
.bubble span:empty { display: none; }
.breathe { animation: dbreathe 3.4s ease-in-out infinite; }
.snore { animation: dbreathe 5.2s ease-in-out infinite; }
.jog { animation: djog 0.42s ease-in-out infinite; }
@keyframes dbreathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, 0.985); } }
@keyframes djog { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-4%) rotate(1.5deg); } }
@keyframes dpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* A seleção de área (tela congelada) */
.sel { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; z-index: 70; cursor: crosshair; touch-action: none; background: rgba(10, 12, 20, 0.52); }
.sel.nodim { background: transparent; }
.srect { position: absolute; box-shadow: 0 0 0 2000px rgba(10, 12, 20, 0.52); outline: 1px solid rgba(255, 255, 255, 0.9); }
.srect .c { position: absolute; width: 22px; height: 22px; border: 0 solid #fff; filter: drop-shadow(0 0 1.5px rgba(10, 12, 20, 0.9)); }
.srect .c.tl { left: -4px; top: -4px; border-left-width: 4px; border-top-width: 4px; border-top-left-radius: 8px; }
.srect .c.tr { right: -4px; top: -4px; border-right-width: 4px; border-top-width: 4px; border-top-right-radius: 8px; }
.srect .c.bl { left: -4px; bottom: -4px; border-left-width: 4px; border-bottom-width: 4px; border-bottom-left-radius: 8px; }
.srect .dt { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 7px; background: #2fd78b; box-shadow: 0 0 0 2px rgba(18, 20, 28, 0.6); }
.schip, .hexchip { position: absolute; display: flex; align-items: center; background: var(--chip); color: var(--chipt); border: 1px solid var(--chipb); font: 500 12px "JetBrains Mono", ui-monospace, monospace; white-space: nowrap; }
.schip { left: 0; height: 24px; padding: 0 9px; border-radius: 12px; }
.cross { position: absolute; width: 21px; height: 21px; pointer-events: none; fill: none; stroke-linecap: round; }
.mag { position: absolute; width: 120px; height: 120px; border-radius: 10px; overflow: hidden; pointer-events: none; box-shadow: 0 0 0 2px #fff, 0 10px 24px rgba(0, 0, 0, 0.45); }
.mag .grid { position: absolute; inset: 0; background-image: repeating-linear-gradient(90deg, rgba(18, 20, 28, 0.12) 0 1px, transparent 1px 10px), repeating-linear-gradient(0deg, rgba(18, 20, 28, 0.12) 0 1px, transparent 1px 10px); }
.mag .ctr { position: absolute; left: 55px; top: 55px; width: 10px; height: 10px; border: 1.5px solid #fff; outline: 1px solid #12141c; }
.hexchip { width: 120px; height: 26px; border-radius: 13px; justify-content: center; gap: 6px; font-size: 11px; pointer-events: none; }
.hexchip i { width: 10px; height: 10px; border-radius: 3px; box-shadow: 0 0 1px rgba(128, 128, 128, 0.5); }
.poschip { position: absolute; width: 120px; text-align: center; font: 400 11px "JetBrains Mono", ui-monospace, monospace; color: #f6f4ef; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); pointer-events: none; }
.selhint { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); height: 34px; padding: 0 8px 0 16px; border-radius: 17px; background: var(--chip); color: var(--chipt); border: 1px solid var(--chipb); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); display: flex; align-items: center; gap: 10px; font-size: 12.5px; white-space: nowrap; cursor: default; }
.selhint svg { width: 15px; height: 15px; }
.selhint kbd { font: 400 11px "JetBrains Mono", ui-monospace, monospace; padding: 1px 5px; border-radius: 3px; border: 1px solid var(--chipb); }
.selhint button { height: 26px; padding: 0 12px; border-radius: 13px; border: 1px solid var(--chipb); background: transparent; color: var(--chipt); font-weight: 600; font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  .breathe, .snore, .jog, .recbar i { animation: none; }
  .pet, .bubble, .panel { transition: none; }
}
.bubble b em { font-style: normal; }
