/* =========================================================================
   Comunidade do Renato (@imagenopolis) — Visual Cartoon da Série
   Paleta: Azul cobalto (#1e3a8a / #2563eb), Dourado (#ffd23a), Ciano (#38bdf8),
   Verde (#22b04b) e Contorno Ink (#181726)
   ========================================================================= */

:root {
  --bg: #eef4ff;
  --paper: #fffdf8;
  --cream: #f4f8ff;
  --ink: #181726;
  --ink-soft: rgba(24, 23, 38, 0.78);
  --cobalt: #1e3a8a;
  --cobalt-dark: #091b54;
  --blue: #2563eb;
  --cyan: #38bdf8;
  --yellow: #ffd23a;
  --yellow-soft: #fff2b2;
  --orange: #f39a3d;
  --green: #15803d;
  --green-dark: #14532d;
  --red: #e8323c;
  --purple: #7c3aed;
  --shadow: 0 6px 0 #181726;
  --shadow-lg: 0 8px 0 #181726;
  --shadow-sm: 0 3px 0 #181726;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --font-display: "Fredoka", "Nunito", ui-rounded, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 18px 18px, rgba(37, 99, 235, 0.14) 2px, transparent 0),
    radial-gradient(circle at 42px 42px, rgba(255, 210, 58, 0.24) 2px, transparent 0);
  background-size: 48px 48px;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* =========================================================================
   BARRA SUPERIOR
   ========================================================================= */
.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(238, 244, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--ink);
}

.portal-topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.back-links-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  border: 2.5px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.back-links-btn:hover {
  background: var(--yellow);
  transform: translateY(-1px);
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.brand-chip img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--cobalt);
  object-fit: cover;
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--ink);
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.nav-pill:hover {
  background: var(--yellow);
  transform: translateY(-1px);
}

.nav-pill.is-active {
  background: var(--yellow);
}

/* Container Principal */
.portal-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 14px 48px;
}

.portal-page--hub {
  max-width: 980px;
  padding-top: 22px;
}

/* =========================================================================
   PÍLULAS E BOTÕES
   ========================================================================= */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.32;
}

.pill--green { background: var(--green); color: #ffffff; }
.pill--red { background: var(--red); color: #ffffff; }
.pill--orange { background: var(--orange); color: var(--ink); }
.pill--white { background: #ffffff; color: var(--ink); }
.pill--blue { background: var(--cobalt); color: #ffffff; }

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 2.5px solid var(--ink);
  background: var(--green);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.cta-btn:hover { transform: translateY(-2px); filter: brightness(1.03); }
.cta-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

.cta-btn--yellow { background: var(--yellow); color: var(--ink); }
.cta-btn--orange { background: var(--orange); color: var(--ink); }
.cta-btn--blue { background: var(--cobalt); color: #ffffff; }
.cta-btn--white { background: #ffffff; color: var(--ink); }

/* =========================================================================
   HUB CENTRAL (comunidade/index.html)
   ========================================================================= */
.hub-top-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hub-balance-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #091b54 100%);
  color: #ffffff;
  border: 3.5px solid var(--ink);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.hub-balance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.hub-balance-main { min-width: 0; }

.hub-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.hub-balance-kicker {
  margin: 10px 0 2px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.86);
}

.hub-balance-amount {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.2vw, 3rem);
  line-height: 1;
  color: var(--yellow);
  text-shadow: 0 4px 0 #181726;
}

.hub-balance-art {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-avatar-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--yellow);
  object-fit: cover;
  box-shadow: 0 4px 0 var(--ink);
}

.hub-briefcase-svg {
  width: 82px;
  height: 76px;
}

/* Progresso por Dia */
.daily-money-box {
  background: rgba(255, 255, 255, 0.14);
  border: 2.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  padding: 12px 14px;
}

.daily-money-box--light {
  background: #f4f8ff;
  border: 2.5px solid var(--ink);
  color: var(--ink);
}

.daily-money-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.daily-money-title {
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
}

.daily-money-tag {
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--yellow);
  color: var(--ink);
  padding: 3px 9px;
  border-radius: 999px;
  border: 2px solid var(--ink);
}

.daily-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.daily-step {
  background: #ffffff;
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 3px 0 var(--ink);
}

.daily-step--boom {
  background: linear-gradient(135deg, #fff5b8 0%, #ffd23a 100%);
}

.daily-step-day {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.daily-step-val {
  font-family: var(--font-display);
  font-size: 1.06rem;
  line-height: 1.3;
}

.daily-step-note {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink-soft);
}

.daily-progress-track {
  margin-top: 10px;
  height: 12px;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
}

.daily-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--yellow) 60%, var(--green) 100%);
}

