.page-footer { position: relative; min-height: 74px; }
.page-footer > .wrap { display: flex; justify-content: flex-end; }
.frost-controls { position: absolute; inset: auto auto 0 0; z-index: 8; display: flex; align-items: end; }
.frost-controls[hidden], .frost-controls [hidden], .return-label, .ice-world { display: none; }
#frost-corner { width: 62px; height: 62px; position: relative; overflow: hidden; background: transparent; border: 0; padding: 0; cursor: pointer; }
#frost-corner::before, .corner-fold { position: absolute; content: ""; inset: 0; clip-path: polygon(0 3%, 14% 19%, 19% 19%, 33% 40%, 39% 39%, 53% 55%, 61% 57%, 73% 75%, 80% 76%, 100% 100%, 0 100%); }
#frost-corner::before { background: linear-gradient(140deg,#09232d,#316775 60%,#c5e4e9); }
.frost-egg { position: absolute; left: 5px; bottom: 2px; width: 26px; height: 35px; transform: rotate(-19deg); border-radius: 55% 55% 48% 48% / 68% 68% 38% 38%; background: radial-gradient(ellipse at 31% 28%,#fff9,transparent 35%),url('assets/ice-grain.webp') center/85px,#85ccd6; box-shadow: inset -4px -3px 6px #255264, inset 2px 1px 4px white; }
.corner-fold { transform-origin: bottom left; transform: scale(.58); background: linear-gradient(135deg,#9ba4a1,#f7f7f3 48%,#cbd1cd 72%,#838d89); }
#frost-corner:is(:hover,:focus-visible) .corner-fold { transform: scale(.32); }
#frost-corner:focus-visible { outline: 2px solid #236989; outline-offset: -2px; }
.ice-edition { --ink:#f2f9fc; --muted:#d5e5ed; --accent:#b1efff; --paper:#0c2634; color-scheme:dark; }
.ice-edition body { isolation:isolate; padding-bottom:4rem; }
.ice-edition .ice-world { display:block; position:fixed; inset:0; z-index:-1; pointer-events:none; background: #153548 url('assets/glacier-interior.webp') center/cover; }
.ice-world::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(5,21,34,.76),rgba(3,17,31,.12)); }
.ice-world canvas { display:none; width:100%; height:100%; }
.flight-ready .ice-world.webgl-active canvas { display:block; }
.ice-edition header, .ice-edition footer { background:#0a2231ed; padding-inline:1rem; }
.ice-edition .intro { background:transparent; min-height:75svh; display:grid; align-content:center; }
.ice-edition .intro .wrap { background:#0a2333dc; padding:clamp(1rem,4vw,3rem); }
.ice-edition .intro h1 { color:#f1fbff; }
.ice-edition main > section:not(.intro) { margin-block:clamp(4rem,16vh,12rem); background:#0b2433f0; }
.ice-edition .spread { padding-inline:clamp(1rem,4vw,3rem); }
.ice-edition .project { color:var(--ink); }
.ice-edition .project dt,.ice-edition .project dd { color:var(--muted); }
.ice-edition .frost-controls { position:fixed; gap:.5rem; padding:.5rem; }
.ice-edition #frost-corner,.ice-edition #ice-motion { width:auto; height:auto; min-height:44px; padding:.55rem .9rem; border:1px solid #91b3bf; border-radius:4px; background:#102b3a; color:white; font:inherit; cursor:pointer; }
.ice-edition :is(.frost-egg,.corner-fold),.ice-edition #frost-corner::before { display:none; }
.ice-edition .return-label { display:inline; }
@media(prefers-reduced-motion:no-preference) {
  .corner-fold { transition:transform .25s ease; }
  .ice-edition .ice-world { animation: ice-reveal .65s ease-out both; }
  @keyframes ice-reveal { from {opacity:0} to {opacity:1} }
}

.egg-doodle {
  position: absolute;
  left: 24px;
  bottom: 8px;
  width: 80px;
  pointer-events: none;
  color: #546a67;
  opacity: .68;
}
.ice-edition .egg-doodle { display: none; }
@media (max-width: 680px) {
  .page-footer { min-height: 86px; }
  .egg-doodle { z-index: 1; left: 29px; bottom: 12px; width: 72px; opacity: .8; }
}
@media (hover: none) and (pointer: coarse) {
  .corner-fold { transform: scale(.4); }
}

.egg-reveal { position:fixed; inset:0; z-index:10; overflow:hidden; pointer-events:none; }
.egg-reveal-shell {
  position:absolute; left:-13px; top:-17.5px; width:26px; height:35px;
  border-radius:55% 55% 48% 48% / 68% 68% 38% 38%;
  overflow:hidden;
}
.egg-reveal-surface {
  position:absolute; inset:0; border-radius:inherit;
  background:radial-gradient(ellipse at 31% 28%,#fff9,transparent 35%),url('assets/ice-grain.webp') center/cover,#85ccd6;
  box-shadow:inset -4px -3px 6px #255264,inset 2px 1px 4px white;
}
.egg-reveal { --burst-radius: -24px; }
@property --burst-radius { syntax: "<length>"; inherits: false; initial-value: -24px; }
