/* Tema VHS do PADD: a tela vira a caixa de uma fita de vídeo dos anos 90
   aberta. À esquerda a capa (caminho, título enorme, sub-notas e as
   listras de arco-íris) e à direita a contracapa, onde fica a nota.
   Duas versões:
   "vhs-claro" (capa creme) e "vhs-escuro" (capa preta com linhas de
   varredura). Fica ativo só com esses temas (ver theme.js) e SUBSTITUI o
   note.css inteiro. */

@font-face { font-family: Montserrat; src: url(fonts/montserrat-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Montserrat; src: url(fonts/montserrat-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Montserrat; src: url(fonts/montserrat-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Montserrat; src: url(fonts/montserrat-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --yellow: #fec901;
  --orange: #ff6600;
  --red: #ff002a;
  --magenta: #b300d5;
  --violet: #4c00ba;
  --black: #050a10;
  --rainbow: linear-gradient(90deg, var(--yellow) 0 20%, var(--orange) 20% 40%, var(--red) 40% 60%, var(--magenta) 60% 80%, var(--violet) 80%);
  --rainbow-v: linear-gradient(180deg, var(--yellow) 0 20%, var(--orange) 20% 40%, var(--red) 40% 60%, var(--magenta) 60% 80%, var(--violet) 80%);
  --font: Montserrat, "Helvetica Neue", Arial, sans-serif;

  /* claro: capa creme */
  color-scheme: light;
  --backdrop: #dcd9d0;
  --paper: #eadeb8;
  --paper-lines: none;
  --ink: #050a10;
  --muted: #6b6146;
  --bar: var(--black);
  --bar-ink: #eadeb8;
  --badge: #eadeb8;
  --badge-ink: var(--black);
  --primary: var(--yellow);
  --primary-ink: var(--black);
  --hover: rgba(5, 10, 16, .08);
  --code: rgba(5, 10, 16, .08);
  --front-deco: 270px;
}
html[data-theme="vhs-escuro"] {
  /* escuro: capa preta com linhas finas de varredura */
  color-scheme: dark;
  --backdrop: #16191e;
  --paper: #050a10;
  --paper-lines: repeating-linear-gradient(180deg, transparent 0 19px, rgba(120, 160, 170, .09) 19px 20px);
  --ink: #f4f1ea;
  --muted: #9aa3ab;
  --bar: transparent;
  --bar-ink: #ffffff;
  --badge: #ffffff;
  --badge-ink: var(--black);
  --primary: var(--violet);
  --primary-ink: #ffffff;
  --hover: rgba(255, 255, 255, .08);
  --code: rgba(255, 255, 255, .09);
  --front-deco: 230px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.lc-only, .tm-only, .pp-only, .sw-only, .mb-only { display: none !important; }
/* peças só da versão clara (.vh-l) ou só da escura (.vh-d) */
html[data-theme="vhs-claro"] .vh-d, html[data-theme="vhs-escuro"] .vh-l { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--backdrop); }
html, body { margin: 0; height: 100%; }
body { background: var(--backdrop); color: var(--ink); font-family: var(--font); }
::selection { background: var(--yellow); color: var(--black); }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---- Peças comuns: painel de papelão, barra preta, selos ----------------------- */
#vh-front, #vh-back, .panel-inner, .login-page .card, .list-page #list, .list-page > header {
  background: var(--paper-lines), var(--paper);
  box-shadow: 0 14px 22px -10px rgba(0, 0, 0, .45);
}
.vh-rainbow { display: flex; }
.vh-rainbow i { display: block; flex: 1; }
.vh-rainbow i:nth-child(1) { background: var(--yellow); }
.vh-rainbow i:nth-child(2) { background: var(--orange); }
.vh-rainbow i:nth-child(3) { background: var(--red); }
.vh-rainbow i:nth-child(4) { background: var(--magenta); }
.vh-rainbow i:nth-child(5) { background: var(--violet); }

/* botões = selos "VHS" / "HQ" da capa */
.links a, .links button, .panel-header button, .login-page button, .list-page a.new {
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 12px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  padding: 8px 10px 7px; border: none; border-radius: 2px; cursor: pointer;
  background: var(--badge); color: var(--badge-ink);
}
.links a:hover, .links button:hover, .panel-header button:hover, .list-page a.new:hover { background: var(--yellow); color: var(--black); }
#preview-toggle, .login-page button, .list-page a.new { background: var(--primary); color: var(--primary-ink); }
#preview-toggle:hover, .login-page button:hover { background: var(--orange); color: var(--black); }

/* ---- Página da nota: capa | contracapa ------------------------------------------- */
body.note-page {
  height: 100vh; height: 100dvh; overflow: hidden;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: 76px auto minmax(0, 1fr) 72px;
  column-gap: 22px; padding: 22px;
}
#main-column, #status-bar { display: contents; }
#vh-front { grid-column: 1; grid-row: 1 / -1; position: relative; overflow: hidden; }
#vh-fhead { grid-column: 1; grid-row: 1 / 3; }
#sidebar { grid-column: 1; grid-row: 3; }
#vh-back { grid-column: 2; grid-row: 1 / -1; }
#vh-bbar { grid-column: 2; grid-row: 1; }
#status { grid-column: 2; grid-row: 1; }
#editor, #preview { grid-column: 2; grid-row: 2 / 4; }
#vh-foot { grid-column: 2; grid-row: 4; }
#status-bar .links { grid-column: 2; grid-row: 4; }
#vh-rec { grid-column: 2; grid-row: 4; }

/* capa: listras no pé + "VIDEO" no canto preto */
.vh-stripes { position: absolute; left: 0; bottom: 0; display: block; }
.vh-stripes text { font: 700 11px var(--font); fill: var(--black); letter-spacing: .02em; }
.vh-video { position: absolute; left: 18px; bottom: 16px; color: var(--paper); }
.vh-video > b { display: block; font: 800 34px/1 var(--font); letter-spacing: -.01em; padding-bottom: 8px; border-bottom: 2px solid var(--paper); width: 190px; }
.vh-badges { display: flex; align-items: center; gap: 7px; margin-top: 9px; }
.vh-badges i { font: 500 13px/1 var(--font); font-style: normal; padding: 3px 5px 2px; background: var(--paper); color: var(--black); }
.vh-badges span { display: flex; flex-direction: column; font: 400 7px/1 var(--font); letter-spacing: .04em; }
.vh-badges span b { font: 800 12px/1 var(--font); }

/* position: o #vh-front é posicionado e, sem isso, pintaria por cima */
#vh-fhead { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; container-type: inline-size; }
#vh-crumb {
  flex-shrink: 0; height: 52px; margin-top: 24px; padding: 0 16px; display: flex; align-items: center; justify-content: center;
  background: var(--bar); color: var(--bar-ink);
  font: 500 15px/1 var(--font); letter-spacing: .42em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* título do tamanho da capa: nomes curtos ficam enormes, como o "90's" */
#vh-title {
  margin: 18px 16px 0; text-align: center;
  font: 800 max(30px, min(96px, calc(100cqw / (var(--len, 3) * .7)))) / .95 var(--font);
  letter-spacing: -.03em; color: var(--ink); overflow-wrap: anywhere;
}
#vh-sub { margin: 12px 18px 0; text-align: center; }
#vh-sub .vh-l { display: block; padding-top: 8px; border-top: 2px solid var(--ink); font: 500 24px/1 var(--font); letter-spacing: -.01em; }

/* sub-notas: lista de "capítulos" com quadradinhos coloridos */
#sidebar {
  min-height: 0; margin: 16px 0 calc(var(--front-deco) - 72px + 12px); padding: 0 16px;
  display: flex; flex-direction: column; z-index: 1;
}
#sidebar-title { flex-shrink: 0; font-size: 0; margin: 0 0 6px 2px; }
#sidebar-title::before { content: "CAPÍTULOS"; font: 700 10px/1 var(--font); letter-spacing: .4em; color: var(--muted); }
#sidebar-up, #sidebar-list a {
  display: flex; align-items: center; gap: 10px; padding: 7px 6px;
  color: var(--ink); text-decoration: none; font: 700 14px/1.25 var(--font); letter-spacing: .02em; overflow-wrap: anywhere;
}
#sidebar-up { flex-shrink: 0; font-size: 0; gap: 0; margin-bottom: 4px; }
/* botão de rebobinar: volta pra nota-mãe */
#sidebar-up::before {
  content: ""; flex-shrink: 0; width: 18px; height: 10px; margin-right: 10px; background: var(--red);
  clip-path: polygon(0 50%, 50% 0, 50% 50%, 100% 0, 100% 100%, 50% 50%, 50% 100%);
}
#sidebar-up::after { content: attr(data-parent); font-size: 14px; text-transform: uppercase; }
#sidebar-list { list-style: none; margin: 0; padding: 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
#sidebar-list a .slash { display: none; }
#sidebar-list a::before { content: ""; flex-shrink: 0; width: 12px; height: 12px; background: var(--yellow); }
#sidebar-list li:nth-child(5n+2) a::before { background: var(--orange); }
#sidebar-list li:nth-child(5n+3) a::before { background: var(--red); }
#sidebar-list li:nth-child(5n+4) a::before { background: var(--magenta); }
#sidebar-list li:nth-child(5n) a::before { background: var(--violet); }
#sidebar-up:hover, #sidebar-list a:hover, #sidebar-list a:focus-visible { background: var(--ink); color: var(--paper); outline: none; }

