:root {
  color-scheme: light;
  --paper: #f8f6f0;
  --white: #fffcf8;
  --ink: #221b2d;
  --muted: #61576a;
  --line: #ddd5df;
  --lime: #dcfa83;
  --purple: #6949a0;
  --dark: #271d3e;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: "Trebuchet MS", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
[hidden] { display: none !important; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #8258cc; outline-offset: 4px; }
.skip-link { position: fixed; z-index: 5; top: 12px; left: 12px; padding: 10px 16px; transform: translateY(-150%); background: var(--white); border-radius: 8px; }
.skip-link:focus { transform: none; }
.shell { margin-inline: auto; width: min(1200px, calc(100% - 96px)); }
.site-header { border-bottom: 1px solid #e8e0e3; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-inner { min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 900; letter-spacing: -0.06em; font-size: 25px; white-space: nowrap; }
.brand img { border-radius: 8px; image-rendering: pixelated; }
.brand-accent { color: #734bac; margin-left: 2px; }
.main-nav { display: flex; gap: 32px; align-items: center; justify-content: center; }
.main-nav a, .site-footer nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 700; white-space: nowrap; }
.main-nav a:hover, .site-footer nav a:hover { color: var(--purple); text-decoration: underline; text-underline-offset: 5px; }
.main-nav a[aria-current] { color: var(--ink); }
.nav-home[aria-current]::before, .nav-catalog[aria-current]::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 2px; background: #8558c2; margin: 0 6px 2px 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: fit-content; padding: 12px 17px; min-height: 44px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-weight: 800; font-size: 14px; line-height: 1.25; transition: background-color .16s ease, color .16s ease, transform .16s ease; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button-ink { background: #2b213c; color: #fff8ee; }
.button-ink:hover { background: #443055; }
.button-lime { background: var(--lime); color: #251d30; }
.button-lime:hover { background: #ebffa8; }
.button-ghost { border-color: #765f92; color: #fff7ee; }
.button-ghost:hover { background: #48355f; }
.button-plain { background: #fffaf4; color: var(--ink); border-color: #d9cfdf; }
.button-plain:hover { background: #f1e9fa; }
.dice { width: 15px; height: 15px; border: 1.5px solid currentColor; border-radius: 4px; background: radial-gradient(circle at 28% 28%, currentColor 1px, transparent 1.6px), radial-gradient(circle at 50% 50%, currentColor 1px, transparent 1.6px), radial-gradient(circle at 72% 72%, currentColor 1px, transparent 1.6px); transform: rotate(-9deg); }
.hero { position: relative; overflow: hidden; isolation: isolate; border-radius: 24px; margin-top: 31px; min-height: 400px; display: grid; grid-template-columns: 1.04fr 1fr; align-items: center; background-color: #302347; background-image: radial-gradient(ellipse at 75% 48%, #543a7270, transparent 60%), linear-gradient(90deg, #221a33 5%, transparent 64%), linear-gradient(#9b75be23 1px,transparent 1px), linear-gradient(90deg,#9b75be23 1px,transparent 1px); background-size: auto, auto, 24px 24px, 24px 24px; color: #fff8ef; }
.hero-copy { z-index: 1; padding: 43px 0 44px clamp(32px, 5vw, 68px); }
.hero-kicker { display: flex; align-items: center; gap: 9px; font: 750 11px/1.3 var(--mono); letter-spacing: .15em; color: #e2d1f5; }
.hero-kicker span { width: 8px; height: 8px; background: var(--lime); box-shadow: 0 0 15px #dcfa8350; }
.hero h1 { margin: 15px 0 19px; font: 950 clamp(48px, 6.2vw, 89px)/.95 system-ui, sans-serif; letter-spacing: -.085em; }
.hero h1 em { color: var(--lime); display: block; font-style: normal; }
.hero p { color: #dfd5e9; font-size: 16px; line-height: 1.56; max-width: 365px; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-art { position: relative; width: min(112%, 650px); max-width: none; margin: 0 0 0 -8%; height: auto; image-rendering: pixelated; }
.catalog { padding-block: 46px 32px; scroll-margin-top: 12px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
h1, h2, h3 { font-family: system-ui, sans-serif; }
.section-heading h2 { font-size: clamp(31px, 4.3vw, 51px); line-height: 1; letter-spacing: -.065em; font-weight: 900; margin: 0; }
.section-heading p { margin: 11px 0 0; color: var(--muted); font-size: 16px; }
.game-count { font: 700 12px/1.4 var(--mono); color: #605668; padding-bottom: 4px; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 21px 0 20px; }
.filter { border: 1px solid #ddd5df; background: var(--white); border-radius: 99px; padding: 7px 15px; min-height: 37px; font-weight: 800; font-size: 13px; transition: background-color .15s ease; }
.filter:hover { background: #ede5f6; }
.filter[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff8ed; }
.game-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 0; margin: 0; }
.game-card { min-width: 0; }
.game-link { height: 100%; display: flex; flex-direction: column; border: 1px solid #dcd3de; border-radius: 16px; overflow: hidden; background: var(--white); text-decoration: none; transition: transform .17s ease, box-shadow .17s ease, border-color .17s ease; }
.game-link:hover { transform: translateY(-4px); border-color: #a68ac0; box-shadow: 0 8px 18px #3d225314; }
.game-link > img { width: 100%; height: auto; aspect-ratio: 9/4; object-fit: cover; image-rendering: pixelated; border-bottom: 1px solid #ded3e4; }
.card-content { position: relative; padding: 15px 55px 18px 16px; flex: 1; }
.category { display: inline-block; border-radius: 5px; padding: 4px 7px; color: #4b3067; background: #ede1fa; font: 800 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.category.pares { color: #265b49; background: #d8f2e7; }
.category.suma { color: #76335f; background: #f9e0ed; }
.category.pulso { color: #773a25; background: #fbe2c8; }
.category.luces { color: #5a4d23; background: #f5efbb; }
.category.ruta { color: #2c5081; background: #e0ebfa; }
.card-content h3 { font-size: clamp(19px, 2vw, 25px); line-height: 1.13; letter-spacing: -.04em; margin: 7px 0 4px; }
.card-content p { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 0; }
.card-arrow { position: absolute; right: 15px; bottom: 17px; width: 33px; height: 33px; display: grid; place-items: center; border: 1px solid #e1d8e4; background: #f3eef5; border-radius: 8px; font: 700 20px/1 system-ui, sans-serif; }
.game-link:hover .card-arrow { background: var(--lime); border-color: #bed674; }
.ad-slot { margin: 0 0 46px; min-height: 86px; padding: 14px; display: flex; justify-content: center; align-items: center; gap: 12px; text-align: left; border-radius: 12px; border: 1px dashed #cfc3d2; background: #f4eff3; color: #62576c; }
.ad-mark { font-size: 23px; color: #85728f; }
.ad-label, .ad-note { display: block; }
.ad-label { font: 800 10px/1.4 var(--mono); letter-spacing: .09em; }
.ad-note { font-size: 12px; margin-top: 4px; }
.site-footer { background: #f1ecf0; border-top: 1px solid #e4dce3; }
.footer-inner { min-height: 90px; }
.footer-inner .brand { font-size: 20px; }
.footer-inner .brand img { width: 28px; height: 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; column-gap: 19px; row-gap: 12px; }
.site-footer nav a, .footer-note { font-size: 13px; }
.footer-note { color: var(--muted); }
.page-top { margin: 28px 0 23px; }
.back-link { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 800; color: #594171; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 305px); gap: 23px; align-items: start; margin-bottom: 26px; }
.game-title { margin-bottom: 21px; }
.game-title h1, .info-card h1 { font-size: clamp(34px, 5.5vw, 61px); line-height: 1.02; letter-spacing: -.065em; font-weight: 900; margin: 9px 0 10px; }
.game-title p { margin: 0; color: var(--muted); line-height: 1.55; }
.game-guide { display: grid; gap: 15px; }
.guide-box, .info-card { border: 1px solid var(--line); background: var(--white); border-radius: 16px; padding: 22px; }
.guide-box h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: -.04em; }
.guide-box ol { margin: 0; padding-left: 21px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.guide-box li + li { margin-top: 8px; }
#related-games { display: grid; gap: 8px; }
#related-games a { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 9px; font-size: 13px; text-decoration: none; padding: 6px; border-radius: 7px; font-weight: 800; }
#related-games a:hover { background: #f0e8f5; }
#related-games img { width: 48px; height: 32px; object-fit: cover; border-radius: 5px; }
.game-stage { border: 1px solid var(--line); background: #f3ebf8; border-radius: 16px; padding: clamp(12px, 3vw, 28px); }
.game-stage:focus-within { border-color: #bda8d3; }
.game-stage.orbita { background: #30234a; border-color: #30234a; color: #fff7ef; }
.game-stage.pares { background: #e4f2ea; }
.game-stage.suma { background: #f7e6f0; }
.game-stage.pulso { background: #fae9d7; }
.game-stage.luces { background: #f6f0cd; }
.game-stage.ruta { background: #e7effa; }
.game-stage:empty { min-height: 180px; }
.game-hud { display: flex; gap: 9px; margin-bottom: 15px; flex-wrap: wrap; }
.stat { display: inline-grid; gap: 3px; justify-content: center; text-align: center; min-width: 75px; padding: 7px 11px; background: #fffaf6; color: var(--ink); border: 1px solid #241d3516; border-radius: 8px; }
.stat span { font: 800 10px/1.15 var(--mono); color: #5c5166; text-transform: uppercase; }
.stat strong { font: 850 17px/1.15 system-ui, sans-serif; }
.game-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 14px; }
.game-status { margin: 13px 0 0; min-height: 1.4em; font-size: 14px; font-weight: 750; line-height: 1.4; }
.orbit-field { max-width: 680px; margin-inline: auto; position: relative; }
.orbit-canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 9px; background: #1d1730; border: 1px solid #695086; touch-action: none; }
.orbit-overlay { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; text-align: center; gap: 10px; background: #201631d9; border-radius: 9px; padding: 12px; }
.orbit-overlay h2 { font-size: clamp(22px, 4vw, 35px); margin: 0; letter-spacing: -.045em; }
.orbit-overlay p { margin: 0; font-size: 14px; max-width: 265px; color: #e2d5ef; }
.orbit-pad { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.orbit-pad button, .dpad button { min-width: 46px; min-height: 46px; font-size: 22px; touch-action: none; padding: 5px; }
.orbit-pad button { border: 1px solid #8167a3; background: #45315e; color: white; }
.orbit-pad button:active { background: #6a4a8f; }
.memory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 500px; margin-inline: auto; }
.memory-card { aspect-ratio: 1.2; min-height: 48px; border: 1px solid #497c68; border-radius: 9px; background: #3b6b5a; color: #f8f7e4; font-size: clamp(23px, 4vw, 39px); font-weight: 850; }
.memory-card:hover { background: #2e5949; }
.memory-card.is-open, .memory-card.is-matched { color: #255743; background: #fffaf0; }
.memory-card.is-matched { background: #c2e7b3; }
.sum-display { min-height: 125px; display: grid; place-items: center; padding: 12px; text-align: center; border: 1px solid #e7c6da; border-radius: 10px; background: #fff9fc; font: 900 clamp(29px, 8vw, 65px)/1 system-ui, sans-serif; letter-spacing: -.06em; }
.sum-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 9px; }
.sum-option { width: 100%; min-height: 52px; font-size: 20px; background: #7c4167; color: #fff8fd; }
.sum-option:hover { background: #693454; }
.reaction { width: 100%; min-height: 212px; padding: 20px; border-radius: 12px; border: 1px solid #d4a98b; display: grid; align-content: center; justify-items: center; gap: 8px; text-align: center; background: #ffe8ce; color: #502f25; }
.reaction strong { font: 900 clamp(26px, 5vw, 48px)/1.05 system-ui, sans-serif; letter-spacing: -.055em; }
.reaction span { font-size: 14px; }
.reaction.is-waiting { background: #854334; color: #fff8ec; }
.reaction.is-go { background: #bdf07e; color: #213517; border-color: #6ca747; }
.lights-layout { display: grid; grid-template-columns: 1fr .62fr; gap: clamp(12px, 3vw, 27px); max-width: 540px; margin-inline: auto; align-items: start; }
.lights-layout h2 { margin: 0 0 8px; font-size: 15px; }
.light-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.light-cell { min-width: 0; aspect-ratio: 1; border: 1px solid #827a4c; border-radius: 5px; display: grid; place-items: center; padding: 0; background: #6d6442; color: #fff7dd; font: 800 clamp(14px, 3vw, 23px)/1 var(--mono); }
button.light-cell { min-height: 32px; }
.light-cell.is-lit { background: #effd8b; color: #4e4825; border-color: #9a942f; }
.maze-field { width: min(100%, 343px); margin-inline: auto; }
.maze-grid { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); border: 2px solid #536c91; background: #526b91; border-radius: 7px; overflow: hidden; }
.maze-cell { aspect-ratio: 1; display: grid; place-items: center; background: #f4f8ff; line-height: 1; font-weight: 850; font-size: clamp(11px, 3vw, 22px); }
.maze-cell.is-wall { background: #3b5378; }
.maze-cell.is-player { background: #dcfa83; color: #2b2639; }
.maze-cell.is-gem { color: #114456; background: #c4f0e8; }
.maze-cell.is-exit { color: #411d76; background: #ddcef6; }
.dpad { display: grid; grid-template-columns: repeat(3, 46px); justify-content: center; gap: 5px; margin-top: 10px; }
.dpad button { width: 100%; border: 1px solid #a8b9d2; background: #f7faff; }
.dpad button:first-child { grid-column: 2; }
.dpad button:nth-child(2) { grid-column: 1; }
.dpad button:active { background: #d9e8fc; }
.info-card { padding: clamp(22px, 5vw, 57px); max-width: 820px; margin: 0 auto 45px; }
.info-card h1 { margin-top: 0; }
.info-card h2 { letter-spacing: -.04em; margin: 25px 0 7px; font-size: 21px; }
.info-card p { color: var(--muted); line-height: 1.6; margin-top: 0; }
.info-card .info-lead { font-size: 18px; }
.info-cta { margin-top: 8px; }
.privacy-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.feedback-form, .feedback-output { display: grid; gap: 10px; margin-top: 21px; }
.feedback-form label, .feedback-output label { font-weight: 800; }
.feedback-form select, .feedback-form textarea, .feedback-output textarea { width: 100%; border: 1px solid #cbbcce; border-radius: 8px; padding: 10px; background: #fffaf7; }
.feedback-form textarea, .feedback-output textarea { resize: vertical; }
@media (max-width: 1000px) {
  .shell { width: calc(100% - 56px); }
  .hero { min-height: 355px; }
  .hero h1 { font-size: clamp(47px, 7.7vw, 70px); }
  .footer-note { display: none; }
}
@media (max-width: 750px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { gap: 10px; min-height: 68px; }
  .main-nav { gap: 16px; }
  .brand { font-size: 22px; }
  .brand img { width: 31px; height: 31px; }
  .hero { min-height: 322px; margin-top: 22px; }
  .hero-copy { padding: 32px 0 34px 24px; }
  .hero-art { width: 128%; margin-left: -16%; }
  .game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .game-layout { grid-template-columns: minmax(0, 1fr); }
  .game-guide { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog { padding-top: 34px; }
}
@media (max-width: 520px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { display: grid; grid-template-columns: 1fr auto; padding-top: 10px; gap: 3px 10px; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; justify-content: start; gap: 22px; }
  .main-nav > a { display: inline-flex; align-items: center; min-height: 42px; }
  .main-nav > a::before { margin-bottom: 0; }
  .random-link { padding: 8px 12px; min-height: 39px; font-size: 13px; }
  .hero { grid-template-columns: 1fr; margin-top: 15px; border-radius: 17px; }
  .hero-copy { padding: 24px 19px 0; }
  .hero h1 { font-size: clamp(42px, 12.3vw, 63px); margin: 13px 0; }
  .hero p { font-size: 14px; }
  .hero-actions { margin-top: 17px; gap: 7px; }
  .hero-actions .button { font-size: 12px; padding: 9px 10px; }
  .hero-art { margin: -3px auto 4px; width: min(97%, 348px); }
  .section-heading p { font-size: 14px; }
  .filters { gap: 6px; }
  .filter { padding: 6px 12px; }
  .game-grid { gap: 10px; }
  .game-link { border-radius: 11px; }
  .card-content { padding: 10px 10px 35px; }
  .card-content h3 { font-size: 17px; margin-top: 6px; }
  .card-content p { font-size: 12px; }
  .card-arrow { right: 8px; bottom: 7px; width: 24px; height: 24px; font-size: 15px; border-radius: 5px; }
  .footer-inner { min-height: 0; flex-direction: column; align-items: start; padding-block: 16px 20px; gap: 14px; }
  .site-footer nav { column-gap: 15px; }
  .page-top { margin: 20px 0 15px; }
  .game-title { margin-bottom: 15px; }
  .game-guide { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.play-icon { flex: 0 0 auto; width: 0; height: 0; border-block: 5px solid transparent; border-left: 8px solid currentColor; }
.arrow-icon { position: relative; display: inline-grid; place-items: center; }
.arrow-icon::before { content: ""; width: 8px; height: 8px; border-top: 1.6px solid currentColor; border-right: 1.6px solid currentColor; }
.arrow-icon::after { content: ""; position: absolute; width: 11px; border-top: 1.6px solid currentColor; transform: translate(-.4px, .4px) rotate(-45deg); }
.card-arrow.arrow-icon { position: absolute; display: grid; }

.analytics-notice {
  position: fixed;
  z-index: 4;
  inset-inline: 0;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(calc(100% - 28px), 660px);
  margin-inline: auto;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 8px 32px #221b2d30;
}
.analytics-notice > div:first-child { flex: 1 1 250px; }
.analytics-notice h2 { margin: 0 0 4px; font-size: 16px; }
.analytics-notice p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.analytics-actions { display: flex; gap: 8px; align-items: center; }
.analytics-notice .analytics-actions { flex-wrap: wrap; }
