.stationery {
  position:relative; isolation:isolate; display:grid; grid-template-columns:minmax(0,1fr);
  background:#69452f url(assets/furniture/grain.webp) center/950px auto;
  scroll-margin:0;
}
.desk-overview { position:relative; grid-area:1/1; align-self:start; height:160svh; min-height:780px; }
.desktop-picture {
  position:sticky; top:0; width:100%; height:100svh; min-height:420px; overflow:hidden;
  isolation:isolate; background:linear-gradient(#706a52 0 22%,#543e31 22% 25%,#92705b 25% 55%,#8d6343 55% 80%,#69472f 80%);
}
.furniture-canvas { display:block; position:absolute; inset:0; width:100%; height:100%; opacity:0; }
.desktop-picture.is-rendered .furniture-canvas { opacity:1; }
.hutch-fallback { position:absolute; inset:24% 0 0; border-block:12px ridge #795737; background:#865d40 url(assets/furniture/grain.webp) center/cover; }
.hutch-fallback::before { content:""; position:absolute; inset:0 0 70%; background:#372b2180; border-bottom:14px ridge #89603e; }
.is-rendered .hutch-fallback { display:none; }
.desk-objects { position:absolute; inset:0; pointer-events:none; }
.desk-objects :is(a,button) {
  pointer-events:auto; position:absolute; display:grid; place-items:center;
  width:max-content; max-width:48%; min-height:44px; padding:9px 13px;
  transform:translate(-50%,-50%) rotate(-3deg); background:#f8e9c5; border:1px solid #705740;
  box-shadow:2px 3px 0 #37261e4d; color:#35291e; text-align:center; text-decoration:none;
  font:600 clamp(13px,1.3vw,19px)/1.1 var(--headline); cursor:pointer;
}
.object-proof { left:20%; top:32%; }
.object-archive { left:73%; top:32%; }
.object-scope { left:24%; top:45%; }
.object-file { left:26%; top:59%; }
.object-book { left:70%; top:61%; }
.object-tape { left:15%; top:75%; }
.object-letters { left:68%; top:76%; }
.object-drawer,.postcat { left:48%; top:89%; }
.is-rendered .desk-objects :is(a,button) {
  left:var(--screen-x); top:var(--screen-y); width:var(--hit-width,56px); height:var(--hit-height,44px);
  min-height:0; max-width:none; padding:0; transform:translate(-50%,-50%); border:0; box-shadow:none; background:none;
}
.is-rendered .desk-objects [data-outside] { visibility:hidden; }
.is-rendered .desk-objects span {
  position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
.is-rendered .desk-objects :focus-visible { outline:2px dashed #fff3cb; outline-offset:4px; border-radius:5px; box-shadow:0 0 0 4px #44302dad; }
.shelf-return,.graphics-warning {
  position:absolute; z-index:2; color:#fff7e8; background:#30261eec;
  font:500 13px/1.4 var(--headline); border-radius:3px; padding:9px 13px;
}
.shelf-return { top:14px; left:clamp(12px,2vw,30px); text-underline-offset:3px; }
.graphics-warning { left:50%; top:12%; transform:translateX(-50%); width:max-content; max-width:90%; margin:0; }
.is-rendered .graphics-warning { top:auto; bottom:12px; font-size:12px; }
.desk-paw { display:none; }
.is-rendered.has-paw, .is-rendered.has-paw * { cursor:none; }
.is-rendered.has-paw .desk-paw {
  position:absolute; display:block; pointer-events:none; z-index:4; left:0; top:0; width:36px; height:40px;
  background-image:url(assets/furniture/paw.svg); background-size:108px 40px; background-repeat:no-repeat;
  filter:drop-shadow(0 1px 1px #29142199); will-change:transform;
}
.desk-paw[data-pose="reach"], .desk-paw[data-pose="light"] { background-position-x:-36px; }
.desk-paw[data-pose="hold"] { background-position-x:-72px; }
.desk-paw[data-pose="light"] i {
  position:absolute; left:17px; top:1px; width:8px; height:10px; background:#ffdf78;
  clip-path:polygon(50% 0,63% 37%,100% 50%,63% 64%,50% 100%,36% 64%,0 50%,36% 37%);
}
.desk-reading { position:relative; background:#f6ebdb; }
.studio-ready .desk-reading {
  scroll-margin-top:clamp(22px,6svh,65px); grid-area:1/1; align-self:start; z-index:3; width:min(94%,1220px); margin:var(--opening,20vh) auto 42px;
  padding:0 0 clamp(28px,4vw,60px); border:1px solid #9c836b; border-radius:3px 8px 6px 3px;
  background:var(--room-wall,#f5ebda); box-shadow:1px 3px #ccbfaa,3px 5px #ffefd8,5px 7px #a18a75,2px 18px 30px #23150f60;
}
.stationery[data-open="desk"] { --room-wall:#e8eada; }
.stationery[data-open="catalogue"] { --room-wall:#e8e1d3; }
.stationery[data-open="about"] { --room-wall:#e9e1ea; }
.stationery[data-open="elsewhere"] { --room-wall:#e8e2ed; }
@media(max-width:620px) {
  .desk-overview { height:148svh; }
  .studio-ready .desk-reading { width:94%; }
}
@media(prefers-reduced-motion:reduce) {
  .desk-overview { height:100svh; min-height:510px; }
}
.desk-rail {
  width: min(92%, 1120px);
  margin: auto;
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.8vw, 25px);
  border-bottom: 1px solid #a68f8a;
}
.desk-rail a {
  color: #59484f;
  padding: 8px 2px;
  text-underline-offset: 4px;
  text-decoration: none;
  font: 580 15px var(--headline);
}
.desk-rail .back-to-desk { margin-right: auto; }
.desk-rail a:is([aria-current="page"],:hover,:focus-visible) { color: #513145; text-decoration: underline; }
.stationery [data-room] { scroll-margin-top: 70px; }
.stationery .workbench, .stationery .catalogue, .stationery .notebook, .letter-room {
  padding-block: clamp(22px, 3.2vw, 46px) 0;
}
.stationery .desk-heading,.stationery .catalogue-head,.notebook-heading,.letter-heading { margin: 0 0 clamp(17px, 2.3vw, 30px); }
.stationery .desk-heading h2,.stationery .catalogue-head h2,.notebook-heading h2,.letter-heading h2 {
  margin: 0;
  font: 670 clamp(33px, 4.1vw, 59px)/1.04 var(--headline);
  letter-spacing: -.055em;
}
.stationery .desk-sheet {
  border: 1px solid #c9bba4;
  box-shadow: 2px 4px 0 #c8bea5, 3px 6px 0 #f1ecde, 1px 12px 18px #4e493719;
}
.stationery .catalogue-list {
  background: #fffcf0;
  border: 1px solid #aa947b;
  box-shadow: 2px 3px 0 #d0bda6, 3px 5px 0 #f9edd8, 4px 7px 0 #a78e73;
  padding: 8px clamp(14px, 2.6vw, 40px) 16px;
}
.stationery .catalogue-list a { padding-block: 15px; }
.stationery .catalogue-list strong { font-size: clamp(18px,1.65vw,23px); }
.file-cabinet {
  display: grid; grid-template-columns: clamp(145px, 17vw, 210px) minmax(0,1fr);
  align-items: start; gap: clamp(20px, 3.5vw, 48px);
}
.file-dividers>img { display: block; width: 100%; height: auto; border: 4px solid #fff4de; box-shadow: 1px 3px 5px #523c2f24; transform: rotate(-2deg); }
.file-stack { min-width: 0; }
.stationery .catalogue-filters { margin: 18px 0 0; gap: 4px; flex-direction: column; }
.stationery .catalogue-filters button {
  background: var(--tab-paper, #ead3b2); color: #4d3629; border: 1px solid #b6a087; border-radius: 2px 9px 2px 2px;
  text-align: left; padding: 10px 12px; display: flex; align-items: baseline; justify-content: space-between;
}
.catalogue-filters button:nth-child(2) { --tab-paper: #e2b9ab; }
.catalogue-filters button:nth-child(3) { --tab-paper: #c7d2b8; }
.catalogue-filters button:nth-child(4) { --tab-paper: #d9c9dd; }
.catalogue-filters button:nth-child(5) { --tab-paper: #f1d9a3; }
.stationery .catalogue-filters button::after { content: attr(data-count); font: 11px var(--mono); margin-left: 8px; }
.stationery .catalogue-filters button:hover { box-shadow: inset 3px 0 #987359; }
.stationery .catalogue-filters button[aria-pressed="true"] { background: #76523e; color: #fff8e8; }
.stationery .catalogue-tail { margin-top: 21px; }
.file-pager,.leaf-pager,.post-controls { display: flex; align-items: center; gap: 10px; }
.file-pager button,.leaf-pager a,.post-controls button {
  min-height: 38px;
  padding: 8px 14px;
  font: 580 14px/1.2 var(--headline);
  border: 1px solid #a89388;
  border-radius: 3px;
  background: #fff7e9;
  color: #4a3733;
  text-decoration: none;
}
.file-pager span,.leaf-pager span { font: 12px var(--mono); }
.file-pager button:disabled { opacity:.45; cursor: default; }
.letter-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:14px; }
.letter-heading nav { display:flex; gap:20px; }
.letter-heading nav a { text-underline-offset:4px; }
.post-office {
  width: min(100%, 720px); margin: 30px auto 0;
}
.postcard {
  position: relative; background: #fffae9; padding: clamp(8px,1vw,14px);
  box-shadow: 1px 2px 1px #57445336, 0 15px 22px #4e324319;
  transform: rotate(-1deg);
}
.postcard-front { display:block; width:100%; height:auto; }
.postcard-back {
  width: 100%; min-height: 240px; aspect-ratio: 3/2; display:grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: 5%;
  color:#46373f;
  padding: clamp(14px,3vw,38px);
  align-content:stretch;
}
.post-message { align-self:center; min-width:0; }
.post-message h3 { font:650 clamp(20px,3.1vw,41px)/1 var(--headline); letter-spacing:-.045em; margin:0; }
.post-message p { font: 12px/1.3 var(--mono); margin:12px 0; }
.post-message ol { margin:0; padding:0; list-style:none; }
.post-message li { padding:4px 0; border-bottom:1px dotted #ac9b86; font-size: clamp(13px,1.25vw,17px); }
.post-address { border-left:1px solid #b78e85; padding-left:12%; display:flex; flex-direction:column; justify-content:space-between; }
.cat-stamp { margin-left:auto; width:clamp(54px,7vw,95px); height:auto; border:4px dotted #f9eed7; }
.post-address p { font: 550 clamp(16px,2.2vw,28px)/1.3 var(--headline); padding-bottom:6px; border-bottom:1px solid #ad9b8c; }
.post-address small { font: 12px var(--mono); overflow-wrap:anywhere; }
.post-office figcaption { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; margin-top:22px; }
.post-office figcaption>span { font:650 clamp(19px,2.1vw,25px) var(--headline); }
.post-controls button:hover,.leaf-pager a:hover { background:#f6e1c5; }
#post-status { min-height:1.3em; font-size:13px; margin-top:6px; }
@media(max-width:720px) {
  .file-cabinet { display:block; }
  .file-dividers>img { display:none; }
  .desk-rail { gap:5px; justify-content:space-between; width:94%; padding:5px 0; }
  .desk-rail a { padding:10px 2px; font-size:13px; }
  .desk-rail .back-to-desk { margin-right:0; }
  .stationery .catalogue-filters { margin:0 0 10px; flex-flow:row wrap; gap:4px; }
  .stationery .catalogue-filters button { padding:7px 10px; }
  .stationery .catalogue-filters button::after { display:none; }
  .stationery .catalogue-list { padding:5px 14px 10px; }
  .stationery .catalogue-tail { gap:9px 13px; }
  .letter-heading nav { gap:16px; }
  .post-office { margin-top:20px; }
  .post-controls { gap:7px; }
}
@media print {
  .desk-rail,.desk-overview,.post-controls,.file-pager,.leaf-pager,.notebook-tabs { display:none !important; }
  .stationery{border:0;background:white;padding:0;}
}
.desktop-picture { touch-action:pan-y pinch-zoom; }
.desktop-picture.looking-around,.desktop-picture.looking-around canvas { user-select:none; }
