:root {
  --ui: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --book: "Iowan Old Style", Palatino, Georgia, serif;
  --ink: #3a2b1c;
  --brass: #e2bd7c;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100svh; color: var(--ink);
  font: 18px/1.5 var(--ui);
  background:
    radial-gradient(120% 80% at 50% 0%, #efe3ca 0%, #dccfae 45%, #c9b691 100%);
}
a { color: inherit; }
/* Keep native cross-document snapshots off; in-page motion stays independent. */
@view-transition { navigation: none; }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
#cabinet { max-width: 1120px; margin: 0 auto; padding: 0 24px 56px; }
.cab-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 2px 22px; }
.cab-top h1 { margin: 0; font: 600 clamp(17px, 1.6vw, 22px)/1 var(--ui); letter-spacing: -.3px; }
.cab-brand { display: inline-flex; align-items: center; gap: 8px; color: #33261a; text-decoration: none; }
.cab-brand > span { font: 34px/.7 var(--book); color: #4b3826; }
.cab-top p { margin: 0; color: #6b563e; font: 500 clamp(11px, 1vw, 14px)/1.4 var(--ui); letter-spacing: .04em; }

.cabinet { padding: 30px clamp(16px, 3vw, 40px) clamp(26px, 3vw, 40px); border-radius: 12px;
  background:
    repeating-linear-gradient(90deg, #6d4322 0 6px, #744825 6px 12px, #6a4020 12px 18px);
  box-shadow: inset 0 0 0 2px #4a2b13, inset 0 0 0 12px #7c4d29, 0 26px 60px #4a2b1338;
}
.cab-heading { padding: 0 4px 24px; color: #f3e3c6; }
.cab-kicker { margin: 0 0 8px; color: #e9c68c; font: 600 11px/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; }
.cab-heading h2 { margin: 0 0 8px; font: 500 clamp(26px, 3.2vw, 38px)/1.15 var(--book); color: #fbf0d9; }
.cab-hint { margin: 0; max-width: 660px; color: #e2cba7; font-size: 14px; }

.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 250px)); justify-content: center;
  gap: clamp(10px, 1.4vw, 18px); margin: 0; padding: 0; list-style: none; }
.door { position: relative; display: block; aspect-ratio: 5 / 6; overflow: hidden; border-radius: 4px; text-decoration: none;
  background: linear-gradient(105deg, #96663a 0%, #855730 42%, #744826 100%);
  box-shadow: inset 0 0 0 6px #62391c, inset 0 0 0 7px #2f1a0c66, 0 6px 14px #2c180a66;
  transition: transform .32s cubic-bezier(.2,.8,.2,1), box-shadow .32s ease;
  transform-origin: left center;
}
.door::after { content: ""; position: absolute; inset: 6px; border-radius: 2px; pointer-events: none;
  box-shadow: inset 0 1px 0 #ffffff2e, inset 0 -18px 30px #2a170a3d; }
.door-glass { position: absolute; inset: 13% 12% 30%; border-radius: 2px;
  background: linear-gradient(160deg, #36473f 0%, #22302b 60%, #1b2621 100%);
  box-shadow: inset 0 0 0 2px #0000004d, inset 0 12px 22px #ffffff12;
}
.door-glass::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, #ffffff1a 0 30%, transparent 30% 100%);
}
.glass-book { position: absolute; left: 10%; right: 26%; bottom: 12%; padding: 6px 8px; border-radius: 1px;
  background: #f2e4c6; color: #5c3a1e; font: 600 clamp(9px, 1.05vw, 13px)/1.2 var(--book); letter-spacing: .01em;
  box-shadow: 2px 3px 6px #0004; transform: rotate(-1.6deg);
}
.door-plate { position: absolute; left: 50%; bottom: 15%; transform: translateX(-50%);
  display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 14px 6px; border-radius: 3px;
  background: linear-gradient(#f0d7a2, #d3ab6a); color: #3b2712;
  box-shadow: 0 2px 5px #2a170880, inset 0 1px 0 #fff8e2;
  font: 600 clamp(13px, 1.5vw, 18px)/1 var(--book);
}
.door-plate small { font: 500 clamp(9px, .95vw, 12px)/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: #5c4224; }
.door-note { position: absolute; left: 0; right: 0; bottom: 7%; text-align: center; color: #f0dcb8; font: 500 clamp(9px, .95vw, 12px)/1 var(--ui); letter-spacing: .04em; }
.door-handle { position: absolute; right: 9%; top: 50%; width: 9px; height: 26px; margin-top: -13px; border-radius: 5px;
  background: linear-gradient(#f4dcae, #bd9354); box-shadow: 0 1px 3px #0006, inset 0 0 0 1px #8a652f; }
.door.is-ready { cursor: pointer; }
.door.is-ready:hover { transform: perspective(900px) rotateY(-5deg) translateX(-2px); box-shadow: inset 0 0 0 6px #62391c, inset 0 0 0 7px #2f1a0c66, 0 10px 26px #2c180a80, 0 0 26px #ffd88c40; }
.door.is-ready:hover .door-glass { background: linear-gradient(160deg, #46584d 0%, #293a32 60%, #202c26 100%); }
.door.is-ready:active { transform: perspective(900px) rotateY(-9deg) translateX(-4px); }
.door.is-ready:focus-visible { outline: 3px solid #f4d786; outline-offset: 4px; }
.door.is-soon { cursor: default; background: linear-gradient(105deg, #7b5531 0%, #6b4727 45%, #5d3c20 100%); }
.door.is-soon .door-glass { background: #1d2723; opacity: .82; }
.door.is-soon .door-plate { background: linear-gradient(#c9ae7d, #a98a5b); color: #4a3a26; box-shadow: 0 2px 4px #2a170860, inset 0 1px 0 #f7e8c4; }
.door.is-soon .door-note { color: #d3bb95; }

.cab-footer { display: flex; justify-content: center; align-items: center; gap: 3%; padding: 26px 6px 0; color: #5b4830; font: 500 13px/1.4 var(--ui); }
.cab-footer button { padding: 2px 0; border: 0; border-bottom: 1px solid #59412966; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.cab-footer button:hover { color: #2d2116; border-bottom-color: currentColor; }
.cab-footer button:focus-visible { outline: 2px solid #594129; outline-offset: 5px; }
.shelf-about { max-width: 580px; padding: 38px 42px; border: 1px solid #a08760; border-radius: 3px; background: #f6efdf; color: #403527; box-shadow: 0 20px 80px #291b1455; }
.shelf-about::backdrop { background: #20180fc4; backdrop-filter: blur(4px); }
.shelf-about h2 { margin: 12px 0 20px; font: 400 32px var(--book); }
.shelf-about p { font: 15px/1.7 var(--ui); }
.shelf-about .about-kicker { margin: 0; color: #826545; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.about-close { position: absolute; right: 16px; top: 12px; padding: 0 7px; background: transparent; border: 0; color: #675542; font: 26px var(--ui); cursor: pointer; }

@media (max-width: 720px) {
  .doors { grid-template-columns: repeat(2, 1fr); }
  .cab-top { flex-wrap: wrap; gap: 6px 16px; }
  .door.is-ready:hover, .door.is-ready:active { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .door, .door-glass { transition: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