/* contracapa: barra com o caminho e o status, nota, rodapé preto */
#vh-bbar { align-self: end; height: 52px; display: flex; align-items: stretch; min-width: 0; }
#vh-path {
  flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 24px;
  background: var(--bar); color: var(--bar-ink);
  font: 500 15px/1 var(--font); letter-spacing: .28em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#vh-bbar .vh-rainbow { flex: 0 0 160px; margin-right: 24px; }
#status {
  justify-self: end; align-self: end; height: 52px; max-width: 45%; min-width: 0; margin-right: 200px;
  display: flex; align-items: center; gap: 9px; padding-left: 14px;
  background: var(--bar); color: var(--bar-ink);
  font: 700 11px/1 var(--font); letter-spacing: .2em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* ícones de videocassete: ▶ salvo · ● gravando · ❚❚ sem conexão */
#status::before { content: ""; flex-shrink: 0; width: 10px; height: 11px; background: var(--yellow); clip-path: polygon(0 0, 100% 50%, 0 100%); }
#status[data-state="busy"]::before { background: var(--red); clip-path: circle(50%); }
#status[data-state="offline"]::before { background: linear-gradient(90deg, var(--orange) 0 35%, transparent 35% 65%, var(--orange) 65%); clip-path: none; }
#editor, #preview {
  z-index: 1; width: auto; height: auto; min-width: 0; min-height: 0; margin: 0;
  padding: 24px 28px 18px; background: transparent; color: var(--ink);
  scrollbar-width: thin; scrollbar-color: var(--muted) transparent;
}
#editor { border: none; outline: none; resize: none; font: 500 16px/1.75 var(--font); caret-color: var(--red); }
#editor::placeholder { color: var(--muted); }
#vh-foot { background: var(--black); border-top: 4px solid transparent; border-image: var(--rainbow) 1; }
html[data-theme="vhs-escuro"] #vh-foot { background: #0b131b; }
#status-bar .links { justify-self: start; align-self: center; margin-left: 20px; display: flex; gap: 8px; position: relative; z-index: 1; }
#more-links, #logout-form { display: contents; }
#more-toggle { display: none; }
.links .history-link.lc-only { display: none; }
/* a "tabela de gravação" da contracapa (SP/LP/EP), com os dados da nota */
#vh-rec {
  justify-self: end; align-self: center; margin-right: 20px; z-index: 1;
  display: grid; grid-template-columns: repeat(3, auto); border: 2px solid #eadeb8; color: #eadeb8;
}
#vh-rec span, #vh-rec b { padding: 3px 10px; border-right: 2px solid #eadeb8; text-align: center; }
#vh-rec span:nth-child(3), #vh-rec b:last-child { border-right: none; }
#vh-rec span { font: 700 8px/1.3 var(--font); letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid #eadeb8; }
#vh-rec b { font: 500 14px/1.3 var(--font); }
@media (max-width: 1240px) { #vh-rec { display: none; } }

/* versão escura: capa sem barra, título branco e faixa roxa; contracapa
   com o caminho em letra grossa e um arco-íris fino até a borda */
html[data-theme="vhs-escuro"] #vh-crumb { justify-content: flex-start; padding: 0 20px; font-weight: 700; letter-spacing: .12em; }
html[data-theme="vhs-escuro"] #vh-title { text-align: left; margin: 8px 20px 0; }
html[data-theme="vhs-escuro"] #vh-sub { margin: 18px 40px 0 0; text-align: left; }
html[data-theme="vhs-escuro"] #vh-sub .vh-d { display: block; padding: 10px 20px; background: var(--violet); color: #fff; font: 700 22px/1 var(--font); }
html[data-theme="vhs-escuro"] #vh-path { flex: 0 1 auto; padding: 0 18px 0 24px; font-weight: 800; font-size: 18px; letter-spacing: .14em; }
html[data-theme="vhs-escuro"] #vh-bbar .vh-rainbow { flex: 1 1 0; min-width: 40px; margin: 0; flex-direction: column; align-self: center; height: 12px; }
html[data-theme="vhs-escuro"] #status { margin-right: 0; padding: 0 24px 0 16px; background: var(--paper-lines), var(--paper); }

/* ---- Preview de Markdown ----------------------------------------------------------- */
#preview { overflow-y: auto; overflow-wrap: anywhere; font: 500 16px/1.75 var(--font); }
#preview > :first-child { margin-top: 0; }
#preview h1, #preview h2, #preview h3, #preview h4, #preview h5, #preview h6 { font-family: var(--font); line-height: 1.15; margin: 1.2em 0 .5em; }
#preview h1 { font-size: 2.3em; font-weight: 800; letter-spacing: -.03em; }
#preview h2 { font-size: 1.45em; font-weight: 800; padding-bottom: .25em; border-bottom: 4px solid transparent; border-image: var(--rainbow) 1; display: inline-block; }
#preview h3 { font-size: .9em; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; }
#preview h4, #preview h5, #preview h6 { font-size: 1em; font-weight: 700; color: var(--muted); }
#preview p { margin: .7em 0; }
#preview ul, #preview ol { padding-left: 1.5em; }
#preview li::marker { color: var(--red); }
#preview li:has(input[type="checkbox"]) { list-style: none; margin-left: -1.5em; }
#preview input[type="checkbox"] { accent-color: var(--violet); }
#preview a { color: var(--violet); }
html[data-theme="vhs-escuro"] #preview a { color: var(--yellow); }
#preview strong { font-weight: 800; }
#preview blockquote { margin: .7em 0; padding-left: 1em; border-left: 4px solid var(--magenta); color: var(--muted); }
#preview code { font: 500 .9em ui-monospace, Menlo, Consolas, monospace; background: var(--code); padding: .1em .35em; }
#preview pre { padding: .8em 1em; background: var(--code); border-left: 4px solid var(--yellow); overflow-x: auto; }
#preview pre code { background: none; padding: 0; overflow-wrap: normal; }
#preview img { max-width: 100%; height: auto; }
#preview hr { border: none; height: 8px; margin: 1.5em 0; background: var(--rainbow); }
#preview table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
#preview th, #preview td { border: 2px solid var(--ink); padding: .3em .8em; text-align: left; overflow-wrap: normal; }
#preview th { font-size: .75em; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* ---- Painéis (histórico, tema) ------------------------------------------------------- */
.panel {
  position: fixed; inset: 0; z-index: 20; background: rgba(5, 10, 16, .5);
  align-items: center; justify-content: center; padding: 2rem;
}
.panel:not([hidden]) { display: flex; }
.panel-inner { width: min(560px, 100%); max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; }
.panel-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 0 12px 0 20px; background: var(--black); color: #eadeb8;
  border-bottom: 4px solid transparent; border-image: var(--rainbow) 1;
}
html[data-theme="vhs-escuro"] .panel-header { background: #0b131b; color: #fff; }
.panel-header strong { font: 500 14px/1 var(--font); letter-spacing: .3em; text-transform: uppercase; }
.panel-header button { padding: 7px 9px 6px; font-size: 11px; background: #eadeb8; color: var(--black); }
.panel-list { overflow-y: auto; padding: 10px 12px 14px; }
.panel-list button {
  display: block; width: 100%; padding: 10px 12px; margin: 0 0 2px; border: none; border-radius: 0;
  background: none; color: var(--ink); text-align: left; cursor: pointer;
  font: 500 14px/1.45 var(--font); overflow-wrap: anywhere;
}
.panel-list small { color: var(--muted); }
.panel-list button:hover, .panel-list button:focus-visible { background: var(--hover); outline: none; }
.panel-list button.current { box-shadow: inset 6px 0 0 var(--yellow); font-weight: 800; }
#theme-list button { font: 700 13px/1.5 var(--font); letter-spacing: .06em; text-transform: uppercase; }
#theme-list small { font: 500 12px var(--font); letter-spacing: 0; text-transform: none; }

/* ---- Celular ---------------------------------------------------------------------------- */
@media (max-width: 640px) {
  body.note-page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) 60px;
    column-gap: 0; row-gap: 10px; padding: 10px;
  }
  #vh-front, #vh-bbar, #vh-rec { display: none !important; }
  #vh-fhead { grid-column: 1; grid-row: 1; background: var(--paper-lines), var(--paper); box-shadow: 0 10px 16px -10px rgba(0, 0, 0, .45); padding-bottom: 14px; border-bottom: 6px solid transparent; border-image: var(--rainbow) 1; }
  #vh-crumb { margin-top: 0; height: 34px; font-size: 11px; letter-spacing: .3em; }
  #vh-title { margin-top: 12px; font-size: max(26px, min(52px, calc(100cqw / (var(--len, 3) * .7)))); }
  #vh-sub { margin-top: 8px; }
  #vh-sub .vh-l { font-size: 14px; padding-top: 6px; }
  html[data-theme="vhs-escuro"] #vh-sub .vh-d { font-size: 15px; padding: 7px 14px; }
  html[data-theme="vhs-escuro"] #vh-sub { margin-top: 10px; }

  #sidebar { grid-column: 1; grid-row: 2; margin: 0; padding: 0; flex-direction: row; align-items: center; gap: 6px; overflow: hidden; }
  #sidebar-title { display: none; }
  #sidebar-list { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  #sidebar-up, #sidebar-list a { flex-shrink: 0; white-space: nowrap; overflow-wrap: normal; padding: 7px 10px; gap: 8px; font-size: 13px; background: var(--paper); }
  #sidebar-up { font-size: 0; padding: 12px 8px; }
  #sidebar-up::before { margin-right: 0; }
  #sidebar-up::after { content: none; }

  #vh-back { grid-column: 1; grid-row: 3 / 5; }
  #editor, #preview { grid-column: 1; grid-row: 3; padding: 16px 16px 12px; font-size: 15px; }
  #vh-foot { grid-column: 1; grid-row: 4; }
  #status {
    grid-column: 1; grid-row: 4; justify-self: start; align-self: center; height: auto; max-width: 42%;
    margin: 0 0 0 12px; padding: 0; background: none; color: #eadeb8; font-size: 9px; letter-spacing: .12em;
  }
  html[data-theme="vhs-escuro"] #status { margin: 0 0 0 12px; padding: 0; background: none; color: #fff; }
  #status-bar .links { grid-column: 1; grid-row: 4; justify-self: end; margin: 0 10px 0 0; gap: 6px; }
  .links a, .links button { padding: 9px 9px 8px; font-size: 11px; }
  /* "histórico" direto no rodapé (o .lc-only geral esconde com !important;
     aqui a regra é mais específica e vence) */
  .links .history-link.lc-only { display: inline-flex !important; }
  #more-toggle { display: inline-flex; font-size: 15px; letter-spacing: 0; }
  #more-links {
    display: none; position: absolute; right: 0; bottom: calc(100% + 16px); z-index: 10;
    flex-direction: column; align-items: stretch; gap: 8px; min-width: 13rem; padding: 12px;
    background: var(--black); border-top: 4px solid transparent; border-image: var(--rainbow) 1;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  }
  #status-bar.menu-open #more-links { display: flex; }
  #more-links #history-link { display: none; }
  #logout-form { display: block; }
  #logout-form button { width: 100%; }
  #more-links a, #more-links #logout-form button { padding: 12px 10px 11px; font-size: 12px; }

  .panel { padding: 0; }
  .panel:not([hidden]) { align-items: flex-end; }
  .panel-inner { width: 100%; max-height: 85dvh; }
}

