/* FOLGA — estilos.
   Marca neutra (papel e tinta, FOLGA em carimbo). Cada semana veste uma identidade:
   6×1 em verde, amarelo e azul-marinho; 5×2 em vermelho com estrela.
   Todas as cores ficam nos tokens de :root; app.js lê daqui as cores do calendário. */

@font-face {
  font-family: 'Anton';
  src: url('fonts/anton-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Marca */
  --paper: #f4efe4;
  --card: #fffdf8;
  --ink: #1a1a1e;
  --muted: #5e5a52;
  --line: #ddd4c2;
  --error: #b42318;
  --whatsapp: #25d366;
  --whatsapp-ink: #07331a;
  --shadow: rgba(26, 26, 30, .16);
  --backdrop: rgba(20, 18, 14, .55);

  /* Semana 6×1: verde, amarelo e azul-marinho */
  --r0-main: #009c3b;
  --r0-deep: #00702b;
  --r0-yellow: #ffdf00;
  --r0-navy: #002776;
  --r0-on: #ffffff;
  --r0-soft: #fff6c4;
  --r0-head: #009c3b;
  --r0-head-ink: #ffdf00;

  /* Semana 5×2: vermelho e estrela */
  --r1-main: #d71920;
  --r1-deep: #9e0f15;
  --r1-on: #ffffff;
  --r1-soft: #ffe6e1;
  --r1-head: #d71920;
  --r1-head-ink: #ffffff;

  /* Calendário (igual nas duas semanas, para comparar) */
  --board: #fffdf8;
  --grid: #ebe4d4;
  --hour-ink: #8b8678;
  --day-ink: #3d3a33;
  --work: #2a2d36;
  --work-ink: #c9ccd6;
  --work-hatch: rgba(255, 255, 255, .08);
  --commute: #8b91a1;
  --commute-ink: #ffffff;
  --routine: #e2dccd;
  --routine-ink: #6d675a;
  --event: #ff8a3d;
  --extra: #ff8a3d;
  --event-ink: #3a1600;
  --slot: #13805c;
  --slot-fill: rgba(19, 160, 100, .24);
  --bad: #b42318;
  --bad-fill: rgba(180, 35, 24, .16);
  --plan-ink: #1a1a1e;
  --today: #1a73e8;
  --plan-0: #ff8f6b;
  --plan-1: #ffc93f;
  --plan-2: #f6a5c4;
  --plan-3: #ab9dff;
  --plan-4: #7cc7ff;
  --plan-5: #73dca0;
  --plan-6: #c2e25e;
  --plan-7: #9fe3de;
  --plan-8: #ffb3a1;
  --plan-9: #d9b8ff;
  --plan-10: #ffe07a;
  --plan-11: #8fd3ff;

  --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --chip-h: 44px;
  color-scheme: light;
}

body[data-round="0"] { --accent: var(--r0-main); --accent-deep: var(--r0-deep); --accent-on: var(--r0-on); --band-title: var(--r0-yellow); --band-shadow: var(--r0-navy); --band-stripe: var(--r0-yellow); --band-line: var(--r0-navy); }
body[data-round="1"] { --accent: var(--r1-main); --accent-deep: var(--r1-deep); --accent-on: var(--r1-on); --band-title: var(--r1-on); --band-shadow: var(--r1-deep); --band-stripe: var(--r1-deep); --band-line: transparent; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.4 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, a, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
svg { fill: currentColor; }

/* Marca: FOLGA em carimbo */
.brand {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: .04em;
  color: var(--ink);
  background: none;
  border: 3px solid currentColor;
  border-radius: 7px;
  padding: 1px 9px 0;
  transform: rotate(-3deg);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 16px 6px;
}
.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 600;
}
.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

/* Botões */
.primary, .secondary, .share-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  border: 2px solid transparent;
}
.primary { background: var(--ink); color: var(--paper); }
.secondary { background: var(--card); border-color: var(--ink); color: var(--ink); }
.primary:disabled, .secondary:disabled { opacity: .4; cursor: default; }
.full { width: 100%; }
.link-button { border: 0; background: none; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.fine { margin: 0; font-size: 13px; color: var(--muted); }

/* Início */
.intro {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.intro h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(46px, 14vw, 78px);
  line-height: .98;
  text-transform: uppercase;
}
.lead { margin: 0; font-size: 17px; line-height: 1.45; }
.scales { display: grid; gap: 12px; margin: 4px 0 6px; }
.scale {
  display: grid;
  grid-template-columns: 64px 1fr 52px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
}
.scale-name { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1; letter-spacing: .01em; }
.scale small { font-size: 12px; font-weight: 700; line-height: 1.2; }
.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.strip i { height: 30px; border-radius: 4px; display: grid; place-items: center; }
.strip svg { width: 70%; height: 70%; max-width: 20px; }
.scale-0 { background: var(--r0-main); color: var(--r0-on); border-bottom: 5px solid var(--r0-yellow); box-shadow: 0 4px 0 var(--r0-navy); }
.scale-0 .scale-name { color: var(--r0-yellow); text-shadow: 2px 2px 0 var(--r0-navy); }
.scale-0 .strip i { background: var(--r0-navy); }
.scale-0 .strip i.off { background: var(--r0-yellow); color: var(--r0-navy); }
.scale-1 { background: var(--r1-main); color: var(--r1-on); border-bottom: 5px solid var(--r1-deep); }
.scale-1 .scale-name { text-shadow: 2px 2px 0 var(--r1-deep); }
.scale-1 .strip i { background: var(--r1-deep); }
.scale-1 .strip i.off { background: var(--r1-on); color: var(--r1-main); }
.intro h1 { font-size: clamp(40px, 12vw, 72px); }
.ask { margin: 4px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(26px, 8vw, 36px); line-height: 1.05; text-transform: uppercase; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  min-height: 150px;
  padding: 14px 12px;
  border: 0;
  border-radius: 12px;
  text-align: left;
}
.choice:hover { filter: brightness(1.06); }
.choice:active { transform: translateY(2px); }
.choice-name { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 400; font-size: clamp(36px, 11vw, 54px); line-height: .95; text-transform: uppercase; }
.choice-star { width: .62em; height: .62em; flex: none; }
.choice .strip { gap: 3px; }
.choice .strip i { height: 22px; border-radius: 3px; }
.choice-sub { font-size: 13px; font-weight: 800; white-space: nowrap; }
.choice-0 { background: var(--r0-main); color: var(--r0-on); border-bottom: 5px solid var(--r0-yellow); box-shadow: 0 4px 0 var(--r0-navy); }
.choice-0 .choice-name { color: var(--r0-yellow); text-shadow: 3px 3px 0 var(--r0-navy); }
.choice-0 .strip i { background: var(--r0-navy); }
.choice-0 .strip i.off { background: var(--r0-yellow); color: var(--r0-navy); }
.choice-1 { background: var(--r1-main); color: var(--r1-on); border-bottom: 5px solid var(--r1-deep); box-shadow: 0 4px 0 var(--r1-deep); }
.choice-1 .choice-name { text-shadow: 3px 3px 0 var(--r1-deep); }
.choice-1 .strip i { background: var(--r1-deep); }
.choice-1 .strip i.off { background: var(--r1-on); color: var(--r1-main); }
.choice:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
#resume-button { align-self: stretch; }

/* Jogo: tela única no celular */
.game { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
body[data-screen="game"] .topbar { display: none; }
.band {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 6px;
  padding-top: max(7px, env(safe-area-inset-top));
  background: var(--accent);
  color: var(--accent-on);
  border-bottom: 4px solid var(--band-stripe);
  box-shadow: 0 3px 0 var(--band-line);
  position: relative;
  z-index: 1;
}
.band .brand { color: var(--accent-on); }
.brand-small { font-size: 17px; border-width: 2px; padding: 0 6px; }
.band-copy { min-width: 0; }
.band h1 { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 400; line-height: 1; }
.band-icon { width: 20px; height: 20px; flex: none; color: var(--band-title); }
#week-scale { font-family: var(--display); font-size: 28px; color: var(--band-title); text-shadow: 2px 2px 0 var(--band-shadow); letter-spacing: .01em; }
#week-step { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
#week-sub { margin: 2px 0 0; font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score { margin: 0; font-family: var(--display); font-size: 30px; line-height: 1; color: var(--band-title); text-shadow: 2px 2px 0 var(--band-shadow); }
.score span { font-size: 18px; }
.score.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.25); } }
.band-help { color: var(--accent-on); padding: 0; }
.clock { margin: 0; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: var(--band-shadow); color: var(--band-title); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock b { font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: .02em; }
.clock.low { background: var(--error); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.clock-bar { height: 5px; background: var(--band-line); position: relative; z-index: 1; }
.clock-bar i { display: block; height: 100%; background: var(--band-stripe); transform-origin: left; transition: transform .25s linear; }
@media (max-width: 419px) { .band .brand-small { display: none; } .band { grid-template-columns: 1fr auto auto auto; gap: 8px; } }
.band :focus-visible { outline-color: var(--accent-on); }

.play {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px max(8px, env(safe-area-inset-bottom));
}
.board-area { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.board-wrap { flex: 1; min-height: 120px; position: relative; }
#board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  border-radius: 10px;
  box-shadow: 0 0 0 1.5px var(--line);
  background: var(--board);
}
#board:focus-visible { outline: 3px solid var(--ink); }
.legend { display: flex; gap: 10px; margin: 5px 2px 0; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sw-work { background: var(--work); }
.sw-commute { background: var(--commute); }
.sw-routine { background: var(--routine); }
.sw-free { background: var(--board); box-shadow: inset 0 0 0 1px var(--line); }
.legend-sleep { margin-left: auto; }

.dock { display: flex; flex-direction: column; gap: 6px; }
.status {
  margin: 0;
  min-height: 32px;
  font-size: 13px;
  line-height: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.status.error { color: var(--error); font-weight: 700; }
.status.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.status.good { font-weight: 700; }

.tray {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, var(--chip-h));
  grid-auto-columns: 70px;
  gap: 5px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  margin: 0 -10px;
  padding: 0 10px;
  scroll-padding: 0 10px;
}
.tray::-webkit-scrollbar { display: none; }
.chip {
  position: relative;
  height: var(--chip-h);
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 5px;
  padding: 3px 4px 3px 4px;
  text-align: left;
  background: var(--card);
  border: 2px dashed var(--c);
  border-radius: 6px;
  touch-action: pan-x;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.chip .emoji { grid-row: 1; grid-column: 1; font-size: 16px; line-height: 1; }
.chip .name { grid-row: 2; grid-column: 1 / -1; font-size: 12px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip .meta { grid-row: 1; grid-column: 2; font-size: 11px; font-weight: 700; line-height: 1.15; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip .full, .chip .tick, .chip .hour { display: none; }
.chip.placed { background: var(--c); border-style: solid; border-color: var(--c); }
.chip.placed .meta { color: var(--plan-ink); font-weight: 700; }
.chip[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); transform: translateY(-2px); }
.chip.dragging { opacity: .35; }
.add-chip { grid-row: span 2; height: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; border: 2px solid var(--ink); background: var(--paper); }
.add-chip .emoji { font-family: var(--sans); font-weight: 900; font-size: 22px; }
.add-chip .name { white-space: normal; line-height: 1.1; }

.picker { display: flex; flex-direction: column; gap: 6px; min-height: calc(var(--chip-h) * 2 + 6px); }
.picker-head { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.picker-head .emoji { font-size: 20px; }
.picker-head b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-head .plan-hours { font-size: 13px; color: var(--muted); flex: none; }
.picker-head .spacer { flex: 1; }
.picker-close { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); font-size: 18px; line-height: 1; padding: 0; }
.slots { display: flex; gap: 6px; overflow-x: auto; padding: 1px 1px 3px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.slot, .remove-button {
  flex: 0 0 auto;
  min-height: calc(var(--chip-h) - 4px);
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.slot { border: 2px dashed var(--slot); background: var(--slot-fill); color: var(--ink); }
.slot.current { border-style: solid; background: var(--c); }
.remove-button { border: 2px solid var(--ink); background: var(--card); }
.remove-button.ghost { border-color: var(--line); color: var(--muted); }
.tool { flex: 0 0 auto; min-height: calc(var(--chip-h) - 4px); padding: 0 12px; border-radius: 8px; border: 2px solid var(--work); background: var(--card); font-size: 13px; font-weight: 800; white-space: nowrap; }
.dock-title { display: none; margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dock-title span { letter-spacing: 0; text-transform: none; font-weight: 600; }
.no-room { margin: 0; font-size: 13px; line-height: 1.3; color: var(--muted); }

.dock-actions { display: grid; grid-template-columns: 1fr 1.8fr; gap: 8px; }
.dock-actions .primary, .dock-actions .secondary { min-height: 46px; padding: 0 12px; font-size: 15px; white-space: nowrap; gap: 8px; }
.game .primary { background: var(--accent); color: var(--accent-on); }
.drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--c);
  color: var(--plan-ink);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 20px var(--shadow);
  white-space: nowrap;
}

@media (max-height: 600px) {
  :root { --chip-h: 38px; }
  .legend { display: none; }
  .chip .emoji { font-size: 14px; }
  .chip .meta { font-size: 10.5px; }
  .chip .name { font-size: 12px; line-height: 1.1; }
  .dock-actions .primary, .dock-actions .secondary { min-height: 40px; }
  .play { padding-top: 7px; gap: 5px; }
  .status { min-height: 30px; font-size: 12.5px; line-height: 15px; }
}
@media (max-height: 620px) and (max-width: 819px) {
  .topbar { padding-top: 8px; padding-bottom: 2px; }
  .brand { font-size: 22px; }
  .intro { gap: 10px; padding-top: 8px; }
  .intro h1 { font-size: clamp(32px, 10vw, 44px); }
  .intro .lead { font-size: 15px; }
  .ask { font-size: 24px; }
  .choice { min-height: 118px; gap: 8px; padding: 10px; }
  .choice-name { font-size: 34px; }
  .choice .strip i { height: 18px; }
}
@media (max-width: 350px) {
  .chip { padding-left: 4px; column-gap: 3px; }
  .chip .name { font-size: 11.5px; }
  #week-sub { font-size: 11px; }
  #week-step { display: none; }
  .choice-sub { font-size: 11.5px; }
  .dock-actions .primary, .dock-actions .secondary { font-size: 14px; padding: 0 8px; }
}

/* Resumos */
.summary {
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.summary h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 10vw, 54px); line-height: 1.02; text-transform: uppercase; }
.id-card { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--line); }
.id-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 12px 6px; }
.id-head b { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; }
.id-head span { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.id-0 .id-head { background: var(--r0-main); color: var(--r0-on); border-bottom: 4px solid var(--r0-yellow); box-shadow: 0 3px 0 var(--r0-navy); }
.id-0 .id-head b { color: var(--r0-yellow); text-shadow: 2px 2px 0 var(--r0-navy); }
.id-1 .id-head { background: var(--r1-main); color: var(--r1-on); border-bottom: 4px solid var(--r1-deep); }
.id-1 .id-head b { text-shadow: 2px 2px 0 var(--r1-deep); }
.id-body { padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.id-body h1 { font-size: clamp(30px, 9vw, 44px); }
.thumb { display: block; width: 100%; aspect-ratio: 7 / 7.4; border-radius: 6px; }
@media (max-height: 600px) and (max-width: 819px) {
    .summary { gap: 12px; padding-top: 6px; }
}
.left-out { margin: 0; font-size: 15px; line-height: 1.45; }
.left-out b { font-weight: 800; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duo .id-body { padding: 8px; gap: 4px; }
.duo .id-head { padding: 6px 10px 4px; }
.duo .id-head b { font-size: 24px; }
.big-score { margin: 0; font-family: var(--display); font-size: 34px; line-height: 1; text-align: center; }
.big-score small { font-family: var(--sans); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; display: block; margin-top: 3px; color: var(--muted); }
.insight { margin: 0; padding: 12px 14px; border-left: 5px solid var(--ink); background: var(--card); font-size: 16px; font-weight: 600; line-height: 1.4; }
.gain { margin: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; }
.gain strong { font-family: var(--display); font-weight: 400; font-size: 48px; line-height: 1; color: var(--r1-main); }
.gain span { font-size: 15px; line-height: 1.4; }
.share-cta { min-height: 58px; font-size: 18px; }

/* Diálogos */
dialog {
  width: min(520px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 22px 20px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 20px 60px var(--shadow);
}
dialog::backdrop { background: var(--backdrop); }
dialog h2 { margin: 4px 36px 10px 0; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.05; text-transform: uppercase; }
dialog h3 { margin: 18px 0 8px; font-size: 15px; }
dialog p { margin: 0 0 10px; }
.close-button { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font-size: 28px; line-height: 1; }
.rules { padding-left: 20px; margin: 0 0 6px; }
.rules li { margin-bottom: 8px; }
.hours { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 12px; }
.hours th, .hours td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.hours th[scope="row"], .hours thead th:first-child { text-align: left; font-weight: 500; }
.hours thead th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.hours .total th, .hours .total td { font-weight: 800; border-bottom: 0; }
.callout { padding: 10px 12px; background: var(--paper); border-radius: 8px; font-size: 14px; }
.sources { padding-left: 18px; margin: 0 0 12px; font-size: 14px; }
.sources li { margin-bottom: 6px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.dialog-actions .primary, .dialog-actions .secondary { padding: 0 10px; }
body[data-screen="game"] dialog .primary { background: var(--accent); color: var(--accent-on); }
.event-emoji { font-size: 44px; margin: 0; line-height: 1; }
.event-impact { font-weight: 700; }

.share-dialog { width: min(440px, calc(100% - 20px)); padding: 18px 16px 16px; }
.share-dialog h2 { font-size: 26px; }
.share-preview { display: flex; justify-content: center; margin: 4px 0 14px; }
.share-preview img { height: min(46vh, 420px); aspect-ratio: 9 / 16; border-radius: 10px; box-shadow: 0 6px 24px var(--shadow); background: var(--paper); }
.share-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-buttons > :first-child, .share-buttons .share-whatsapp { grid-column: 1 / -1; }
.share-buttons .primary, .share-buttons .secondary, .share-whatsapp { min-height: 48px; padding: 0 10px; font-size: 15px; }
.share-whatsapp { background: var(--whatsapp); color: var(--whatsapp-ink); }
.share-text { width: 100%; margin-top: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 13px; resize: none; }
#share-help { margin-top: 10px; }

/* Computador */
@media (min-width: 820px) {
  .game { height: auto; min-height: 100vh; }
  .band { grid-template-columns: auto 1fr auto auto auto; gap: 18px; padding: 12px max(24px, calc((100vw - 1080px) / 2 + 24px)) 10px; }
  .brand-small { font-size: 22px; border-width: 3px; padding: 0 8px; }
  #week-scale { font-size: 40px; }
  .band-icon { width: 28px; height: 28px; }
  #week-step { font-size: 12px; }
  #week-sub { font-size: 14px; }
  .score { font-size: 44px; }
  .score span { font-size: 24px; }
  .play { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 0; width: calc(100% - 48px); max-width: 1080px; margin: 22px auto 32px; padding: 16px; background: var(--card); border-radius: 16px; box-shadow: 0 0 0 1.5px var(--line), 0 12px 30px var(--shadow); }
  .board-area { padding-right: 16px; }
  #board { box-shadow: none; border-radius: 0; }
  .dock { padding-left: 16px; border-left: 1.5px solid var(--line); }
  .dock-title { display: flex; justify-content: space-between; gap: 8px; }
  .clock { font-size: 17px; padding: 4px 12px; }
  .clock b { font-size: 26px; }
  .board-wrap { flex: none; height: clamp(440px, calc(100vh - 190px), 640px); }
  .legend { font-size: 12px; margin-top: 8px; }
  .dock { gap: 10px; }
  .tray { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: 1fr; grid-auto-columns: auto; gap: 6px; max-height: min(52vh, 470px); overflow: hidden auto; margin: 0; padding: 0 4px 0 0; }
  .chip { touch-action: none; }
  .add-chip { grid-row: auto; flex-direction: row; justify-content: flex-start; gap: 8px; height: var(--chip-h); border-left-width: 2px; }
  .chip { --chip-h: 42px; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-rows: auto; padding: 4px 10px 4px 8px; column-gap: 8px; cursor: grab; }
  .chip .emoji { grid-row: 1; grid-column: 1; font-size: 20px; }
  .chip .short { display: none; }
  .chip .full { display: block; grid-row: 1; grid-column: 2; font-size: 14px; line-height: 1.3; }
  .chip .tick, .chip .hour { display: inline; }
  .chip .meta { grid-row: 1; grid-column: 3; font-size: 13px; font-weight: 800; color: var(--ink); }
  .tray { max-height: min(56vh, 520px); }
  .picker { min-height: 0; padding: 12px; border-radius: 10px; background: var(--card); box-shadow: 0 0 0 1.5px var(--line); }
  .slots { flex-wrap: wrap; max-height: 112px; overflow-y: auto; }
  .status { min-height: 34px; font-size: 14px; line-height: 17px; }
  .summary { padding-top: 24px; }
  .intro { padding-top: 5vh; }
  .choice { min-height: 190px; padding: 18px 16px; }
  .duo { gap: 16px; }
  .duo .id-body { padding: 12px; }
}
@media (max-width: 819px) {
  .dock[data-mode="pick"] .tray { display: none; }
}
@media (min-width: 820px) {
  .dock[data-mode="pick"] .tray { max-height: min(30vh, 260px); }
}
.go-title:focus { outline: none; }

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

/* Lista de sugestões */
.add-dialog { width: min(560px, calc(100% - 20px)); }
.catalog h3 { margin: 14px 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cat-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-size: 14px; font-weight: 700; }
.cat-chip small { font-weight: 600; color: var(--muted); }
.cat-chip[aria-pressed="true"] { background: var(--c); border-color: var(--c); }
.cat-chip[aria-pressed="true"]::after { content: '✓'; font-weight: 900; }
.custom-form { margin: 16px 0 12px; padding-top: 4px; border-top: 1px solid var(--line); }
.custom-form h3 { margin: 12px 0 8px; }
.custom-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.custom-row input, .custom-row select { min-height: 44px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); font-size: 16px; }
.custom-row .secondary { grid-column: 1 / -1; min-height: 44px; }
#custom-status { margin-top: 6px; }

/* Game over da 6×1 */
.gameover { width: min(460px, calc(100% - 24px)); padding: 26px 22px 22px; background: var(--ink); color: var(--paper); text-align: center; box-shadow: 0 0 0 4px var(--r0-yellow), 0 0 0 8px var(--r0-main), 0 24px 70px var(--shadow); }
.gameover::backdrop { background: rgba(0, 0, 0, .7); }
.go-title { margin: 0; font-family: var(--display); font-size: clamp(54px, 17vw, 84px); line-height: .95; text-transform: uppercase; color: var(--r0-yellow); text-shadow: 4px 4px 0 var(--r0-main); letter-spacing: .02em; }
.go-why { margin: 8px 0 10px; font-weight: 700; }
.go-score { margin: 0 0 16px; font-size: 14px; line-height: 1.45; color: #d9d6cc; }
.go-score b { color: var(--paper); }
.go-tired { margin: 0; font-family: var(--display); font-size: 30px; text-transform: uppercase; color: var(--r0-yellow); }
.go-question { margin: 2px 0 14px; font-family: var(--display); font-weight: 400; font-size: clamp(24px, 7vw, 32px); line-height: 1.05; text-transform: uppercase; }
.go-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.go-actions.go-stack { grid-template-columns: 1fr; }
.go-button { min-height: 56px; border-radius: 10px; border: 3px solid var(--paper); background: transparent; color: var(--paper); font-family: var(--display); font-size: 26px; text-transform: uppercase; }
.go-button:hover, .go-button:focus-visible { background: var(--paper); color: var(--ink); outline: none; }
.go-reply { margin: 0 0 8px; font-family: var(--display); font-size: clamp(26px, 8vw, 34px); line-height: 1.02; text-transform: uppercase; color: var(--r0-yellow); }
.go-text { margin: 0 0 16px; }
.gameover .primary.go-lula { background: var(--r1-main); color: var(--r1-on); }
.gameover .secondary { background: transparent; color: var(--paper); border-color: var(--paper); }
.law-dialog h2 { color: var(--error); }
.law-flavio { font-weight: 700; padding: 10px 12px; border-left: 5px solid var(--r0-main); background: var(--r0-soft); }

/* Como jogar (primeira visita, por cima da semana) */
.howto { width: min(440px, calc(100% - 24px)); padding-top: 0; }
.howto::before { content: ''; display: block; height: 14px; margin: 0 -20px 18px; background: var(--r0-main); box-shadow: inset 0 -5px 0 var(--r0-yellow); }
.howto h2 { margin-right: 0; }
.howto-steps { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; gap: 10px; }
.howto-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
.howto-steps span { font-size: 22px; line-height: 1.15; }
.howto-steps p { margin: 0; }
.howto .primary { background: var(--r0-main); color: var(--r0-on); }
.howto-more { text-align: center; margin-top: 12px; }
@media (max-height: 600px) {
  .howto { padding-bottom: 14px; }
  .howto h2 { font-size: 24px; }
  .howto p, .howto-steps p { font-size: 14px; line-height: 1.35; }
  .howto-steps { gap: 6px; margin: 8px 0 12px; }
}

/* Abas: pra sobreviver / pra viver */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 10px; background: var(--line); }
.tab { min-height: 34px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 800; color: var(--muted); }
.tab b { font-weight: 700; margin-left: 4px; }
.tab[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px var(--shadow); }
.tab.locked { opacity: .65; }
.chip.locked { opacity: .5; border-style: dotted; }
.tool.on { background: var(--work); color: var(--card); }
.go-flavio { margin: 4px 0 12px; padding: 10px 12px; border-radius: 8px; background: rgba(255, 255, 255, .08); font-size: 14px; line-height: 1.45; text-align: left; }
.go-flavio a, .results-flavio a { color: inherit; font-weight: 700; }
.go-relato { margin: 8px 0 12px; padding: 12px 14px; border-left: 5px solid var(--r0-yellow); border-radius: 0 8px 8px 0; background: rgba(255, 255, 255, .08); text-align: left; }
.go-relato blockquote { margin: 0 0 6px; font-size: 17px; font-weight: 800; line-height: 1.3; }
.go-relato figcaption { font-size: 13px; line-height: 1.4; color: #d9d6cc; }
.go-relato a, .go-videos a { color: var(--r0-yellow); font-weight: 800; }
.go-videos { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; text-align: left; }
.go-videos a { display: inline-block; margin-right: 10px; }
.results-flavio { margin: 0; padding: 12px 14px; border-left: 5px solid var(--r0-main); background: var(--r0-soft); font-weight: 600; }
@media (max-height: 600px) and (max-width: 819px) {
  .dock { gap: 4px; }
  .tabs { padding: 2px; }
  .tab { min-height: 28px; font-size: 12.5px; }
}
/* No game over, os botões ficam sempre à vista; o texto rola por cima deles. */
.gameover .go-actions { position: sticky; bottom: -22px; z-index: 1; margin: 6px -22px -22px; padding: 12px 22px 22px; background: var(--ink); box-shadow: 0 -10px 14px -6px var(--ink); }
@media (max-height: 600px) {
  .gameover { padding: 18px 16px 16px; }
  .gameover .go-actions { bottom: -16px; margin: 4px -16px -16px; padding: 10px 16px 16px; gap: 8px; }
  .go-title { font-size: 46px; }
  .go-tired { font-size: 24px; }
  .go-relato blockquote { font-size: 15px; }
}
