dialog.desk-collections {
  --dc-ink: #37352f;
  --dc-paper: #faf3de;
  --dc-cranberry: #5c3d48;
  color: var(--dc-ink);
  color-scheme: light;
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(1190px,95vw);
  height: min(850px,93svh);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid #e7d7af;
  border-radius: 20px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  background: #c5a37f;
  box-shadow: 0 18px 90px #1b101078, 0 2px 12px #1b101070;
  font: 500 15px/1.35 system-ui,"Malgun Gothic",sans-serif;
}
.desk-collections[open] { animation: dc-arrive .25s cubic-bezier(.17,.66,.29,1) both; }
.desk-collections::backdrop { background: #1e16205e; animation: dc-fade .22s ease both; }
@keyframes dc-arrive { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes dc-fade { from { opacity: 0; } }
.desk-collections *, .desk-collections *::before, .desk-collections *::after { box-sizing: border-box; }
.desk-collections [hidden] { display:none !important; }
.desk-collections button, .desk-collections a {
  color: inherit;
  font: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.desk-collections a { text-decoration: none; }
.desk-collections button { cursor: pointer; border: 0; }
.desk-collections :is(button,a):focus-visible { outline: 3px solid #7f495e; outline-offset: 5px; }
.desk-collections svg { width: 19px; height: 19px; display: block; }
.dc-body {
  width: 100%;
  min-height: 100%;
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: clamp(20px,3.6vh,42px) clamp(21px,4.2vw,63px) clamp(18px,3.8vh,44px);
  background-color: #ceb48c;
  background-image:
    radial-gradient(ellipse at 13% 6%,#fff6d95c,transparent 48%),
    linear-gradient(102deg,#7b5d3924,transparent 27%,#ffe5b526 67%,#64442621),
    repeating-linear-gradient(1deg,#452b2105 0 1px,transparent 2px 6px,#563b2408 7px 8px,transparent 9px 14px),
    repeating-linear-gradient(0deg,#805f3a33 0 1px,#f4d9ab2b 2px 3px,transparent 4px 105px,#6e492913 106px);
}
.dc-head { display:grid; grid-template-columns: 1fr auto 1fr; align-items:center; position:relative; z-index:2; padding-bottom:clamp(12px,2.5vh,28px); }
.dc-head h2 { margin:0; padding:0; font:650 clamp(15px,2vw,21px)/1.25 system-ui,"Malgun Gothic",sans-serif; letter-spacing:-.065em; }
.dc-back { min-height:44px; display:inline-flex; gap:6px; align-items:center; justify-self:start; background:transparent; padding:0 8px; font-weight:620 !important; }
.dc-back svg { width:17px; }
.dc-photo { display:grid; min-width:0; align-self:stretch; grid-template-rows: minmax(0,1fr) auto; }
.dc-felt {
  display:grid; padding:clamp(17px,3.5vh,37px) 0; min-height:0; position:relative; isolation:isolate;
  background:
    radial-gradient(ellipse at 23% 14%,#e6f0c773,transparent 64%),
    repeating-linear-gradient(91deg,#463c3008 0 1px,transparent 1px 3px),
    repeating-linear-gradient(1deg,#fcf8d809 0 1px,transparent 1px 3px),
    #a0ad93;
  border:1px solid #6e785fba;
  border-radius:clamp(9px,1.5vw,21px);
  box-shadow:inset 0 1px 2px #f5f2d488,0 1px 0 #4b453982,0 4px 5px #57442d26;
}
.dc-felt::before {
  content:""; position:absolute; inset:7px; z-index:-1; pointer-events:none;
  border:1px dashed #42513d53; border-radius:inherit; opacity:.65;
}
.dc-piles {
  position:relative; display:grid; place-items:center; min-width:0;
  --step: min(27vw, 307px);
  --print-w: min(26vw, 33.5vh, 290px);
  --side-y: min(3.2vh, 27px);
  min-height:calc(var(--print-w)*1.40 + 45px);
}
.dc-print {
  grid-area: 1/1;
  display:flex; flex-direction:column; position:relative;
  padding:max(5px,calc(var(--print-w)*.036)) max(5px,calc(var(--print-w)*.036)) 0;
  width:var(--print-w); aspect-ratio:.76;
  background:linear-gradient(138deg,#fffdf0,#f8f3e4 65%,#efebdc);
  box-shadow:0 1px 1px #463d3260,0 6px 11px #26342138;
  user-select:none; -webkit-user-select:none;
  -webkit-user-drag:none; transform-origin:center;
  backface-visibility:hidden;
}
.dc-print img { position:relative; display:block; width:100%; flex:1; min-height:0; object-fit:cover; pointer-events:none; }
.dc-caption { display:flex; align-items:center; justify-content:space-between; gap:4px; padding:0 2px; height:calc(var(--print-w)*.13); flex:none; color:#736c60; }
.dc-caption span:first-child { font:500 clamp(7px,.84vw,10px)/1.1 ui-monospace,monospace; letter-spacing:.05em; }
.dc-caption span:last-child { display:flex; align-items:center; gap:3px; font:500 clamp(8px,.84vw,11px)/1.1 system-ui,sans-serif; }
.dc-caption svg { width:1.03em;height:1.03em; }
.dc-print[data-side="-1"] { --side:-1; --angle:-10deg; --back-angle:-16deg; }
.dc-print[data-side="1"] { --side:1; --angle:8deg; --back-angle:15deg; }
.dc-print[data-role="buried"] {
  z-index:1; pointer-events:none;
  transform:translate(calc(var(--step)*var(--side) + var(--side)*4px),calc(var(--side-y) + 4px)) rotate(var(--back-angle)) scale(.86);
}
.dc-print[data-role="landing"] {
  z-index:3; transform:translate(calc(var(--step)*var(--side)),var(--side-y)) rotate(var(--angle)) scale(.89);
}
.dc-print[data-role="under"] {
  z-index:4; pointer-events:none; transform:translate(-4px,4px) rotate(-4.3deg) scale(.981);
}
.dc-print[data-role="source"] {
  z-index:5; transform:rotate(1.5deg); touch-action:none; cursor:grab; will-change:transform;
  box-shadow:0 1px 2px #463d3270,0 8px 16px #2634213d;
}
.dc-piles[data-dragging] [data-role="source"] { cursor:grabbing; }
.dc-foot { display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:66px; padding-top:13px; }
.dc-tip { display:flex; align-items:center; gap:8px; color:#443e31; font-size:12px; }
.dc-tip svg { width:21px; }
.dc-arrows,.dc-ticket-arrows { display:flex; gap:7px; align-items:center; justify-content:center; }
.dc-arrows button,.dc-ticket-arrows button { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; }
.dc-arrows button { background:transparent; }
.dc-arrows svg,.dc-ticket-arrows svg { width:16px; height:16px; }
.dc-arrows output,.dc-ticket-arrows output { min-width:57px; text-align:center; color:#4f473a; font:500 11px/1 ui-monospace,monospace; }
.dc-taste {
  position:relative; isolation:isolate; min-height:0; display:flex; align-items:center; justify-content:center;
  gap:clamp(3px,1vw,15px); padding:14px clamp(3px,2vw,24px) 32px;
}
.dc-place {
  --bowl: min(38vw,51vh,455px);
  position:relative; flex:0 0 auto;
  width:calc(var(--bowl)*1.15); height:calc(var(--bowl)*1.11);
  display:grid;place-items:center;
}
.dc-cloth {
  position:absolute; inset:0 -3% -3% -1%; transform:rotate(-9deg); border:1px solid #ad9c7d;
  background-color:#ebe6cb;
  background-image:
    repeating-linear-gradient(0deg,#fff8da24 0 1px,transparent 1px 3px),
    repeating-linear-gradient(90deg,#786c4924 0 1px,transparent 1px 3px),
    repeating-linear-gradient(0deg,transparent 0 23px,#81855e3d 23px 26px,#fff4d380 26px 27px,transparent 27px 32px),
    repeating-linear-gradient(90deg,transparent 0 23px,#81855e3d 23px 26px,#fff4d380 26px 27px,transparent 27px 32px);
  box-shadow:1px 5px 7px #56402d36;
}
.dc-bowl { position:relative; display:grid;place-items:center; width:var(--bowl); height:var(--bowl); transform:translate(-4%,-1%) rotate(-8deg); filter:drop-shadow(3px 8px 5px #42352d56); }
.dc-bowl svg { display:block; width:92%;height:92%; }
.dc-sticks { position:absolute; right:3%; top:6%;height:91%;width:9%;transform:rotate(8deg); filter:drop-shadow(2px 3px 1px #493d324d); }
.dc-sticks::before,.dc-sticks::after { content:"";position:absolute; top:0; bottom:0;width:clamp(3px,.38vw,5px);border-radius:3px 3px 40% 40%;background:linear-gradient(90deg,#70482d,#d7ad76 54%,#99714b); }
.dc-sticks::after { right:21%; transform:rotate(-2deg); }
.dc-ticket {
  width:clamp(216px,27vw,330px); position:relative; z-index:1;
  transform:rotate(4deg); margin-top:clamp(16px,10vh,95px);
  padding:clamp(18px,2.7vw,33px); background:linear-gradient(124deg,#fffbed,#f4edd4);
  border:1px solid #e6d8b9; box-shadow:1px 3px 4px #5a48344d,1px 14px 24px -10px #50372877;
}
.dc-ticket-top { padding-bottom:clamp(12px,2vh,20px); display:flex; align-items:center;justify-content:space-between;gap:8px; border-bottom:1px dashed #92795f9c;color:var(--dc-cranberry); }
.dc-ticket-top span { font:750 clamp(23px,3vw,35px)/1.1 system-ui,"Malgun Gothic",sans-serif; letter-spacing:-.085em; }
.dc-ticket-top svg { width:17px; }
.dc-recipe { display:flex;min-height:64px;align-items:center;gap:8px;border-radius:3px; }
.dc-recipe strong { margin-right:auto; font-size:clamp(14px,1.7vw,19px); letter-spacing:-.045em; white-space:nowrap; }
.dc-recipe svg { width:15px; }
.dc-score { font:500 12px/1 ui-monospace,monospace;white-space:nowrap; }
.dc-ticket-arrows { padding-top:8px; }
.dc-ticket-arrows button { width:42px; height:42px; background:#e9e3cb63;border:1px solid #7c745b57; }
@media (hover:hover) {
  .dc-ticket-arrows button:hover { background:#fff6de; }
  .dc-back:hover span {text-decoration:underline;text-underline-offset:4px}
  .dc-arrows button:hover svg {transform:scale(1.18)}
  .dc-recipe:hover { color:#803e56; }
}
@media(max-width:650px) {
  dialog.desk-collections { width:100%;height:100svh;max-height:100svh;border:0;border-radius:0; }
  .dc-body { padding:max(16px,env(safe-area-inset-top)) 12px max(16px,env(safe-area-inset-bottom)); }
  .dc-head { padding-inline:5px; }
  .dc-piles { --print-w:min(39vw,27vh);--step:24vw;--side-y:min(4.5vh,33px); }
  .dc-foot { padding-inline:7px; }
  .dc-place { --bowl:min(56vw,36vh,340px); }
  .dc-taste { flex-direction:column;gap:0; padding:12px 4px 14px; }
  .dc-ticket { width:min(64vw,285px);margin:-2vh 0 0 16%;padding:16px 19px;transform:rotate(3deg); }
  .dc-ticket-top { padding-bottom:9px; }
  .dc-ticket-arrows { padding-top:3px; }
  .dc-recipe { min-height:47px; }
}
@media(max-height:500px) and (min-width:651px) {
  dialog.desk-collections { width:100vw;height:100svh;max-height:100svh;border-radius:0; }
  .dc-body { padding:8px 30px 6px; }
  .dc-head { padding-bottom:4px; }
  .dc-piles { --print-w: min(22vw,39vh); --step:26vw; }
  .dc-felt {padding:5px 0;}
  .dc-foot {min-height:47px;padding-top:3px;}
  .dc-place {--bowl: min(36vw,51vh);}
  .dc-ticket {padding:14px 20px;margin-top:0;}
  .dc-taste {padding-bottom:9px;}
}
@media(prefers-reduced-motion:reduce) {
  .desk-collections[open], .desk-collections::backdrop { animation:none; }
}

/* When the room supplies the print plane, its furniture is the entire photo surface. */
dialog.desk-collections[data-anchored] {
  inset:0; margin:0; padding:0; width:100vw; height:100dvh; max-height:none;
  border:0; border-radius:0; box-shadow:none; overflow:hidden;
  background:transparent; animation:none;
}
.desk-collections[data-anchored]::backdrop { background:transparent; animation:none; }
.desk-collections[data-anchored] :is(.dc-body,.dc-photo,.dc-felt) {
  display:contents; background:none; box-shadow:none; border:0; padding:0;
}
.desk-collections[data-anchored] .dc-felt::before { display:none; }
.desk-collections[data-anchored] .dc-piles {
  --print-w:320px;
  position:absolute; left:0; top:0; width:320px; height:396.923077px; min-height:0;
  transform-origin:0 0;
}
.desk-collections[data-anchored] .dc-print {
  width:320px; height:396.923077px; aspect-ratio:auto;
  padding:15.38px 13.54px 0; border-radius:1.5px;
}
.desk-collections[data-anchored] .dc-caption { height:32.6px; }
.desk-collections[data-anchored] .dc-caption span:first-child { font-size:10px; }
.desk-collections[data-anchored] .dc-caption span:last-child { font-size:12px; }
.desk-collections[data-anchored] .dc-print[data-role="source"],
.desk-collections[data-anchored] .dc-print[data-role="under"] { transform:none; }
.desk-collections[data-anchored] .dc-print[data-side="-1"] {
  --landing:var(--left-matrix,translate(var(--left-offset),4%) rotate(-7deg) scale(var(--land-scale)));
}
.desk-collections[data-anchored] .dc-print[data-side="1"] {
  --landing:var(--right-matrix,translate(var(--right-offset),4%) rotate(6deg) scale(var(--land-scale)));
}
.desk-collections[data-anchored] .dc-print[data-role="landing"] { transform:var(--landing); }
.desk-collections[data-anchored] .dc-print[data-role="buried"] { transform:var(--landing) translate(3px,4px) rotate(calc(5deg * var(--side))); }
.desk-collections[data-anchored] .dc-head,
.desk-collections[data-anchored] .dc-foot {
  position:absolute; left:max(21px,3vw); right:max(21px,3vw); z-index:2;
  padding:0; min-height:0; display:flex; justify-content:space-between; align-items:center; pointer-events:none;
}
.desk-collections[data-anchored] .dc-head { top:max(19px,env(safe-area-inset-top),3.1vh); }
.desk-collections[data-anchored] .dc-foot { bottom:max(19px,env(safe-area-inset-bottom),3.1vh); }
.desk-collections[data-anchored] .dc-head h2 { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.desk-collections[data-anchored] :is(.dc-back,.dc-tip,.dc-arrows) {
  color:#fff8e9;text-shadow:0 1px 2px #322029,0 1px 5px #342133d9;
}
.desk-collections[data-anchored] :is(.dc-back,.dc-arrows) {pointer-events:auto}
.desk-collections[data-anchored] .dc-arrows {gap:0}
.desk-collections[data-anchored] .dc-arrows output {color:inherit;min-width:46px}
.desk-collections[data-anchored] :is(.dc-back,.dc-tip,.dc-arrows) svg {filter:drop-shadow(0 1px 2px #21101d)}
:root[data-theme=light] .desk-collections[data-anchored] :is(.dc-back,.dc-tip,.dc-arrows) {
  color:#513341;text-shadow:0 1px 1px #fff7eb,0 1px 5px #fff4e4;
}
:root[data-theme=light] .desk-collections[data-anchored] :is(.dc-back,.dc-tip,.dc-arrows) svg {filter:drop-shadow(0 1px 2px #fff6e6)}
.desk-collections[data-collection=photos] :is(.dc-back,.dc-arrows button):focus-visible {outline:none}
.desk-collections[data-collection=photos] .dc-back:focus-visible span{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.desk-collections[data-collection=photos] .dc-arrows button:focus-visible svg{transform:scale(1.25);stroke-width:3}
@media(max-width:650px) {
  .desk-collections[data-anchored] .dc-head,.desk-collections[data-anchored] .dc-foot { left:12px; right:12px; }
}
