/* Game page shell/header. Keep this self-contained so the game does not depend on
   resource-detail-only stylesheets for LearnHub branding/layout. */
.interactive-game-page .interactive-game-shell{width:min(1180px,100%);margin-inline:auto;padding:18px 20px 48px;}
.interactive-game-page .game-topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:66px;margin-bottom:18px;padding:10px 12px 10px 14px;border:1px solid #dce7f0;border-radius:18px;background:rgba(255,255,255,.96);box-shadow:0 6px 22px rgba(25,56,91,.05);}
.interactive-game-page .game-topbar .brand{display:inline-flex;align-items:center;gap:10px;min-width:0;color:#123f70;font-size:.98rem;font-weight:850;text-decoration:none;}
.interactive-game-page .game-topbar .brand::before{display:none!important;}
.interactive-game-page .game-topbar .brand-logo-mini{display:block!important;width:40px!important;height:40px!important;max-width:40px!important;max-height:40px!important;min-width:40px!important;min-height:40px!important;flex:0 0 40px!important;border-radius:12px;object-fit:cover;box-shadow:0 3px 10px rgba(16,43,76,.13);}
.interactive-game-page .game-topbar .nav-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;}
.interactive-game-page .game-topbar .link-button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 12px;border:1px solid #cfdeed;border-radius:11px;background:#f8fbff;color:#0b5da8;font-size:.82rem;font-weight:800;text-decoration:none;}
.interactive-game-page .game-topbar .link-button:hover,.interactive-game-page .game-topbar .link-button:focus-visible{border-color:#9fc8e5;background:#eef8ff;}
@media(max-width:600px){.interactive-game-page .interactive-game-shell{padding:12px 12px 42px}.interactive-game-page .game-topbar{align-items:stretch;flex-direction:column;padding:10px 12px}.interactive-game-page .game-topbar .nav-actions{justify-content:flex-start}.interactive-game-page .game-topbar .link-button{width:100%}}

.interactive-game-page{background:#f4f8f2;color:#183126;min-height:100%;}

.game-topbar{margin-bottom:18px;}
.story-game{--game-green:#176b3a;--game-green-dark:#0f4e2a;--game-lime:#e8f7d8;--game-gold:#f2b84b;--game-ink:#183126;--game-muted:#63736a;--game-card:#fff;--game-line:#dbe7dd;}
.game-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:18px 4px 16px;}
.game-heading-copy{min-width:0}.game-kicker{display:inline-flex;align-items:center;gap:6px;color:var(--game-green);font-weight:800;font-size:.76rem;letter-spacing:.09em;text-transform:uppercase}.game-heading h1{margin:4px 0 0;font-size:clamp(2rem,5vw,3.45rem);line-height:.95;color:#23452e}.game-heading p{margin:8px 0 0;color:var(--game-muted);font-weight:700}
.game-progress-summary{width:min(330px,42vw);display:grid;grid-template-columns:auto auto;gap:7px 12px;align-items:center;color:var(--game-muted);font-size:.82rem}.game-progress-summary strong{justify-self:end;color:var(--game-green-dark);font-size:.9rem}.game-progress-track{grid-column:1/-1;height:9px;border-radius:99px;background:#dfe9df;overflow:hidden}.game-progress-track span{display:block;width:0;height:100%;background:linear-gradient(90deg,#5da56e,#f2b84b);border-radius:inherit;transition:width .35s ease}
.game-stage{position:relative;background:var(--game-card);border:1px solid var(--game-line);border-radius:26px;overflow:hidden;box-shadow:0 16px 40px rgba(43,75,49,.08);min-height:560px;}
.game-start-card{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(300px,.9fr);min-height:560px}.game-cover-wrap{background:#dcebd8;overflow:hidden;display:flex;align-items:center;justify-content:center}.game-cover-wrap img{width:100%;height:100%;object-fit:cover;display:block}.game-start-copy{padding:clamp(28px,5vw,56px);display:flex;flex-direction:column;justify-content:center}.game-badge{align-self:flex-start;background:var(--game-lime);color:var(--game-green-dark);padding:7px 11px;border-radius:999px;font-size:.78rem;font-weight:800}.game-start-copy h2{font-size:clamp(1.7rem,3vw,2.55rem);line-height:1.06;margin:18px 0 12px;color:#1b442b}.game-start-copy p{margin:0;color:var(--game-muted);font-size:1.02rem;line-height:1.65}.game-start-meta{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}.game-start-meta span{padding:8px 10px;border:1px solid var(--game-line);border-radius:10px;font-size:.82rem;font-weight:700}.game-start-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:6px}.game-start-copy small{margin-top:18px;color:var(--game-muted)}
.game-primary-button,.game-secondary-button,.game-choice,.game-next-button,.game-submit-button,.game-undo-button{min-height:46px;border:0;border-radius:13px;font:inherit;font-weight:800;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,background .15s ease}.game-primary-button,.game-next-button,.game-submit-button{background:var(--game-green);color:#fff;padding:11px 18px;box-shadow:0 7px 16px rgba(23,107,58,.17)}.game-primary-button:hover,.game-next-button:hover,.game-submit-button:hover{background:var(--game-green-dark);transform:translateY(-1px)}.game-secondary-button,.game-undo-button{background:#eef3ee;color:#23452e;padding:11px 16px}.game-secondary-button:hover,.game-undo-button:hover{background:#e2ebe2}.game-primary-button:disabled,.game-secondary-button:disabled{opacity:.55;cursor:wait;transform:none}
.game-screen{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(310px,.65fr);min-height:560px}.game-visual{position:relative;background:#e4efe1;display:flex;align-items:center;justify-content:center;overflow:hidden;min-height:430px}.game-visual img{display:block;width:100%;height:100%;object-fit:contain;background:#edf5e8}.game-panel{padding:clamp(24px,4vw,42px);display:flex;flex-direction:column;justify-content:center;min-width:0}.game-level-chip{display:inline-flex;align-self:flex-start;padding:6px 10px;border-radius:999px;background:#eef4ee;color:var(--game-green);font-size:.75rem;font-weight:900;letter-spacing:.04em}.game-panel h2{font-size:clamp(1.55rem,3vw,2.2rem);line-height:1.08;margin:13px 0 8px;color:#1b442b}.game-prompt{color:var(--game-muted);line-height:1.55;margin:0 0 18px}.game-choices{display:grid;gap:10px}.game-choice{display:flex;align-items:center;gap:11px;width:100%;text-align:left;padding:12px 14px;background:#f5f8f5;color:var(--game-ink);border:1px solid var(--game-line);box-shadow:none}.game-choice:hover{border-color:#a6c6ac;background:#f0f7f1}.game-choice.is-selected{border-color:var(--game-green);background:#eaf6ec;box-shadow:0 0 0 2px rgba(23,107,58,.08)}.game-choice:disabled{cursor:default}.game-choice-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#fff;border:1px solid #dfe8df;font-size:1.35rem;flex:0 0 auto}.game-choice-copy{display:block;min-width:0}.game-choice-copy strong{display:block}.game-choice-copy small{display:block;color:var(--game-muted);font-weight:600;margin-top:2px}.game-feedback{min-height:52px;margin-top:14px;padding:11px 13px;border-radius:12px;background:#f5f8f5;color:var(--game-muted);line-height:1.45;font-size:.9rem}.game-feedback.is-correct{background:#e8f7e9;color:#1d6031}.game-feedback.is-wrong{background:#fff1ed;color:#8a3a25}.game-next-wrap{margin-top:12px}.game-next-button{width:100%}
.hotspot-visual{cursor:default}.hotspot-image-wrap{position:relative;width:100%;aspect-ratio:1100/778;cursor:crosshair;outline-offset:-4px}.hotspot-image-wrap img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.hotspot-image-wrap.is-found{cursor:default}.game-hotspot-hint{position:absolute;border:3px dashed rgba(242,184,75,.95);border-radius:50%;width:18%;aspect-ratio:1.45;left:49%;top:62%;display:none;pointer-events:none;animation:hotspotPulse 1.2s ease-in-out infinite}.hotspot-image-wrap.show-hint .game-hotspot-hint{display:block}.hotspot-accessible{margin-top:10px}.hotspot-accessible button{width:100%}
.helper-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.helper-card{position:relative;border:2px solid transparent;border-radius:13px;overflow:hidden;background:#eef3ee;cursor:pointer;padding:0;text-align:left}.helper-card img{display:block;width:100%;aspect-ratio:1.42;object-fit:cover}.helper-card span{display:block;padding:8px 9px;font-size:.78rem;font-weight:800;color:#284936}.helper-card.is-selected{border-color:var(--game-green);box-shadow:0 0 0 2px rgba(23,107,58,.1)}.helper-card.is-selected::after{content:'✓';position:absolute;right:8px;top:8px;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--game-green);color:#fff;font-weight:900}.game-submit-row{display:flex;gap:10px;margin-top:12px}.game-submit-button{flex:1}.game-undo-button{flex:0 0 auto}
.sequence-screen{display:block;padding:clamp(20px,4vw,38px);min-height:560px}.sequence-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}.sequence-head h2{margin:5px 0 4px;color:#1b442b;font-size:clamp(1.45rem,3vw,2rem)}.sequence-head p{margin:0;color:var(--game-muted)}.sequence-counter{white-space:nowrap;background:#eef4ee;border-radius:999px;padding:7px 11px;font-weight:800;color:var(--game-green)}.sequence-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.sequence-card{position:relative;border:2px solid transparent;border-radius:15px;overflow:hidden;background:#e7efe4;padding:0;cursor:pointer;min-width:0}.sequence-card img{display:block;width:100%;aspect-ratio:1.42;object-fit:cover}.sequence-card .sequence-order{position:absolute;left:8px;top:8px;width:31px;height:31px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.94);color:#24472e;font-weight:900;box-shadow:0 2px 9px rgba(0,0,0,.13)}.sequence-card.is-picked{border-color:var(--game-green);opacity:.72}.sequence-card.is-picked .sequence-order{background:var(--game-green);color:#fff}.sequence-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px;align-items:center}.sequence-actions .game-feedback{flex:1;min-width:220px;margin:0}
.game-result{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);min-height:560px}.game-result-art{position:relative;overflow:hidden;background:#142d5b}.game-result-art img{width:100%;height:100%;object-fit:cover;display:block}.game-result-art::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,rgba(16,35,30,.45))}.game-result-copy{padding:clamp(28px,5vw,52px);display:flex;flex-direction:column;justify-content:center}.game-result-copy .result-stars{font-size:2rem;letter-spacing:.15em}.game-result-copy h2{margin:10px 0 5px;color:#1b442b;font-size:clamp(1.8rem,4vw,2.6rem)}.game-result-copy p{margin:0;color:var(--game-muted);line-height:1.55}.result-score{display:flex;align-items:flex-end;gap:8px;margin:18px 0}.result-score strong{font-size:3rem;line-height:1;color:var(--game-green)}.result-score span{color:var(--game-muted);font-weight:800}.result-badge{display:flex;gap:12px;align-items:center;border:1px solid #d9e8d9;background:#f2f8ef;padding:12px 14px;border-radius:14px;margin-bottom:16px}.result-badge b{font-size:1.7rem}.result-badge strong{display:block;color:#245331}.result-badge small{display:block;color:var(--game-muted);margin-top:2px}.result-actions{display:flex;flex-wrap:wrap;gap:9px}
.game-footer-tools{display:flex;justify-content:flex-end;gap:8px;padding:10px 4px 0}.game-text-button{border:0;background:transparent;color:#5e7165;padding:8px 10px;border-radius:9px;font:inherit;font-size:.82rem;font-weight:700;cursor:pointer}.game-text-button:hover{background:#e9f0e7;color:#234b30}
.game-confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:4}.game-confetti i{position:absolute;top:-18px;width:9px;height:16px;border-radius:2px;background:var(--c,#f2b84b);animation:confettiFall 2.6s linear forwards;transform:rotate(var(--r,0deg))}
@keyframes confettiFall{to{transform:translateY(620px) rotate(calc(var(--r,0deg) + 540deg));opacity:.3}}@keyframes hotspotPulse{50%{transform:scale(1.1);opacity:.65}}
@media (max-width:820px){.game-heading{align-items:flex-start;flex-direction:column}.game-progress-summary{width:100%;grid-template-columns:auto auto}.game-start-card,.game-screen,.game-result{grid-template-columns:1fr}.game-cover-wrap{max-height:430px}.game-start-copy{padding:26px}.game-visual{min-height:0;aspect-ratio:1.414}.game-panel{padding:24px}.sequence-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.game-stage{min-height:0}.game-start-card,.game-screen,.game-result{min-height:0}.game-result-art{max-height:430px}.sequence-screen{min-height:0}}
@media (max-width:520px){.interactive-game-shell{padding-left:12px;padding-right:12px}.game-heading{padding-left:2px;padding-right:2px}.game-heading h1{font-size:2.15rem}.game-stage{border-radius:18px}.game-start-copy,.game-panel,.game-result-copy{padding:20px}.game-start-copy h2{font-size:1.62rem}.game-start-meta{display:grid}.game-start-actions,.result-actions{display:grid}.game-start-actions>* ,.result-actions>*{width:100%}.game-choice{padding:10px}.helper-grid{grid-template-columns:1fr 1fr}.helper-card span{font-size:.72rem}.sequence-screen{padding:16px}.sequence-head{display:block}.sequence-counter{display:inline-flex;margin-top:9px}.sequence-grid{gap:8px}.sequence-card .sequence-order{width:27px;height:27px;font-size:.78rem}.game-footer-tools{justify-content:space-between}.game-text-button{font-size:.75rem;padding:8px 5px}}
@media (prefers-reduced-motion:reduce){.game-progress-track span,.game-primary-button,.game-next-button,.game-submit-button{transition:none}.game-hotspot-hint,.game-confetti i{animation:none}}

/* May Anino uses portrait artwork. Preserve each illustration instead of cropping it
   into the landscape layout used by the Sorpresa prototype. */
.story-game[data-game-key="may-anino"] .game-cover-wrap{background:#172433;}
.story-game[data-game-key="may-anino"] .game-cover-wrap img{object-fit:contain;background:#172433;}
.story-game[data-game-key="may-anino"] .game-visual{background:#172433;}
.story-game[data-game-key="may-anino"] .game-visual>img{background:#172433;}
.story-game[data-game-key="may-anino"] .hotspot-image-wrap.portrait-hotspot{width:min(100%,396px);aspect-ratio:848/1200;background:#172433;}
.story-game[data-game-key="may-anino"] .hotspot-image-wrap.portrait-hotspot img{object-fit:contain;background:#172433;}
.story-game[data-game-key="may-anino"] .anino-hotspot-hint{width:30%;aspect-ratio:.75;left:35%;top:23%;border-radius:18px;}
.story-game[data-game-key="may-anino"] .sequence-card{background:#172433;}
.story-game[data-game-key="may-anino"] .sequence-card img{aspect-ratio:1/1;object-fit:contain;background:#172433;}
.story-game[data-game-key="may-anino"] .game-result-art{background:#172433;}
.story-game[data-game-key="may-anino"] .game-result-art img{object-fit:contain;background:#172433;}
@media(max-width:820px){.story-game[data-game-key="may-anino"] .game-visual{aspect-ratio:auto;padding:12px}.story-game[data-game-key="may-anino"] .game-visual>img{max-height:620px;width:auto;max-width:100%;}.story-game[data-game-key="may-anino"] .hotspot-image-wrap.portrait-hotspot{width:min(100%,360px)}}


/* Karitela also uses portrait storybook artwork, but with an earthy, festival-inspired palette. */
.story-game[data-game-key="karitela"]{--game-green:#8a5a1d;--game-green-dark:#68420f;--game-lime:#f6eddc;--game-gold:#e2a648;--game-ink:#432b14;--game-muted:#7a6858;--game-card:#fffdf9;--game-line:#eadfcf;}
.story-game[data-game-key="karitela"] .game-cover-wrap{background:#efe6d5;}
.story-game[data-game-key="karitela"] .game-cover-wrap img{object-fit:contain;background:#efe6d5;}
.story-game[data-game-key="karitela"] .game-visual{background:#efe6d5;}
.story-game[data-game-key="karitela"] .game-visual>img{background:#efe6d5;}
.story-game[data-game-key="karitela"] .hotspot-image-wrap.portrait-hotspot{width:min(100%,430px);aspect-ratio:1024/1454;background:#efe6d5;}
.story-game[data-game-key="karitela"] .hotspot-image-wrap.portrait-hotspot img{object-fit:contain;background:#efe6d5;}
.story-game[data-game-key="karitela"] .karitela-hotspot-hint{width:24%;aspect-ratio:1;left:18%;top:68%;border-radius:50%;}
.story-game[data-game-key="karitela"] .sequence-card{background:#efe6d5;}
.story-game[data-game-key="karitela"] .sequence-card img{aspect-ratio:1/1;object-fit:contain;background:#efe6d5;}
.story-game[data-game-key="karitela"] .game-result-art{background:#efe6d5;}
.story-game[data-game-key="karitela"] .game-result-art img{object-fit:contain;background:#efe6d5;}
@media(max-width:820px){.story-game[data-game-key="karitela"] .game-visual{aspect-ratio:auto;padding:12px}.story-game[data-game-key="karitela"] .game-visual>img{max-height:620px;width:auto;max-width:100%;}.story-game[data-game-key="karitela"] .hotspot-image-wrap.portrait-hotspot{width:min(100%,360px)}}
