@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700;800&display=swap');
:root {
  color-scheme: light;
  --pine: #173e32;
  --ink: #1d2a25;
  --muted: #485952;
  --cream: #f4f1e8;
  --sage: #e6ede5;
  --line: #bdc9c1;
  --red: #9a322b;
  background: #f7f6f1;
  color: var(--ink);
  font: 16px/1.48 system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
figure, p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { line-height: 1.13; color: var(--pine); }
a { color: var(--pine); }
button, .button, select, textarea, input { font: inherit; }
button, .button, select {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--pine);
  border-radius: .55rem;
  padding: .5rem .72rem;
}
button:not(:disabled), .button, summary, select { cursor: pointer; }
button:hover:not(:disabled), .button:hover { background: var(--sage); }
button:disabled { opacity: .45; }
.button { display: inline-block; text-decoration: none; }
.primary { background: var(--pine); color: #fff; border-color: var(--pine); }
.primary:hover:not(:disabled), .button.primary:hover { background: #285942; }
:focus-visible { outline: 3px solid #a76024; outline-offset: 3px; }
[hidden] { display: none !important; }
.skip {
  position: fixed;
  inset: 1rem auto auto 1rem;
  translate: 0 -200%;
  z-index: 5;
  background: #fff;
  padding: .75rem;
}
.skip:focus { translate: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem max(1rem, calc((100vw - 66rem) / 2));
}
.brand {
  margin-right: auto;
  color: var(--pine);
  text-decoration: none;
  font-family: Georgia, serif;
  font-weight: bold;
  font-size: 1.24rem;
  white-space: nowrap;
}
.brand span { color: var(--red); }
.site-header nav { display: flex; gap: .38rem; align-items: center; }
.site-header nav label { font-size: .86rem; font-weight: 650; }
.site-header select { max-width: min(33vw, 19rem); }
#opcoes { position: relative; color: var(--pine); }
#opcoes summary { padding: .45rem .1rem; font-weight: 650; }
.tools {
  min-width: 14rem;
  position: absolute;
  right: 0;
  z-index: 3;
  display: grid;
  gap: .4rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: .65rem;
  padding: .62rem;
  box-shadow: 0 .4rem 1.6rem #173e3221;
}
.tools > * { text-align: left; }
.tools a { padding: .38rem .65rem; }
main { min-height: 75vh; }
.sheet {
  width: min(100% - 2rem, 60rem);
  margin: 1.5rem auto;
  padding: clamp(1.15rem, 4vw, 3rem);
  background: #fff;
  border: 1px solid #d8ded7;
  border-radius: 1rem;
  box-shadow: 0 .5rem 2rem #1d2a250a;
}
.exercise { display: grid; gap: 1.05rem; }
.sheet-header { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-weight: 650; }
.sheet-header img { width: 3.25rem; }
.sheet-title { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem .9rem; }
.day-tag {
  padding: .2rem .6rem;
  color: var(--pine);
  background: var(--sage);
  border-radius: .32rem;
  font-size: .86rem;
  font-weight: 750;
  white-space: nowrap;
}
.sheet h1 { font: bold clamp(1.7rem, 5vw, 2.8rem)/1.05 Georgia, serif; }
.instruction { max-width: 68ch; color: var(--ink); font-size: 1.07rem; }
.eyebrow { color: var(--red); font-weight: 750; font-size: .86rem; letter-spacing: .09em; text-transform: uppercase; }
.cover-body {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.4rem;
}
.cover-copy { display: grid; gap: .9rem; align-items: start; }
.cover-copy img { width: 4.5rem; }
.cover h1 { font-size: clamp(2.4rem, 7.5vw, 5rem); line-height: .96; }
.cover-lead { max-width: 34ch; color: var(--muted); }
.cover-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; }
.quiet { font-size: .9rem; }
.day-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; padding-top: 1.1rem; }
.day-link { display: grid; grid-template-columns: auto 1fr; padding: .55rem; gap: .2rem .55rem; align-items: center; border: 1px solid var(--line); border-radius: .45rem; text-decoration: none; font-size: .9rem; line-height: 1.24; }
.day-link:hover { background: var(--sage); }
.tile-number { color: var(--red); font-variant-numeric: tabular-nums; font-weight: 800; }
.site-footer { width: min(100% - 2rem, 60rem); margin: 1.4rem auto; display: flex; justify-content: space-between; gap: .85rem; color: var(--muted); font-size: .83rem; }
.block-text { white-space: pre-line; }
.clues { padding: .7rem 1rem; border: 1px solid var(--line); border-radius: .55rem; }
.clues h3 { font-size: 1rem; margin-bottom: .35rem; }
.clues ul { margin: 0; padding-left: 1.25rem; }
.clues li + li { margin-top: .08rem; }
.tip { border-left: .23rem solid #567859; display: flex; gap: .65rem; border-radius: .22rem; padding: .62rem .85rem; background: var(--sage); font-size: .9rem; }
.tip strong { color: var(--pine); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.split > div { display: grid; gap: .55rem; align-content: start; min-width: 0; }
.single-image { width: var(--width, 100%); margin-inline: auto; }
.single-image img { width: 100%; border-radius: .42rem; }
.image-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  width: var(--width, 100%);
  gap: .5rem;
  margin-inline: auto;
}
.image-grid figure { min-width: 0; }
.image-grid img { width: 100%; border-radius: .28rem; }
figcaption { padding: .15rem 0; text-align: center; color: var(--muted); font-size: .82rem; }
.fields { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: .62rem; }
.field-label { display: grid; gap: .24rem; align-content: end; min-width: 0; font-weight: 630; font-size: .92rem; }
.answer { min-width: 0; }
.answer input, .answer textarea, .answer select, #editor textarea, #editor input {
  display: block;
  width: 100%;
  min-width: 0;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: .35rem;
  padding: .35rem .5rem;
}
textarea { resize: vertical; }
.written, .print-only { display: none; }
.table-wrap { min-width: 0; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
td, th { border: 1px solid var(--line); padding: .26rem .4rem; text-align: left; overflow-wrap: anywhere; }
th { color: var(--pine); background: var(--sage); font-size: .88rem; }
td .answer select, td .answer input { font-size: .88rem; }
.options-list { white-space: pre-line; font-size: .84rem; color: var(--muted); margin-top: .3rem; }
.choice { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: .42rem; padding: .27rem .6rem .45rem; }
.choice legend { font-weight: 630; padding-inline: .2rem; }
.choice label { display: inline-flex; align-items: baseline; margin-right: 1rem; gap: .27rem; }
.marks { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: .22rem; }
.mark-cell { padding: 0; overflow: hidden; position: relative; background: #fff; }
.mark-cell img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.mark-cell[aria-pressed="true"]::after {
  content: '×';
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0;
  font-weight: 750;
  font-size: clamp(1rem, 5vw, 2.4rem);
  background: #fff9;
  color: var(--red);
}
.sequences { display: grid; gap: .45rem; }
.sequence { display: grid; grid-template-columns: 1.15rem repeat(6, minmax(0, 1fr)) repeat(2, minmax(0, 1.75fr)); gap: .2rem; align-items: center; }
.sequence-n { font-weight: 750; color: var(--pine); }
.token { position: relative; }
.token img { width: 100%; aspect-ratio: 1.15; object-fit: contain; }
.colour-code { display: none; background: #ffffffed; color: #151515; font: bold .69rem/1 system-ui, sans-serif; padding: .12rem; position: absolute; inset: auto .08rem .08rem auto; }
.mono .colour-code { display: block; }
.mono img { filter: grayscale(1); }
.mono { --pine: #222; --ink: #191919; --muted: #414141; --cream: #f5f5f5; --sage: #eaeaea; --line: #b8b8b8; --red: #363636; color: var(--ink); }
.mono .day-tag, .mono .tip, .mono th { background: #ececec; }
.mono .tip { border-color: #555; }
.mono .path-cell[data-cell="~"] { background: #d9d9d9; color: #1f1f1f; }
.mono .path-cell[data-cell="#"] { background: #bdbdbd; color: #171717; }
.mono .path-cell[data-cell="="] { background: #e8e8e8; }
.mono .route .path-cell { border-color: #bfbfbf; }
.marker-frame { position: relative; }
.mark-photo { display: block; padding: 0; border: 0; font-size: 0; width: 100%; position: relative; cursor: crosshair !important; }
.mark-photo:focus-visible { outline-offset: 1px; }
.photo-dot { position: absolute; translate: -50% -50%; pointer-events: none; width: 1.35rem; height: 1.35rem; border-radius: 50%; text-align: center; background: var(--red); color: white; border: 1px solid white; font-size: .8rem; font-weight: 750; }
.mark-status { margin-left: .6rem; font-size: .9rem; }
.memory, .study, .recall { display: grid; gap: .7rem; justify-items: stretch; align-items: start; }
.memory > button, .recall > button { justify-self: start; }
.recall h3 { font-size: 1rem; }
.countdown, .path-controls, .game-navigation { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.clock { font-weight: 750; color: var(--pine); font-variant-numeric: tabular-nums; }
.path-board {
  width: min(100%, 29rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
}
.path-cell { position: relative; aspect-ratio: 1; padding: .1rem; border: 1px solid #b6c9c3; border-radius: 0; box-shadow: none; font-weight: 750; font-size: clamp(.72rem, 2.5vw, 1.12rem); }
.path-coordinate { position: absolute; right: .15em; bottom: .12em; font-size: .64em; line-height: 1; opacity: .77; }
.maze .path-cell { border-color: transparent; background: #fff; }
.maze .north { border-top: 1.5px solid var(--pine); }
.maze .east { border-right: 1.5px solid var(--pine); }
.maze .south { border-bottom: 1.5px solid var(--pine); }
.maze .west { border-left: 1.5px solid var(--pine); }
.path-cell[data-cell] { background: var(--cream); }
.path-cell[data-cell="~"] { background: #b5d7de; color: #173c47; }
.path-cell[data-cell="#"] { background: #f3d3a4; color: #4a2a09; }
.path-cell[data-cell="="] { background: #e5d5b8; }
.path-cell:disabled { opacity: 1; }
.path-cell.visited { background: #e2efe2; }
.path-cell.delivered { background: #c0dfb9; }
.path-cell.position { background: var(--pine); color: white; }
.path-cell:not(:disabled):hover { filter: brightness(.94); }
.path-controls { margin-top: .6rem; }
.path-status { font-size: .89rem; color: var(--muted); margin-top: .3rem; }
.secret { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem 1.2rem; padding: .8rem; font-size: 1.28rem; color: var(--pine); background: var(--cream); border: 1px solid var(--line); border-radius: .4rem; }
.secret span { white-space: nowrap; }
.secret, [data-day="24"] table { font-family: "DejaVu Sans", sans-serif; }
[data-day="11"] th:nth-child(3n + 1), [data-day="21"] th:nth-child(odd) { width: 9%; }
.game { display: grid; gap: .75rem; }
.game-card { padding: .75rem; border: 1px solid var(--line); border-radius: .5rem; display: grid; gap: .5rem; }
.game-card h3 { font-size: 1.04rem; }
.solutions { display: grid; gap: .9rem; }
.solution-group h2 { font-size: 1.05rem; margin-bottom: .3rem; }
.solution-list { margin: 0; padding-left: 1.25rem; }
.solution-group:not(:last-child) .solution-list { list-style: disc; }
dialog { max-width: min(95vw, 44rem); max-height: 91vh; border: 1px solid var(--line); border-radius: .6rem; color: var(--ink); }
dialog::backdrop { background: #142b23ad; }
#form-edicao { display: grid; gap: .65rem; width: 37rem; max-width: 100%; }
#form-edicao label { display: grid; gap: .25rem; }
#form-edicao [name="blocos"] { font-family: ui-monospace, monospace; font-size: .87rem; }
.editor-actions { display: flex; justify-content: end; gap: .5rem; }
#erro-editor { color: var(--red); }
@media (max-width: 670px) {
  .site-header { flex-wrap: wrap; gap: .35rem .7rem; }
  .site-header nav { order: 3; flex-basis: 100%; }
  .site-header select { flex: 1; max-width: none; }
  .cover-body, .split { grid-template-columns: 1fr; }
  .cover-body > img { max-height: 15rem; object-fit: contain; margin: auto; }
  .day-grid { grid-template-columns: repeat(2, 1fr); }
  .sheet { width: calc(100% - 1rem); margin-block: .6rem; }
  .field-label, td, th { font-size: .82rem; }
  td, th { padding: .18rem .2rem; }
  td .answer select, td .answer input { padding-inline: .18rem; }
  .mark-cell { border-radius: .2rem; }
  .marks { gap: .08rem; }
  .sequence { grid-template-columns: .75rem repeat(6, minmax(0, 1fr)) repeat(2, minmax(0, 1.55fr)); }
}
@page { size: A4; margin: 12mm 13mm; }
@media print {
  :root, body { background: #fff; font-size: 10.5pt; line-height: 1.33; }
  body { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .screen, .skip, dialog, .timer { display: none !important; }
  .print-only, .print-reveal[hidden] { display: block !important; }
  #pagina { min-height: auto; }
  .exercise { break-before: page; }
  .instruction { max-width: none; }
  .sheet { margin: 0; padding: 0; border: 0; box-shadow: none; border-radius: 0; width: auto; }
  .exercise:first-child { break-before: auto; }
  .exercise > * { margin-bottom: 3mm; }
  .exercise > :last-child { margin-bottom: 0; }
  .sheet-header { font-size: 9pt; }
  .sheet-header img { width: 11mm; }
  .sheet h1 { font-size: 24pt; }
  .day-tag { line-height: 1; font-size: 9pt; }
  .tip, .clues, .game-card, .memory, .comparison, .split, .image-grid, .path-board, tr { break-inside: avoid; }
  .cover-body { min-height: 255mm; border: 0; padding: 0; }
  .cover .cover-body { gap: 5mm; grid-template-columns: 1fr; align-content: center; justify-items: center; text-align: center; }
  .cover-copy { justify-items: center; }
  .cover-copy img { width: 22mm; }
  .cover h1 { font-size: 46pt; }
  .cover-body > img { width: 145mm; }
  .cover-lead { max-width: 35ch; }
  .fields { gap: 1.7mm 3mm; }
  .answer :is(select, input, textarea) { display: none; }
  .written {
    display: block;
    border: 1px solid #77877e;
    border-radius: 1.4mm;
    padding-inline: 1mm;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .mono .written {
    border-color: #777;
  }
  .split { grid-template-columns: 1fr 1fr; gap: 3mm; }
  .choice input { appearance: none; width: 2.8mm; height: 2.8mm; border: 1px solid #505a54; vertical-align: middle; }
  .choice input:checked { background: #505a54; }
  .mono .choice input { border-color: #555; }
  .mono .choice input:checked { background: #555; }
  .image-grid { gap: 1.5mm; }
  .single-image img { max-height: 123mm; object-fit: contain; }
  .comparison img { max-height: 122mm; object-fit: contain; }
  .marks { gap: .6mm; }
  .marks img { max-height: 21mm; }
  .sequence .token img { max-height: 15mm; }
  .sequence .written { min-height: 10mm; }
  .colour-code { font-size: 7.5pt; }
  .path-board { width: min(100%, 130mm); }
  .path-cell { font-size: 9pt; }
  .path-cell.position[data-cell="Início"], .path-cell.position[data-cell="T"] { background: var(--sage); color: var(--pine); }
  .game { display: block; columns: 2; column-gap: 4mm; }
  .game-card { margin-bottom: 2.2mm; padding: 1.6mm 2mm; gap: 1.3mm; font-size: 9pt; }
  .game-card h3 { font-size: 9.8pt; }
  .game-card img { max-height: 33mm; object-fit: contain; }
  .game-card .memory { gap: 1mm; }
  .game-card .recall h3 { font-size: 8.5pt; }
  .solutions { display: block; line-height: 1.25; font-size: 10pt; }
  .solution-group { margin-top: 3mm; }
  .solution-group h2 { break-after: avoid; }
  .solution-group li { break-inside: avoid; }
  [data-day="1"] .study .image-grid img { height: 30mm; object-fit: contain; }
  [data-day="2"] .image-grid img { height: 20mm; object-fit: contain; }
  [data-day="8"] .image-grid img { height: 24mm; object-fit: contain; }
  [data-day="14"] .image-grid img { height: 39mm; object-fit: contain; }
}
.maze-frame {
  display: grid;
  grid-template: auto 1fr / 1.75rem minmax(0, 1fr);
  width: min(100%, 39rem);
  margin-inline: auto;
  color: var(--muted);
  font-weight: 700;
  font-size: .76rem;
  text-align: center;
}
.maze-columns {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
}
.maze-rows {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-auto-rows: 1fr;
  align-items: center;
}
.maze-frame .maze { grid-area: 2 / 2; width: 100%; }
.maze-frame .path-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  font-size: clamp(.46rem, 1.15vw, .78rem);
  line-height: 1;
  --trace: #a13b25;
  --stripe: linear-gradient(var(--trace), var(--trace));
  --north: linear-gradient(transparent, transparent);
  --south: linear-gradient(transparent, transparent);
  --east: linear-gradient(transparent, transparent);
  --west: linear-gradient(transparent, transparent);
  background-image: var(--north), var(--south), var(--west), var(--east);
  background-repeat: no-repeat;
  background-size: 14% 50%, 14% 50%, 50% 14%, 50% 14%;
  background-position: center top, center bottom, left center, right center;
  background-origin: border-box;
}
.maze-frame .north { border-top-width: 1px; }
.maze-frame .east { border-right-width: 1px; }
.maze-frame .south { border-bottom-width: 1px; }
.maze-frame .west { border-left-width: 1px; }
.maze .trail-north { --north: var(--stripe); }
.maze .trail-south { --south: var(--stripe); }
.maze .trail-east { --east: var(--stripe); }
.maze .trail-west { --west: var(--stripe); }
.maze-frame .path-cell.visited { background-color: #faf6ec; }
.maze-frame .path-cell[data-cell] { background-color: var(--sage); }
.maze-frame .cell-name { position: relative; border-radius: .15rem; padding: .12em; background: var(--sage); color: var(--pine); }
.maze-frame .position .cell-name { background: var(--pine); color: #fff; }
.maze-frame .path-cell.position { box-shadow: inset 0 0 0 2px var(--red); }
.mono .maze-frame .path-cell { --trace: #4b4b4b; }
.mono .maze-frame .path-cell.visited { background-color: #f5f5f5; }
.solved-maze { padding-block: .5rem; }
.solved-maze .maze-frame { width: min(100%, 28rem); }

.game-track {
  --track-line: var(--pine);
  --track-gap: 1.35rem;
  display: grid;
  gap: var(--track-gap);
}
.track-row {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  border: 2px solid var(--track-line);
  border-radius: .7rem;
  background: var(--cream);
}
.track-tile, .track-finish {
  color: var(--pine);
  padding: .35rem .22rem;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  min-width: 0;
  gap: .18rem;
  overflow-wrap: anywhere;
}
.track-tile.track-edge-right { border-right: 0; }
.track-number {
  display: grid;
  place-items: center;
  min-width: 1.4rem;
  min-height: 1.4rem;
  padding: 0 .16rem;
  background: var(--pine);
  color: #fff;
  border-radius: 50%;
  font-weight: 750;
  font-size: .68rem;
  line-height: 1;
}
.track-title { font-size: .73rem; line-height: 1.1; }
.track-cue { color: var(--ink); font-size: .67rem; line-height: 1.14; }
.track-tile img { max-height: 1.85rem; width: auto; object-fit: contain; }
.track-pair { display: flex; gap: .12rem; }
.track-pair img { width: 50%; min-width: 0; }
.track-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  line-height: 1;
  font: 700 .57rem/1.1 "DejaVu Sans", sans-serif;
}
.track-matrix span { border: 1px solid var(--line); padding: .08rem .15rem; }
.track-tile[aria-current] { background: var(--sage); outline: 2px solid var(--red); outline-offset: -2px; }
.track-tile:focus-visible { z-index: 1; outline-offset: -2px; }
.track-start, .track-finish { background: var(--pine); color: #fff; justify-content: center; }
.track-start { border-radius: .55rem 0 0 .55rem; }
.track-start:hover:not(:disabled), .track-start[aria-current] { background: var(--pine); color: #fff; }
.track-start .track-number { background: #fff; color: var(--pine); }
.track-start .track-cue { color: #fff; }
.track-start .track-title, .track-finish .track-title {
  color: #fff;
  font-size: .95rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.track-finish { grid-column: -2; grid-row: 1; border: 0; border-radius: 0 .55rem .55rem 0; }
.track-turn {
  position: absolute;
  top: 100%;
  height: var(--track-gap);
  display: grid;
  place-items: center;
  width: var(--track-turn-width);
  align-content: center;
}
.track-turn::before {
  content: '';
  width: .10rem;
  height: calc(var(--track-gap) * .48);
  background: var(--track-line);
}
.track-turn::after {
  content: '';
  border: .17rem solid transparent;
  border-bottom: 0;
  border-top-color: var(--track-line);
}
.track-turn.turn-left { left: 0; }
.track-turn.turn-right { right: 0; }
.game-stage { scroll-margin-top: 1rem; }
.numeric-cell { text-align: center; font-variant-numeric: tabular-nums; }
[data-day="5"] th:first-child { width: 76%; }
[data-day="4"] th:first-child, [data-day="16"] th:first-child { width: 21%; }
[data-day="20"] th:nth-child(1) { width: 20%; }
[data-day="20"] th:nth-child(2) { width: 14%; }
[data-day="20"] th:nth-child(3) { width: 38%; }

@media screen and (max-width: 700px) {
  .track-cue, .track-title, .track-tile img, .track-matrix { display: none; }
  .track-tile { justify-content: center; padding: .26rem .02rem; min-height: 2rem; }
  .track-number { min-width: 1.13rem; min-height: 1.13rem; font-size: .62rem; }
  .track-start .track-title, .track-finish .track-title { display: block; font-size: .57rem; }
  .maze-frame { grid-template-columns: 1.05rem minmax(0, 1fr); font-size: .58rem; }
}

@page tabuleiro { size: A4 landscape; margin: 10mm 12mm; }
@media print {
  .exercise:not(.board-page) {
    min-height: 270mm;
    display: flex;
    flex-direction: column;
    gap: var(--sheet-gap, 3.2mm);
  }
  .exercise:not(.board-page) > * { margin-bottom: 0; }
  .exercise:not(.board-page) > .tip { margin-top: auto; }
  .sheet-header { padding-bottom: 1.5mm; border-bottom: 1px solid var(--line); }
  .sheet-title { margin-top: 1mm; }
  .instruction { font-size: 11.4pt; line-height: 1.41; }
  .tip { padding: 2.5mm 3mm; }
  .clues { padding: 2.2mm 3.2mm; }
  .clues li + li { margin-top: .32mm; }
  .field-label { font-size: 10pt; }
  .written {
    --step: var(--line-step, 7.6mm);
    min-height: calc(var(--lines, 1) * var(--step));
    position: relative;
    background: transparent;
  }
  .writing-guides { position: absolute; inset: 0; padding-top: var(--step); }
  .writing-guides span { display: block; height: var(--step); border-top: 1px solid var(--line); }
  .written-value { position: relative; line-height: var(--step); }
  td .written, .mono td .written { min-height: 0; border: 0; background: none; }
  td .written-value { line-height: inherit; }
  table { border-collapse: collapse; }
  th { height: 8.5mm; font-size: 10pt; }
  td { height: var(--row-height, 9mm); font-size: 10pt; }
  td, th { padding: 1mm 1.7mm; vertical-align: middle; }
  .options-list { margin-top: 1.6mm; font-size: 9pt; line-height: 1.34; }
  .choice { display: flex; flex-wrap: wrap; align-content: center; min-height: 18mm; padding: 1mm 3mm 2mm; }
  .choice legend { font-size: 10.2pt; }
  [data-day="1"] { --line-step: 8.6mm; }
  [data-day="1"] .study .image-grid img { height: 40mm; }
  [data-day="2"] { --sheet-gap: 2.6mm; --line-step: 9mm; }
  [data-day="2"] .single-image img { max-height: 109mm; }
  [data-day="2"] .image-grid img { height: 22mm; }
  [data-day="3"] .marks img { max-height: 25mm; }
  [data-day="4"] { --row-height: 12mm; --line-step: 9mm; }
  [data-day="5"] { --row-height: 17mm; }
  [data-day="6"] { --line-step: 14mm; }
  [data-day="7"] .sequence { min-height: 22mm; }
  [data-day="7"] .sequence .token img { max-height: 19mm; }
  [data-day="7"] .sequence .written { min-height: 17mm; background: none; }
  [data-day="8"] { --line-step: 12mm; }
  [data-day="8"] .block-text { font-size: 16pt; line-height: 1.55; }
  [data-day="8"] .image-grid img { height: 33mm; }
  [data-day="9"] { --line-step: 8.4mm; }
  [data-day="9"] .comparison img { max-height: 137mm; }
  [data-day="10"] { --line-step: 11.7mm; }
  [data-day="11"] { --row-height: 19.5mm; }
  [data-day="12"] .maze-frame { width: 180mm; }
  [data-day="12"] .maze-frame .path-cell { font-size: 7.1pt; }
  [data-day="13"] { --line-step: 8.4mm; }
  [data-day="13"] .single-image img { max-height: 118mm; }
  [data-day="14"] .image-grid img { height: 48.5mm; object-fit: contain; }
  [data-day="14"] { --line-step: 8.6mm; }
  [data-day="15"] .marks img { max-height: 17.6mm; }
  [data-day="16"] { --row-height: 11mm; --line-step: 9.5mm; }
  [data-day="17"] .marks { width: 143mm; margin-inline: auto; }
  [data-day="17"] .marks img { max-height: 13.7mm; }
  [data-day="17"] { --line-step: 9.2mm; }
  [data-day="18"] .choice { min-height: 23mm; }
  [data-day="19"] { --line-step: 8.5mm; }
  [data-day="19"] .split { grid-template-columns: 1.27fr 1fr; }
  [data-day="20"] { --sheet-gap: 2.35mm; --row-height: 9.1mm; }
  [data-day="21"] { --sheet-gap: 2.5mm; --row-height: 9.2mm; }
  [data-day="21"] td, [data-day="21"] th { padding: .8mm 1.7mm; }
  [data-day="22"] { --line-step: 9mm; }
  [data-day="23"] { --line-step: 10mm; }
  [data-day="23"] .single-image img { max-height: none; }
  [data-day="24"] { --line-step: 12.5mm; }
  [data-day="24"] .secret { padding: 5mm 3.5mm; margin-block: 2mm; font-size: 14pt; }
  [data-day="24"] th, [data-day="24"] td { text-align: center; padding-inline: .5mm; }
  .solved-maze { break-inside: avoid; }
  .solved-maze .maze-frame { width: 96mm; font-size: 6pt; }
  .solved-maze .path-cell { font-size: 4.7pt; }
  .solved-maze .maze-frame .path-cell.position { box-shadow: none; }
  .board-page { display: block; page: tabuleiro; break-before: page; }
  .board-page > * { margin-bottom: 2.6mm; }
  .board-page .sheet-title { margin-top: 0; }
  .board-page .sheet-header img { width: 8.5mm; }
  .board-page .sheet-header { padding-bottom: .7mm; }
  .board-page h1 { font-size: 22pt; }
  .board-page .instruction { font-size: 10pt; line-height: 1.3; }
  .board-page .game-track { --track-gap: 3.9mm; }
  .board-page .track-row { border-width: 1pt; border-radius: 3.4mm; min-height: 27mm; break-inside: avoid; }
  .board-page .track-tile, .board-page .track-finish { gap: .75mm; padding: 1.3mm .8mm; }
  .board-page .track-number { min-width: 4.7mm; min-height: 4.7mm; font-size: 8pt; }
  .board-page .track-title { font-size: 8.05pt; line-height: 1.09; }
  .board-page .track-cue { font-size: 7.5pt; line-height: 1.12; }
  .board-page .track-tile img { max-height: 7mm; }
  .board-page .track-matrix { font-size: 6pt; }
  .board-page .track-matrix span { padding: 0 .65mm; }
  .board-page .track-start .track-title, .board-page .track-finish .track-title { font-size: 13pt; }
  .game-cards { break-before: page; }
  .game-cards > h2 { font-size: 16pt; margin-bottom: 2mm; }
  .card-instruction { font-size: 9.2pt; margin-bottom: 3mm; }
  .game-card .written { --step: 5.6mm; min-height: 5.6mm; }
  .game-card td, .game-card th { height: 4mm; font-size: 7.4pt; padding: .2mm 1.1mm; }
  .game-card .path-board { max-width: 36mm; }
}

/* Revisão editorial premium */
:root { font-family: Raleway, Arial, sans-serif; --line:#c8d0c9; }
.brand,.sheet h1 { font-family: Raleway, Arial, sans-serif; font-weight:800; letter-spacing:-.035em; }
.sheet { border-radius:0; box-shadow:none; }
.cover-copy img { width:12rem; margin-inline:auto; }
.cover-copy { justify-items:center; text-align:center; }
.cover-body > img,.single-image img,.image-grid img,.comparison img { margin-inline:auto; object-position:center; }
.image-grid figure { display:grid; justify-items:center; align-content:center; }
.sheet-header { font-size:.8rem; letter-spacing:.055em; font-weight:700; }
.sheet-header .brand-handle { margin-left:auto; font-weight:500; letter-spacing:0; }
.day-tag { border-radius:0; letter-spacing:.08em; text-transform:uppercase; }
.tip { border-radius:0; }
.game-card { border-radius:0; align-content:start; }
@media print {
 .cover-copy img { width:53mm; }
 .cover h1 { font-size:42pt; }
 .sheet-header { font-size:8pt; }
 .game-cards .game { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); columns:auto; gap:3mm; }
 .game-cards .game-card { min-height:83mm; margin:0; padding:3mm; break-inside:avoid; }
 .game-cards .game-card h3 { font-weight:800; }
}

/* Imagens sem recorte e fundo branco */
.sheet img { background:#fff; object-position:center; border-radius:0; }
[data-day="2"] .single-image { overflow:visible; }
[data-day="2"] .single-image img { width:100%; height:auto; object-fit:contain; max-height:none; }
@media print { [data-day="2"] .single-image img { max-height:109mm; width:100%; height:109mm; object-fit:contain; } }

.feedback { margin: 1.5rem 0; padding:1rem 0; border-top:1px solid var(--line); }
.feedback-result { display:grid; gap:.5rem; margin-top:.75rem; }
.answer-ok { color:#24533c; font-weight:700; }
.answer-review { color:#8a4d20; font-weight:700; }
.self-review { display:flex; flex-wrap:wrap; gap:.5rem; }
.brand-handle { display:block; text-align:center; font-size:.8rem; }
@media print { .feedback,.screen { display:none!important; } }

.download-book { display: inline-block; padding: .65rem 1rem; text-decoration: none; }

.advent-progress {
  display: grid;
  gap: .55rem;
  margin: 1.3rem 0;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  color: var(--pine);
  background: #f9f7f0;
}
.advent-progress progress { width: 100%; height: .7rem; accent-color: var(--pine); }
.advent-progress button { justify-self: start; }
.advent-actions, .completion-panel { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.completion-message { flex-basis: 100%; margin: 0; color: var(--pine); font-weight: 700; }
.completion-message:empty { display: none; }
.locked-sheet { min-height: 18rem; }
.tile-state { grid-column: 2; color: var(--muted); font-size: .7rem; }
.advent-dialog { max-width: min(92vw, 32rem); max-height: 90dvh; overflow: auto; }
.advent-dialog > * + * { margin-top: .65rem; }
.advent-dialog form { display: grid; gap: .7rem; }
.advent-dialog input, .invite-text { display: block; width: 100%; }
.invite-text { min-height: 7rem; }
.artwork-preview { display: block; max-width: 100%; max-height: 56dvh; object-fit: contain; margin-inline: auto; }
.advent-dialog .button { margin-right: .6rem; }

.group-controls { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .7rem 0; }
.group-turn { flex-basis: 100%; margin: 0; color: var(--pine); font-weight: 800; font-size: 1.17rem; }
.group-setup { display: grid; gap: .8rem; padding: 1rem; background: #f9f7f0; border: 1px solid var(--line); }
.group-setup > button { justify-self: start; }
.group-names { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .7rem; }
.group-names input { display: block; width: 100%; }
.group-roster { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; }
.group-roster li { display: flex; align-items: center; gap: .35rem; padding: .3rem .55rem; border: 1px solid var(--line); }
.group-roster [aria-current] { border: 2px solid var(--pine); font-weight: 800; }
.group-pawn { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; color: white; border: 1px solid white; border-radius: 50%; font-weight: 800; font-size: .72rem; line-height: 1; }
.group-pawns { display: flex; flex-wrap: wrap; justify-content: center; gap: .08rem; }
.group-game > .game-card { margin-top: 1rem; font-size: 1.08rem; }
.group-game > .game-card > button { justify-self: start; }
@media (max-width: 650px) {
  .group-pawns .group-pawn { width: .85rem; height: .85rem; font-size: .57rem; }
}
