/* =====================================================================
   Quiz da Samanta — tema "lírios" (inspirado no convite dos 15 anos)
   Papel claro, dourado, aquarela de lírios, lavanda e eucalipto.
   ===================================================================== */

@font-face { font-family: "Allura"; src: url("fonts/allura.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-700.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }

:root {
  --paper: #fcfaf6;
  --ink: #5b4a3f;
  --ink-soft: #8a7766;
  --gold: #b8955f;
  --gold-light: #e3d3b3;
  --gold-deep: #96743f;
  --gold-text: linear-gradient(110deg, #8a6532 0%, #a98243 28%, #d9bd85 45%, #a98243 62%, #84602e 100%);
  --rose: #c0507a;
  --lavender: #7a68b3;
  --apricot: #c06424;
  --sage: #4f8263;
  --ok: #5c9470;
  --fail: #c0507a;
  --card: rgba(255, 255, 255, 0.84);
  --radius: 16px;
  --font-script: "Allura", "Brush Script MT", cursive;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 0% 100%, rgba(240, 175, 198, 0.22), transparent 45%),
    radial-gradient(ellipse at 100% 100%, rgba(196, 178, 232, 0.2), transparent 45%),
    radial-gradient(ellipse at 50% 0%, rgba(240, 223, 181, 0.25), transparent 55%),
    url("img/paper.webp");
  background-size: auto, auto, auto, 360px 360px;
  background-attachment: fixed;
  min-height: 100vh;
  font-variant-numeric: lining-nums;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }
a { color: var(--gold-deep); }
.muted { color: var(--ink-soft); }
.error { color: #8d2f45; background: #fbe8ec; border: 1px solid #f1c6d0; padding: 8px 12px; border-radius: 10px; margin: 0; }
.error:empty { display: none; }
.notice { background: #eef5ef; border: 1px solid #cfe2d4; color: #3f6b4f; padding: 10px 14px; border-radius: 10px; }
code { background: #f3ede3; padding: 1px 5px; border-radius: 4px; }

/* ---------- jardim (assets/garden.js) ---------- */
.garden, .burst { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.garden { z-index: 0; }
.burst { z-index: 50; }
body > :not(.garden):not(.burst) { position: relative; z-index: 1; }

.frame {
  position: absolute;
  inset: max(10px, 1.8vh) max(10px, 1.4vw);
  border: 1px solid rgba(184, 149, 95, 0.6);
}
.frame::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(184, 149, 95, 0.25);
}

.branch {
  position: absolute;
  top: -1.2vh;
  width: clamp(110px, 25vh, 310px);
  aspect-ratio: 1;
  background: url("img/branch-corner.webp") top left / contain no-repeat;
  transform-origin: top left;
  animation: sway 8s ease-in-out infinite;
}
.branch-tl { left: -0.8vw; }
.branch-tr { right: -0.8vw; transform-origin: top center; animation-name: sway-r; }
@keyframes sway { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(1.6deg); } }
@keyframes sway-r { 0%, 100% { transform: scaleX(-1) rotate(0deg); } 50% { transform: scaleX(-1) rotate(1.6deg); } }

.bouquet {
  position: absolute;
  bottom: -1vh;
  height: var(--bh, 68vh);
  aspect-ratio: 640 / 1000;
  background: url("img/bouquet-left.webp") bottom left / contain no-repeat;
  transform-origin: bottom left;
  transition: height 0.9s ease;
  animation: breeze 9s ease-in-out infinite;
}
.bouquet-l { left: -0.6vw; }
.bouquet-r {
  right: -0.6vw;
  background-image: url("img/bouquet-right.webp");
  background-position: bottom right;
  transform-origin: bottom right;
  animation-name: breeze-r;
  animation-delay: -4.5s;
}
@keyframes breeze { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(0.9deg); } }
@keyframes breeze-r { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-0.9deg); } }

body[data-state="question"] .bouquet,
body[data-state="reveal"] .bouquet { --bh: 42vh; }

.glint {
  position: absolute;
  line-height: 1;
  opacity: 0;
  text-shadow: 0 0 6px rgba(240, 220, 170, 0.9);
  animation: glint 4s ease-in-out infinite;
}
@keyframes glint {
  0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  50% { opacity: 0.85; transform: scale(1.1) rotate(25deg); }
}

.petal-pink { background-image: url("img/petal-pink.webp"); }
.petal-white { background-image: url("img/petal-white.webp"); }
.petal-orange { background-image: url("img/petal-orange.webp"); }
.petal, .bloom { background-repeat: no-repeat; background-size: contain; background-position: center; }

.petal {
  position: absolute;
  top: -50px;
  opacity: 0;
  animation: petal-fall 18s linear infinite;
  will-change: transform, opacity;
}
@keyframes petal-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 0.85; }
  25% { transform: translate(var(--sway), 27vh) rotate(calc(var(--spin) * 0.25)); }
  50% { transform: translate(calc(var(--sway) * -0.6), 54vh) rotate(calc(var(--spin) * 0.5)); }
  75% { transform: translate(var(--sway), 81vh) rotate(calc(var(--spin) * 0.75)); opacity: 0.75; }
  100% { transform: translate(0, 112vh) rotate(var(--spin)); opacity: 0; }
}

