:root {
  --bg: #15100c;
  --surface: #211710;
  --surface-2: #2a1e15;
  --surface-3: #33251a;
  --ink: #f6ecdb;
  --ink-dark: #1d1107;
  --ink-soft: #bba98f;
  --ink-faint: #85745f;
  --line: rgba(255, 236, 205, 0.1);
  --line-strong: rgba(255, 236, 205, 0.2);
  --beer: #eaa92a;
  --beer-light: #f5cd6c;
  --beer-deep: #b86a0b;
  --beer-shadow: #9a5a0a;
  --foam: #fffaf0;
  --red: #e8735f;
  --red-bg: rgba(179, 54, 43, 0.16);
  --red-line: rgba(232, 115, 95, 0.32);
  --green: #8fd3a0;
  --green-bg: rgba(47, 107, 58, 0.22);
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --condensed: Impact, Haettenschweiler, "Arial Narrow Bold", "sans-serif-condensed", "Roboto Condensed", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }

body {
  min-height: 100dvh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- fundo: distribuidora (imagem estática, sem animação) ---------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg) url("/scene.svg") center 38% / cover no-repeat;
}
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 16, 12, 0.5) 0%, rgba(21, 16, 12, 0.78) 30%, rgba(21, 16, 12, 0.88) 100%);
}

#fx-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- layout ---------- */
main, .top {
  position: relative;
  z-index: 2;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}
main { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ---------- topo: placa da distribuidora + marca ---------- */
.top { padding-top: env(safe-area-inset-top); }

/* Placa esmaltada pendurada por duas correntes, em espaço próprio: nada passa por cima dela. */
.sign {
  position: relative;
  width: fit-content;
  margin: 22px auto 0;
  padding: 6px 26px 7px;
  text-align: center;
  color: #2a160b;
  background: #efe2c4;
  border: 3px solid #2a160b;
  border-radius: 9px;
  box-shadow: inset 0 0 0 2px #efe2c4, inset 0 0 0 3.5px #a8352a, 0 5px 0 rgba(0, 0, 0, 0.35);
  transform: rotate(-1.2deg);
  transform-origin: 50% -22px;
  animation: signIn 1.1s cubic-bezier(.3, 1.6, .5, 1) both;
}
.sign::before, .sign::after {
  content: "";
  position: absolute;
  top: -25px;
  width: 3px;
  height: 22px;
  background: repeating-linear-gradient(180deg, #6b5a49 0 4px, transparent 4px 6px);
}
.sign::before { left: 18%; }
.sign::after { right: 18%; }
@keyframes signIn {
  0% { transform: rotate(5deg); }
  45% { transform: rotate(-3.5deg); }
  75% { transform: rotate(0.4deg); }
  100% { transform: rotate(-1.2deg); }
}
.sign-kicker {
  display: block;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .34em;
  margin-right: -.34em;
  text-transform: uppercase;
}
.sign-name {
  display: block;
  font-family: var(--condensed);
  font-weight: 900;
  font-size: 2.15rem;
  line-height: .95;
  letter-spacing: .05em;
  margin-right: -.05em;
  color: #a8352a;
}
.sign-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #5c4632;
}
.sign-foot::before, .sign-foot::after { content: ""; flex: 1; height: 1px; min-width: 10px; background: currentColor; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand h1 { margin: 0; font-family: var(--serif); font-size: 1.32rem; line-height: 1.1; color: var(--foam); }
.brand p { margin: 1px 0 0; color: var(--ink-soft); font-size: .86rem; }

h2 { margin: 20px 0 6px; font-family: var(--serif); font-size: 1.55rem; line-height: 1.15; color: var(--foam); }
h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--foam); }
.muted { color: var(--ink-soft); line-height: 1.45; }
.small { font-size: .86rem; }
.center { text-align: center; }
.kbd {
  display: inline-block; padding: 0 6px; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--surface-2); color: var(--ink);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---------- botões ---------- */
button, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
.btn-primary, .btn-ghost {
  border-radius: 12px;
  padding: 14px 18px;
  min-height: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform .1s, box-shadow .1s, background-color .15s, color .15s;
}
/* Botão "físico": sombra sólida embaixo, afunda ao tocar. */
.btn-primary {
  border: 0;
  background: var(--beer);
  color: var(--ink-dark);
  box-shadow: 0 3px 0 var(--beer-shadow);
}
.btn-primary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--beer-shadow); }
.btn-primary:disabled { background: var(--surface-3); color: var(--ink-faint); box-shadow: none; }

