/* ── 60-Second Talent Show — vintage theater playbill ───────────────
   Aged cream paper, stacked-rule border with fleurons, crimson and
   ink playbill lettering, brass medallion play buttons. */

:root {
  --paper: #f3ecdb;
  --paper-deep: #e9dfc8;
  --crimson: #9e1b2f;
  --crimson-deep: #711221;
  --ink: #251d18;
  --ink-soft: #857a6b;
  --brass: #b08d3d;
  --card: #faf5e9;
  --line: #d9cdb3;
  --err: #b03030;
  --font-playbill: 'Playfair Display SC', serif;
  --font-condensed: 'Oswald', sans-serif;
  --font-body: 'Source Serif 4', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.hidden { display: none !important; }

body {
  font-family: var(--font-body);
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(37, 29, 24, 0.02) 3px 4px),
    var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* playbill page border */
.page::before {
  content: '';
  position: fixed;
  inset: 8px;
  border: 3px double var(--ink);
  pointer-events: none;
  z-index: 5;
  opacity: 0.55;
}

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 26px; }

main { flex: 1 0 auto; padding-bottom: 70px; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.velvet-band {
  height: 18px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 3px, transparent 3px 9px),
    var(--crimson);
  border-bottom: 2px solid var(--ink);
}

.hero { text-align: center; }

.hero-inner { padding: 40px 0 18px; }

