:root { color-scheme: dark; font-family: "Trebuchet MS", "Segoe UI", sans-serif; background: #111735; color: #f8f8ff; }
* { box-sizing: border-box; }
body { --game-accent:#ffda69; margin: 0; min-width: 320px; background: linear-gradient(150deg, #111735, #282047); }
body[data-game="sudoku"] { --game-accent:#89e5e2; }
body[data-game="ordenar-15"] { --game-accent:#ffcb78; }
body[data-game="colores"] { --game-accent:#ffa5c4; }
body[data-game="memoria"] { --game-accent:#91e7b6; }
body[data-game="desafios-logicos"] { --game-accent:#d1b4ff; }
button, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid #ffda69; outline-offset: 3px; }
button { cursor: pointer; }
.shell { width: min(1050px, calc(100% - 32px)); margin: auto; }
.solo-header { border-bottom: 1px solid #566392; background: #111735; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-height: 68px; padding-block: 10px; }
.header-inner a { text-decoration: none; }
.brand { margin-right: auto; font-size: 24px; font-weight: 900; }
.brand span { color: #ffda69; }
#xp-total { color: #ffda69; font-size: 13px; font-weight: 800; }
main { padding-block: 35px 70px; }
.back { display: inline-block; margin-bottom: 18px; color: #e1e6fa; font-size: 14px; }
.eyebrow { margin: 0 0 8px; color: var(--game-accent); font-size: 12px; font-weight: 800; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { margin: 0; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 42px; font-weight: 400; line-height: 1.05; }
h2 { font-size: 22px; }
.intro { max-width: 630px; color: #d5dcf4; }
.menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 30px; }
.menu a { display: flex; min-height: 165px; flex-direction: column; justify-content: space-between; padding: 18px; border: 1px solid #7180b5; border-radius: 8px; background: linear-gradient(145deg,#443762,#26375a); text-decoration: none; }
.menu a:nth-child(2n) { background: linear-gradient(145deg,#285568,#252e59); }
.menu a:hover { border-color: #ffda69; }
.menu-icon { color: #ffb6a6; font-size: 38px; }
.menu strong { font-size: 18px; }
.menu span:last-child { color: #b0f8e9; font-weight: 700; }
.game-layout { display: grid; gap: 26px; margin-top: 24px; }
.game-main { min-width: 0; }
.game-side { min-width: 0; border-top: 1px solid #65729d; padding-top: 20px; }
.controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.controls label { display: grid; gap: 5px; color: #e0e6fa; font-size: 13px; font-weight: 700; }
select { min-height: 44px; padding: 8px 30px 8px 10px; border: 1px solid #8794bd; border-radius: 6px; background: #27325a; color: #fff; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border: 1px solid #8b9ac8; border-radius: 8px; background: #303b69; color: #fff; font-weight: 700; text-decoration: none; transition:transform 150ms ease,border-color 150ms ease; }
.button:hover:not(:disabled) { border-color: var(--game-accent); }
.button:active:not(:disabled) { transform:scale(.97); }
.button.primary { border-color: var(--game-accent); background: var(--game-accent); color: #151a35; }
.button.active { border-color: var(--game-accent); color: var(--game-accent); }
button:disabled { opacity: .48; cursor: default; }
.metrics { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 20px 0; color: #dbe1f7; font-size: 14px; }
.metrics strong { color: #fff; font-variant-numeric: tabular-nums; }
.board { display: grid; width: min(100%, 540px); gap: 3px; }
.board button { aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid #697bad; border-radius: 6px; background: #303b69; color: #fff; font-weight: 800; }
.board button:hover:not(:disabled) { border-color: var(--game-accent); }
.board button.selected { outline: 3px solid var(--game-accent); outline-offset: -3px; }
.sudoku-board { gap: 1px; border: 2px solid #a6b4d9; background: #a6b4d9; }
.sudoku-board button { position: relative; border: 0; border-radius: 0; background: #26345d; font-size: 20px; }
.sudoku-board button.given { background: #365377; color: #cffbf3; }
.sudoku-board button.wrong { color: #ffad98; background: #57302e; }
.sudoku-board button.box-right { border-right: 2px solid #aeb9a8; }
.sudoku-board button.box-bottom { border-bottom: 2px solid #aeb9a8; }
.notes { display: grid; height: 100%; grid-template-columns: repeat(3, 1fr); align-items: center; font-size: 9px; font-weight: 400; line-height: 1; }
.keypad { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.keypad button { min-width: 40px; }
.fifteen-board button { background: #ffcb78; color: #29213a; font-size: 26px; }
.fifteen-board button.empty { border-color: transparent; background: #1b2449; }
.memory-board button { background: #5263a0; font-size: 30px; }
.memory-board button.revealed { background: #ffce8b; color: #222743; }
.memory-board button.matched { background: #a1e9c2; color: #17362d; }
.status { min-height: 24px; margin: 16px 0; color: #e5f7f3; font-weight: 700; }
.status.error { color: #ffb5a3; }
.status-box { margin-top: 14px; padding: 16px; border-left: 3px solid #82e5d6; background: #28365e; }
.question { margin: 16px 0; font-size: 22px; line-height: 1.35; }
.answers { display: grid; gap: 8px; }
.answers button { justify-content: flex-start; min-height: 52px; text-align: left; }
.answers + [data-action="hint"] { margin-top: 12px; }
.answers button.correct { border-color: #a9df8b; background: #284934; }
.answers button.incorrect { border-color: #ff9a82; background: #57312d; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.palette-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; padding: 0; border: 0; }
.palette-settings legend { margin-bottom: 10px; color: #e0e6fa; font-size: 13px; font-weight: 700; }
.palette-settings label { display: flex; min-height: 36px; align-items: center; gap: 6px; font-size: 13px; }
.palette-settings input { width: 18px; height: 18px; accent-color: #ffda69; }
.palette-dot { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; }
.swatch { display: inline-flex; min-width: 64px; min-height: 52px; align-items: center; justify-content: center; padding: 8px; border: 2px solid transparent; border-radius: 3px; color: #161a17; font-size: 12px; font-weight: 900; }
.swatch:focus-visible { outline-color: white; }
.guess { display: flex; gap: 6px; margin: 14px 0; }
.guess-slot { display: grid; width: 58px; height: 58px; place-items: center; border: 1px dashed #99a59a; border-radius: 3px; background: #232a25; color: #f4f2e9; font-size: 12px; font-weight: 800; }
.history { display: grid; gap: 8px; padding: 0; list-style: none; }
.history li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #465047; }
.history-colors { display: flex; flex-wrap: wrap; gap: 4px; }
.history .swatch { min-width: 48px; min-height: 34px; padding: 4px; }
.storage-warning { position: fixed; right: 12px; bottom: 12px; left: 12px; z-index: 3; padding: 12px; background: #793b32; color: white; }
@media (min-width: 800px) { .game-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; } .game-side { border-top: 0; border-left: 1px solid #65729d; padding: 0 0 0 24px; } }
@media (max-width: 420px) { .sudoku-board button { font-size: 16px; } .memory-board button { font-size: 22px; } .notes { font-size: 7px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation:none !important; transition:none !important; } }