/* Teleprompter Studio · estilos ------------------------------------------------ */

:root {
  --bg: #07070a;
  --surface: #0f1015;
  --card: #15161d;
  --card-2: #1c1d27;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f4f4f6;
  --muted: #9a9aa6;
  --muted-2: #6b6b78;
  --brand: #bc00ee;
  --brand-2: #e567ff;
  --brand-soft: rgba(188, 0, 238, 0.16);
  --ok: #34d399;
  --warn: #fbbf24;
  --rec: #ef4444;
  --radius: 14px;
  --radius-sm: 10px;
  --dock-h: 0px;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
[x-cloak] { display: none !important; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: 0.45; cursor: default; }
::selection { background: var(--brand); color: #fff; }

.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 22px; height: 22px; }
.ic.fill { fill: currentColor; stroke: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Botões ------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--line);
  color: var(--text); font-weight: 600; font-size: 13px;
  transition: background .15s, border-color .15s, transform .08s, opacity .15s;
  white-space: nowrap; user-select: none;
}
.btn:hover { background: var(--card-2); border-color: var(--line-2); }
.btn:active { transform: scale(0.97); }
.btn.icon { width: 40px; padding: 0; }
.btn.primary { background: var(--brand); border-color: transparent; color: #fff; }
.btn.primary:hover { background: #cb1cf8; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.btn.danger { color: #fca5a5; }
.btn.danger:hover { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.3); }
.btn.rec { background: var(--rec); border-color: transparent; color: #fff; }
.btn.rec.on { animation: recpulse 1.4s ease-in-out infinite; }
.btn.big { min-height: 48px; padding: 0 20px; font-size: 14px; border-radius: 12px; }
.btn.on { background: var(--brand-soft); border-color: rgba(188, 0, 238, 0.45); color: var(--brand-2); }
.btn.ok-on { background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.4); color: var(--ok); }
@keyframes recpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); } 50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } }

.seg { display: inline-flex; padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); gap: 2px; }
.seg button { min-height: 32px; padding: 0 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1; }
.seg button.on { background: var(--card-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg.wrap { flex-wrap: wrap; }

.stepper { display: inline-flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); height: 40px; overflow: hidden; }
.stepper button { width: 36px; height: 100%; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.stepper button:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.stepper .val { min-width: 56px; text-align: center; display: flex; flex-direction: column; align-items: center; line-height: 1; padding: 0 4px; }
.stepper .val b { font-family: var(--font-mono); font-size: 13px; color: var(--brand-2); font-weight: 600; }
.stepper .val small { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 3px; }

.field { width: 100%; min-height: 42px; padding: 0 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); color: var(--text); outline: none; }
.field:focus { border-color: rgba(188, 0, 238, 0.6); box-shadow: 0 0 0 3px var(--brand-soft); }
.field::placeholder { color: var(--muted-2); }
select.field { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239a9aa6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }

input[type=range] { width: 100%; accent-color: var(--brand); height: 28px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line-2); transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--brand); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(18px); }

