/* Web-only sequence. The GBA canvas and its save namespace are unchanged. */
:root {
 --ive-bg:#110a1c; --ive-ink:#241433; --ive-text:#f6edff; --ive-muted:#d0bddf;
 --ive-mint:#e3c1ff; --ive-mint-deep:#b791e8; --ive-line:#5b3b7b; --ive-line-strong:#9164b4;
}
html,body {background:#110a1c}
body {overflow-x:clip;background:#110a1c}
main {z-index:1}
main {width:min(100% - 2.5rem,70rem); padding:0 0 3.75rem}
main::before {display:none}
.ive-cinema {
 position:relative; isolation:isolate; display:flex; flex-direction:column; align-items:center;
 justify-content:flex-start; row-gap:clamp(2.5rem,11svh,6rem); overflow:hidden; overflow:clip;
 width:100vw; margin-inline:calc((100% - 100vw)/2); margin-bottom:1.25rem;
 padding:clamp(1.65rem,5.7vh,4rem) max(1.25rem,calc((100vw - 70rem)/2)) 1rem;
 background:transparent;
}
/* Fixed, viewport-sized video behind the entire landing page. */
.ive-film-world {
 position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;
 background:#1b0e2f url("./site-art/ive-camp-poster-wide.webp?v=steady2") center/cover no-repeat;
}
.ive-film-world video {
 display:block;position:absolute;inset:0;width:100%;height:100%;
 object-fit:cover;object-position:center;pointer-events:none;
}
.ive-film-world::after {
 content:"";position:absolute;inset:0;pointer-events:none;
 background:
  linear-gradient(180deg,#10071ba8 0%,#16092632 37%,#120a2433 60%,#10081a9d 100%),
  radial-gradient(ellipse at center,transparent 44%,#170a265e 100%);
}
body:has(#play-shell:not([hidden])) .ive-film-world {display:none}
@media(max-aspect-ratio:4/5) {
 .ive-film-world {background-image:url("./site-art/ive-camp-poster-tall.webp?v=steady2")}
}
.ive-cinema-brand {width:min(82%,31rem);text-align:center}
.ive-cinema-brand h1 {display:grid;place-items:center;gap:clamp(.45rem,1.4vw,.9rem);margin:0;text-shadow:none}
.ive-brand-mark {
 display:block;width:100%;height:auto;image-rendering:pixelated;
 filter:drop-shadow(0 .16rem 0 #170e2e) drop-shadow(0 .35rem .6rem #100618dc);
}
.ive-brand-edition {
 display:block;width:min(82%,20.4rem);padding:.82rem 1.15rem .69rem;background:#1e0e36dc;
 border:2px solid #bd88f1;box-shadow:inset 0 0 0 3px #2e174a,0 3px 0 #130620;
}
.ive-brand-edition img {display:block;width:100%;height:auto;image-rendering:pixelated}
.ive-cinema-footer {
 display:flex;align-items:center;justify-content:space-between;gap:.6rem 1.25rem;width:100%;
 color:#f6e9ff;font:750 .78rem/1.3 var(--ive-mono);letter-spacing:.12em;
 text-shadow:0 1px .35rem #090512,0 2px 0 #150a24;
}
.ive-motion-toggle,.ive-motion-toggle:not(:disabled):hover {
 color:#f5e8fb;background:#1d102deb;border:1px solid #a174c5;
 padding:.48rem .72rem;min-height:2.6rem;box-shadow:none;font-weight:650;letter-spacing:normal;
}
.ive-motion-toggle:not(:disabled):hover {background:#3d235c}
.visually-hidden {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#chooser {width:min(100%,51rem);margin-inline:auto;background:linear-gradient(130deg,#2b1a40f7,#1d122bec 70%);box-shadow:inset 0 3px 0 #4b2b61,0 4px 0 #0d0715,0 23px 44px #0007}
#rom,#seed {background:#150d20;border-color:#885fa6;color:#f5eaff}
#seed::placeholder,#chooser label>small {color:#cfbadf}
#rom::file-selector-button {background:#3d2756;border-color:#8d63ae;color:#f7edff}
#rom:hover::file-selector-button {background:#533472}
#start:disabled,#save:disabled {background:#332345;border-color:#654984;color:#cfbfdf}
.ive-actions .ive-mgba-link,#save:not(:disabled),#last:not(:disabled) {background:#312044;color:#f4e7ff;border-color:#8863a9}
.ive-actions .ive-mgba-link:hover,#save:not(:disabled):hover,#last:not(:disabled):hover {background:#4d3269;color:#fff}
button:not(:disabled):hover {background:#f4dbff;color:#220e33}
:where(a,button,input,canvas,video):focus-visible {outline-color:#f4dbff}
#play-shell {margin-inline:auto}
body:has(#play-shell:not([hidden])) .ive-cinema {display:none}
@media(max-width:720px) {
 main {width:calc(100% - 1.5rem);padding:0 0 2.6rem}
 .ive-cinema {row-gap:clamp(1.5rem,5.5svh,3rem);padding-inline:1rem;padding-top:2rem}
 .ive-cinema-brand {width:min(86%,26rem)}
 .ive-brand-edition {padding:.63rem .82rem .56rem}
}
@media(max-width:420px) {
 .ive-cinema-footer {font-size:.67rem;letter-spacing:.065em}
 .ive-cinema-footer {align-items:flex-end}
 .ive-motion-toggle,.ive-motion-toggle:not(:disabled):hover {font-size:.76rem;padding:.36rem .48rem}
}

.ive-rom-help {display:flex;flex-wrap:wrap;gap:.55rem 1.25rem;align-items:center;justify-content:space-between;margin:.55rem 0 .7rem}
.ive-rom-help .note {margin:0}
.ive-rom-guide {display:inline-flex;align-items:center;min-height:2.45rem;padding:.4rem .65rem;border:1px solid #9d75bd;border-radius:3px;color:#fff0ff;background:#38234d;text-decoration:none;font-weight:700;font-size:.84rem}
.ive-rom-guide:hover {background:#4d3269;color:#fff}

.ive-rom-links {display:flex;flex-wrap:wrap;align-items:center;gap:.45rem}

.ive-film-world .ive-animated-loop {display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;pointer-events:none}
.ive-film-world .ive-animated-loop[hidden] {display:none!important}
.ive-film-world video[data-using-fallback] {visibility:hidden}

/* Pixel menu, independent of the game's canvas and controls. */
.ive-cinema-actions {
 display:flex; flex-wrap:wrap; align-items:stretch; justify-content:center;
 gap:.66rem; width:100%; letter-spacing:.045em;
}
.ive-cinema-actions a {
 --ive-edge:#53445d; --ive-surface:#24202c; --ive-glass:#3b3147; --ive-dot:#a291ad;
 --ive-cut:polygon(0 0, 39% 0, calc(39% + 9px) 9px, 100% 9px, 100% 100%, 0 100%);
 position:relative; isolation:isolate; box-sizing:border-box;
 display:flex; align-items:center; justify-content:flex-start; gap:.7rem;
 min-height:3.65rem; min-width:10.6rem; padding:.68rem 1.06rem .5rem .8rem;
 font:800 .875rem/1.15 var(--ive-mono,monospace); text-transform:uppercase;
 color:#fff7ff; text-shadow:0 2px #130d1d; text-decoration:none;
 border:0; border-radius:0; background:none;
 filter:drop-shadow(0 3px 0 #0c0911) drop-shadow(0 3px 7px #08050ca8);
 transition:transform 140ms ease,filter 160ms ease;
}
.ive-cinema-actions a::before,.ive-cinema-actions a::after {
 content:""; position:absolute; z-index:-1; pointer-events:none; clip-path:var(--ive-cut);
}
.ive-cinema-actions a::before {inset:0;background:var(--ive-edge)}
.ive-cinema-actions a::after {
 inset:3px; background:
  linear-gradient(134deg,transparent 6%,#ffffff13 34%,transparent 51%) -44px 0 / calc(100% + 44px) 100% no-repeat,
  linear-gradient(132deg,var(--ive-glass) 0 45%,var(--ive-surface) 45% 100%);
}
.ive-cinema-actions a > svg {width:1.7rem;height:1.7rem;flex:none;filter:drop-shadow(0 2px #100c18);transition:transform 160ms ease}
.ive-cinema-actions a > span {white-space:nowrap}
.ive-cinema-actions a[data-menu="play"] {
 --ive-edge:#69e9fb; --ive-surface:#066078; --ive-glass:#04758a;
}
.ive-cinema-actions a:focus-visible {
 --ive-edge:#f4df82; --ive-surface:#145663; --ive-glass:#11677b;
 outline:2px solid #fff3b0; outline-offset:3px;
}
.ive-cinema-actions a:active {transform:translateY(2px)}
.ive-cinema-actions a:focus-visible::after {animation:ive-menu-scan 580ms ease-out both}
@media(hover:hover) and (pointer:fine) {
 .ive-cinema-actions a:hover {
  --ive-edge:#69e9fb; --ive-surface:#066078; --ive-glass:#04758a;
  transform:translateY(-3px);
  filter:drop-shadow(0 4px 0 #101321) drop-shadow(0 2px 8px #22d9e17a);
 }
 .ive-cinema-actions a:hover::after {animation:ive-menu-scan 580ms ease-out both}
 .ive-cinema-actions a:hover svg {transform:translateY(-2px)}
 .ive-cinema-actions a:active {transform:translateY(2px)}
}
@keyframes ive-menu-scan {from{background-position:-120% 0,0 0}to{background-position:120% 0,0 0}}
@media(max-width:570px) {
 .ive-cinema-actions {display:grid;grid-template-columns:minmax(0,20rem);gap:.55rem;padding-inline:.25rem}
 .ive-cinema-actions a {min-width:0;min-height:3rem;padding:.53rem .8rem .4rem;gap:.59rem}
 .ive-cinema-actions a > svg {width:1.48rem;height:1.48rem}
}
@media(prefers-reduced-motion:reduce) {
 .ive-cinema-actions a,.ive-cinema-actions a > svg {transition:none}
 .ive-cinema-actions a:is(:hover,:focus-visible)::after {animation:none}
 .ive-cinema-actions a:is(:hover,:active),.ive-cinema-actions a:hover svg {transform:none}
}