.butterfly-path {
  position: absolute;
  left: 0;
  top: var(--y0, 20vh);
  width: clamp(38px, 4.2vw, 70px);
  aspect-ratio: 160 / 140;
  animation: fly-ltr 14s linear forwards;
}
.butterfly-path.rtl { animation-name: fly-rtl; }
.butterfly {
  display: block;
  width: 100%;
  height: 100%;
  background: url("img/butterfly.webp") center / contain no-repeat;
  animation: flap 0.28s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 6px rgba(120, 80, 40, 0.18));
}
@keyframes flap { from { transform: scaleX(1); } to { transform: scaleX(0.3); } }
@keyframes fly-ltr {
  0% { transform: translate(-12vw, 0) rotate(12deg); }
  25% { transform: translate(22vw, -7vh) rotate(4deg); }
  50% { transform: translate(50vw, 5vh) rotate(16deg); }
  75% { transform: translate(78vw, -5vh) rotate(6deg); }
  100% { transform: translate(112vw, 2vh) rotate(12deg); }
}
@keyframes fly-rtl {
  0% { transform: translate(112vw, 0) rotate(-12deg); }
  25% { transform: translate(78vw, -6vh) rotate(-4deg); }
  50% { transform: translate(50vw, 4vh) rotate(-16deg); }
  75% { transform: translate(22vw, -6vh) rotate(-6deg); }
  100% { transform: translate(-12vw, 2vh) rotate(-12deg); }
}

.burst span {
  position: absolute;
  line-height: 1;
  animation: burst 1.8s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  will-change: transform, opacity;
}
@keyframes burst {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--rot)); opacity: 0; }
}

