:root {
  --red: #8e0000;
  --bg: #fdf7fc;
  --text-muted: #5f5b62;
  --card: #ffffff;
  --max: 720px;
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: #1d1b1e;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Topo */
.topbar {
  background: var(--red);
  color: #fff;
  padding-top: env(safe-area-inset-top);
}
.topbar__inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 64px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
}
.logo {
  justify-self: center;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-weight: 500;
  font-size: 26px;
  letter-spacing: 0.5px;
  line-height: 1;
}
.logo sup { font-size: 9px; vertical-align: top; opacity: 0.7; margin-left: 1px; }
.icon-btn {
  justify-self: end;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: none; border: 0; color: inherit;
  border-radius: 50%; cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,0.12); }

/* Seletor de cidade */
.city {
  position: relative;
  border-bottom: 1px solid var(--red);
}
.city select {
  display: block;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  appearance: none;
  background: transparent;
  border: 0;
  font: 500 17px/1 Roboto, sans-serif;
  color: var(--text-muted);
  padding: 22px 56px 22px 18px;
  cursor: pointer;
}
.city select:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.city__arrow {
  position: absolute;
  right: max(18px, calc((100% - var(--max)) / 2 + 18px));
  top: 50%; transform: translateY(-50%);
  color: var(--red);
  pointer-events: none;
}

/* Menu */
.menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 16px;
}
.pill {
  width: 176px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--card);
  color: var(--red);
  font: 700 15px Roboto, sans-serif;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25), 0 2px 6px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.pill:hover { background: #fff5f5; box-shadow: 0 2px 4px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.14); }
.pill:active { transform: scale(0.97); }
.pill:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.pill--small { width: auto; min-height: 44px; font-size: 15px; }

/* Publicidade */
.ad {
  display: flex;
  width: calc(100% - 16px);
  max-width: var(--max);
  margin: 0 auto calc(16px + env(safe-area-inset-bottom));
  background: #f3eff4;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  padding: 4px 4px 4px 12px;
  gap: 0;
}
.ad__label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: #fff;
  padding: 0 8px;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: #333;
  text-align: center;
  display: grid; place-items: center;
}
.ad__slot {
  flex: 1;
  min-height: 132px;
  background: #0b0b0b;
  color: #fff;
  border-radius: 0 10px 10px 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
}
.ad__slot strong { font-size: clamp(18px, 5vw, 28px); letter-spacing: 1px; text-transform: uppercase; }
.ad__slot span { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; opacity: 0.7; }

/* Toast */
.toast {
  position: fixed;
  left: 50%; bottom: 200px;
  transform: translate(-50%, 20px);
  background: #322f35; color: #fff;
  padding: 12px 20px; border-radius: 8px;
  font-size: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Modal "sobre" */
.modal {
  border: 0; border-radius: 24px;
  padding: 24px; width: min(360px, calc(100% - 32px));
  text-align: center;
}
.modal::backdrop { background: rgba(0,0,0,0.4); }
.modal h2 { color: var(--red); font-family: Oswald, sans-serif; font-weight: 500; margin-bottom: 8px; }
.modal p { margin-bottom: 8px; line-height: 1.4; }
.modal__muted { color: var(--text-muted); font-size: 13px; }
.modal form { margin-top: 16px; }

/* Telas maiores */
@media (min-width: 768px) {
  .topbar__inner { height: 72px; }
  .logo { font-size: 34px; }
  .menu { gap: 28px; }
  .pill { width: 220px; min-height: 52px; font-size: 16px; }
  .ad__slot { min-height: 160px; }
}