/* Coluna lateral do Hub */
.hub-side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.week-spotlight-card {
  background: linear-gradient(135deg, #fff4bd 0%, #ffd23a 100%);
  border: 3.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 15px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.spotlight-char {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 0 rgba(24, 23, 38, 0.25));
}

.spotlight-copy { min-width: 0; }

.spotlight-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 4px;
}

.spotlight-handle {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.15;
}

.spotlight-role {
  margin: 2px 0 3px;
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--cobalt-dark);
}

.spotlight-desc {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.thanks-card {
  background: #ffffff;
  border: 3.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 15px 16px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.thanks-lead {
  margin: 6px 0 2px;
  font-family: var(--font-display);
  font-size: 1.06rem;
  line-height: 1.25;
}

.thanks-sub {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.38;
  color: var(--ink-soft);
}

.commenters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.commenter-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #eef4ff;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Faixa do elenco oficial */
.cast-parade-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 12px 18px;
  border-radius: 24px;
  border: 3.5px solid var(--ink);
  background: linear-gradient(135deg, #ffffff 0%, #e0edff 100%);
  box-shadow: var(--shadow);
}

.cast-parade-note {
  margin: 6px 0 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink-soft);
}

.cast-parade-stage {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.cast-actor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cast-actor svg {
  width: 68px;
  height: 68px;
  filter: drop-shadow(0 3px 0 rgba(24, 23, 38, 0.22));
}

.cast-tag {
  padding: 2px 9px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #ffffff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Triptych dos 3 jogos no Hub */
.hub-games-triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  height: 100%;
}

.mini-scene {
  position: relative;
  border-radius: 14px;
  border: 2.5px solid var(--ink);
  overflow: hidden;
  padding: 6px 6px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-scene--lama { background: linear-gradient(180deg, #dbeafe 0%, #93c5fd 60%, #94a3b8 60%, #64748b 100%); }
.mini-scene--kitnet { background: linear-gradient(180deg, #fff6dc 0%, #ffe6b3 100%); }
.mini-scene--festa { background: linear-gradient(180deg, #f3e8ff 0%, #ddd6fe 100%); }

.mini-scene svg {
  width: 100%;
  height: 82px;
}

.mini-scene-label {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1.8px solid var(--ink);
  background: #ffffff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Animações */
.char-anim-bob { animation: castBob 2.4s ease-in-out infinite; transform-origin: center bottom; }
.char-anim-wave { animation: castWave 2.2s ease-in-out infinite; transform-origin: center bottom; }
.char-anim-hop { animation: castHop 1.7s ease-in-out infinite; transform-origin: center bottom; }
.char-anim-walk { animation: castWalk 2s ease-in-out infinite; transform-origin: center bottom; }
.char-anim-sneak { animation: castSneak 2.6s ease-in-out infinite; transform-origin: center bottom; }

@keyframes castBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes castWave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-4deg); } }
@keyframes castHop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes castWalk { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(3px); } }
@keyframes castSneak { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(3deg); } }

/* Grade das 5 Subpáginas */
.hub-section-label {
  margin: 4px 0 12px;
  font-family: var(--font-display);
  font-size: 1.24rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hub-tile {
  background: #ffffff;
  border: 3.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 14px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.hub-tile:hover { transform: translateY(-3px); }
.hub-tile:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }

.hub-tile--featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #fff4bd 0%, #ffd23a 100%);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 16px;
}

.hub-tile--virada { background: linear-gradient(180deg, #fffdf4 0%, #fff0c2 100%); }
.hub-tile--cidade { background: linear-gradient(180deg, #eef6ff 0%, #dbeafe 100%); }
.hub-tile--diario { background: linear-gradient(180deg, #f3f0ff 0%, #e4d8ff 100%); }
.hub-tile--historias { background: linear-gradient(180deg, #efffef 0%, #d2f8dc 100%); }

.hub-tile-visual {
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
  min-height: 124px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-tile--featured .hub-tile-visual {
  min-height: 136px;
  background: #fffdf8;
}

.hub-tile-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hub-tile-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.24rem;
  line-height: 1.15;
}

.hub-tile-phrase {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.hub-tile-go {
  margin-top: 4px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: #ffffff;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 3px 0 var(--ink);
}

.hub-tile--featured .hub-tile-go {
  background: var(--green);
  color: #ffffff;
}

/* =========================================================================
   HERO E CARTÕES GENÉRICOS DAS SUBPÁGINAS
   ========================================================================= */
.subpage-hero {
  background: linear-gradient(135deg, #fffdf4 0%, #dbeafe 100%);
  border: 3.5px solid var(--ink);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.subpage-title {
  margin: 6px 0 4px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.05rem);
  line-height: 1.28;
}

.subpage-sub {
  margin: 0;
  max-width: 60ch;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.hero-right-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-mini-chars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.hero-mini-char {
  width: 50px;
  height: 50px;
  filter: drop-shadow(0 2px 0 rgba(24, 23, 38, 0.25));
}

.card {
  background: #ffffff;
  border: 3.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.card h2, .card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
}

.stack-md { display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* Jogos Portal */
.games-portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.game-portal-card {
  background: #ffffff;
  border: 3.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.game-portal-preview {
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #eef4ff;
  min-height: 138px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.game-portal-card p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* Kitnet / Virada */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.metric-box {
  background: #ffffff;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.metric-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--cobalt);
}

.metric-box span {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--ink-soft);
}

.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-weight: 800;
}

.rules-table th, .rules-table td {
  padding: 9px 10px;
  border-bottom: 2px solid rgba(24, 23, 38, 0.14);
  text-align: left;
}

.rules-table th {
  font-family: var(--font-display);
  background: #eef4ff;
}

.kitnet-stage {
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdf4 0%, #f1f5f9 100%);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Cidade dos Seguidores */
.city-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.city-search {
  flex: 1 1 220px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  background: #ffffff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-pill.is-active {
  background: var(--yellow);
}

.city-canvas-wrap {
  position: relative;
  border: 3.5px solid var(--ink);
  border-radius: 24px;
  overflow: hidden;
  background: #89c87a;
  box-shadow: var(--shadow);
  height: 460px;
}

.city-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.city-zoom-tools {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 6px;
}

.city-zoom-btn {
  padding: 6px 11px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: #ffffff;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
}

.city-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 16px;
  align-items: start;
}

.city-detail-card {
  background: linear-gradient(180deg, #fffdf4 0%, #fff4cc 100%);
  border: 3.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.roster-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 2.5px solid var(--ink);
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 3px 0 var(--ink);
}

.roster-card.is-vip {
  background: linear-gradient(135deg, #fff7cc 0%, #ffd23a 100%);
}

.roster-card.is-selected {
  outline: 3px solid var(--green);
}

/* Diário & Histórias */
.diary-card-day {
  background: #ffffff;
  border: 3.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.diary-card-day--open {
  background: linear-gradient(180deg, #f3f7ff 0%, #dbeafe 100%);
}

.mural-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mural-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.84rem;
  font-weight: 800;
}

.mural-field--full {
  grid-column: 1 / -1;
}

.mural-field input,
.mural-field select,
.mural-field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: #ffffff;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.feedback-line {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
}

.feedback-line.is-ok { color: var(--green-dark); }
.feedback-line.is-err { color: var(--red); }

.empty-state {
  text-align: center;
  padding: 28px 18px;
  border: 3px dashed var(--ink);
  border-radius: 20px;
  background: #f8fbff;
}

.portal-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink-soft);
}

.portal-footer a {
  color: var(--cobalt);
}

/* Modal VIP compartilhado */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(24, 23, 38, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop[hidden] { display: none; }

.modal-card {
  width: 100%;
  max-width: 420px;
  background: #fffdf8;
  border: 3.5px solid var(--ink);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 9px 0 var(--ink);
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

/* =========================================================================
   RESPONSIVO
   ========================================================================= */
@media (max-width: 900px) {
  .hub-top-grid,
  .city-layout,
  .games-portal-grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hub-tile--featured {
    grid-template-columns: 1fr;
  }

  .metrics-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hub-grid,
  .grid-2,
  .mural-form,
  .daily-steps-grid,
  .roster-grid {
    grid-template-columns: 1fr;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .city-canvas-wrap {
    height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .char-anim-bob,
  .char-anim-wave,
  .char-anim-hop,
  .char-anim-walk,
  .char-anim-sneak {
    animation: none;
  }
}