.btn-ghost {
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
}
.btn-ghost:active { transform: translateY(1px); background: var(--surface-2); }

.btn-link {
  flex: none; min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600; font-size: .9rem;
}
.btn-link:active { background: var(--surface-2); }

.wide { width: 100%; margin-top: 18px; }
:focus-visible { outline: 2px solid var(--beer-light); outline-offset: 2px; }

/* ---------- views ---------- */
.view { animation: fadeUp .28s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }

.intro { display: grid; justify-items: center; padding-top: 7vh; }
.intro-title { margin: 14px 0 0; font-family: var(--serif); font-size: 1.8rem; font-weight: 700; color: var(--foam); }
.intro .muted { margin: 4px 0 0; }

/* ---------- copo animado (SVG montado em app.js) ---------- */
.beer-anim svg { display: block; width: 100%; height: 100%; overflow: visible; }
.beer-anim.logo { width: 40px; height: 40px; flex: none; }
.beer-anim.big { width: 168px; height: 168px; }
/* O logo enche uma vez e fica parado: nada animando no topo o tempo todo. */
.beer-anim.logo .ba-wave { animation: none; }
.beer-anim.logo .ba-bub, .beer-anim.logo .ba-drop { display: none; }

.ba-rise { animation: ba-rise 1.3s cubic-bezier(.25, .8, .3, 1) both; }
@keyframes ba-rise { from { transform: translateY(62px); } }
.ba-wave { animation: ba-wave 1.05s linear infinite; }
@keyframes ba-wave { to { transform: translateX(40px); } }
.ba-head { transform-box: fill-box; transform-origin: 50% 100%; animation: ba-head .45s .92s ease-out both; }
@keyframes ba-head { from { transform: scaleY(0); } }
.ba-foam { transform-box: fill-box; transform-origin: 50% 100%; animation: ba-pop .65s 1.12s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes ba-pop { from { transform: scale(.3) translateY(8px); opacity: 0; } }
.ba-stream { transform-box: fill-box; transform-origin: 50% 0; animation: ba-stream 1.35s ease-in both; }
@keyframes ba-stream {
  0% { transform: scaleY(0); }
  25%, 80% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}
.ba-bub { animation: ba-bub var(--d, 2.4s) var(--l, 0s) linear infinite; }
@keyframes ba-bub {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: .95; }
  100% { transform: translateY(-44px); opacity: 0; }
}
.ba-drop { animation: ba-drop 2.8s var(--l, 0s) ease-in infinite; }
@keyframes ba-drop {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: .6; }
  100% { transform: translateY(22px); opacity: 0; }
}

/* ---------- brinde animado ---------- */
.cheers-anim { position: relative; display: grid; place-items: center; }
.cheers-anim svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cheers-anim.big { width: 190px; height: 155px; margin-top: 12px; }
.cheers-anim.small { width: 132px; height: 108px; margin: 0 auto 4px; }

