:root {
  --bg: #EDF1F5;
  --paper: #FFFFFF;
  --ink: #15263A;
  --muted: #5B6B7C;
  --line: #C9D3DD;
  --accent: #0F7A63;
  --accent-dark: #0B5E4C;
  --accent-soft: #E1F1EC;
  --mark: #F4C542;
  --danger: #B3261E;
  --f-head: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
body.lock { overflow: hidden; }
a { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 3px; }

/* Página */
.top { max-width: 880px; margin: 0 auto; padding: 20px 20px 0; }
.brand { font-family: var(--f-head); font-weight: 600; font-size: 15px; color: var(--muted); }
.page { max-width: 880px; margin: 0 auto; padding: 28px 20px 48px; }
.page.narrow { max-width: 640px; }
.title {
  font-family: var(--f-head);
  font-weight: 800;
  font-size: clamp(42px, 8.5vw, 86px);
  line-height: .95;
  letter-spacing: -.02em;
  margin: 0 0 18px;
  max-width: 11ch;
}
.lede { color: var(--muted); max-width: 52ch; margin: 0 0 28px; }

.video { position: relative; aspect-ratio: 16 / 9; background: var(--ink); border-radius: 14px; overflow: hidden; }
.video iframe, #player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #AFC0D0; font-family: var(--f-head); font-size: 22px; }
.video-empty p { margin: 0; }

/* Espaço do botão: tracejado enquanto espera, botão sólido quando aparece */
.cta-slot {
  margin-top: 20px;
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
}
.cta-wait { margin: 0; color: var(--muted); }
.cta-note { display: none; margin: 12px 0 0; color: var(--muted); font-size: 16px; }
.cta-slot.is-open { border-color: transparent; padding: 0; }
.cta-slot.is-open .cta-wait { display: none; }
.cta-slot.is-open .cta-note { display: block; }
.cta {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-family: var(--f-head);
  font-weight: 800;
  font-size: clamp(20px, 3.4vw, 26px);
  padding: 22px 28px;
  width: 100%;
  cursor: pointer;
}
.cta:hover { background: var(--accent-dark); }
.cta-slot.is-open .cta { animation: arrive .8s ease-out; }
@keyframes arrive {
  0%   { transform: translateY(10px); opacity: 0; box-shadow: 0 0 0 0 rgba(244, 197, 66, .9); }
  55%  { transform: none; opacity: 1; box-shadow: 0 0 0 12px rgba(244, 197, 66, .45); }
  100% { box-shadow: 0 0 0 0 rgba(244, 197, 66, 0); }
}
.foot { max-width: 880px; margin: 0 auto; padding: 0 20px 32px; font-size: 14px; }
.foot a { color: var(--muted); }

/* Quiz */
.quiz {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg);
  display: flex; flex-direction: column;
  overflow-y: auto;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.quiz[hidden] { display: none; }
.quiz-bar { display: flex; justify-content: space-between; align-items: center; max-width: 640px; width: 100%; margin: 0 auto; padding: 16px 20px 10px; }
.quiz-progress { font-size: 15px; color: var(--muted); }
.link { background: none; border: 0; color: var(--ink); font: inherit; font-size: 16px; cursor: pointer; padding: 6px 2px; text-decoration: underline; text-underline-offset: 3px; }
.quiz-track { max-width: 600px; width: calc(100% - 40px); margin: 0 auto; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
#quiz-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.quiz-body { max-width: 640px; width: 100%; margin: 0 auto; padding: 32px 20px 56px; }

.q-title { font-family: var(--f-head); font-weight: 800; font-size: clamp(26px, 5vw, 36px); line-height: 1.1; margin: 0 0 24px; outline: none; }
.q-help { color: var(--muted); margin: -10px 0 20px; }
.opts { display: grid; gap: 10px; }
.opt, .day, .time {
  appearance: none;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}
.opt { text-align: left; padding: 16px 18px; }
.opt:hover, .day:hover, .time:hover { border-color: var(--ink); }
.opt[aria-pressed="true"], .time[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--ink); outline: none; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; font-size: 16px; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }

.btn {
  display: block; width: 100%;
  appearance: none; border: 0; border-radius: 10px;
  background: var(--accent); color: #fff;
  font-family: var(--f-head); font-weight: 800; font-size: 20px;
  padding: 18px 24px; margin-top: 12px;
  text-align: center; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { background: #9FB0BF; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }

.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px; }
.day { flex: none; padding: 10px 14px; font-size: 16px; }
.day[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 8px; }
.time { padding: 12px 8px; font-size: 17px; }
.picked { font-weight: 600; min-height: 1.5em; margin: 8px 0 4px; }

.msg { padding: 14px 16px; border-radius: 10px; background: #FBEAEA; color: var(--danger); margin: 12px 0; font-size: 16px; }
.msg[hidden] { display: none; }
.done-when { font-family: var(--f-head); font-weight: 800; font-size: 24px; margin: 0 0 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Admin */
.table-wrap { overflow-x: auto; }
.table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--paper); }
.table th, .table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 13px; background: var(--accent-soft); color: var(--accent-dark); }
.badge.off { background: #FBEAEA; color: var(--danger); }
.panel { background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 18px; margin: 0 0 20px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row .field { flex: 1 1 200px; margin: 0; }
.row .btn { width: auto; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Camada sobre o vídeo: sem barra, sem avançar, só play e pausa */
.video-shield { position: absolute; inset: 0; z-index: 2; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer; }
.video-shield[hidden] { display: none; }
.video-shield.is-paused { background: rgba(21, 38, 58, .65); }
.play-icon { display: none; position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: var(--accent); }
.play-icon::after { content: ""; position: absolute; left: 33px; top: 26px; border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent #fff; }
.video-shield.is-paused .play-icon { display: block; }
