.desk-scene {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  height: clamp(164px, 30vw, 700px);
  background: #e4c49c url("assets/art/desk.webp") center / cover no-repeat;
}
.desk-cover, .desk-print {
  position: absolute;
  display: block;
  transform: translate(-50%, -50%) rotate(var(--tilt));
}
.desk-cover {
  --tilt: -9deg;
  --art: url("assets/covers/B0DQSHRG96.webp");
  --badge-x: 84%; --badge-y: 36%;
  left: 26%; top: 51%; width: min(22.8%, 500px);
  aspect-ratio: 1;
  z-index: 1;
  border-radius: 2px 5px 5px 2px;
  background: #f0c4ae;
  box-shadow: 1px 2px #fdf6e8, 2px 4px #ddd2bf, 3px 6px #866e58, 8px 14px 17px #49312440;
}
.cover-link { position: absolute; inset: 0; border-radius: inherit; }
.desk-print {
  padding: clamp(6px, .84vw, 20px);
  background: #fffefb;
  box-shadow: 2px 4px 6px #4e342a38, 6px 10px 18px #482d1f27;
  touch-action: manipulation;
}
.desk-line {
  --tilt: -18deg;
  --art: url("product-detail/media/inside-night.jpg");
  --paint: url("assets/art/bookshop-colors.svg");
  --size: 430% 275%; --position: 4% 82%;
  --badge-x: 62%; --badge-y: 30%;
  left: 7%; top: 89%; width: 18%; aspect-ratio: 1;
}
.desk-day {
  --tilt: 4deg;
  --art: url("product-detail/media/inside-day.jpg");
  --size: 250% 145%; --position: 8% 51%;
  --badge-x: 85%; --badge-y: 86%;
  left: 49.2%; top: 46%; width: min(25.4%,555px); aspect-ratio: .96;
  z-index: 2;
}
.desk-plane {
  --tilt: -8deg;
  --art: url("product-detail/media/inside-day.jpg");
  --paint: url("assets/art/plane-colors.svg");
  --size: 420% 258%; --position: 96.6% 80%;
  --badge-x: 76%; --badge-y: 70%;
  left: 69%; top: 21%; width: min(17.5%,390px); aspect-ratio: 1;
}
.desk-night {
  --tilt: 8deg;
  --art: url("product-detail/media/inside-night.jpg");
  --size: 245% 143%; --position: 93% 51%;
  --badge-x: 79%; --badge-y: 35%;
  left: 72.6%; top: 85%; width: min(20.4%,455px); aspect-ratio: .98;
}
.sample-art, .ink-reveal {
  display: block;
  background-position: var(--position, center);
  background-size: var(--size, cover);
  background-repeat: no-repeat;
}
.sample-art {
  width: 100%; height: 100%; position: relative;
  background-color: white;
  background-image: var(--art);
}
.desk-plane .sample-art, .desk-line .sample-art {
  background-image: var(--art), var(--paint);
  background-blend-mode: multiply;
}
.ink-reveal {
  position: absolute; inset: 0;
  background-image: var(--art);
  filter: grayscale(1) brightness(1.75) contrast(3);
  --color-edge: -12%;
  --wash: linear-gradient(102deg, transparent calc(var(--color-edge) - 4%), black calc(var(--color-edge) + 4%));
  -webkit-mask-image: var(--wash);
  mask-image: var(--wash);
}
.desk-plane .ink-reveal, .desk-line .ink-reveal { filter: none; }
.desk-night .ink-reveal { filter: grayscale(1) brightness(2.75) contrast(3.3); }
.desk-print[aria-pressed="true"] .ink-reveal,
.desk-cover:has([aria-pressed="true"]) .ink-reveal { --color-edge: 112%; }
.cover-toggle, .desk-print > .paint-icon {
  position: absolute; left: var(--badge-x); top: var(--badge-y);
  transform: translate(-50%, -50%) rotate(calc(0deg - var(--tilt)));
}
.cover-toggle {
  padding: 0; width: 44px; height: 44px;
  border-radius: 50%; touch-action: manipulation;
}
.paint-icon {
  display: grid; width: 44px; height: 44px; place-items: center;
  color: var(--brand-deep);
}
.paint-icon svg {
  box-sizing: border-box;
  width: 34px; height: 34px; padding: 5px;
  border: 1.5px solid #7684a8; border-radius: 50%;
  background: #fffdf4; box-shadow: 0 2px 3px #382e2438;
}
.pencil-glyph, [aria-pressed="true"] .palette-glyph { display: none; }
[aria-pressed="true"] .pencil-glyph { display: inline; }
@media (hover: hover) {
  .desk-print:hover .paint-icon svg, .cover-toggle:hover svg { background: #fff1d5; }
}
@media (prefers-reduced-motion: no-preference) {
  .paint-icon svg { animation: paint-arrive .32s ease-out backwards; transition: transform .15s ease-out; }
  .desk-print:nth-of-type(2) .paint-icon svg { animation-delay: .05s; }
  .desk-print:nth-of-type(3) .paint-icon svg { animation-delay: .1s; }
  .desk-print:active .paint-icon svg, .cover-toggle:active svg { transform: scale(.94); }
  @keyframes paint-arrive {
    from { opacity: 0; transform: translateY(5px) scale(.86); }
    to { opacity: 1; transform: none; }
  }
}
.desk-print:focus-visible .paint-icon svg, .cover-toggle:focus-visible svg {
  outline: 3px solid var(--brand-deep); outline-offset: 2px;
}
@media (max-width: 650px), (pointer: coarse) and (max-width: 980px) and (max-height: 500px) {
  .desk-scene { height: auto; aspect-ratio: 4 / 5; background-position: 48% center; }
  .desk-print { padding: 1.8vw; }
  .desk-cover { left: 36%; top: 28%; width: 55%; --tilt: -8deg; }
  .desk-day { left: 45%; top: 69%; width: 60%; --tilt: 5deg; }
  .desk-plane { left: 84%; top: 30%; width: 39%; --tilt: 9deg; --badge-x: 64%; --badge-y: 81%; }
  .desk-night { left: 84%; top: 80%; width: 43%; --tilt: -6deg; --badge-x: 65%; --badge-y: 79%; }
  .desk-line { left: 0; top: 62%; width: 32%; --badge-x: 80%; --badge-y: 36%; }
}