.ch-left { transform-box: fill-box; transform-origin: 70% 85%; animation: clinkLeft 2.4s cubic-bezier(.22, 1.25, .36, 1) infinite; }
.ch-right { transform-box: fill-box; transform-origin: 30% 85%; animation: clinkRight 2.4s cubic-bezier(.22, 1.25, .36, 1) infinite; }
@keyframes clinkLeft {
  0% { transform: translate(-22px, 6px) rotate(-18deg); }
  22% { transform: translate(3px, -2px) rotate(9deg); }
  32% { transform: translate(-4px, 0) rotate(-3deg); }
  45%, 84% { transform: translate(-2px, -2px) rotate(2deg); }
  100% { transform: translate(-22px, 6px) rotate(-18deg); }
}
@keyframes clinkRight {
  0% { transform: translate(22px, 6px) rotate(18deg); }
  22% { transform: translate(-3px, -2px) rotate(-9deg); }
  32% { transform: translate(4px, 0) rotate(3deg); }
  45%, 84% { transform: translate(2px, -2px) rotate(-2deg); }
  100% { transform: translate(22px, 6px) rotate(18deg); }
}
.ch-burst { transform-box: fill-box; transform-origin: 50% 50%; animation: clinkBurst 2.4s ease-out infinite; }
@keyframes clinkBurst {
  0%, 19% { transform: scale(.2); opacity: 0; }
  24% { transform: scale(1.18); opacity: 1; }
  42%, 100% { transform: scale(1.45); opacity: 0; }
}
.ch-splash { transform-box: fill-box; transform-origin: 50% 100%; animation: clinkSplash 2.4s ease-out infinite; }
@keyframes clinkSplash {
  0%, 20% { transform: translateY(8px) scale(.3); opacity: 0; }
  28% { transform: translateY(-6px) scale(1.05); opacity: 1; }
  48% { transform: translateY(-16px) scale(.7); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- escolha do nome (dropdown próprio) ---------- */
.av {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--av, #7d6a2c);
  color: #fff6e6;
  font-weight: 800; font-size: .9rem; line-height: 1;
}

.picker { margin-top: 16px; }
.pick-toggle {
  width: 100%;
  min-height: 58px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  text-align: left;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  transition: border-color .15s, border-radius .15s;
}
.pick-toggle:active { background: var(--surface-2); }
.picker.open .pick-toggle { border-color: var(--beer); border-radius: 12px 12px 0 0; }
.pick-label { flex: 1; min-width: 0; font-size: 1.1rem; font-weight: 700; color: var(--foam); }
.pick-label.is-empty { color: var(--ink-soft); font-weight: 500; }
.chev { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--ink-soft); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.picker.open .chev { transform: rotate(180deg); stroke: var(--beer-light); }

.pick-list {
  list-style: none; margin: 0; padding: 8px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  border: 1.5px solid var(--beer); border-top: 0;
  border-radius: 0 0 12px 12px;
  background: var(--surface);
  animation: dropIn .18s ease-out;
  scroll-margin-bottom: 96px;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } }
.pick-opt {
  width: 100%; min-height: 48px;
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px;
  text-align: left;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--surface-2);
  transition: background-color .12s, border-color .12s;
}
.pick-opt:active:not(:disabled) { background: var(--surface-3); }
.pick-opt .av { width: 28px; height: 28px; font-size: .82rem; }
.pick-opt .pn { flex: 1; min-width: 0; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.pick-opt.is-on { border-color: var(--beer); background: #3a2814; }
.pick-opt:disabled { background: transparent; border-color: var(--line); color: var(--ink-faint); }
.pick-opt:disabled .av { background: var(--surface-3); color: var(--ink-faint); }
.pick-opt .pn small { display: block; margin-top: 1px; font-size: .7rem; font-weight: 600; color: var(--ink-faint); text-decoration: none; }
#pick-hint { min-height: 1.3em; margin: 10px 2px 0; }

/* ---------- ranking ---------- */
.rank-edge {
  margin: 16px 0 6px; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--beer-light); text-align: center;
}
.rank-list + .rank-edge { margin: 8px 0 0; color: var(--ink-faint); }
.rank-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rank-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 60px;
  padding: 6px 4px 6px 10px; border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  user-select: none; -webkit-user-select: none;
  transition: border-color .2s, background-color .2s;
}
.rank-item.first { border-color: rgba(234, 169, 42, 0.6); background: #2c1f12; }
.rank-item .pos {
  flex: 0 0 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; border: 1.5px solid var(--line-strong); font-weight: 800; font-size: .85rem;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.rank-item.first .pos { background: var(--beer); border-color: var(--beer); color: var(--ink-dark); }
.rank-item .nm { flex: 1; font-weight: 700; line-height: 1.15; min-width: 0; color: var(--foam); overflow-wrap: anywhere; }
.rank-item .nm small { display: block; font-weight: 600; color: var(--beer-light); font-size: .74rem; }
.arrows { display: flex; flex-direction: column; gap: 4px; }
.arrows button {
  width: 44px; height: 24px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-soft); font-size: .62rem; line-height: 1;
}
.arrows button:active:not(:disabled) { background: var(--surface-3); color: var(--ink); }
.arrows button:disabled { opacity: .3; }
.handle {
  flex: 0 0 40px; height: 48px; display: grid; place-items: center;
  font-size: 1.25rem; color: var(--ink-faint); touch-action: none; cursor: grab;
}
.handle:active,
.sortable-chosen,
.sortable-chosen .handle,
.sortable-fallback,
body.is-dragging,
body.is-dragging * { cursor: grabbing !important; }
.sortable-ghost { opacity: .3; }
.sortable-chosen { box-shadow: 0 10px 24px rgba(0, 0, 0, .5); border-color: var(--beer); }
.bump { animation: glug .38s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes glug {
  32% { transform: scale(1.025); }
  68% { transform: scale(.995); }
}

/* mini copo que enche conforme a posição */
.mini-glass {
  position: relative; flex: 0 0 16px; height: 24px; overflow: hidden;
  border: 1.6px solid rgba(255, 244, 224, 0.6); border-top: 0; border-radius: 1px 1px 4px 4px;
  clip-path: polygon(0 0, 100% 0, 86% 100%, 14% 100%);
  background: rgba(130, 195, 220, 0.1);
}
.mini-beer {
  position: absolute; left: -3px; right: -3px; bottom: 0;
  background: linear-gradient(180deg, var(--foam) 0 3px, var(--beer-light) 3px, var(--beer) 45%, var(--beer-deep));
  transition: height .45s cubic-bezier(.3, 1.45, .5, 1);
}

.dq-line { margin: 18px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.dq-list { display: contents; }
.dq-list span {
  padding: 3px 10px; border-radius: 999px; font-size: .85rem;
  background: var(--red-bg); border: 1px solid var(--red-line); color: var(--red);
}

.sticky-cta {
  position: sticky; bottom: 0; margin: 18px -16px 0; display: flex; gap: 10px;
  padding: 16px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(21, 16, 12, 0), var(--bg) 32%);
}
.sticky-cta .btn-ghost { flex: 0 0 auto; }
.sticky-cta .btn-primary { flex: 1; font-size: 1.05rem; }

/* ---------- esperando todo mundo ---------- */
.tally { display: flex; align-items: center; gap: 16px; margin: 18px 0; }
.tally-num { font-family: var(--serif); line-height: 1; font-variant-numeric: tabular-nums; }
.tally-num b { font-size: 3rem; color: var(--beer-light); }
.tally-num > span { font-size: 1.35rem; color: var(--ink-soft); }
.tally-side { flex: 1; display: grid; gap: 6px; }
.bar { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.bar i {
  display: block; height: 100%; width: 0;
  background: var(--beer);
  transition: width .6s cubic-bezier(.22, 1, .36, 1);
}

.notify { padding: 16px; }
.notify h3 { margin: 0 0 4px; }
.notify p { margin: 0; }
.notify .btn-primary { width: 100%; margin-top: 12px; }
.notify.on { border-color: rgba(143, 211, 160, 0.35); background: var(--green-bg); }
.notify.on h3 { color: var(--green); }

.list-title {
  margin: 22px 0 8px; font-size: .76rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft);
}
.people { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.people li { padding: 6px 12px; border-radius: 999px; font-size: .9rem; font-weight: 600; }
.people li.done { background: #3a2814; border: 1px solid rgba(234, 169, 42, 0.45); color: var(--beer-light); }
.people li.done::before { content: "✓ "; }
.people li.todo { border: 1px dashed var(--line-strong); color: var(--ink-faint); font-weight: 500; }

/* ---------- placar ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin-top: 18px; }
.podium .col { text-align: center; min-width: 0; }
.podium .medal { width: 40px; height: 40px; margin: 0 auto 4px; animation: capPop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.podium .p1 .medal { width: 48px; height: 48px; animation-delay: .35s; }
.podium .p2 .medal { animation-delay: .18s; }
.podium .p3 .medal { animation-delay: .05s; }
.podium .medal svg { display: block; width: 100%; height: 100%; overflow: visible; }
@keyframes capPop { from { transform: translateY(14px) scale(.4) rotate(-25deg); opacity: 0; } }
.podium .who { font-weight: 800; margin: 2px 0; overflow-wrap: anywhere; color: var(--foam); line-height: 1.15; }
.podium .pts { color: var(--ink-soft); font-size: .8rem; }
.podium .block {
  margin-top: 6px; border-radius: 10px 10px 4px 4px;
  border-top: 8px solid var(--foam);
  background: linear-gradient(180deg, var(--beer) 0%, var(--beer-deep) 100%);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--ink-dark);
  animation: grow .8s cubic-bezier(.3, 1.3, .5, 1) both; transform-origin: bottom;
}
@keyframes grow { from { transform: scaleY(0); } }
.podium .p1 .block { height: 118px; animation-delay: .25s; }
.podium .p2 .block { height: 84px; animation-delay: .1s; }
.podium .p3 .block { height: 62px; }
.podium .col.me .who { text-decoration: underline; text-decoration-color: var(--beer); text-decoration-thickness: 3px; }

.res-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; }
.res-list li {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  animation: fadeUp .3s ease both;
}
.res-list .pos { width: 26px; font-weight: 800; color: var(--beer-light); }
.res-list .nm { flex: 1; min-width: 0; font-weight: 700; color: var(--foam); overflow-wrap: anywhere; }
.res-list .bar { flex: 0 0 32%; height: 8px; }
.res-list .pts { width: 36px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: .85rem; }
.res-list li.me { border-color: rgba(234, 169, 42, 0.6); }

/* ---------- copo do campeão ---------- */
.winner-card { margin-top: 18px; padding: 16px; text-align: center; }
.winner-card h3 { font-family: var(--serif); font-size: 1.28rem; margin: 0; color: var(--beer-light); }
.winner-card p { margin: 4px 0 0; }
.glass-wrap { position: relative; height: min(340px, 48vh); margin: 6px -8px 0; }
.winner-card.spectator .glass-wrap { height: 200px; }
.glass-wrap canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.winner-card:not(.spectator) .glass-wrap canvas { cursor: grab; }
.winner-card:not(.spectator) .glass-wrap canvas:active { cursor: grabbing; }
.glass-done {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 2px;
  font-family: var(--serif); font-size: 2.25rem; font-weight: 700; color: var(--foam);
  animation: pop .55s cubic-bezier(.3, 1.6, .5, 1) both; pointer-events: none;
}
.glass-done small { font-family: system-ui, sans-serif; font-size: 1rem; font-weight: 500; color: var(--beer-light); }
.glass-actions { display: flex; flex-direction: column; gap: 8px; }
@keyframes pop { from { transform: scale(.35); opacity: 0; } }

/* ---------- dialogs ---------- */
dialog.sheet {
  width: min(480px, 100vw); max-width: 100vw; max-height: 88dvh;
  margin: auto auto 0; padding: 0; border: 0; border-top: 1px solid var(--line-strong);
  border-radius: 18px 18px 0 0; color: var(--ink);
  background: #1e150e;
  overscroll-behavior: contain;
}
dialog.sheet[open] { animation: sheetUp .25s cubic-bezier(.2, 1, .4, 1); }
@keyframes sheetUp { from { transform: translateY(100%); } }
dialog::backdrop { background: rgba(6, 3, 1, 0.7); }
dialog form { padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }
dialog form::before {
  content: ""; display: block; width: 40px; height: 4px; margin: -8px auto 12px;
  border-radius: 99px; background: var(--line-strong);
}
dialog h2 { margin-top: 4px; }
dialog .btn-primary { width: 100%; }
.rules { padding-left: 20px; line-height: 1.55; color: var(--ink); }
.rules li { margin-bottom: 8px; }
.row { display: flex; gap: 10px; margin-top: 16px; }
.row > * { flex: 1; }
#dlg-confirm h2, #dlg-confirm p { text-align: center; }

/* ---------- telas cheias (enviar / revelação) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; padding: 24px;
  display: grid; place-content: center; justify-items: center; text-align: center;
  background: rgba(18, 12, 8, 0.96);
  overflow: hidden;
}
.overlay-glow {
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(234, 169, 42, 0.16) 0%, transparent 70%);
  pointer-events: none;
}
.overlay > * { position: relative; z-index: 1; }
.overlay p { margin: 6px 0 0; }
.overlay-title {
  font-family: var(--serif); font-size: 2.1rem; font-weight: 700; margin-top: 16px !important;
  color: var(--beer-light);
  animation: pop .45s 1.05s both;
}
#pour { cursor: pointer; }
#pour .muted { animation: pop .45s 1.15s both; }
#reveal > .muted:first-of-type { max-width: 310px; animation: fadeUp .4s both; }
.reveal-name {
  font-family: var(--serif); font-size: 2.6rem; font-weight: 700; line-height: 1.1;
  color: var(--foam);
  animation: pop .6s .85s cubic-bezier(.3, 1.6, .5, 1) both;
}
#reveal-pts { animation: fadeUp .4s 1.25s both; color: var(--beer-light); font-weight: 600; }
#reveal .btn-primary { margin-top: 26px; min-width: 220px; animation: fadeUp .4s 1.5s both; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translateX(-50%); width: max-content; max-width: min(440px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 12px; font-weight: 600; line-height: 1.35;
  background: #2f2318; color: var(--foam);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: fadeUp .2s ease;
}
.toast.error { background: #6e2219; border-color: rgba(232, 115, 95, 0.5); color: #fff4f2; }

/* telas baixas (celular deitado ou pequeno): placa menor */
@media (max-height: 640px) {
  .sign { margin-top: 18px; padding: 4px 20px 5px; }
  .sign-name { font-size: 1.7rem; }
  .sign-foot { display: none; }
  .topbar { margin-top: 10px; }
}

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