.crate-experience {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: clip;
  background: #040608;
  isolation: isolate;
}

.crate-experience[hidden] {
  display: none;
}

body.crate-open {
  overflow: hidden;
}

.crate-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background:
    radial-gradient(circle at 50% 58%, rgba(65, 83, 95, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(4, 6, 8, 0.5), rgba(4, 6, 8, 0.96));
  cursor: default;
}

.crate-dialog {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 620px;
  overflow: clip;
  outline: 0;
  background:
    radial-gradient(circle at 50% 56%, #1d252b 0, #0b1014 38%, #040608 76%);
}

.crate-dialog::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.64), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.64)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.52), transparent 26%, transparent 70%, rgba(0, 0, 0, 0.64));
  box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.72);
}

.crate-close {
  position: absolute;
  top: max(22px, env(safe-area-inset-top));
  right: max(24px, env(safe-area-inset-right));
  z-index: 50;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(5, 8, 10, 0.62);
  color: #f4f7f9;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  backdrop-filter: blur(12px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.crate-close:hover,
.crate-close:focus-visible {
  border-color: #8dd2ff;
  background: rgba(8, 124, 255, 0.18);
  outline: 0;
  transform: rotate(4deg) scale(1.05);
}

.crate-warehouse,
.crate-warehouse::before,
.crate-warehouse::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.crate-warehouse::before {
  content: "";
  top: auto;
  height: 39%;
  background: linear-gradient(180deg, #12191e, #06090b);
  clip-path: polygon(0 14%, 100% 0, 100% 100%, 0 100%);
}

.crate-warehouse::after {
  content: "";
  top: auto;
  height: 18%;
  opacity: 0.58;
  background:
    repeating-linear-gradient(90deg, #0b0e10 0 11%, #171c20 11% 12%, #080b0d 12% 25%),
    #0b0e10;
  transform: perspective(380px) rotateX(58deg) scaleX(1.4);
  transform-origin: bottom;
}

.warehouse-beam {
  position: absolute;
  top: -80px;
  width: 32px;
  height: 72%;
  background: linear-gradient(90deg, #06080a, #20272b 48%, #080b0d);
  opacity: 0.82;
  transform: rotate(36deg);
  transform-origin: top;
}

.beam-one { left: 14%; }
.beam-two { right: 11%; transform: rotate(-34deg); }

.warehouse-lamp {
  position: absolute;
  top: -26px;
  left: 50%;
  width: 220px;
  height: 170px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0, rgba(190, 225, 236, 0.55), rgba(104, 153, 171, 0.08) 42%, transparent 69%);
  clip-path: polygon(43% 0, 57% 0, 100% 100%, 0 100%);
  filter: blur(2px);
  opacity: 0.8;
}

.warehouse-haze {
  position: absolute;
  width: 38vw;
  height: 18vw;
  border-radius: 50%;
  background: rgba(147, 173, 179, 0.08);
  filter: blur(38px);
  animation: warehouse-haze 9s ease-in-out infinite alternate;
}

.haze-one { left: 6%; bottom: 20%; }
.haze-two { right: 5%; bottom: 30%; animation-delay: -4s; }

.crate-copy {
  position: absolute;
  top: max(34px, env(safe-area-inset-top));
  left: clamp(24px, 5vw, 76px);
  z-index: 30;
  max-width: 540px;
}

.crate-copy p {
  margin: 0 0 10px;
  color: #74c1ff;
  font: 700 10px/1.2 "Courier New", monospace;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.crate-copy h2 {
  margin: 0;
  color: #f4f6f3;
  font: 800 clamp(31px, 4.2vw, 64px)/0.95 "Arial Narrow", Arial, sans-serif;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.crate-copy > span {
  display: block;
  max-width: 460px;
  margin-top: 14px;
  color: #9ca8ae;
  font-size: 13px;
  line-height: 1.55;
}

.crate-world {
  position: absolute;
  left: 50%;
  bottom: clamp(132px, 17vh, 190px);
  z-index: 10;
  width: min(760px, 86vw);
  height: min(520px, 58vh);
  transform: translateX(-50%);
  perspective: 1100px;
}

.crate-webgl {
  position: absolute;
  inset: -12% -18% -8%;
  z-index: 15;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease;
}

.crate-webgl canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  touch-action: none;
  filter: saturate(0.94) contrast(1.04);
}

.crate-loading {
  position: absolute;
  left: 50%;
  bottom: 14%;
  z-index: 2;
  color: #8ca0aa;
  font: 700 9px/1 "Courier New", monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.crate-loading::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 10px;
  display: inline-block;
  border-radius: 50%;
  background: #43a2ff;
  box-shadow: 0 0 12px #087cff;
  animation: webgl-loading-pulse 850ms ease-in-out infinite alternate;
}

.crate-dialog.is-loading-webgl .crate-webgl,
.crate-dialog.has-webgl .crate-webgl {
  opacity: 1;
}

.crate-dialog.has-webgl .crate-loading {
  display: none;
}

.crate-dialog.has-webgl .crate-world {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
}

.crate-dialog.has-webgl .crate-webgl {
  inset: 0;
}

.crate-dialog.has-webgl.is-revealed .crate-webgl {
  pointer-events: auto;
  cursor: grab;
}

.crate-dialog.has-webgl.is-inspecting .crate-webgl {
  cursor: grabbing;
}

.crate-dialog.has-webgl .crate-warehouse {
  opacity: 0;
}

.crate-dialog.has-webgl.chrome-lite .crate-warehouse {
  opacity: 1;
}

.crate-dialog.chrome-lite .crate-webgl canvas {
  filter: none;
}

.crate-dialog.has-webgl .wood-crate,
.crate-dialog.has-webgl .crate-pallet,
.crate-dialog.has-webgl .crate-light,
.crate-dialog.has-webgl .crate-smoke,
.crate-dialog.has-webgl .first-person-arm,
.crate-dialog.has-webgl .impact-ring {
  visibility: hidden;
  opacity: 0;
}

.crate-dialog.webgl-failed .crate-loading {
  display: none;
}

.crate-light {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: 520px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(44, 167, 255, 0.46), rgba(8, 124, 255, 0.14) 42%, transparent 72%);
  filter: blur(16px);
  opacity: 0;
  transform: translateX(-50%) scale(0.4);
}

.crate-pallet {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 74%;
  height: 68px;
  transform: translateX(-50%) perspective(500px) rotateX(55deg);
  transform-origin: bottom;
}

.crate-pallet span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22%;
  border: 1px solid #342315;
  background:
    repeating-linear-gradient(90deg, transparent 0 24px, rgba(32, 17, 8, 0.38) 25px 27px),
    linear-gradient(90deg, #4f301a, #7a5030 48%, #3b2516);
  box-shadow: 0 14px 12px rgba(0, 0, 0, 0.48);
}

.crate-pallet span:nth-child(1) { left: 0; }
.crate-pallet span:nth-child(2) { left: 26%; }
.crate-pallet span:nth-child(3) { right: 26%; }
.crate-pallet span:nth-child(4) { right: 0; }

.wood-crate {
  position: absolute;
  left: 50%;
  bottom: 40px;
  width: min(610px, 80vw);
  height: min(340px, 35vh);
  min-height: 270px;
  transform: translateX(-50%) rotateX(-2deg);
  transform-style: preserve-3d;
  filter: drop-shadow(0 30px 28px rgba(0, 0, 0, 0.7));
}

.crate-body,
.crate-lid {
  position: absolute;
  left: 0;
  width: 100%;
  border: 6px solid #1e1712;
  background: #634226;
  transform-style: preserve-3d;
  backface-visibility: visible;
}

.crate-body {
  bottom: 0;
  height: 75%;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 2px rgba(186, 130, 72, 0.26),
    inset 0 -32px 45px rgba(22, 12, 6, 0.42);
}

.crate-lid {
  top: 0;
  z-index: 6;
  height: 31%;
  overflow: hidden;
  transform-origin: 50% 0;
  box-shadow: inset 0 -15px 24px rgba(25, 13, 7, 0.28), 0 9px 8px rgba(0, 0, 0, 0.34);
}

.wood-board,
.lid-board {
  position: absolute;
  inset-block: 0;
  border-right: 2px solid rgba(40, 23, 13, 0.72);
  border-left: 1px solid rgba(176, 120, 66, 0.26);
  background:
    radial-gradient(ellipse at 70% 24%, transparent 0 8px, rgba(50, 29, 16, 0.5) 9px 11px, transparent 12px),
    repeating-linear-gradient(5deg, transparent 0 9px, rgba(45, 25, 14, 0.18) 10px 11px),
    linear-gradient(90deg, #5b391f, #8b5c35 50%, #58361e);
}

.wood-one { left: 0; width: 25%; }
.wood-two { left: 25%; width: 25%; }
.wood-three { left: 50%; width: 25%; }
.wood-four { right: 0; width: 25%; }
.board-one { left: 0; width: 34%; }
.board-two { left: 34%; width: 33%; }
.board-three { right: 0; width: 33%; }

.steel-band {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 34px;
  border-inline: 1px solid #090b0c;
  background:
    radial-gradient(circle at 50% 18px, #768087 0 2px, #111619 3px 6px, transparent 7px),
    radial-gradient(circle at 50% calc(100% - 18px), #768087 0 2px, #111619 3px 6px, transparent 7px),
    linear-gradient(90deg, #101417, #3b444a 46%, #13181b);
  box-shadow: 3px 0 7px rgba(0, 0, 0, 0.35);
}

.band-left { left: 12%; }
.band-right { right: 12%; }

.crate-corner {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 22px;
  background: linear-gradient(90deg, #0c1012, #343c41 55%, #111517);
}

.corner-left { left: 0; }
.corner-right { right: 0; }

.crate-stencil {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -58%) rotate(-1deg);
  color: rgba(231, 223, 197, 0.8);
  font: 900 clamp(26px, 4.2vw, 48px)/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0.035em;
  text-shadow: 2px 2px 0 rgba(42, 25, 14, 0.55);
  white-space: nowrap;
}

.crate-stencil span { color: #3fb0ff; }

.crate-manifest,
.crate-code,
.crate-label {
  position: absolute;
  z-index: 2;
  font: 700 8px/1.2 "Courier New", monospace;
  letter-spacing: 0.12em;
}

.crate-manifest { right: 24%; bottom: 9px; color: rgba(244, 230, 199, 0.66); }
.crate-code { right: 28px; bottom: 16px; color: rgba(229, 216, 190, 0.55); }
.crate-label {
  left: 28px;
  top: 28px;
  padding: 6px 8px;
  border: 2px solid rgba(33, 23, 15, 0.72);
  color: rgba(42, 27, 17, 0.85);
  transform: rotate(-2deg);
}

.crate-latch {
  position: absolute;
  top: -12px;
  z-index: 8;
  width: 38px;
  height: 54px;
  border: 2px solid #07090a;
  border-radius: 3px;
  background: linear-gradient(90deg, #111618, #505a5f 48%, #161b1e);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.42);
  transform-origin: 50% 0;
}

.latch-left { left: 31%; }
.latch-right { right: 31%; }

.crate-cavity {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 15%;
  z-index: 1;
  height: 42%;
  border: 7px solid #25170e;
  background: radial-gradient(ellipse at center, rgba(68, 190, 255, 0.95), rgba(8, 124, 255, 0.38) 34%, #030709 74%);
  box-shadow: 0 0 80px rgba(24, 157, 255, 0.65);
  opacity: 0;
}

.first-person-arm {
  position: absolute;
  right: -8%;
  bottom: -13%;
  z-index: 12;
  width: 44%;
  height: 58%;
  opacity: 0;
  transform: translate(34%, 38%) rotate(-24deg);
  transform-origin: 86% 90%;
}

.forearm {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 78%;
  height: 42%;
  border-radius: 52% 18% 20% 46%;
  background:
    linear-gradient(110deg, transparent 0 18%, rgba(16, 22, 24, 0.65) 19% 23%, transparent 24% 29%, rgba(18, 24, 26, 0.55) 30% 34%, transparent 35%),
    linear-gradient(155deg, #8f5b3e, #5e3828 54%, #2a1a17);
  box-shadow: inset -18px -16px 30px rgba(20, 10, 7, 0.44);
}

.hand {
  position: absolute;
  left: 10%;
  top: 33%;
  width: 28%;
  height: 24%;
  border-radius: 55% 48% 38% 62%;
  background: linear-gradient(145deg, #a66d4b, #663e2c 58%, #35201a);
  transform: rotate(-7deg);
  box-shadow: inset -8px -8px 14px rgba(27, 14, 10, 0.4);
}

.crowbar {
  position: absolute;
  left: -17%;
  top: -29%;
  width: 20px;
  height: 126%;
  border-radius: 10px 10px 5px 5px;
  background: linear-gradient(90deg, #260a0a, #a43b32 35%, #551714 72%, #140708);
  box-shadow: 5px 8px 12px rgba(0, 0, 0, 0.48), inset 3px 0 rgba(255, 166, 136, 0.22);
  transform: rotate(39deg);
  transform-origin: 50% 78%;
}

.crowbar::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -18px;
  width: 36px;
  height: 18px;
  border-radius: 18px 3px 3px 18px;
  border-top: 8px solid #76231e;
  transform: rotate(-22deg);
}

.crate-smoke {
  position: absolute;
  left: 50%;
  bottom: 28%;
  z-index: 9;
  width: 170px;
  height: 90px;
  border-radius: 50%;
  background: rgba(172, 199, 211, 0.34);
  filter: blur(24px);
  opacity: 0;
}

.smoke-one { transform: translateX(-70%); }
.smoke-two { transform: translateX(-20%); }

.impact-ring {
  position: absolute;
  left: 50%;
  bottom: 27%;
  z-index: 8;
  width: 100px;
  height: 100px;
  border: 2px solid rgba(108, 200, 255, 0.75);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, 50%) scale(0.2);
}

.crate-controls {
  position: absolute;
  left: 50%;
  bottom: max(30px, env(safe-area-inset-bottom));
  z-index: 40;
  width: min(460px, calc(100% - 36px));
  text-align: center;
  transform: translateX(-50%);
}

.crate-status {
  display: block;
  margin-bottom: 10px;
  color: #8f9aa1;
  font: 700 9px/1 "Courier New", monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.crate-action {
  position: relative;
  width: 100%;
  min-height: 70px;
  overflow: hidden;
  border: 1px solid rgba(80, 180, 255, 0.75);
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent, rgba(67, 162, 255, 0.14), transparent),
    rgba(5, 11, 15, 0.82);
  color: #eef8ff;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 0 34px rgba(8, 124, 255, 0.12), inset 0 0 24px rgba(8, 124, 255, 0.06);
  backdrop-filter: blur(12px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.crate-action::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 20%, rgba(130, 211, 255, 0.18) 50%, transparent 80%);
  transform: translateX(-110%);
  animation: button-scan 2.8s ease-in-out infinite;
}

.crate-action:hover,
.crate-action:focus-visible {
  border-color: #b4e1ff;
  background-color: rgba(8, 124, 255, 0.17);
  outline: 0;
  transform: translateY(-2px);
}

.crate-action:disabled {
  cursor: wait;
  opacity: 0.68;
}

.crate-action span,
.crate-action small {
  position: relative;
  z-index: 1;
  display: block;
}

.crate-action span { font-size: 13px; font-weight: 900; letter-spacing: 0.16em; }
.crate-action small { margin-top: 5px; color: #7e929e; font: 700 8px/1 "Courier New", monospace; letter-spacing: 0.17em; }

.shipment-readout,
.shipment-complete {
  position: absolute;
  left: clamp(24px, 5vw, 76px);
  z-index: 35;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
}

.shipment-readout {
  bottom: clamp(132px, 18vh, 188px);
  padding-left: 13px;
  border-left: 2px solid #51b8ff;
  transition: opacity 220ms ease, transform 280ms ease;
}

.shipment-readout.is-active {
  opacity: 1;
  transform: none;
}

.shipment-readout span,
.shipment-complete span {
  display: block;
  color: #9aa6ad;
  font: 700 9px/1.3 "Courier New", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.shipment-readout strong {
  display: block;
  margin-top: 6px;
  color: #f4f7f8;
  font: 800 clamp(18px, 2.2vw, 28px)/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.shipment-complete {
  bottom: clamp(130px, 17vh, 176px);
}

.shipment-complete strong {
  display: block;
  margin-bottom: 7px;
  color: #f4f7f8;
  font: 800 16px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crate-dialog.is-opening .wood-crate {
  animation: crate-hit 1.75s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.crate-dialog.is-opening .first-person-arm {
  animation: arm-pry 1.9s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.crate-dialog.is-opening .crowbar {
  animation: crowbar-pry 1.25s 0.28s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.crate-dialog.is-opening .latch-left { animation: latch-pop 0.45s 0.78s ease-out both; }
.crate-dialog.is-opening .latch-right { animation: latch-pop 0.45s 1.02s ease-out both; }

.crate-dialog.is-opening .crate-lid,
.crate-dialog.is-revealed .crate-lid {
  animation: lid-open 1.05s 1.28s cubic-bezier(0.16, 0.76, 0.18, 1) forwards;
}

.crate-dialog.is-opening .crate-cavity,
.crate-dialog.is-revealed .crate-cavity {
  animation: cavity-glow 0.7s 1.35s ease-out forwards;
}

.crate-dialog.is-opening .crate-light,
.crate-dialog.is-revealed .crate-light {
  animation: light-burst 1.2s 1.4s ease-out forwards;
}

.crate-dialog.is-opening .crate-smoke,
.crate-dialog.is-revealed .crate-smoke {
  animation: smoke-rise 1.8s 1.38s ease-out forwards;
}

.crate-dialog.is-opening .smoke-two { animation-delay: 1.52s; }
.crate-dialog.is-opening .impact-ring { animation: impact-ring 0.8s 1.42s ease-out both; }

.crate-dialog.is-revealed .shipment-readout { opacity: 0; }
.crate-dialog.is-revealed .shipment-complete {
  animation: shipment-complete-in 0.48s ease-out forwards;
}
.crate-dialog.is-revealed .crate-copy { opacity: 0; transition: opacity 400ms ease; }

@keyframes warehouse-haze {
  to { transform: translate(10vw, -3vh) scale(1.15); }
}

@keyframes webgl-loading-pulse {
  to { opacity: 0.3; transform: scale(0.72); }
}

@keyframes button-scan {
  0%, 35% { transform: translateX(-110%); }
  75%, 100% { transform: translateX(110%); }
}

@keyframes crate-hit {
  0%, 16% { transform: translateX(-50%) rotateX(-2deg) translateY(0); }
  26% { transform: translateX(-51%) rotateX(-2deg) translateY(3px) rotateZ(-0.7deg); }
  34% { transform: translateX(-49%) rotateX(-2deg) translateY(-2px) rotateZ(0.6deg); }
  46% { transform: translateX(-50.6%) rotateX(-2deg) rotateZ(-0.3deg); }
  62% { transform: translateX(-49.6%) rotateX(-2deg) rotateZ(0.2deg); }
  100% { transform: translateX(-50%) rotateX(-2deg); }
}

@keyframes arm-pry {
  0% { opacity: 0; transform: translate(34%, 38%) rotate(-24deg); }
  18% { opacity: 1; }
  43% { opacity: 1; transform: translate(3%, 4%) rotate(-4deg); }
  67% { opacity: 1; transform: translate(-1%, 1%) rotate(8deg); }
  100% { opacity: 0; transform: translate(28%, 42%) rotate(22deg); }
}

@keyframes crowbar-pry {
  0%, 40% { transform: rotate(39deg); }
  76%, 100% { transform: rotate(25deg); }
}

@keyframes latch-pop {
  0% { opacity: 1; transform: rotateX(0) translateY(0); }
  55% { opacity: 1; transform: rotateX(72deg) translateY(-8px); }
  100% { opacity: 0; transform: rotateX(92deg) translateY(22px); }
}

@keyframes lid-open {
  0% { transform: translateY(0) rotateX(0); }
  42% { transform: translateY(-26px) rotateX(-12deg); }
  100% { transform: translateY(-70px) rotateX(-94deg); }
}

@keyframes cavity-glow {
  from { opacity: 0; transform: scale(0.72); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes light-burst {
  0% { opacity: 0; transform: translateX(-50%) scale(0.35); }
  38% { opacity: 1; }
  100% { opacity: 0.66; transform: translateX(-50%) scale(1.5); }
}

@keyframes smoke-rise {
  0% { opacity: 0; transform: translate(-60%, 40px) scale(0.55); }
  38% { opacity: 0.52; }
  100% { opacity: 0; transform: translate(-80%, -170px) scale(2.4); }
}

@keyframes impact-ring {
  0% { opacity: 0.8; transform: translate(-50%, 50%) scale(0.2); }
  100% { opacity: 0; transform: translate(-50%, 50%) scale(7); }
}

@keyframes shipment-complete-in {
  to { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .crate-dialog { min-height: 560px; }

  .crate-close {
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    width: 42px;
    height: 42px;
  }

  .crate-copy {
    top: max(18px, env(safe-area-inset-top));
    left: 18px;
    right: 70px;
  }

  .crate-copy h2 { font-size: clamp(27px, 9vw, 40px); }
  .crate-copy > span { margin-top: 8px; font-size: 11px; }

  .crate-world {
    bottom: 155px;
    width: 100vw;
    height: 50vh;
  }

  .crate-webgl {
    inset: -6% -8% -7%;
  }

  .wood-crate {
    width: min(90vw, 520px);
    height: min(300px, 31vh);
    min-height: 220px;
  }

  .crate-stencil { font-size: clamp(25px, 10vw, 40px); }
  .crate-label { left: 20px; top: 22px; font-size: 6px; }
  .crate-code { right: 20px; font-size: 6px; }
  .first-person-arm { width: 62%; right: -20%; }

  .shipment-readout,
  .shipment-complete {
    left: 18px;
    right: 18px;
    bottom: 112px;
  }

  .shipment-complete span {
    font-size: 7px;
    letter-spacing: 0.1em;
  }

  .crate-controls {
    bottom: max(18px, env(safe-area-inset-bottom));
  }
}

@media (max-height: 670px) and (orientation: landscape) {
  .crate-copy { top: 20px; }
  .crate-copy h2 { font-size: 30px; }
  .crate-copy > span { display: none; }
  .crate-world { bottom: 86px; height: 68vh; transform: translateX(-50%) scale(0.78); transform-origin: bottom; }
  .crate-controls { left: auto; right: 24px; bottom: 20px; width: 310px; transform: none; }
  .shipment-readout,
  .shipment-complete { left: 24px; bottom: 24px; max-width: 430px; }
}

@media (prefers-reduced-motion: reduce) {
  .crate-experience *,
  .crate-experience *::before,
  .crate-experience *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}