@keyframes shimmer { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.15); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes opt-in { from { transform: scale(0.88) translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.logo-name, .age-num, .pin, .countdown, .section-title {
  background: var(--gold-text);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

/* ---------- título no estilo do convite ---------- */
.logo {
  margin: 0 0 14px;
  text-align: center;
  font-weight: 400;
  line-height: 1;
}
.logo-eyebrow {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(0.95rem, 3.6vw, 1.35rem);
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
}
.logo-name {
  display: block;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.8));
  font-family: var(--font-script);
  font-size: clamp(3.8rem, 17vw, 6.2rem);
  line-height: 1.08;
  padding: 0 0.12em;
  margin-top: -0.06em;
}
.logo-age { display: flex; align-items: baseline; justify-content: center; gap: 0.25em; margin-top: -0.1em; }
.age-num {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 10vw, 3.6rem);
  font-variant-numeric: lining-nums;
  line-height: 1;
}
.age-word { font-family: var(--font-script); font-size: clamp(1.7rem, 7vw, 2.5rem); color: var(--gold); }
.logo-sub { display: block; font-family: var(--font-serif); font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.logo::after, .section-title::after {
  content: "";
  display: block;
  width: min(320px, 70%);
  height: 0;
  padding-bottom: min(36px, 7.5%);
  margin: 10px auto 0;
  background: url("img/divider.svg") center / contain no-repeat;
}

/* ---------- botões e formulários ---------- */
.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 14px 26px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f1e1ba 0%, #d8ba84 55%, #c6a066 100%);
  color: #4a3a2f;
  box-shadow: 0 3px 0 #a8844e, 0 8px 20px rgba(184, 149, 95, 0.3);
  letter-spacing: 0.02em;
}
.btn-primary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #a8844e; }
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.7) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: sheen 3.6s ease-in-out infinite;
}
@keyframes sheen { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn-ghost { background: rgba(255, 255, 255, 0.8); color: var(--ink); border: 1px solid var(--gold-light); }
.btn-small { padding: 6px 14px; font-size: 0.9rem; background: #fff; color: var(--ink); border: 1px solid var(--gold-light); }
.btn-danger { color: #a8405a; background: #fff6f8; border-color: #efc7cf; }

.card {
  background: var(--card);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(120, 90, 60, 0.1);
  backdrop-filter: blur(3px);
}
label, .label { font-weight: 600; margin: 0; color: var(--ink); }

input, textarea {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--gold-light);
  background: #fff;
  color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #b3a595; }
input:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(184, 149, 95, 0.18); }

/* ---------- medalhão com a foto ---------- */
.portrait {
  position: relative;
  margin: 0 auto calc(var(--pw) * 0.16);
  width: var(--pw, 200px);
  aspect-ratio: 5 / 6;
  flex: none;
  animation: float 6s ease-in-out infinite;
}
.portrait-sm { --pw: 130px; }
.portrait-lg { --pw: 28vh; }
.portrait-frame {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 32%, #ffffff 0%, #fdf0f3 35%, #f6d6e0 70%, #ecbfcf 100%);
  box-shadow:
    0 0 0 calc(var(--pw) * 0.02) #fff,
    0 0 0 calc(var(--pw) * 0.03) var(--gold),
    0 0 0 calc(var(--pw) * 0.055) #fffdf8,
    0 0 0 calc(var(--pw) * 0.062) var(--gold-light),
    0 16px 34px rgba(120, 80, 60, 0.18);
}
.portrait-frame img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 112%;
  transform: translateX(-50%);
}
.portrait-spray {
  position: absolute;
  left: 50%;
  bottom: -17%;
  width: 150%;
  aspect-ratio: 500 / 230;
  transform: translateX(-50%);
  background: url("img/portrait-spray.webp") center / contain no-repeat;
  filter: drop-shadow(0 3px 4px rgba(120, 80, 60, 0.12));
}

/* ---------- entrada (celular) ---------- */
.join { max-width: 420px; margin: 0 auto; padding: 44px 18px 40px; }
.join .portrait { margin-top: 10px; }
.join #pin {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.2rem;
  letter-spacing: 0.3em;
  text-align: center;
  font-variant-numeric: lining-nums;
  color: var(--ink);
}
.resume { display: block; margin-bottom: 16px; }

/* ---------- jogo (celular) ---------- */
.page-play .bouquet, .page-join .bouquet { --bh: 30vh; }
.page-play[data-state="question"] .bouquet, .page-play[data-state="reveal"] .bouquet { --bh: 17vh; }
.page-play .branch, .page-join .branch { width: 120px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--gold-light);
  backdrop-filter: blur(6px);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
}
.score { color: var(--gold-deep); font-variant-numeric: lining-nums; }

