:root {
  color-scheme: light;
  --ink: #253c3c;
  --muted: #4b6461;
  --deep: #27504f;
  --paper: #fffcf5;
  --soft: #f5f0e6;
  --line: #dcded2;
  --yellow: #fdd689;
  --aqua: #88c4c2;
  --lilac: #debedc;
  --leaf: #d9e8c2;
  --pink: #e4a3b9;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 500 1rem/1.55 system-ui, sans-serif; }
a { color: var(--deep); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #76558d; outline-offset: 4px; }
.skip { position: absolute; top: 10px; left: 12px; background: white; padding: 8px 14px; transform: translateY(-160%); z-index: 5; }
.skip:focus { transform: none; }
.wrap { width: min(1136px, calc(100% - 64px)); margin-inline: auto; }
.top { min-height: 82px; padding-block: 7px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top img { width: 78px; height: auto; }
.top a { font-size: .92rem; font-weight: 750; text-underline-offset: 4px; }
.intro { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: clamp(22px, 4.6vw, 52px); border-radius: 31px; overflow: hidden; background: var(--aqua); }
.intro::before { content: ""; position: absolute; inset: auto -65px -133px auto; width: 450px; height: 370px; border-radius: 50%; background: var(--leaf); transform: rotate(-12deg); z-index: -1; }
.intro img { width: clamp(75px, 17%, 170px); height: auto; margin-right: 3%; transform: rotate(-7deg); }
h1, h2, h3, p { margin: 0; }
h1 { font-weight: 850; font-size: clamp(2.35rem, 6.5vw, 5.1rem); line-height: .97; letter-spacing: -.07em; }
h1 em { font-style: normal; color: #2b5652; }
.intro p { font-size: clamp(1rem, 2.1vw, 1.28rem); font-weight: 650; margin-top: 12px; max-width: 34ch; }
.game { background: #fff; border: 1px solid var(--line); border-radius: 29px; margin: 18px 0; padding: clamp(16px, 3.5vw, 38px); }
.progress { padding: 0; margin: 0 0 23px; list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.progress li { padding: 5px 12px; border-radius: 20px; background: var(--soft); color: var(--muted); font-size: .86rem; font-weight: 750; }
.progress li[aria-current] { color: #fff; background: var(--deep); }
.controls { display: flex; align-items: end; justify-content: space-between; gap: 13px 20px; flex-wrap: wrap; margin-bottom: 20px; }
h2 { font-size: clamp(1.62rem, 3.7vw, 2.62rem); letter-spacing: -.043em; line-height: 1.12; }
h3 { font-size: 1.13rem; }
#instrucao { margin-top: 7px; color: var(--muted); font-size: 1.06rem; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
legend { font-size: .84rem; font-weight: 750; padding: 0 0 4px; }
fieldset label { position: relative; cursor: pointer; }
fieldset input { position: absolute; opacity: 0; }
fieldset span, .modes button { display: inline-flex; align-items: center; min-height: 42px; padding: 5px 12px; border-radius: 13px; border: 1px solid #b6c8c2; background: #fff; font-weight: 730; font-size: .92rem; color: var(--deep); }
fieldset input:checked + span, .modes button[aria-pressed="true"] { background: var(--leaf); border-color: var(--deep); }
fieldset input:focus-visible + span { outline: 3px solid #76558d; outline-offset: 3px; }
.cards { display: grid; grid-template-columns: repeat(var(--total, 2), minmax(0, 1fr)); gap: clamp(8px, 2vw, 17px); }
.cards[data-total="3"] { --total: 3; }
.cards[data-total="4"] { --total: 4; }
.card { min-width: 0; position: relative; margin: 0; padding: clamp(10px, 2.3vw, 19px); border-radius: 19px; border: 1px solid #0002; background: var(--tint); }
.personagem { --tint: #f0e0ef; --strong: var(--lilac); }
.cenario { --tint: #dbefec; --strong: var(--aqua); }
.emocao { --tint: #fff0ce; --strong: var(--yellow); }
.detalhe { --tint: #e8efd8; --strong: var(--leaf); }
.category { width: fit-content; color: #273f3d; font-weight: 790; font-size: clamp(.77rem, 1.65vw, .91rem); }
.picture { display: grid; place-items: center; width: 100%; height: clamp(96px, 16vw, 169px); margin-top: 7px; background: #ffffffa3; border-radius: 11px; overflow: hidden; }
.picture img { width: 100%; height: 100%; object-fit: contain; }
.picture .symbol { font-size: clamp(2.05rem, 5vw, 4.3rem); line-height: 1; }
.card-name { overflow-wrap: anywhere; margin-top: 9px; font-size: clamp(.96rem, 2.1vw, 1.3rem); font-weight: 850; line-height: 1.24; }
.card.turned .picture { background: var(--strong); }
.card.turned .card-name { font-weight: 650; font-size: .9rem; }
.card.changed { outline: 2px solid #76558d; outline-offset: 2px; }
.change-button { width: 100%; margin-top: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 17px; }
.button, .quiet { border: 1px solid var(--deep); padding: 8px 16px; min-height: 46px; border-radius: 13px; font-weight: 770; color: white; background: var(--deep); }
.quiet { color: var(--deep); background: white; }
.button:hover, .quiet:hover, .modes button:hover { filter: brightness(.96); }
#status { padding: 10px 14px; margin: 0 0 15px; background: var(--leaf); border-radius: 10px; }
.question { margin-top: 16px; padding: 16px; background: var(--soft); border-radius: 18px; }
.question p { margin-bottom: 10px; }
.answers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.answer { min-width: 0; border: 1px solid #acc3bb; background: #fff; border-radius: 11px; color: var(--ink); padding: 8px; display: grid; justify-items: center; align-content: center; font-weight: 740; overflow-wrap: anywhere; }
.answer .picture { height: clamp(62px, 10vw, 105px); margin-top: 0; }
.answer[aria-pressed="true"] { background: var(--leaf); border: 2px solid var(--deep); }
.feedback { margin: 12px 0 0 !important; color: var(--deep); font-weight: 760; }
.creation { background: #f9f5ed; border: 1px solid #e9e2d2; border-radius: 16px; padding: 15px; margin-top: 17px; }
.creation p, .creation label { margin-top: 8px; }
.modes, .colors { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.colors button[data-color] { display: grid; place-items: center; border: 0; width: 46px; height: 46px; background: white; border-radius: 50%; }
.colors button[data-color]::before { content: ""; border-radius: 50%; width: 24px; height: 24px; background: var(--swatch); }
.colors button[aria-pressed="true"] { border: 2px solid var(--deep); }
canvas { width: 100%; height: auto; display: block; border: 1px solid #bdc9bd; border-radius: 12px; background: white; margin-top: 8px; cursor: crosshair; touch-action: none; }
textarea { width: 100%; min-height: 95px; resize: vertical; border: 1px solid #a8bdb4; border-radius: 11px; background: #fff; color: var(--ink); padding: 10px; margin-top: 8px; }
.guide { border-radius: 19px; padding: 15px 20px; background: var(--leaf); }
.guide summary { cursor: pointer; width: fit-content; font-weight: 800; }
.guide-body { padding: 13px 0 3px; max-width: 76ch; }
.guide-body ol { padding-left: 23px; }
.guide-body li + li, .guide-body p + p { margin-top: 8px; }
.footer { padding: 22px 0 29px; color: var(--muted); font-size: .88rem; }
@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .top { min-height: 66px; }
  .top img { width: 65px; }
  .intro, .game { border-radius: 21px; }
  .intro::before { width: 230px; height: 220px; bottom: -76px; }
  .cards[data-total] { --total: 2; }
  .change-button { padding-inline: 6px; font-size: .84rem; }
  .answer { font-size: .82rem; padding: 5px; }
}
@media (max-width: 350px) {
  .top a { font-size: .8rem; }
  .intro { gap: 4px; }
  .intro img { width: 64px; margin-right: 0; }
  .answers { gap: 4px; }
}
@media print {
  .progress, .actions, .change-button, #niveis, #status, .guide, .footer, .modes, .colors, .top a, .intro img { display: none !important; }
  .wrap { width: 100%; }
  .intro, .game { padding: 14px; }
  .card, .creation { break-inside: avoid; print-color-adjust: exact; }
  .picture { height: 90px; }
}
#historia-impressa { display: none; }
@media print {
  #texto label, #historia { display: none; }
  #historia-impressa { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
}
