/* Trilo — peças comuns da Marcação e dos Bastidores, sobre marca/base/tokens.css e barra.css */
:root { --surface: #f4ece3; --line: var(--bh-line); --line-strong: var(--bh-line-strong); --muted: var(--bh-muted); --fg: var(--bh-ink); --bg: var(--bh-paper); }
body { font-size: 1rem; line-height: 1.45; display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
main { flex: 1; min-height: 0; }

/* barra: assinatura, cena e páginas; logo abaixo, as ferramentas da página */
.bh-bar { flex: none; --bh-bar-pad: 20px; }
.bh-bar-in { gap: 16px; }
.sub { flex: none; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 20px; border-bottom: 1px solid var(--bh-line); }
.sub .spacer { flex: 1; }

/* seletor segmentado: pílula; o escolhido ganha a tinta */
.seg { display: inline-flex; background: var(--bh-wash); border-radius: var(--r-pill); padding: 3px; gap: 2px; flex: none; }
.seg button, .seg a { border: 0; background: none; padding: 9px 16px; border-radius: var(--r-pill); font: 500 .9375rem/1 var(--font-sans); color: var(--bh-muted); cursor: pointer; text-decoration: none; white-space: nowrap; }
.seg [aria-pressed=true] { background: var(--accent); color: var(--bh-paper); }
.seg--paper [aria-pressed=true] { background: var(--bh-paper); color: var(--bh-ink); box-shadow: 0 1px 2px rgba(43,27,23,.14); }

.btn { min-height: 40px; padding: 0 18px; font-size: .9375rem; }
.btn--grande { min-height: 52px; padding: 0 28px; font-size: 1.0625rem; }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.btn--icone { padding: 0; width: 40px; justify-content: center; }

select, input[type=text] { font: 400 .9375rem/1.2 var(--font-sans); color: var(--bh-ink); border: 1.5px solid var(--bh-line-strong); border-radius: var(--r-input); background: var(--surface); padding: 9px 12px; min-width: 0; }
select { appearance: none; -webkit-appearance: none; border-radius: var(--r-pill); padding: 9px 36px 9px 16px; font-weight: 500; background: var(--bh-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%232b1b17' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center / 12px; border-color: transparent; cursor: pointer; max-width: 100%; }
input[type=text]::placeholder { color: var(--bh-muted); }
input[type=checkbox] { accent-color: var(--accent); }
.hint { color: var(--bh-muted); font-size: .8125rem; }

/* texto da cena (as duas páginas) */
.ln { padding: 10px 20px 10px 30px; cursor: pointer; position: relative; border-left: 3px solid transparent; }
.ln .who { font: 500 .75rem/1.3 var(--font-mono); letter-spacing: .04em; margin-bottom: 2px; }
.ln .who i { font-style: normal; color: var(--bh-muted); }
.ln.dir { color: var(--bh-muted); font-style: italic; }
.ln.on { background: var(--bh-wash); border-left-color: var(--accent); }
.ln .mk { position: absolute; left: 11px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ln .w.on { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Elenco */
dialog#dlgElenco { border: 0; border-radius: var(--r-card); padding: 20px; width: min(580px, 94vw); max-height: 88vh; background: var(--bh-paper); color: var(--bh-ink); box-shadow: inset 0 0 0 1.5px var(--bh-line-strong), 0 24px 60px -16px rgba(43,27,23,.45); display: flex; flex-direction: column; gap: 12px; }
dialog#dlgElenco:not([open]) { display: none; }
dialog#dlgElenco::backdrop { background: rgba(43,27,23,.3); }
.dlg-topo { display: flex; align-items: center; justify-content: space-between; }
.dlg-topo h3 { font: 400 1.75rem/1 var(--font-serif); font-variation-settings: var(--serif-settings); letter-spacing: -.02em; }
.dlg-cab { display: grid; grid-template-columns: 1fr 1fr; font: 500 .75rem/1 var(--font-mono); color: var(--bh-muted); padding: 0 2px; }
.dlg-lista { overflow: auto; display: flex; flex-direction: column; }
.pp { display: grid; grid-template-columns: auto 1fr 1fr; gap: 12px; align-items: center; padding: 8px 2px; border-top: 1px solid var(--bh-line); cursor: pointer; }
.pp input[type=checkbox] { width: 22px; height: 22px; }
.pp span { font: 500 .8125rem/1.2 var(--font-mono); letter-spacing: .03em; }

/* importar */
.importar { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; text-align: center; }
.importar-placa { width: min(760px, 100%); aspect-ratio: 16 / 10; margin-bottom: 8px; }
.importar-placa .copy { position: absolute; inset: 0 0 auto; padding: clamp(20px, 4vw, 40px); text-align: left; }
.importar-placa h1 { font-size: clamp(2.8rem, 2rem + 3vw, 4.4rem); line-height: 1; letter-spacing: -.035em; }
@media (max-width: 560px) { .importar-placa { aspect-ratio: 9 / 12; } }
.importar .nota { color: var(--bh-muted); max-width: 36ch; }

@media (max-width: 760px) {
  body { height: auto; }
  .bh-bar { --bh-bar-pad: 12px; }
  .bh-bar-in { flex-wrap: wrap; padding: 8px 0; }
  .bh-bar #cena { order: 3; flex: 1 1 100%; }
  .sub { padding: 8px 12px; gap: 8px; }
  .seg button, .seg a { padding: 8px 12px; }
}