/* Cabeçalho ---------------------------------------------------------------- */
.top {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: calc(8px + var(--safe-t)) 12px 8px;
  background: rgba(10, 10, 14, 0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  min-height: 56px; z-index: 40; flex: none;
  transition: opacity .3s, transform .3s;
}
.is-reading.hud-hidden .top { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.brand { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(140deg, #d43cff, #7a00b8); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 20px -6px rgba(188, 0, 238, 0.7); }
.brand .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.title-wrap { min-width: 0; }
.title-input { width: 100%; background: transparent; border: 0; outline: none; font-weight: 700; font-size: 15px; padding: 2px 6px; margin-left: -6px; border-radius: 6px; color: var(--text); text-overflow: ellipsis; }
.title-input:focus { background: rgba(255, 255, 255, 0.06); }
.title-input::placeholder { color: var(--muted-2); font-weight: 600; }
.title-static { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.meta .sync { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 400px) { .meta .sync span { display: none; } }
.meta .sync .ic { width: 12px; height: 12px; }
.meta .sync.ok { color: var(--ok); }
.meta .sync.warn { color: var(--warn); }
.meta .sync.spin .ic { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.top-actions { display: flex; gap: 6px; }
.desktop-only { display: none; }
@media (min-width: 760px) { .desktop-only { display: inline-flex; } .mobile-only { display: none !important; } }

/* Editor ------------------------------------------------------------------- */
main { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.editor { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; max-width: 980px; margin: 0 auto; padding: 10px 12px calc(10px + var(--safe-b)); gap: 10px; }
.toolbar { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.toolbar .btn { padding: 0 12px; }
@media (max-width: 420px) { .toolbar .btn .lbl { display: none; } .toolbar .btn { padding: 0 10px; } }
.toolbar .spacer { flex: 1; }
.editor-box { flex: 1; min-height: 0; position: relative; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.editor-box:focus-within { border-color: rgba(188, 0, 238, 0.45); }
.editor-box textarea { flex: 1; min-height: 0; width: 100%; resize: none; background: transparent; border: 0; outline: none; padding: 16px; font-size: 16px; line-height: 1.6; color: var(--text); }
.editor-box textarea::placeholder { color: var(--muted-2); }
.editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.editor-foot .stats { display: flex; gap: 12px; color: var(--muted); font-size: 12px; align-items: center; flex-wrap: wrap; }
@media (max-width: 520px) { .editor-foot .stats .words { display: none; } }
.editor-foot .stats b { font-family: var(--font-mono); color: var(--text); font-weight: 600; }
.menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; padding: 6px; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.9); z-index: 60; }
.menu button { width: 100%; display: flex; gap: 10px; align-items: center; padding: 10px 10px; border-radius: 8px; font-size: 13px; text-align: left; color: var(--text); }
.menu button:hover { background: rgba(255, 255, 255, 0.06); }
.menu button .ic { color: var(--brand-2); }
.menu small { display: block; color: var(--muted); font-weight: 400; font-size: 11.5px; }
.rel { position: relative; }

/* Palco de leitura --------------------------------------------------------- */
.stage { position: absolute; inset: 0; background: #050507; overflow: hidden; }
.stage .bgcam { position: absolute; inset: 0; z-index: 0; }
.stage .bgcam video { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.stage .bgcam::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, .75)); }
.mirror-preview video { transform: scaleX(-1); }

.viewport { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; z-index: 5; scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: pointer; }
.viewport::-webkit-scrollbar { display: none; }
.viewport.masked { mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .8) 16%, #000 30%, #000 70%, rgba(0, 0, 0, .8) 84%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .8) 16%, #000 30%, #000 70%, rgba(0, 0, 0, .8) 84%, transparent 100%); }
.tp-text {
  margin: 0 auto; padding: 0 18px; width: 100%;
  font-weight: 700; letter-spacing: -0.005em; white-space: pre-wrap; word-break: break-word;
  text-wrap: pretty;
}
.tp-text.f-sans { font-family: var(--font); }
.tp-text.f-serif { font-family: var(--font-serif); font-weight: 600; }
.tp-text.f-mono { font-family: var(--font-mono); font-weight: 600; letter-spacing: -0.02em; }
.c-white { color: #fff; }
.c-yellow { color: #fde047; }
.c-green { color: #4ade80; }
.c-cyan { color: #38bdf8; }
.c-amber { color: #fb923c; }
.mirror-h { transform: scaleX(-1); }
.mirror-v { transform: scaleY(-1); }
.mirror-both { transform: scale(-1, -1); }
.tp-text > .tp-h:first-child { margin-top: 0; }
.tp-h { display: block; font-size: 0.42em; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-2); font-weight: 800; margin: 0.6em 0 0.2em; line-height: 1.4; opacity: .95; }
.tp-pause { display: inline-flex; align-items: center; gap: .3em; vertical-align: middle; font-size: 0.38em; font-family: var(--font-mono); font-weight: 600; letter-spacing: .06em; padding: .35em .9em; border-radius: 999px; background: rgba(251, 191, 36, .16); color: #fcd34d; border: 1px solid rgba(251, 191, 36, .4); line-height: 1; }
.tp-pause .ic { width: 1.1em; height: 1.1em; }
.tp-tag { display: inline-block; vertical-align: middle; font-size: 0.36em; font-family: var(--font-mono); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .35em .8em; border-radius: 6px; background: var(--brand-soft); color: var(--brand-2); border: 1px solid rgba(188, 0, 238, .45); line-height: 1; }
.tp-em { font-style: normal; color: var(--brand-2); text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .16em; text-decoration-color: rgba(229, 103, 255, .6); }
.c-yellow .tp-em, .c-green .tp-em, .c-cyan .tp-em, .c-amber .tp-em { color: #fff; text-decoration-color: currentColor; }
.tp-empty { color: var(--muted); font-size: 18px; font-weight: 500; text-align: center; padding: 0 24px; }

.guide { position: absolute; left: 0; right: 0; z-index: 8; pointer-events: none; transform: translateY(-50%); display: flex; align-items: center; }
.guide::before, .guide::after { content: ''; position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(229, 103, 255, .55) 20%, rgba(229, 103, 255, .55) 80%, transparent); }
.guide::before { top: 0; }
.guide::after { bottom: 0; }
.guide .mark { position: absolute; top: 50%; transform: translateY(-50%); width: 0; height: 0; border: 7px solid transparent; }
.guide .mark.l { left: 6px; border-left: 10px solid var(--brand-2); }
.guide .mark.r { right: 6px; border-right: 10px solid var(--brand-2); }

.progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255, 255, 255, .08); z-index: 30; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .12s linear; }

.hud { position: absolute; top: 12px; right: 12px; z-index: 30; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; transition: opacity .3s; pointer-events: none; }
.hud-hidden .hud { opacity: 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: rgba(12, 12, 18, .82); border: 1px solid var(--line-2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.pill b { color: var(--text); font-weight: 600; }
.pill .st { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.pill .st.on { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.pill.rec { color: #fff; background: rgba(239, 68, 68, .9); border-color: transparent; }
.pill.rec .st { background: #fff; animation: blink 1s steps(2) infinite; }
@keyframes blink { to { opacity: .2; } }
.vu { width: 56px; height: 6px; background: rgba(255, 255, 255, .1); border-radius: 999px; overflow: hidden; }
.vu i { display: block; height: 100%; background: var(--ok); transition: width .06s; }
.vu i.hot { background: var(--rec); }

/* Ilha de controles -------------------------------------------------------- */
.dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 10px calc(10px + var(--safe-b)); background: linear-gradient(to top, rgba(5, 5, 7, .98) 68%, rgba(5, 5, 7, .85) 88%, transparent); transition: opacity .3s, transform .3s; }
.hud-hidden .dock { opacity: 0; transform: translateY(12px); pointer-events: none; }
.dock-row { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 640px; }
.dock .stepper { flex: 1; max-width: 200px; justify-content: space-between; background: rgba(21, 22, 29, .9); }
.play { width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px -8px rgba(188, 0, 238, .8); flex: none; transition: transform .1s, background .15s; }
.play .ic { width: 28px; height: 28px; }
.play:active { transform: scale(.94); }
.play.on { background: #f59e0b; box-shadow: 0 10px 30px -8px rgba(245, 158, 11, .7); }
.dock .btn { background: rgba(21, 22, 29, .9); height: 48px; min-width: 48px; border-radius: 14px; flex-direction: column; gap: 2px; font-size: 10px; font-weight: 600; letter-spacing: .02em; color: var(--muted); padding: 0 10px; }
.dock .btn .ic { width: 20px; height: 20px; }
.dock .btn.on, .dock .btn.ok-on { color: var(--brand-2); }
.dock .btn.ok-on { color: var(--ok); }
.dock .btn.rec { color: #fff; background: var(--rec); }
.dock .btn.rec.off { background: rgba(21, 22, 29, .9); color: #fca5a5; }

/* Janela flutuante da câmera ---------------------------------------------- */
.pip { position: fixed; top: 76px; right: 16px; z-index: 55; background: #000; border-radius: 14px; overflow: hidden; border: 2px solid rgba(188, 0, 238, .8); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9); touch-action: none; cursor: move; }
.pip video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pip.r-9-16 { width: 150px; height: 266px; }
.pip.r-1-1 { width: 180px; height: 180px; }
.pip.r-16-9 { width: 260px; height: 146px; }
.pip .bar { position: absolute; top: 0; left: 0; right: 0; padding: 6px; display: flex; justify-content: space-between; gap: 4px; background: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent); }
.pip .bar button { background: rgba(0, 0, 0, .6); color: #fff; border-radius: 6px; padding: 3px 7px; font-family: var(--font-mono); font-size: 10px; display: inline-flex; align-items: center; gap: 4px; }

/* Folhas (modais / gavetas) ------------------------------------------------ */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: calc(100dvh - 40px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; overflow: hidden; animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.sheet .handle { width: 40px; height: 4px; border-radius: 999px; background: var(--line-2); margin: 10px auto 0; }
.sheet header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px 12px 20px; border-bottom: 1px solid var(--line); }
.sheet header h2 { margin: 0; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sheet header h2 .ic { color: var(--brand-2); }
.sheet header p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.sheet .body { padding: 14px 20px calc(18px + var(--safe-b)); overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.sheet .foot { padding: 12px 20px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
@media (min-width: 640px) {
  .scrim { align-items: center; padding: 20px; }
  .sheet { border-radius: 18px; max-height: calc(100dvh - 60px); }
  .sheet .handle { display: none; }
  .sheet.wide { max-width: 720px; }
}
.sheet .foot .spacer { flex: 1; }

.group { display: flex; flex-direction: column; gap: 8px; }
.group > label, .group > .label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.group > label b, .group > .label b { font-family: var(--font-mono); color: var(--brand-2); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 12px; }
.group p.hint { margin: 0; color: var(--muted); font-size: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); }
.row .txt b { display: block; font-size: 13px; font-weight: 600; }
.row .txt span { display: block; font-size: 11.5px; color: var(--muted); }
.row select.field { max-width: 190px; min-height: 34px; font-size: 12px; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.swatches button { height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; }
.swatches button i { width: 18px; height: 18px; border-radius: 50%; display: block; }
.swatches button.on { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.card-block { padding: 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.card-block.brand { border-color: rgba(188, 0, 238, .4); background: linear-gradient(180deg, rgba(188, 0, 238, .1), transparent); }
.card-block h3 { margin: 0; font-size: 13px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.card-block h3 .ic { color: var(--brand-2); }

/* Biblioteca --------------------------------------------------------------- */
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.search .field { padding-left: 38px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 12px 12px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-align: left; transition: border-color .15s, background .15s; }
.item:hover { border-color: rgba(188, 0, 238, .45); }
.item.cur { border-color: rgba(188, 0, 238, .7); background: linear-gradient(90deg, rgba(188, 0, 238, .12), var(--card) 60%); }
.item .t { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .p { color: var(--muted); font-size: 12px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; margin-top: 2px; }
.item .m { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 11px; color: var(--muted-2); font-family: var(--font-mono); }
.item .m .ic { width: 12px; height: 12px; }
.item .acts { display: flex; flex-direction: column; gap: 4px; }
.item .acts button { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.item .acts button:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.item .acts button.del:hover { color: #fca5a5; background: rgba(239, 68, 68, .12); }
.item.main { cursor: pointer; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 13px; }
.tpl { padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-align: left; display: flex; flex-direction: column; gap: 6px; }
.tpl:hover { border-color: rgba(188, 0, 238, .5); }
.tpl .h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.tpl .h span { font-family: var(--font-mono); font-size: 11px; color: var(--brand-2); background: var(--brand-soft); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.tpl p { margin: 0; color: var(--muted); font-size: 12.5px; }

/* Conta -------------------------------------------------------------------- */
.status { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.status .ic { color: var(--muted); }
.status.ok .ic { color: var(--ok); }
.status.warn .ic { color: var(--warn); }
.status b { display: block; font-size: 13px; }
.status span { display: block; font-size: 12px; color: var(--muted); }
.steps { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
.steps code { font-family: var(--font-mono); font-size: 11.5px; color: var(--brand-2); background: rgba(255, 255, 255, .05); padding: 1px 5px; border-radius: 4px; }
.err { color: #fca5a5; font-size: 12px; }

/* Atalhos ------------------------------------------------------------------ */
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.keys div { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; color: var(--muted); }
kbd { font-family: var(--font-mono); font-size: 11px; color: var(--text); background: var(--card-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 2px 7px; }
@media (max-width: 480px) { .keys { grid-template-columns: 1fr; } }

/* Contagem e avisos --------------------------------------------------------- */
.countdown { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.countdown .n { width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #e567ff, #7a00b8); display: grid; place-items: center; font-size: 72px; font-weight: 800; color: #fff; box-shadow: 0 0 60px -10px rgba(188, 0, 238, .9); animation: pop .9s ease-out infinite; }
@keyframes pop { 0% { transform: scale(.92); } 30% { transform: scale(1); } 100% { transform: scale(1); } }
.countdown p { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }

.toasts { position: fixed; top: calc(10px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 140; display: flex; flex-direction: column; gap: 6px; width: min(92vw, 420px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(20, 20, 28, .95); border: 1px solid var(--line-2); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .9); font-size: 13px; pointer-events: auto; animation: up .2s ease-out; }
.toast .ic { color: var(--brand-2); }
.toast.ok .ic { color: var(--ok); }
.toast.warn .ic { color: var(--warn); }
.toast span { flex: 1; }
.toast button { color: var(--brand-2); font-weight: 700; font-size: 12.5px; padding: 4px 8px; border-radius: 6px; }
.toast button:hover { background: var(--brand-soft); }

.rec-video { width: 100%; max-height: 52vh; background: #000; border-radius: var(--radius); border: 1px solid var(--line); }

/* Celular deitado: cabeçalho mais baixo, ilha em uma linha --------------------- */
@media (max-height: 460px) and (orientation: landscape) {
  .top { min-height: 44px; padding-top: calc(4px + var(--safe-t)); padding-bottom: 4px; }
  .meta { display: none; }
  .dock { flex-direction: row; justify-content: center; gap: 6px; padding-top: 4px; }
  .dock-row { width: auto; gap: 6px; }
  .dock .stepper { flex: none; height: 36px; }
  .dock .stepper button { width: 30px; }
  .dock .stepper .val { min-width: 60px; }
  .dock .btn { height: 42px; min-width: 42px; padding: 0 8px; }
  .play { width: 48px; height: 48px; }
  .hud { top: 6px; right: 8px; }
}

/* Gravações ---------------------------------------------------------------- */
.bar-progress { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .2s; }
.upload-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.upload-box .h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; }
.upload-box .h span { color: var(--muted); font-family: var(--font-mono); font-weight: 500; font-size: 12px; }
.upload-box.ok { border-color: rgba(52, 211, 153, .4); }
.upload-box.err { border-color: rgba(239, 68, 68, .4); }
.vid { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 12px 12px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.vid .t { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vid .m { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: 11.5px; color: var(--muted); font-family: var(--font-mono); }
.vid .acts { display: flex; gap: 4px; align-items: center; }
.vid .acts a, .vid .acts button { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); text-decoration: none; }
.vid .acts a:hover, .vid .acts button:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.vid .acts .del:hover { color: #fca5a5; background: rgba(239, 68, 68, .12); }
.vid .acts .dl { background: var(--brand-soft); color: var(--brand-2); }
.vid .preview { grid-column: 1 / -1; }
.vid .preview video { width: 100%; max-height: 50vh; border-radius: var(--radius-sm); background: #000; }
.vid.up { opacity: .7; }
