:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --ink: #2b2620;
  --muted: #8a8076;
  --gold: #b08d57;
  --gold-dark: #8c6d3f;
  --line: #ece5da;
  --danger: #b4483c;
  --ok: #4f7a52;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }

.hero { text-align: center; padding: 40px 20px 16px; }
.eyebrow { letter-spacing: .3em; text-transform: uppercase; font-size: 12px; color: var(--gold); margin: 0 0 8px; }
.hero h1 {
  font-family: "Didot", "Bodoni 72", "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 400; font-size: clamp(32px, 9vw, 52px); margin: 0; line-height: 1.1;
}
.sub { color: var(--muted); margin: 10px 0 0; letter-spacing: .15em; }
.divider { width: 60px; height: 1px; background: var(--gold); margin: 18px auto 0; }

main { max-width: 960px; margin: 0 auto; padding: 8px 16px 60px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; max-width: 480px; margin: 12px auto 28px; box-shadow: 0 6px 24px rgba(60, 40, 10, .05);
}
.card h2 { font-family: Georgia, serif; font-weight: 400; margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); }

.field { display: block; font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.field input {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
.field input:focus { outline: 2px solid var(--gold); border-color: transparent; }

.btn-primary, .btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px; border-radius: 14px; border: 0; cursor: pointer;
  font-size: 17px; font-weight: 600; text-decoration: none;
  background: var(--gold); color: #fff; -webkit-tap-highlight-color: transparent;
}
.btn-primary:active, .btn:active { background: var(--gold-dark); }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.btn.danger { background: var(--danger); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; opacity: 0;
}

.progress { margin-top: 18px; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .3s; }
.status { margin-top: 10px !important; font-size: 15px; color: var(--ink) !important; text-align: center; }
.status.ok { color: var(--ok) !important; }
.status.err { color: var(--danger) !important; }
.hint { font-size: 13px; text-align: center; margin-top: 12px !important; }

.section-title { font-family: Georgia, serif; font-weight: 400; text-align: center; margin: 8px 0 4px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; } }
.tile {
  position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--line);
  border: 0; padding: 0; cursor: pointer;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.new { animation: pop .6s ease; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.lightbox {
  position: fixed; inset: 0; background: rgba(15, 12, 8, .94); z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px;
}
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 8px; }
.lightbox p { color: #e8dcc8; margin-top: 12px; font-family: Georgia, serif; font-size: 18px; }
.lightbox .close { position: absolute; top: 12px; right: 16px; color: #fff; font-size: 32px; background: none; border: 0; }

/* ---------- Telão ---------- */
body.telao { background: #0d0b09; color: #f3ead9; overflow: hidden; height: 100vh; }
.stage { position: fixed; inset: 0; }
.stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transition: opacity 1.2s ease;
}
.stage img.show { opacity: 1; }
.caption {
  position: fixed; left: 0; right: 0; bottom: 28px; text-align: center;
  font-family: Georgia, serif; font-size: 3vh; text-shadow: 0 2px 12px rgba(0,0,0,.8);
}
.brand {
  position: fixed; top: 22px; left: 0; right: 0; text-align: center;
  font-family: "Didot", "Bodoni 72", Georgia, serif; font-size: 3.2vh; letter-spacing: .08em;
  text-shadow: 0 2px 12px rgba(0,0,0,.8); opacity: .9;
}
.telao-empty {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; font-family: Georgia, serif; padding: 40px;
}
.telao-empty h1 { font-weight: 400; font-size: 7vh; margin: 0; }
.telao-empty p { font-size: 3vh; color: #c9b48f; }
.fs-btn {
  position: fixed; bottom: 16px; right: 16px; z-index: 5; width: auto; padding: 10px 16px; font-size: 14px;
  opacity: .7;
}

/* ---------- Admin ---------- */
.admin main { max-width: 1100px; }
.toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stats { text-align: center; color: var(--muted); margin-bottom: 16px; }
.admin-tile { position: relative; }
.admin-tile .tile { width: 100%; }
.admin-tile.hidden-photo .tile img { opacity: .25; filter: grayscale(1); }
.admin-tile .meta { font-size: 12px; color: var(--muted); margin: 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-tile button.toggle {
  width: 100%; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  font-size: 13px; cursor: pointer;
}
.admin-tile.hidden-photo button.toggle { background: var(--ok); color: #fff; border-color: transparent; }