.play {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 18px 24px;
  min-height: calc(100vh - 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.play section { text-align: center; }
.play section[data-screen="question"] { text-align: left; display: flex; flex-direction: column; gap: 14px; }

.big { font-family: var(--font-serif); font-weight: 700; font-size: 2.1rem; line-height: 1.15; margin: 0 0 8px; color: var(--ink); }
.countdown {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 7rem;
  line-height: 1.1;
  margin: 0;
  font-variant-numeric: lining-nums;
  animation: shimmer 6s linear infinite, beat 1s ease-in-out infinite;
}
.rank { font-family: var(--font-serif); font-size: 1.45rem; font-weight: 600; }
.points { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 700; color: var(--gold-deep); font-variant-numeric: lining-nums; }

.q-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; }
.q-text { font-family: var(--font-serif); font-size: 1.55rem; font-weight: 700; line-height: 1.2; margin: 0; color: var(--ink); }

.timer {
  min-width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--gold-light);
}
.timer.hurry { background: var(--rose); border-color: var(--rose); color: #fff; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  min-height: 112px;
  padding: 12px;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1.02rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  box-shadow: 0 4px 0 rgba(70, 40, 30, 0.18), 0 8px 18px rgba(70, 40, 30, 0.12);
}
button.opt { cursor: pointer; }
button.opt:active:not(:disabled) { transform: translateY(2px); }
button.opt:disabled { opacity: 0.55; }
.opt-1 { background: linear-gradient(160deg, #d4678f, var(--rose)); }
.opt-2 { background: linear-gradient(160deg, #9585c8, var(--lavender)); }
.opt-3 { background: linear-gradient(160deg, #d98042, var(--apricot)); }
.opt-4 { background: linear-gradient(160deg, #6c9c7d, var(--sage)); }
.shape { font-size: 1.5rem; line-height: 1; opacity: 0.95; }
section:not([hidden]) .opt { animation: opt-in 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.3) backwards; }
section:not([hidden]) .opt-2 { animation-delay: 0.08s; }
section:not([hidden]) .opt-3 { animation-delay: 0.16s; }
section:not([hidden]) .opt-4 { animation-delay: 0.24s; }

.reveal-box { border-radius: var(--radius); padding: 24px; margin-bottom: 16px; color: #fff; box-shadow: 0 12px 30px rgba(70, 40, 30, 0.15); }
.reveal-box.ok { background: linear-gradient(160deg, #7cb08d, var(--ok)); }
.reveal-box.fail { background: linear-gradient(160deg, #d4678f, var(--fail)); }
.reveal-box .big { color: #fff; }
.reveal-box .points { color: #fff; }
.reveal-box .muted { color: rgba(255, 255, 255, 0.92); }

/* ---------- telão ---------- */
.page-host { overflow: hidden; }
.host {
  height: 100vh;
  padding: 5vh 8vw 0;
  display: flex;
  flex-direction: column;
}
.host > section { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.host .logo { margin-bottom: 1vh; }
.host .logo-eyebrow { font-size: 1.5vw; }
.host .logo-name { font-size: 5.8vw; }
.host .age-num { font-size: 3vw; }
.host .age-word { font-size: 2.4vw; }
.host .logo::after { width: 26vw; padding-bottom: 2.6vw; margin-top: 0.6vh; }

.lobby-grid { display: flex; justify-content: center; align-items: center; gap: 4vw; margin-top: 1vh; }
.join-info { font-size: 1.9vw; text-align: center; color: var(--ink-soft); }
.join-info strong { color: var(--ink); }
.join-info p { margin: 0.35em 0; }
.pin-label { font-family: var(--font-serif); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; font-size: 1.3vw; }
.pin {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 8vw;
  letter-spacing: 0.06em;
  line-height: 1;
  font-variant-numeric: lining-nums;
}
.qr {
  width: 23vh;
  height: 23vh;
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 5px #fff, 0 0 0 6px var(--gold-light), 0 12px 26px rgba(120, 90, 60, 0.14);
  image-rendering: pixelated;
}
.players-count { text-align: center; font-family: var(--font-serif); font-weight: 600; font-size: 2vw; margin: 1.5vh 0 1vh; }
.hint { text-align: center; color: var(--ink-soft); font-size: 0.95vw; margin: 0 0 1vh; }

.player-chips {
  list-style: none;
  padding: 6px 6vw;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  gap: 10px;
  overflow: auto;
  flex: 1;
}
.player-chips button {
  font: inherit;
  font-size: 1.35vw;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--gold-light);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(120, 90, 60, 0.08);
  animation: pop 0.3s ease-out;
}
.player-chips button::before { content: "✿ "; color: var(--rose); }
.player-chips button:hover { background: #fbe8ec; text-decoration: line-through; }
.player-chips.many { gap: 6px; }
.player-chips.many button { font-size: 1.05vw; padding: 5px 12px; }
.player-chips.crowd button { font-size: 1.05vw; padding: 5px 11px; }

.host.crowded section[data-screen="lobby"] .logo-name { font-size: 4.6vw; }
.host.crowded section[data-screen="lobby"] .logo-eyebrow { font-size: 1.1vw; }
.host.crowded section[data-screen="lobby"] .age-num { font-size: 2.4vw; }
.host.crowded section[data-screen="lobby"] .age-word { font-size: 1.7vw; }
.host.crowded section[data-screen="lobby"] .logo::after { width: 18vw; padding-bottom: 1.8vw; }
.host.crowded .portrait-lg { --pw: 21vh; }
.host.crowded .pin { font-size: 6vw; }
.host.crowded .join-info { font-size: 1.5vw; }
.host.crowded .qr { width: 18vh; height: 18vh; }
.host.crowded .players-count { font-size: 1.6vw; margin: 0.5vh 0 1vh; }

body[data-state="question"] .host, body[data-state="reveal"] .host { padding-left: 13vw; padding-right: 13vw; }
.host .q-head { font-size: 1.7vw; }
.host .timer { width: 9vh; height: 9vh; font-size: 4.2vh; }
.host-q {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 4rem);
  line-height: 1.15;
  text-align: center;
  margin: 2.5vh 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 3vh 2.5vw;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.85), 0 0 0 7px var(--gold-light), 0 16px 34px rgba(120, 90, 60, 0.14);
}
section[data-screen="prepare"] { justify-content: center; align-items: center; text-align: center; }
.host .countdown { font-size: 16vh; }

.host-options { flex: 1; gap: 1.5vh 1.5vw; margin-bottom: 2vh; }
.host-options .opt {
  flex-direction: row;
  justify-content: flex-start;
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.5vw, 3.1rem);
  padding: 0 2vw;
  gap: 1.5vw;
  min-height: 0;
}
.host-options .opt-text { flex: 1; text-align: left; position: relative; }
.host-options .shape { font-size: 2.6vw; position: relative; }
.host-options .bar-count { font-size: 3vw; font-weight: 700; position: relative; font-variant-numeric: lining-nums; }
.host-options .opt::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 0%);
  background: rgba(255, 255, 255, 0.24);
  transition: width 0.6s ease-out;
}
.host-options .opt.wrong { opacity: 0.32; }
.host-options .opt.correct { outline: 5px solid #fff; animation: correct-pulse 1.3s ease-in-out infinite; }
.host-options .opt.correct .opt-text::after { content: "  ✔"; }
@keyframes correct-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 164, 106, 0); transform: scale(1); }
  50% { box-shadow: 0 0 0 10px rgba(201, 164, 106, 0.45); transform: scale(1.015); }
}

.section-title {
  font-family: var(--font-script);
  font-weight: 400;
  text-align: center;
  font-size: 6.4vw;
  line-height: 1.1;
  margin: 0 0 3vh;
}
.section-title::after { width: 22vw; padding-bottom: 2.2vw; margin-top: 0; }

.board {
  list-style: none;
  counter-reset: pos;
  padding: 0;
  margin: 0 auto;
  width: min(900px, 62vw);
  display: flex;
  flex-direction: column;
  gap: 1.4vh;
}
.board li {
  counter-increment: pos;
  display: flex;
  align-items: center;
  gap: 2vw;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--gold-light);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1.8vh 2vw;
  font-family: var(--font-serif);
  font-size: 2.3vw;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(120, 90, 60, 0.08);
  animation: pop 0.4s ease-out both;
}
.board li::before { content: counter(pos) "º"; color: var(--gold); min-width: 2.6ch; font-variant-numeric: lining-nums; }
.board .b-name { flex: 1; }
.board .b-score { color: var(--gold-deep); font-variant-numeric: lining-nums; }
.board .b-delta { font-size: 1.5vw; color: var(--sage); font-variant-numeric: lining-nums; }
.board-rest { margin-top: 3vh; counter-reset: pos 3; }
.board-rest li { font-size: 1.5vw; padding: 1vh 2vw; }

.podium { flex: 1; display: flex; justify-content: center; align-items: flex-end; gap: 2vw; min-height: 0; }
.step {
  width: 19vw;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vh;
  padding: 2vh 1vw;
  color: var(--ink);
  border: 1px solid rgba(184, 149, 95, 0.5);
  border-bottom: 0;
  box-shadow: 0 -8px 30px rgba(120, 90, 60, 0.12);
  animation: rise 0.9s ease-out both;
  transform-origin: bottom;
}
.step-1 { height: 50vh; background: linear-gradient(180deg, #f6e7c4, #dcc08a); animation-delay: 1.2s; }
.step-2 { height: 38vh; background: linear-gradient(180deg, #ffffff, #e9e2da); animation-delay: 0.6s; }
.step-3 { height: 29vh; background: linear-gradient(180deg, #fbe3ea, #ecbccb); animation-delay: 0s; }
.p-name { font-family: var(--font-serif); font-weight: 700; font-size: 2.4vw; text-align: center; word-break: break-word; line-height: 1.1; }
.p-score { font-family: var(--font-serif); font-weight: 600; font-size: 1.6vw; color: var(--gold-deep); font-variant-numeric: lining-nums; }
.p-place { font-family: var(--font-serif); font-weight: 600; font-size: 4.4vw; margin-top: auto; color: var(--gold-deep); line-height: 1; }
.step-1 .p-name::before {
  content: "";
  display: block;
  width: 7.5vw;
  aspect-ratio: 1;
  margin: -12vh auto 1vh;
  background: url("img/lily-pink.webp") center / contain no-repeat;
  filter: drop-shadow(0 6px 8px rgba(120, 60, 70, 0.25));
  animation: lily-drop 1.2s ease-out 2s both;
}
@keyframes lily-drop { from { transform: translateY(-50px) scale(0.3) rotate(-60deg); opacity: 0; } to { transform: none; opacity: 1; } }

.host-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3vw;
  padding: 2vh 0 4vh;
  font-size: 1.15vw;
}
.host-controls .btn { font-size: 1.4vw; padding: 1.4vh 2.6vw; }

/* ---------- painel ---------- */
.admin { max-width: 960px; margin: 0 auto; padding: 40px 18px 48px; }
.admin.narrow { max-width: 560px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; }
.admin-head h1, .card h2 { font-family: var(--font-serif); font-weight: 700; color: var(--ink); }
.admin-head small, .card-head small { color: var(--ink-soft); font-weight: 400; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head h2, .card h2 { margin: 0; }
.q-list { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 10px; }
.q-list li { padding: 10px 0; border-bottom: 1px solid var(--gold-light); }
.q-list li > div:first-child { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.games { width: 100%; border-collapse: collapse; }
.games th, .games td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--gold-light); }
.answer-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.answer-row input[type="radio"] { width: 22px; height: 22px; flex: none; accent-color: #fff; }
.answer-row .shape { width: 28px; text-align: center; font-size: 1.3rem; cursor: pointer; color: #fff; }
.answer-row input:not([type="radio"]) { border-color: transparent; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 420px) {
  .opt { min-height: 98px; font-size: 0.95rem; }
  .games th:nth-child(5), .games td:nth-child(5) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- trava de entrada (QR code) ---------- */
.gate { text-align: center; align-items: center; }
.gate p { margin: 0; line-height: 1.45; }
.gate .big { margin-top: 4px; }
.gate-icon {
  display: block;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  background: url("img/lock.svg") center / contain no-repeat;
}
.gate-icon-qr { background-image: url("img/qr-scan.svg"); }
.gate-wait { display: flex; align-items: center; gap: 8px; font-family: var(--font-serif); font-weight: 600; letter-spacing: 0.08em; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); animation: dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 0.2s; background: var(--lavender); }
.dots i:nth-child(3) { animation-delay: 0.4s; background: var(--gold); }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(-6px); opacity: 1; } }

.qr-box { display: flex; flex-direction: column; align-items: center; gap: 1.6vh; }
.qr-frame {
  width: 36vh;
  height: 36vh;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 7px #fff, 0 0 0 8px var(--gold-light), 0 16px 34px rgba(120, 90, 60, 0.14);
}
.qr-frame .qr { width: 100%; height: 100%; border: 0; box-shadow: none; padding: 2.2vh; animation: pop 0.5s ease-out; }
.qr-locked { display: flex; flex-direction: column; align-items: center; gap: 1.4vh; font-family: var(--font-serif); font-weight: 700; font-size: 2.1vw; color: var(--ink-soft); }
.qr-locked .gate-icon { width: 10vh; height: 10vh; }
.qr-caption { margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: 1.8vw; color: var(--ink); text-align: center; }
.host.gate-open .qr-caption { color: var(--gold-deep); }
.host.crowded .qr-frame { width: 26vh; height: 26vh; }
.host.crowded .qr-caption { font-size: 1.3vw; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; margin-right: 6px; }
.tag-open { background: #e4f1e8; color: #3f6b4f; }
.tag-locked { background: #f6ece0; color: #8a6532; }
.gate-form { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0; }
.btn-open { background: linear-gradient(135deg, #f1e1ba, #d8ba84); border-color: #c6a066; }

/* ---------- foto da pergunta ---------- */
.q-photo { margin: 0; display: flex; align-items: center; justify-content: center; min-height: 0; }
.q-photo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--gold);
  background: #fff;
  padding: 6px;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.9), 0 0 0 6px var(--gold-light), 0 14px 30px rgba(120, 90, 60, 0.16);
  animation: pop 0.45s ease-out;
}
.q-body { flex: 1; display: flex; min-height: 0; margin-bottom: 2vh; }
.q-body .host-options { flex: 1; margin-bottom: 0; }
.host.has-photo .q-body { gap: 2vw; }
.host.has-photo .q-body .q-photo { flex: 0 0 38%; height: 100%; }
.host.has-photo .q-body .q-photo img { height: auto; width: auto; max-height: 100%; max-width: 100%; }
.host.has-photo .host-options { grid-template-columns: 1fr; gap: 1.2vh; }
.host.has-photo .host-options .opt { font-size: clamp(1.1rem, 2vw, 2.6rem); }
.host.has-photo .host-q { font-size: clamp(1.4rem, 2.8vw, 3.4rem); margin: 1.6vh 0; padding: 2.2vh 2vw; }
.q-photo-prepare { height: 40vh; margin: 0 0 1vh; }
.host.has-photo section[data-screen="prepare"] .countdown { font-size: 11vh; }
.host.has-photo section[data-screen="prepare"] .host-q { margin-bottom: 2vh; }

.q-photo-sm { margin: 0; display: flex; justify-content: center; }
.q-photo-sm img {
  max-width: 100%;
  max-height: 26vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--gold-light);
  background: #fff;
  padding: 4px;
  box-shadow: 0 8px 20px rgba(120, 90, 60, 0.12);
}

.photo-field { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.photo-preview { width: 140px; height: 105px; object-fit: cover; border-radius: 10px; border: 1px solid var(--gold-light); }
.photo-inputs { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 8px; }
.photo-inputs input[type="file"] { padding: 9px; background: #fff; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: auto; }
.small { font-size: 0.88rem; margin: 0; }
.tag-photo { background: #f3e8f8; color: #6b4f93; }