/* ---- Login: a capa da fita -------------------------------------------------------------------- */
body.login-page { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-page .card {
  position: relative; overflow: hidden; width: min(360px, 100%); padding: 24px 0 0; color: var(--ink);
  display: flex; flex-direction: column;
}
.login-page h1 {
  margin: 0; height: 52px; display: flex; align-items: center; justify-content: center;
  background: var(--bar); color: var(--bar-ink); font: 500 14px/1 var(--font); letter-spacing: .38em; text-transform: uppercase;
}
html[data-theme="vhs-escuro"] .login-page h1 { justify-content: flex-start; padding: 0 22px; font-weight: 700; letter-spacing: .14em; }
.vh-ctop { text-align: center; margin: 14px 22px 22px; }
.vh-ctitle { font: 800 92px/.95 var(--font); letter-spacing: -.04em; }
.vh-csub .vh-l { display: block; margin-top: 10px; padding-top: 8px; border-top: 2px solid var(--ink); font: 500 22px/1 var(--font); }
html[data-theme="vhs-escuro"] .vh-ctop { text-align: left; margin: 6px 0 22px; }
html[data-theme="vhs-escuro"] .vh-ctitle { padding: 0 22px; }
html[data-theme="vhs-escuro"] .vh-csub .vh-d { display: block; width: 70%; margin-top: 16px; padding: 9px 22px; background: var(--violet); color: #fff; font: 700 22px/1 var(--font); }
.login-page .error { margin: 0 22px 10px; color: var(--red); font: 700 11px var(--font); letter-spacing: .14em; text-transform: uppercase; }
.login-page input[type="password"] {
  display: block; width: calc(100% - 44px); margin: 0 22px 12px; padding: 12px 14px; border-radius: 0;
  border: 2px solid var(--ink); background: transparent; color: var(--ink); caret-color: var(--red);
  font: 500 16px var(--font); outline: none;
}
.login-page input[type="password"]:focus { border-color: var(--orange); }
.login-page button { width: calc(100% - 44px); margin: 0 22px; padding: 13px 16px 12px; font-size: 13px; }
.vh-cbottom { position: relative; height: 270px; margin-top: 18px; }
html[data-theme="vhs-escuro"] .vh-cbottom { height: 230px; }
.login-page .vh-video { color: #eadeb8; }

/* ---- Lista de notas: a contracapa ------------------------------------------------------------- */
body.list-page { min-height: 100vh; min-height: 100dvh; padding: 22px; }
.list-page > header {
  max-width: 980px; margin: 0 auto; padding: 24px 24px 0; display: flex; align-items: stretch; gap: 0;
}
.list-page h1 {
  flex: 1; min-width: 0; margin: 0; height: 52px; display: flex; align-items: center; padding: 0 20px;
  background: var(--bar); color: var(--bar-ink); font: 500 15px/1 var(--font); letter-spacing: .32em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html[data-theme="vhs-escuro"] .list-page h1 { padding: 0; font-weight: 800; font-size: 20px; letter-spacing: .12em; }
.list-page a.new { align-self: center; margin-left: 14px; }
.list-page #list { max-width: 980px; margin: 0 auto; padding: 18px 24px 24px; list-style: none; box-shadow: 0 14px 22px -10px rgba(0, 0, 0, .45); }
.list-page #list::after { content: ""; display: block; height: 6px; margin-top: 18px; background: var(--rainbow); }
.list-page #list li a {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; column-gap: 14px; align-items: center;
  padding: 9px 8px; color: var(--ink); text-decoration: none;
}
.list-page #list li a::before { content: ""; width: 12px; height: 12px; background: var(--yellow); }
.list-page #list li:nth-child(5n+2) a::before { background: var(--orange); }
.list-page #list li:nth-child(5n+3) a::before { background: var(--red); }
.list-page #list li:nth-child(5n+4) a::before { background: var(--magenta); }
.list-page #list li:nth-child(5n) a::before { background: var(--violet); }
.list-page #list .path { font: 700 15px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-page #list .meta { font: 500 12px var(--font); color: var(--muted); white-space: nowrap; }
.list-page #list li a:hover { background: var(--ink); color: var(--paper); }
.list-page #list li a:hover .meta { color: inherit; }
.list-page #empty { max-width: 980px; margin: 0 auto; padding: 24px; background: var(--paper); }
.list-page #empty a { color: var(--violet); }
@media (max-width: 640px) {
  body.list-page { padding: 10px; }
  .list-page > header { padding: 14px 14px 0; }
  .list-page h1 { font-size: 12px; letter-spacing: .2em; padding: 0 12px; }
  html[data-theme="vhs-escuro"] .list-page h1 { font-size: 14px; }
  .list-page #list { padding: 12px 14px 16px; }
  .list-page #list li a { grid-template-columns: 12px minmax(0, 1fr); }
  .list-page #list .meta { grid-column: 2; white-space: normal; }
}
