/* =========================================================
   Galeria do cliente — Foxen Media
   Cores principais ficam nas variáveis abaixo.
   ========================================================= */
:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --ink: #1d1b19;
  --muted: #7a736b;
  --line: #e9e4dd;
  --accent: #e8772e;
  --accent-ink: #ffffff;
  --radius: 12px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: inherit; }
img { display: block; max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.link { color: var(--accent); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; text-decoration: none; }
.brand-mark { width: 22px; height: 22px; color: var(--accent); }
.brand-logo { height: 34px; width: auto; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 11px 22px; font: 500 14px var(--sans); cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { padding: 8px 16px; font-size: 13px; }

/* ---------- Páginas de mensagem / senha ---------- */
.center-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 40px 36px; box-shadow: 0 10px 40px rgba(29, 27, 25, .06); }
.card.narrow { width: 100%; max-width: 420px; text-align: center; }
.card h1 { font: 500 34px/1.15 var(--serif); margin: 18px 0 8px; }
.eyebrow { margin: 22px 0 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.stack { display: grid; gap: 14px; margin-top: 26px; text-align: left; }
.stack label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.stack input { font: 16px var(--sans); padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.stack input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.error { color: #b3261e; font-size: 14px; margin: 0; }
.contact-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin: 16px 0 0; }

/* ---------- Aviso do admin ---------- */
.admin-strip { position: fixed; z-index: 60; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.25); white-space: nowrap; }
.admin-strip a { color: var(--accent); }

/* ---------- Capa ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 480px; display: grid; place-items: center; text-align: center; color: #fff; background: #2a2622 var(--cover) center / cover no-repeat; overflow: hidden; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,.55) 100%); }
.hero-content { position: relative; padding: 24px; max-width: 760px; animation: rise .9s ease both; }
.hero .brand { color: #fff; }
.hero .brand-mark { color: #fff; }
.hero h1 { font: 500 clamp(40px, 7vw, 76px)/1.05 var(--serif); margin: 26px 0 14px; letter-spacing: .01em; }
.hero-meta { margin: 0; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; opacity: .92; }
.hero-meta .dot { margin: 0 10px; opacity: .6; }
.hero-message { font: italic 400 21px/1.45 var(--serif); margin: 22px auto 0; max-width: 560px; opacity: .95; }
.hero-btn { margin-top: 34px; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.7); color: #fff; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; padding: 13px 28px; backdrop-filter: blur(6px); }
.hero-btn:hover { background: #fff; color: var(--ink); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Barra ---------- */
.toolbar { position: sticky; top: 0; z-index: 20; background: rgba(250, 248, 245, .92); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.toolbar-inner { max-width: 1600px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.toolbar-title { font: 500 22px var(--serif); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; }
.filters { display: flex; gap: 6px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; background: transparent; padding: 7px 14px; border-radius: 999px; font: 500 13px var(--sans); color: var(--muted); cursor: pointer; white-space: nowrap; }
.chip span { font-size: 11px; opacity: .75; }
.chip:hover { color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; }
.chip .i { width: 14px; height: 14px; }
.actions { display: flex; gap: 8px; }

/* ---------- Grade justificada (linhas com altura igual, como nos apps de foto) ---------- */
.grid-wrap { max-width: 1600px; margin: 0 auto; padding: 14px; min-height: 50vh; }
.grid { --row-h: 280px; display: flex; flex-wrap: wrap; gap: 6px; }
.grid::after { content: ""; flex-grow: 999999999; }
.tile { flex-grow: var(--r); flex-basis: calc(var(--r) * var(--row-h)); position: relative; display: block; overflow: hidden; background: #ece7e0; cursor: zoom-in; border-radius: 3px; }
.tile i { display: block; padding-bottom: calc(100% / var(--r)); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .4s; opacity: 0; }
.tile img.loaded { opacity: 1; }
.tile:hover img { transform: scale(1.03); }
.tile.hidden { display: none; }
.badge-video { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px 4px 6px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 500; backdrop-filter: blur(4px); }
.badge-video svg { width: 14px; height: 14px; fill: #fff; }
.fav-btn { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0,0,0,.28); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s, transform .15s; backdrop-filter: blur(4px); }
.fav-btn svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; }
.tile:hover .fav-btn, .fav-btn.on { opacity: 1; }
.fav-btn.on { background: rgba(255,255,255,.92); }
.fav-btn.on svg { fill: var(--accent); stroke: var(--accent); }
.fav-btn:active { transform: scale(.88); }
@media (hover: none) { .fav-btn { opacity: 1; background: rgba(0,0,0,.22); } }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; font: italic 20px var(--serif); }

/* ---------- Rodapé ---------- */
.site-footer { text-align: center; padding: 60px 20px 80px; border-top: 1px solid var(--line); margin-top: 40px; }
.site-footer p { margin: 14px 0 0; }

/* ---------- Visualizador em tela cheia ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: #0b0a09; color: #fff; user-select: none; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lb-stage { position: absolute; inset: 64px 72px 24px; }
.lb-stage img, .lb-stage video { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; animation: fade .25s ease; }
.lb-stage video { width: 100%; height: 100%; background: #000; outline: none; }
.lb-spinner { inset: 0; margin: auto; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lb-top { position: absolute; top: 0; left: 0; right: 0; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 22px; }
.lb-counter { font-size: 13px; letter-spacing: .12em; opacity: .7; }
.lb-actions { display: flex; gap: 4px; }
.lb-btn { width: 44px; height: 44px; border: 0; background: transparent; color: #fff; display: grid; place-items: center; border-radius: 50%; cursor: pointer; text-decoration: none; }
.lb-btn:hover { background: rgba(255,255,255,.1); }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#lb-fav.on svg { fill: var(--accent); stroke: var(--accent); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border: 0; background: transparent; color: #fff; cursor: pointer; border-radius: 50%; display: grid; place-items: center; opacity: .75; }
.lb-nav:hover { opacity: 1; background: rgba(255,255,255,.08); }
.lb-nav svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lb-nav.prev { left: 8px; }
.lb-nav.next { right: 8px; }
.lb-spinner { width: 34px; height: 34px; border: 2px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; position: absolute; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Celular ---------- */
@media (max-width: 720px) {
  .toolbar-inner { flex-wrap: wrap; padding: 10px 12px; gap: 10px; }
  .toolbar-title { display: none; }
  .filters { order: 2; flex-basis: 100%; }
  .actions { margin-left: auto; }
  .grid-wrap { padding: 4px; }
  .grid { gap: 3px; --row-h: 110px; }
  .tile { border-radius: 0; }
  .lb-stage { inset: 56px 0 0; }
  .lb-top { height: 56px; background: linear-gradient(rgba(0,0,0,.5), transparent); z-index: 2; }
  .lb-nav { display: none; }
  .card { padding: 32px 24px; }
}

/* =========================================================
   Seleção de fotos (galeria com ✓)
   ========================================================= */
.sel-intro { max-width: 760px; margin: 18px auto 22px; padding: 0 16px; text-align: center; }
.sel-intro p { margin: 6px 0; }
.sel-msg { font: italic 21px/1.45 var(--serif); }
.fav-btn.sel-btn.on { background: var(--accent); }
.fav-btn.sel-btn.on svg, #lb-fav.sel-btn.on svg { fill: none; stroke: #fff; stroke-width: 2.6; }
#lb-fav.sel-btn.on { background: var(--accent); }
.tile-name { position: absolute; left: 8px; bottom: 6px; font-size: 11px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); opacity: .85; pointer-events: none; }
.sel-bar { position: sticky; bottom: 0; z-index: 30; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(0,0,0,.06); }
.sel-bar-inner { max-width: 1600px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sel-bar strong { font-size: 18px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.pill-ok { color: #1f7a3d; font-weight: 600; }

/* ---------- Janela (dialog) ---------- */
.dlg { border: 0; border-radius: 18px; padding: 28px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 24px 80px rgba(0,0,0,.25); color: var(--ink); }
.dlg::backdrop { background: rgba(20,18,16,.55); backdrop-filter: blur(3px); }
.dlg h2 { font: 500 28px var(--serif); margin: 0 0 8px; }
.dlg-label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 14px; }
.dlg textarea, .pv-reject textarea { font: 15px var(--sans); padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); resize: vertical; width: 100%; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* =========================================================
   Aprovação de posts
   ========================================================= */
.pv-head { text-align: center; padding: 56px 20px 18px; }
.pv-head h1 { font: 500 clamp(34px, 5vw, 52px)/1.1 var(--serif); margin: 10px 0 6px; }
.pv-head .eyebrow { margin-top: 18px; }
.pv-message { font: italic 19px/1.45 var(--serif); max-width: 560px; margin: 12px auto 0; }
.pv-alert { display: inline-block; margin: 18px 0 0; padding: 10px 18px; border-radius: 999px; background: #fff3e8; color: #8a4512; font-size: 14px; }
.pv-months { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 10px 16px; position: sticky; top: 0; z-index: 20; background: rgba(250,248,245,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.pv-months .chip { text-decoration: none; }
.pv-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; opacity: 1 !important; }
.pv-summary { text-align: center; margin: 16px 0 0; font-size: 13px; }
.pv-list { max-width: 1040px; margin: 0 auto; padding: 18px 16px 40px; display: grid; gap: 28px; }
.pv-post { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 10px 40px rgba(29,27,25,.05); }
.pv-post.st-pending { border-color: #f0c9a6; box-shadow: 0 10px 40px rgba(232,119,46,.12); }
.pv-media { position: relative; background: #111; aspect-ratio: var(--ar); max-height: 82vh; align-self: start; }
.pv-track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pv-track::-webkit-scrollbar { display: none; }
.pv-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; display: grid; place-items: center; }
.pv-slide img, .pv-slide video { width: 100%; height: 100%; object-fit: contain; background: #111; }
.pv-nomedia { display: grid; place-items: center; height: 100%; min-height: 240px; color: #aaa; }
.pv-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.pv-arrow svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.2; }
.pv-arrow.prev { left: 10px; }
.pv-arrow.next { right: 10px; }
.pv-count { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.pv-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.pv-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); }
.pv-dots i.on { background: #fff; }
.pv-info { padding: 24px 26px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pv-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.pv-format { font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; color: var(--ink); }
.pv-pill { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pv-pill.ok { background: #e5f4ea; color: #1f7a3d; }
.pv-pill.err { background: #fdecea; color: #a1281e; }
.pv-pill.wait { background: #fff3e8; color: #8a4512; }
.pv-feedback { margin: 8px 0 0; font: italic 17px/1.4 var(--serif); }
.pv-status p { margin: 6px 0 0; }
.pv-caption { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.6; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.link-btn { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--accent); font: 500 13px var(--sans); cursor: pointer; text-decoration: none; }
.pv-downloads { display: flex; gap: 14px; flex-wrap: wrap; }
.pv-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.pv-actions .btn { flex: 1; }
.pv-reject { display: grid; gap: 10px; }
.pv-reject label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }

/* =========================================================
   Orçamento
   ========================================================= */
.pp-hero { height: 78vh; height: 78svh; }
.pp-hero .hero-shade { background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.3) 50%, rgba(0,0,0,.6) 100%); }
.pp-hero h1, .pp-hero .hero-meta { text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.pp-eyebrow { margin-top: 22px; }
.pp-intro { max-width: 720px; margin: 0 auto; padding: 64px 22px 10px; text-align: center; }
.pp-intro p { font: 400 22px/1.55 var(--serif); white-space: pre-line; margin: 0; }
.pp-title { font: 500 clamp(30px, 4vw, 42px)/1.15 var(--serif); text-align: center; margin: 0 0 30px; }
.pp-options { max-width: 1180px; margin: 0 auto; padding: 56px 18px 30px; scroll-margin-top: 10px; }
.pp-chosen { max-width: 760px; margin: 0 auto 36px; padding: 18px 22px; border-radius: 14px; background: #e9f6ee; color: #174f2b; text-align: center; }
.pp-chosen p { margin: 0 0 10px; }
.pp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.pp-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px 26px 26px; box-shadow: 0 10px 40px rgba(29,27,25,.05); }
.pp-card.hl { border: 2px solid var(--accent); box-shadow: 0 18px 50px rgba(232,119,46,.16); }
.pp-card.chosen { border: 2px solid #1f7a3d; }
.pp-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; white-space: nowrap; }
.pp-tag.chosen { background: #1f7a3d; }
.pp-card h3 { font: 500 30px var(--serif); margin: 0; text-align: center; }
.pp-desc { text-align: center; color: var(--muted); margin: 6px 0 0; font-size: 14px; }
.pp-price { text-align: center; margin: 20px 0 18px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.pp-price strong { font: 600 34px var(--sans); letter-spacing: -.01em; }
.pp-price .pp-ask { font-size: 24px; }
.pp-price span { color: var(--muted); font-size: 13px; }
.pp-items { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; flex: 1; align-content: start; }
.pp-items li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; }
.pp-items svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pp-choose { width: 100%; }
.pp-works { max-width: 1400px; margin: 0 auto; padding: 50px 14px 20px; }
.pp-works .grid { --row-h: 240px; }
.pp-terms { max-width: 980px; margin: 30px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.pp-terms > div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; }
.pp-terms h3 { margin: 0 0 8px; font: 600 12px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pp-terms p { margin: 0; white-space: pre-line; }
.pp-cta { text-align: center; padding: 64px 20px 10px; }
.pp-cta .pp-title { margin-bottom: 8px; }
.pp-cta .btn { margin-top: 14px; }

@media (max-width: 860px) {
  .pv-post { grid-template-columns: 1fr; }
  .pv-media { max-height: 75vh; }
  .pv-info { padding: 18px; }
  .pp-grid { grid-template-columns: 1fr; gap: 26px; max-width: 460px; margin: 0 auto; }
  .pp-intro p { font-size: 19px; }
  .sel-bar-inner { padding: 10px 14px; }
}

/* =========================================================
   Tema escuro (galeria do cliente)
   Ligado por <html data-theme="dark">: padrão da galeria (painel) ou botão sol/lua do cliente.
   ========================================================= */
html[data-theme="dark"] {
  --bg: #121110;
  --surface: #1c1a18;
  --ink: #f1ede7;
  --muted: #a39b91;
  --line: #2f2b27;
  color-scheme: dark;
}
[data-theme="dark"] .btn.primary,
[data-theme="dark"] .chip.active,
[data-theme="dark"] .admin-strip { background: var(--ink); color: #161412; }
[data-theme="dark"] .btn.primary:hover { background: #fff; }
[data-theme="dark"] .btn.ghost { color: var(--ink); border-color: #4a443e; }
[data-theme="dark"] .toolbar { background: rgba(18, 17, 16, .9); }
[data-theme="dark"] .pv-months { background: rgba(18, 17, 16, .94); }
[data-theme="dark"] .tile,
[data-theme="dark"] .pv-media { background: #24211e; }
[data-theme="dark"] .sel-bar { background: rgba(28, 26, 24, .95); box-shadow: 0 -8px 30px rgba(0,0,0,.4); }
[data-theme="dark"] .card,
[data-theme="dark"] .pp-card,
[data-theme="dark"] .pv-post { box-shadow: 0 10px 40px rgba(0,0,0,.35); }
[data-theme="dark"] .dlg { background: var(--surface); }
[data-theme="dark"] input,
[data-theme="dark"] textarea { background: #24211e; color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .pv-alert,
[data-theme="dark"] .pv-pill.wait { background: #3a2716; color: #f5c79c; }
[data-theme="dark"] .pv-pill.ok { background: #16301f; color: #9edbb3; }
[data-theme="dark"] .pv-pill.err { background: #3a1916; color: #f2aaa2; }
[data-theme="dark"] .pp-chosen { background: #16301f; color: #bfe6cc; }
[data-theme="dark"] .pv-arrow { background: rgba(40, 37, 34, .92); }
[data-theme="dark"] .pv-arrow svg { stroke: var(--ink); }

/* Botão sol/lua (troca o tema só para quem está vendo) */
.theme-btn { width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-btn .moon { display: block; }
.theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .moon { display: none; }
[data-theme="dark"] .theme-btn .sun { display: block; }
.theme-float { position: fixed; bottom: 16px; left: 16px; z-index: 40; background: rgba(0,0,0,.35); color: #fff; border-color: rgba(255,255,255,.4); backdrop-filter: blur(6px); }

/* ---------- Álbuns (vários ensaios na mesma galeria) ---------- */
.album-nav { flex-wrap: wrap; overflow: visible; margin: 4px 0 12px; }
.album-nav .chip { border-color: var(--line, #e6e1da); }
.album-sec + .album-sec { margin-top: 34px; }
.album-sec[hidden] { display: none; }
.album-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 6px 2px 12px; }
.album-head h2 { font: 500 30px/1.15 var(--serif); margin: 0; }
.album-dl { margin-left: auto; font-size: 13px; color: inherit; }
@media (max-width: 640px) {
  .album-head { margin: 10px 8px 10px; }
  .album-head h2 { font-size: 24px; }
  .album-nav { padding: 0 6px; }
}

/* ---------- Busca por rosto ("Encontrar minhas fotos") ---------- */
.face-btn { background: var(--accent, #e8772e); border-color: transparent; color: #fff; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.face-btn .i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.face-chip .i { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.face-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 2px 14px; padding: 12px 16px; border-radius: 14px; background: var(--surface, #fff); border: 1px solid var(--line); }
.face-bar .grow { flex: 1 1 200px; }
.face-bar[hidden], .face-maybe[hidden] { display: none; }
.face-maybe { margin-top: 34px; }
.maybe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.maybe-card { display: grid; gap: 6px; }
.maybe-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: zoom-in; background: var(--line); }
.face-dlg { overflow: auto; max-height: calc(100dvh - 24px); }
.face-dlg p { line-height: 1.55; }
.face-dlg .check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-weight: 500; cursor: pointer; }
.face-dlg .check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent, #e8772e); flex: none; }
.dlg-x { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.cam-box { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #000; margin-top: 8px; }
.cam-box video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-oval { position: absolute; left: 50%; top: 46%; width: 58%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border: 3px solid rgba(255,255,255,.9); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
.face-busy { display: grid; place-items: center; gap: 12px; padding: 30px 0; text-align: center; }
.face-busy .spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--accent, #e8772e); border-radius: 50%; animation: fx-spin .8s linear infinite; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
.face-tips { padding-left: 18px; margin: 10px 0 0; }
.center { text-align: center; }
@media (max-width: 640px) {
  .face-btn { order: 3; flex: 1 1 100%; justify-content: center; }
  .face-bar { margin: 6px 6px 12px; }
  .maybe-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 4px; }
}
