@charset "UTF-8";
:root {
  color-scheme: dark;
  --cream: #f3e3c9;
  --gold: #fff0cc;
  --kraft: #a47b51;
  /* Surface of a Cardboard, Jonathan West / Pexels License.
     https://www.pexels.com/photo/surface-of-a-cardboard-14129745/ */
  --kraft-photo: url("/box-kitty/assets/pexels-14129745-8825af8df33d44b9a22b84e389ff3a8bfde6e18b134aa4a04717d6e157a7e762.jpg");
}
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { color: var(--cream); background: var(--kraft); font-family: system-ui, sans-serif; }
svg { display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.page { position: relative; width: 100%; min-height: 100dvh; overflow: clip; }
.play {
  --window-width: clamp(148px, min(69vw, 65dvh), 460px);
  --rim-depth: calc(.058 * var(--window-width));
  position: relative; width: 100%; height: 100dvh; touch-action: none; user-select: none;
}
.box-plane { position: absolute; inset: 0; transform: translate(var(--shake-x, 0px), var(--shake-y, 0px)); pointer-events: none; }
.carton-shell { position: absolute; z-index: 1; inset: 0; }
.carton-surface {
  position: absolute; inset: -12px; pointer-events: auto;
  background: radial-gradient(ellipse at 49% 24%, #ffdeb516, #3c251015 52%, #26160647 100%),
    var(--kraft-photo) 64% center / cover no-repeat, var(--kraft);
}
.carton {
  pointer-events: auto; position: absolute; z-index: 1; top: max(13.6dvh, env(safe-area-inset-top) + 12px);
  left: 53%; width: var(--window-width); aspect-ratio: 2.73;
  min-height: 44px; translate: -50% 0; appearance: none; border: 0; padding: 0; border-radius: 999px;
  background: transparent; touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.carton:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.rim {
  position: absolute; inset: 0; display: block; border-radius: inherit; padding: var(--rim-depth);
  background: repeating-linear-gradient(96deg, #59402116 0 .65px, #fff2d226 .65px 1.45px, transparent 1.45px 3.2px),
    linear-gradient(178deg, #eee3cbF5 1%, #d4c09aE8 45%, #e6d3adF4 71%, #b89c75e8 100%),
    var(--kraft-photo) 44% 42% / 1000px auto;
  box-shadow: inset 0 1px 1.5px 1px #fff7de97, inset 0 -2px 2.5px #653e21a8,
    0 1px 0 #4e331e9e, 0 4px 8px -2px #43281376;
}
.aperture { position: relative; display: block; width: 100%; height: 100%; border-radius: inherit; isolation: isolate; overflow: hidden; background: #180f0e; }
.aperture::after {
  content: ''; position: absolute; z-index: 2; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 calc(var(--rim-depth) * .21) calc(var(--rim-depth) * .40) calc(var(--rim-depth) * .09) #140b09e0,
    inset 0 calc(var(--rim-depth) * -.09) calc(var(--rim-depth) * .24) calc(var(--rim-depth) * .07) #190c08b0;
}
.cat { position: absolute; inset: 0; }
.cat-fallback, .cat-photo { display: block; position: absolute; top: -3%; left: -10%; width: 113%; height: 106%; }
.cat-photo { filter: saturate(.73) brightness(.96); }
.package-mark {
  position: absolute; right: max(4vw, env(safe-area-inset-right)); bottom: max(4dvh, env(safe-area-inset-bottom));
  width: clamp(27px, 8vw, 44px); aspect-ratio: 1.85; display: grid; place-items: center;
  border: 1px solid currentColor; border-radius: 50%; color: #492e1b88; transform: rotate(-5deg); pointer-events: none;
}
.package-mark svg { width: 63%; }
.paw { position: absolute; z-index: 3; width: 0; height: 0; left: 0; top: 0; visibility: hidden; pointer-events: none; }
.paw-shadow-field { position: absolute; inset: 0; z-index: 2; visibility: hidden; pointer-events: none; }
.play[data-paw-pose="reach"] :is(.paw, .paw-shadow-field, .cat-reach-recess) { visibility: visible; }
.paw-shadow, .paw-track { position: absolute; top: 0; left: 0; display: block; pointer-events: none; }
.impact { z-index: 4; position: absolute; top: 0; left: 0; width: clamp(32px, calc(var(--window-width) * .15), 78px); opacity: 0; pointer-events: none; overflow: visible; }
.paper-spray { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; overflow: hidden; }
.feather {
  position: fixed; top: 0; left: 0; z-index: 12; width: var(--feather-buffer, 160px); height: var(--feather-buffer, 160px); pointer-events: none; visibility: hidden;
  transform: translate3d(var(--fx, 0px), var(--fy, 0px), 0) rotate(var(--tilt, 0deg)) scale(var(--feather-scale, 1));
  transform-origin: var(--hot-x, 50%) var(--hot-y, 50%);
  opacity: .98;
}
.feather canvas { display: block; width: 100%; height: 100%; }
.feather.is-flying { visibility: visible; }
.page.with-feather, .page.with-feather .carton { cursor: none; }
.model-note {
  position: fixed; margin: 0 auto; z-index: 5; inset: auto 16px max(22px, env(safe-area-inset-bottom));
  width: fit-content; max-width: calc(100% - 32px); padding: 6px 10px; border-radius: 4px;
  text-align: center; font-size: 13px; color: var(--cream); background: #382819e6; pointer-events: none;
}

/* Reference layout: opening spans 43.4% of the 2560 × 1600 frame. */
html,body{height:100%;overflow:hidden}
.play{--window-width:min(43.4vw,69.4dvh)}
.carton{left:50%;top:20dvh}
.package-mark{display:none}
.frame-top,.frame-bottom{position:fixed;left:2.2%;right:2.2%;z-index:20;display:grid;grid-template-columns:1fr 1fr 1fr;pointer-events:none;color:#fffdf5;font:700 clamp(12px,.98vw,25px)/1.6 "Courier New",SimSun,monospace}
.frame-top{top:max(12px,env(safe-area-inset-top))}
.frame-bottom{bottom:max(12px,env(safe-area-inset-bottom))}
.frame-top>:nth-child(2),.frame-bottom>:nth-child(2){justify-self:center}
.frame-top>:last-child,.frame-bottom>:last-child{justify-self:end}
.frame-top a,.frame-bottom a{pointer-events:auto;color:inherit;text-decoration:none}
.frame-top a:hover,.frame-bottom a:hover{text-decoration:underline}
.frame-bottom nav{display:flex;flex-direction:column}
@media(max-width:650px){.play{--window-width:min(86vw,100dvh)}.carton{top:23dvh}.frame-top,.frame-bottom{font-size:12px;left:4%;right:4%}.frame-top{grid-template-columns:1fr auto 1fr}}