.presents {
  font-family: var(--font-condensed);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.playbill-title {
  font-family: var(--font-playbill);
  font-weight: 700;
  font-size: clamp(2rem, 8vw, 3.1rem);
  line-height: 1.08;
  color: var(--ink);
}

.big-60 {
  color: var(--crimson);
  font-size: 1.35em;
  text-shadow: 2px 2px 0 rgba(37, 29, 24, 0.18);
}

.rule-orn { color: var(--brass); margin: 16px 0 12px; letter-spacing: 0.2em; font-size: 0.9rem; }

.hero .sub { color: var(--ink-soft); max-width: 440px; margin: 0 auto; font-style: italic; }

.hero-cta { display: flex; justify-content: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* ── Tabs ─────────────────────────────────────────────────────────── */
.tabs { display: flex; margin: 30px 0 22px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }

.tab {
  flex: 1;
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 13px 10px;
  background: transparent;
  color: var(--ink-soft);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab:hover { color: var(--ink); }

.tab.is-active { background: var(--crimson); color: var(--paper); }

/* ── Cards / notes ────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1.5px solid var(--ink);
  padding: 30px 26px;
  margin-bottom: 18px;
  box-shadow: 5px 5px 0 rgba(37, 29, 24, 0.14);
}

.card h2 {
  font-family: var(--font-playbill);
  font-weight: 700;
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 6px;
}

.card-sub { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 20px; text-align: center; font-style: italic; }

.note {
  margin: 18px 0;
  padding: 16px 20px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  text-align: center;
}

/* ── Dropzone ─────────────────────────────────────────────────────── */
.drop {
  position: relative;
  border: 2px dashed var(--crimson);
  background: rgba(158, 27, 47, 0.04);
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  overflow: hidden;
  transition: background 0.15s ease;
}

.drop:hover { background: rgba(158, 27, 47, 0.09); }

.drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.drop-inner { text-align: center; padding: 22px; }

.drop-icon { font-size: 2.2rem; display: block; margin-bottom: 8px; }

.drop-text { font-weight: 600; }

.drop-hint { color: var(--ink-soft); font-size: 0.85rem; margin-top: 4px; }

.file-chosen {
  font-family: var(--font-condensed);
  font-weight: 500;
  padding: 20px;
  text-align: center;
  color: var(--crimson);
}

/* ── Fields ───────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

label {
  display: block;
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 13px 15px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  transition: border-color 0.15s ease;
}

input:focus { outline: none; border-color: var(--crimson); }
input.error { border-color: var(--err); }
input::placeholder { color: var(--ink-soft); opacity: 0.7; }

.fine { margin-top: 12px; text-align: center; color: var(--ink-soft); font-size: 0.85rem; font-style: italic; }

.form-error { color: var(--err); font-weight: 600; text-align: center; margin-top: 12px; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

.btn-primary {
  background: var(--crimson);
  color: var(--paper);
  box-shadow: 4px 4px 0 rgba(37, 29, 24, 0.5);
}

.btn-primary:hover:not(:disabled) { background: var(--crimson-deep); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  font-size: 0.82rem;
  padding: 11px 20px;
}

.btn-ghost:hover:not(:disabled) { background: var(--paper-deep); }

.btn-block { width: 100%; }

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(243, 236, 219, 0.4);
  border-top-color: var(--paper);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── My entry ─────────────────────────────────────────────────────── */
.my-photo-wrap { text-align: center; margin-bottom: 18px; }

.my-photo {
  max-width: 260px;
  width: 100%;
  border: 1.5px solid var(--ink);
  margin-bottom: 12px;
}

.my-caption { color: var(--ink-soft); font-style: italic; }

.share-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ── Gallery ──────────────────────────────────────────────────────── */
.gallery-head { text-align: center; margin-bottom: 22px; }

.gallery-head h2 { font-family: var(--font-playbill); font-weight: 700; font-size: 1.7rem; }

.gallery-sub { color: var(--ink-soft); font-style: italic; margin-top: 4px; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.act-card {
  position: relative;
  background: var(--card);
  border: 1.5px solid var(--ink);
  padding: 8px 8px 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.act-card:hover { transform: translateY(-4px); box-shadow: 5px 8px 0 rgba(37, 29, 24, 0.18); }

/* corner ornaments */
.act-card::before,
.act-card::after {
  content: '\2766';
  position: absolute;
  color: var(--brass);
  font-size: 0.85rem;
  z-index: 2;
}

.act-card::before { top: 3px; left: 7px; }
.act-card::after { top: 3px; right: 7px; transform: scaleX(-1); }

.act-thumb-wrap { position: relative; }

.act-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  background: var(--paper-deep);
}

/* brass medallion play button */
.play-medallion {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #d3b465, var(--brass) 65%, #7d6222);
  border: 2px solid #6e5518;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 29, 24, 0.45);
  pointer-events: none;
}

.play-medallion::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 16px solid var(--paper);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}

.act-caption {
  font-family: var(--font-playbill);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.35;
  text-align: center;
  margin-top: 10px;
  padding: 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.act-author {
  font-family: var(--font-condensed);
  color: var(--ink-soft);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 4px;
}

.act-votes {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  gap: 12px;
}

.vote-count { font-family: var(--font-condensed); font-weight: 600; color: var(--crimson); font-size: 0.88rem; }

.vote-btn {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 18px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.vote-btn:hover:not(:disabled) { background: var(--crimson); }
.vote-btn.is-voted { background: var(--line); color: var(--ink-soft); cursor: default; }

/* ── Empty / load more ────────────────────────────────────────────── */
.empty { text-align: center; padding: 48px 20px; border: 2px dashed var(--line); }

.empty-icon { font-size: 2.4rem; display: block; margin-bottom: 10px; }

.empty-sub { color: var(--ink-soft); margin: 6px 0 18px; font-style: italic; }

.load-wrap { text-align: center; margin-top: 26px; }

/* ── Lightbox ─────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 11, 0.95);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lb-content {
  background: var(--card);
  border: 2px solid var(--brass);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.lb-media { background: #000; }

.lb-media video,
.lb-media img {
  width: 100%;
  max-height: 58vh;
  display: block;
  object-fit: contain;
}

.lb-meta { padding: 18px 22px 22px; }

.lb-caption { font-family: var(--font-playbill); font-weight: 700; font-size: 1.1rem; line-height: 1.4; }

.lb-author {
  font-family: var(--font-condensed);
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 6px;
}

.lb-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }

.lb-votes { font-family: var(--font-condensed); font-weight: 600; color: var(--crimson); }

.lb-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--paper);
  cursor: pointer;
  z-index: 2;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.6rem;
  background: rgba(243, 236, 219, 0.12);
  border: 1px solid var(--brass);
  color: var(--paper);
  cursor: pointer;
  width: 52px;
  height: 52px;
  line-height: 1;
}

.lb-prev { left: 14px; }
.lb-next { right: 14px; }

/* ── Toast ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-condensed);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 13px 24px;
  z-index: 200;
  box-shadow: 0 10px 26px rgba(37, 29, 24, 0.4);
}

.toast-ok { background: var(--crimson); }

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 24px 26px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-style: italic;
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .lb-nav { display: none; }
}
