:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: #0b1220; color: #fff7dc; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
/* XP/streak remain recorded by the shared site contract, but its global bar
   would consume the first rows of a mobile playfield. The game surfaces its
   own compact HUD instead. */
.viajes-body .cet-gamification-bar { display: none !important; }
button, a { -webkit-tap-highlight-color: transparent; }
.viajes-page { margin: 0 auto; max-width: 1180px; min-width: 0; padding: max(1rem, env(safe-area-inset-top)) clamp(1rem, 4vw, 2rem) max(1.5rem, env(safe-area-inset-bottom)); width: 100%; }
.viajes-back { align-items: center; color: #f5cd71; display: inline-flex; font-weight: 800; margin: 0 0 .9rem; min-height: 44px; text-underline-offset: .22em; }
.viajes-shell { background: linear-gradient(160deg, #1c2947, #101a31); border: 1px solid rgba(255,225,151,.25); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.35); min-width: 0; overflow: hidden; width: 100%; }
.viajes-heading { padding: clamp(1rem, 3vw, 1.7rem); }
.viajes-kicker, .viajes-modal__eyebrow { color: #f4ca70; font-size: .74rem; font-weight: 900; letter-spacing: .13em; margin: 0 0 .35rem; text-transform: uppercase; }
.viajes-heading h1 { font-size: clamp(1.5rem, 5vw, 2.5rem); line-height: 1; margin: 0; }
.viajes-heading > p:last-child { color: #dbe5f4; line-height: 1.45; margin: .65rem 0 0; max-width: 46rem; }
.viajes-stage { --viajes-stage-ratio: 16 / 9; aspect-ratio: var(--viajes-stage-ratio); background: #182848; border-block: 1px solid rgba(255,225,151,.18); max-width: 100%; min-height: 190px; min-width: 0; overflow: hidden; position: relative; width: 100%; }
.viajes-game-root { height: 100%; min-width: 0; width: 100%; }
.viajes-game-root canvas { display: block; height: auto !important; margin: 0 auto; max-width: 100%; width: 100% !important; }
.viajes-hud { align-items: start; display: flex; gap: .4rem; left: max(.55rem, env(safe-area-inset-left)); pointer-events: none; position: absolute; right: max(.55rem, env(safe-area-inset-right)); top: max(.55rem, env(safe-area-inset-top)); z-index: 4; }
.viajes-hud p, .viajes-hud__pause { background: rgba(10,18,36,.78); border: 1px solid rgba(255,238,186,.3); border-radius: .55rem; box-shadow: 0 .25rem .7rem rgba(0,0,0,.2); color: #fff7dc; font: inherit; font-weight: 900; margin: 0; min-height: 2.25rem; padding: .42rem .58rem; }
.viajes-hud__hearts { color: #ff8f82 !important; letter-spacing: .08em; }
.viajes-hud__scrolls { color: #f8d882 !important; }
.viajes-hud__objective { font-size: clamp(.66rem, 2.3vw, .82rem); line-height: 1.25; margin-left: auto !important; max-width: 12rem; text-align: right; }
.viajes-hud__pause { min-height: 44px; min-width: 44px; padding: .35rem; pointer-events: auto; }
.viajes-stage.is-intro .viajes-hud, .viajes-stage.is-intro .viajes-prompt, .viajes-stage.is-intro .viajes-status { visibility: hidden; }
.viajes-prompt { background: rgba(7,15,31,.86); border: 1px solid rgba(245,205,113,.65); border-radius: 999px; bottom: .75rem; color: #fff0bd; font-size: clamp(.72rem, 2.6vw, .92rem); font-weight: 850; left: 50%; margin: 0; max-width: calc(100% - 1.5rem); padding: .48rem .85rem; position: absolute; text-align: center; transform: translateX(-50%); z-index: 4; }
.viajes-status { background: rgba(6,13,27,.82); bottom: .35rem; color: #e5edf9; font-size: .73rem; left: .55rem; margin: 0; padding: .25rem .4rem; position: absolute; z-index: 4; }
.viajes-modal[hidden], .viajes-touch[hidden] { display: none !important; }
.viajes-modal { background: linear-gradient(160deg, rgba(25,44,76,.985), rgba(10,20,40,.99)); border: 1px solid rgba(255,223,138,.72); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.5); display: grid; gap: .7rem; inset: .7rem; margin: auto; max-width: min(37rem, calc(100% - 1.4rem)); overflow-y: auto; overscroll-behavior: contain; padding: clamp(.95rem, 4vw, 1.4rem); position: absolute; z-index: 8; }
.viajes-modal h2 { font-size: clamp(1.15rem, 4.2vw, 1.65rem); line-height: 1.14; margin: 0; }
.viajes-modal > p:not(.viajes-modal__eyebrow) { color: #e6eefc; line-height: 1.48; margin: 0; overflow-wrap: anywhere; }
.viajes-modal--start { align-items: center; grid-template-columns: minmax(100px, .6fr) minmax(0, 1fr); max-width: min(42rem, calc(100% - 1.4rem)); }
.viajes-start__portrait { align-self: stretch; background: #090d18; border: 1px solid rgba(244,202,112,.34); border-radius: 11px; min-height: 10rem; overflow: hidden; }
.viajes-start__portrait img { display: block; height: 100%; object-fit: cover; object-position: 52% 20%; width: 100%; }
.viajes-start__copy { display: grid; gap: .62rem; min-width: 0; }
.viajes-start__copy .viajes-button { justify-self: stretch; width: 100%; }
.viajes-start__copy p { color: #e6eefc; line-height: 1.4; margin: 0; }
.viajes-start__controls { font-size: .78rem; }
.viajes-world-picker-wrap { border-top: 1px solid rgba(255,225,151,.2); display: grid; gap: .45rem; grid-column: 1 / -1; min-width: 0; padding-top: .7rem; }
.viajes-world-picker__title { color: #f4ca70; font-size: .72rem; font-weight: 900; letter-spacing: .1em; margin: 0; text-transform: uppercase; }
.viajes-world-picker { display: grid; gap: .4rem; grid-template-columns: repeat(4, minmax(0, 1fr)); min-width: 0; }
.viajes-world-picker__tile { background: var(--world-card); border: 1px solid rgba(255,238,186,.45); border-radius: .55rem; color: #fff8e9; display: grid; gap: .08rem; min-height: 52px; min-width: 0; padding: .45rem; text-decoration: none; text-shadow: 0 1px 2px rgba(0,0,0,.65); }
.viajes-world-picker__tile[aria-current="true"] { box-shadow: inset 0 0 0 2px #ffe5a2; }
.viajes-world-picker__tile span { font-size: .78rem; font-weight: 950; overflow-wrap: anywhere; }
.viajes-world-picker__tile small { font-size: .62rem; font-weight: 800; opacity: .92; overflow-wrap: anywhere; }
.viajes-world-picker__tile b { color: #fff0b5; font-size: .62rem; }
.viajes-world-picker__tile:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.viajes-button { align-items: center; background: #f0c35e; border: 1px solid #ffe6a1; border-radius: .58rem; color: #17213a; cursor: pointer; display: inline-flex; font: inherit; font-weight: 900; justify-content: center; max-width: 100%; min-height: 44px; min-width: 0; padding: .55rem .85rem; text-align: center; text-decoration: none; }
.viajes-button:hover { filter: brightness(1.06); }
.viajes-button:focus-visible, .viajes-back:focus-visible, .viajes-exit:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.viajes-button--secondary { background: rgba(196,220,255,.12); border-color: #b9d9ff; color: #e8f3ff; }
.viajes-dialog__reference { color: #f6d883 !important; font-weight: 850; }
.viajes-dialog__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.viajes-quiz-options { display: grid; gap: .45rem; }
.viajes-quiz-options button { background: rgba(255,255,255,.06); border: 1px solid rgba(222,234,255,.38); border-radius: .55rem; color: #f5f8ff; cursor: pointer; font: inherit; font-weight: 750; min-height: 44px; padding: .55rem .65rem; text-align: left; }
.viajes-quiz-options button.is-correct { background: rgba(96,199,143,.2); border-color: #8ae5ae; }
.viajes-quiz-options button.is-incorrect { background: rgba(235,120,113,.16); border-color: #f2958d; }
.viajes-quiz-feedback { color: #f8dfa0 !important; font-weight: 800; }
.viajes-pause__stats { display: grid; gap: .45rem; grid-template-columns: repeat(3, minmax(0,1fr)); margin: 0; }
.viajes-pause__stats div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,225,143,.23); border-radius: .55rem; padding: .5rem .32rem; text-align: center; }
.viajes-pause__stats dt { color: #dbe8fa; font-size: .67rem; font-weight: 800; overflow-wrap: anywhere; }
.viajes-pause__stats dd { color: #f7d373; font-size: 1.08rem; font-weight: 900; margin: .16rem 0 0; }
.viajes-option { color: #e7eefb; font-weight: 700; }
.viajes-exit { color: #d8eaff; font-weight: 800; justify-self: start; text-underline-offset: .2em; }
.viajes-modal--victory { text-align: center; }
.viajes-victory__stars { color: #f5d36e !important; font-size: 2.2rem; letter-spacing: .15em; }
.viajes-touch { align-items: end; bottom: max(.55rem, env(safe-area-inset-bottom)); display: grid; gap: .4rem; grid-template-columns: 1fr auto 1fr; left: max(.55rem, env(safe-area-inset-left)); pointer-events: none; position: absolute; right: max(.55rem, env(safe-area-inset-right)); z-index: 5; }
.viajes-touch > div { display: flex; gap: .35rem; }
.viajes-touch__vertical { justify-content: center; }
.viajes-touch__act { justify-content: flex-end; }
.viajes-touch button { align-items: center; background: rgba(12,21,40,.88); border: 1px solid rgba(255,223,137,.64); border-radius: .58rem; box-shadow: 0 .2rem .65rem rgba(0,0,0,.28); color: #fff7dc; cursor: pointer; display: inline-flex; flex-direction: column; font: inherit; font-size: 1.05rem; font-weight: 900; justify-content: center; min-height: 44px; min-width: 44px; padding: .2rem .45rem; pointer-events: auto; touch-action: none; }
.viajes-touch button small { font-size: .58rem; }
.viajes-touch button:active { background: rgba(244,195,94,.3); transform: translateY(1px); }
.viajes-footer { color: #d7e2f2; display: grid; gap: .65rem; line-height: 1.45; padding: 1rem clamp(1rem, 3vw, 1.7rem) 1.3rem; }
.viajes-footer p { margin: 0; }
.viajes-footer a { color: #f7d17a; font-weight: 850; min-height: 44px; text-underline-offset: .2em; }
@media (max-width: 700px) { .viajes-page { padding: 0; } .viajes-back { margin-inline: 1rem; } .viajes-shell { border-inline-width: 0; border-radius: 0; } .viajes-heading { padding: .9rem 1rem; } .viajes-heading > p:last-child { margin-top: .42rem; } .viajes-stage.is-portrait-game { min-height: min(45dvh, 30rem); } .viajes-page.is-playing { height: 100dvh; min-height: 100dvh; overflow: hidden; } .viajes-page.is-playing .viajes-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; } .viajes-page.is-playing .viajes-stage.is-portrait-game { aspect-ratio: auto; height: auto; min-height: 0; } .viajes-page.is-playing .viajes-game-root { min-height: 0; overflow: hidden; } .viajes-page.is-playing .viajes-game-root canvas { height: 100% !important; width: 100% !important; } .viajes-page.is-playing .viajes-back, .viajes-page.is-playing .viajes-heading > p, .viajes-page.is-playing .viajes-footer { display: none; } .viajes-page.is-playing .viajes-heading { display: flex; align-items: center; min-height: 56px; padding-block: .5rem; } .viajes-page.is-playing .viajes-heading h1 { font-size: 1.35rem; } .viajes-page.is-playing .viajes-status { visibility: hidden; } .viajes-modal--start { gap: .45rem; grid-template-columns: 68px minmax(0,1fr); inset: .4rem; padding: .5rem; } .viajes-start__portrait { min-height: 0; height: 8.15rem; } .viajes-start__copy { gap: .28rem; } .viajes-start__copy h2 { font-size: 1.15rem; } .viajes-start__copy > p:not(.viajes-modal__eyebrow) { font-size: .77rem; line-height: 1.25; } .viajes-start__controls { display: none; } .viajes-start__copy .viajes-button { min-height: 44px; padding: .35rem .55rem; } .viajes-world-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } .viajes-hud__objective { font-size: .66rem; max-width: 7.15rem; padding: .32rem .42rem !important; } }
@media (max-width: 480px) { .viajes-pause__stats { grid-template-columns: 1fr; } }
@media (max-width: 370px) { .viajes-stage:not(.is-portrait-game) { aspect-ratio: 16 / 12; } .viajes-modal { inset: .4rem; padding: .8rem; } .viajes-modal--start { grid-template-columns: 60px minmax(0,1fr); max-width: calc(100% - .8rem); overflow-x: hidden; padding: .4rem; width: calc(100% - .8rem); } .viajes-start__portrait { height: 7.4rem; } .viajes-start__copy > p:not(.viajes-modal__eyebrow) { font-size: .7rem; } .viajes-world-picker__tile { min-height: 48px; padding: .34rem; } .viajes-hud__objective { font-size: .62rem; line-height: 1.15; max-width: 6.3rem; padding: .28rem .36rem !important; } .viajes-touch { gap: .25rem; grid-template-columns: auto auto auto; justify-content: space-between; } .viajes-touch > div { gap: .2rem; } .viajes-touch__vertical { grid-column: auto; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
