.poster-stage { container: garage-poster / inline-size; }

.garage-sticker {
  position: absolute;
  z-index: 3;
  cursor: pointer;
  bottom: 6%;
  right: 4.2%;
  display: grid;
  justify-items: start;
  min-height: 44px;
  padding: 5px 12px;
  border: 1px solid #b99c68;
  border-radius: 1px 3px 2px 2px;
  color: #221a15;
  background: repeating-linear-gradient(172deg, #6f26110a 0 1px, transparent 1px 4px), #f4d797;
  box-shadow: 2px 4px 0 #170e12bb;
  transform: rotate(-7deg);
  transition: transform 160ms ease, background-color 160ms ease;
  font-family: "Courier New", monospace;
  line-height: 1;
}
.garage-sticker:hover,
.garage-sticker[aria-expanded="true"] { transform: rotate(-4deg) translateY(-2px); background-color: #ffebac; }
.garage-sticker strong { font: 900 clamp(14px, 3.2cqi, 24px)/1 Impact, "Arial Narrow", sans-serif; letter-spacing: .045em; }
.garage-sticker span { font-size: 11px; font-weight: 700; margin-top: 4px; letter-spacing: .09em; }
.garage-sticker b { color: #a92443; }
.garage-case-wrap {
  --garage-paper: #f0e2bf;
  --garage-case-gap: 14px;
  font: 1rem/normal "Courier New", monospace;
  width: min(100%, 590px);
  margin: var(--garage-case-gap) auto 0;
  animation: garage-unfold 320ms ease-out both;
}
.garage-case {
  display: grid;
  grid-template-columns: minmax(0, .65fr) minmax(0, 1fr);
  perspective: 950px;
  border-radius: 9px;
  background: #141215;
  box-shadow: 0 6px 16px #140c1050;
}
.garage-lid,
.garage-deck {
  display: grid;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid #534648;
  background: repeating-linear-gradient(158deg, #ffffff06 0 1px, transparent 1px 6px), #242125;
}
.garage-lid {
  position: relative;
  padding: clamp(9px, 2.2cqi, 16px);
  border-right: 5px double #504448;
  transform-origin: right center;
  animation: garage-hinge 380ms cubic-bezier(.2,.75,.2,1) both;
}
.garage-inlay {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(5px, 1.5cqi, 10px);
  padding: clamp(5px, 2.4cqi, 16px);
  border: 1px solid #b4a283;
  color: #2f2424;
  background: radial-gradient(ellipse at 75% 60%, #b2584314, transparent 67%), repeating-linear-gradient(99deg, #42251712 0 1px, transparent 1px 19px), var(--garage-paper);
  box-shadow: inset 0 0 15px #805a4250;
  font-size: clamp(11px, 1.9cqi, 13px);
  font-weight: 700;
  line-height: 1.12;
}
.garage-inlay strong { color: #a82a49; font: 900 clamp(20px, 7.3cqi, 54px)/.88 Impact, "Arial Narrow", sans-serif; letter-spacing: .01em; }
.garage-inlay b { border: 1px solid; padding: 2px 4px; margin-top: 3px; }
.garage-deck { padding: clamp(6px, 1.7cqi, 12px); gap: 5px; }
.garage-bay {
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 4 / 3;
  padding: 4%;
  overflow: hidden;
  border-radius: 5px;
  background: #131113;
  box-shadow: inset 0 0 12px #000;
}
.garage-bay:has(.garage-screen:not([hidden])) { padding: 0; }
.garage-cassette {
  width: 100%;
  display: grid;
  gap: clamp(4px, 1.2cqi, 8px);
  padding: 7% 10% 5%;
  border: 1px solid #5b5054;
  border-radius: 6px;
  color: #c9bdad;
  background: repeating-linear-gradient(0deg, #ffffff0b 0 1px, transparent 1px 4px), #282428;
  box-shadow: inset 0 0 0 5px #1e1a1d, 0 6px 10px #080708;
  transform: rotate(-2deg);
  font-size: 11px;
}
.garage-label { display: grid; text-align: center; color: #291a1d; background: #dfb1a2; border-left: 5px solid #b33152; padding: 4px 2px; font-weight: 700; }
.garage-label strong { font: 900 clamp(14px, 3.55cqi, 26px)/1 Impact, "Arial Narrow", sans-serif; letter-spacing: .05em; }
.garage-window { display: flex; justify-content: space-between; align-items: center; padding: 2% 10%; border: 1px solid #4b4144; border-radius: 3px; background: #161218; }
.garage-window span {
  width: 25%; aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid #4e4445;
  background: radial-gradient(circle, #17131b 0 22%, transparent 25%), repeating-conic-gradient(#eee0c5 0deg 31deg, #b0a291 31deg 60deg);
  box-shadow: 0 0 0 3px #251d22;
}
.garage-format { display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.garage-format i { font-style: normal; }
.garage-controls { display: flex; gap: 6px; justify-content: space-between; }
.garage-controls button {
  cursor: pointer;
  min-height: 44px;
  border: 1px solid #766267;
  border-radius: 3px;
  font: 700 12px "Courier New", monospace;
}
.garage-play { flex: 1; display: flex; gap: 6px; align-items: center; justify-content: center; color: #261b1d; background: var(--garage-paper); }
.garage-play:hover { background: #fff1c9; }
.garage-controls .garage-eject { min-width: 44px; color: #f4e6d8; background: #342b30; font-size: 20px; }
.garage-eject:hover { background: #493842; }
.garage-screen {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #211e1d;
  color: #fff7dc;
  font-size: clamp(11px, 2.2cqi, 15px);
  font-weight: 700;
  text-shadow: 1px 1px 3px #000, 0 0 4px #000;
}
.garage-screen img { width: 100%; height: 100%; display: block; object-fit: cover; animation: garage-camera 10s ease-out both; }
.garage-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, #21162030 0 1px, transparent 1px 3px); box-shadow: inset 0 0 24px #110a18aa; }
.garage-screen[data-blackout] { background: #0d0a0e; }
.garage-screen[data-blackout] > * { visibility: hidden; }
.garage-osd { position: absolute; display: flex; justify-content: space-between; inset: 6% 6% auto; }
.garage-clock { position: absolute; inset: auto 6% 6%; }
.garage-count { position: absolute; inset: auto 8% 8% auto; font-size: clamp(28px, 7cqi, 55px); color: #ffe4a8; }
.garage-caption,
.garage-error {
  display: grid;
  place-items: center;
  min-height: 46px;
  margin: 5px 0 0;
  padding: 5px 8px;
  border-radius: 4px;
  text-align: center;
  color: #fff1df;
  background: #241c22;
  font: 600 clamp(13px, 2.75cqi, 16px)/1.25 system-ui, sans-serif;
}
@keyframes garage-unfold { from { opacity: 0; translate: 0 -9px; } to { opacity: 1; translate: 0 0; } }
@keyframes garage-hinge { from { transform: rotateY(82deg); filter: brightness(.55); } to { transform: rotateY(0deg); filter: brightness(1); } }
@keyframes garage-camera { from { transform: scale(1.11) rotate(-.65deg); filter: saturate(.62) contrast(1.2); } to { transform: scale(1.025); filter: saturate(.87); } }

.garage-outro-effect { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .garage-outro-effect:not([hidden]) {
    position: fixed;
    z-index: 4;
    inset: 0;
    display: block;
    overflow: hidden;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, #100d1433 0 1px, transparent 1px 5px);
    animation: garage-signal-fade 2400ms ease-in-out both;
  }
  .garage-outro-effect::before,
  .garage-outro-effect::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    background: linear-gradient(transparent, #110d1973 45%, #fff6da40 49%, transparent 70%),
      repeating-linear-gradient(0deg, #1a111c50 0 3px, transparent 3px 7px);
  }
  .garage-outro-effect::before { height: 18%; animation: garage-signal-roll 2250ms linear both; }
  .garage-outro-effect::after { height: 6%; animation: garage-signal-roll 1750ms linear 500ms both; }
  .garage-case-wrap[data-closing] {
    overflow: hidden;
    animation: garage-case-away 2100ms ease-in-out both;
  }
  .garage-case-wrap[data-closing] .garage-lid {
    animation: garage-hinge 1300ms ease-in reverse both;
  }
  .garage-sticker[data-disappearing] {
    animation: garage-sticker-away 850ms ease-in-out 1150ms both;
  }
}
@keyframes garage-signal-fade {
  0%, 100% { opacity: 0; }
  16% { opacity: .62; }
  34% { opacity: .34; }
  53% { opacity: .68; }
  81% { opacity: .24; }
}
@keyframes garage-signal-roll {
  from { top: -20%; }
  to { top: 104%; }
}
@keyframes garage-case-away {
  0%, 34% { opacity: 1; block-size: var(--garage-case-height); margin-block-start: var(--garage-case-gap); }
  65% { opacity: .58; }
  100% { opacity: 0; block-size: 0; margin-block-start: 0; }
}
@keyframes garage-sticker-away {
  from { opacity: 1; }
  to { opacity: 0; transform: rotate(-8deg) translateY(3px) scale(.94); }
}
@container garage-poster (max-width: 400px) {
  .garage-sticker { bottom: -9px; padding-inline: 9px; }
  .garage-case-wrap { --garage-case-gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .garage-case-wrap,
  .garage-lid,
  .garage-screen img { animation: none; }
  .garage-sticker { transition: none; }
}

.garage-sticker:focus-visible,
.garage-controls button:focus-visible { outline-color: #ffedc4; outline-offset: 2px; }
