/* The Shop. The storefront is the plain one (every piece in a scrolling grid, years, search) on a living wallpaper; an opened piece
   hangs in the viewing room, which grows out of its tile and pulls back into it. */
:root { --night: #0a0818; --room: #0b0806; --brass: #c9a25e; --barh: calc(56px + env(safe-area-inset-top)); }
/* the wallpaper sits under everything: the page's own ground moves to the root so the canvas shows through the body */
html { background: var(--bg); }
body { background: transparent; }
.paper { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 2.4s ease; }
.paper.on { opacity: 1; }
/* the Shop's air comes up slowly, and the words that sit in it carry a dark edge of their own */
[data-air] .paper { transition: opacity 1.6s ease; }
/* night water: each picture stands in it, so no pool of shade round it and no shadow under it, only the line where it meets the water;
   and the rows stand further apart, so every reflection has room to run */
[data-air="water"] .grid { row-gap: clamp(76px, 9vw, 132px); }
[data-air="water"] .card .cw { background: none; }
[data-air="water"] .card .art { box-shadow: 0 1px 0 rgba(244, 237, 225, .14); }
/* nothing between a picture and its reflection: no shade behind the caption (the words carry their own dark edge), and on hover the
   picture stays in the water (no lift, no shadow), its waterline only a little brighter */
[data-air="water"] .card .ct { text-shadow: 0 1px 2px #07070d, 0 0 5px #07070d, 0 0 12px #07070d, 0 0 22px rgba(7, 7, 13, .9); }
[data-air="water"] .card .ct span { color: rgba(244, 237, 225, .78); }
@media (hover: hover) { [data-air="water"] .card:hover .art { transform: none; box-shadow: 0 1px 0 rgba(244, 237, 225, .34); } }
[data-air] .shop .lede, [data-air] .found, [data-air] .card .ct { text-shadow: 0 1px 2px rgba(7, 7, 13, .95), 0 0 10px rgba(7, 7, 13, .85); }
.shop .lede { font-size: 19px; max-width: 30em; }
.shop .chips button { min-height: 44px; background: rgba(7, 7, 13, .55); }
.shop .chips button[aria-pressed="true"] { background: var(--fg); }
.pane { margin-top: 28px; }
@media (max-width: 899px) { .shop .chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); padding-right: 44px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the art without its Instagram border */
.art { position: relative; display: block; overflow: hidden; flex: none; }
.art img { position: absolute; display: block; max-width: none; height: auto; }
.lsd .art { box-shadow: none; }
.lsd.mat .art { box-shadow: 0 0 0 max(1px, calc(var(--f) * .12)) #fbf8f1, 0 0 0 max(1.5px, calc(var(--f) * .16)) rgba(0, 0, 0, .14); }
.lsd.fr-oval .art, .lsd.fr-arch .art { border-radius: inherit; }
@media (prefers-reduced-motion: no-preference) { .lsd.live .art { transition: width .45s cubic-bezier(.2, .8, .2, 1), height .45s cubic-bezier(.2, .8, .2, 1); } }

/* find: search and years */
.find { display: grid; gap: 10px; }
.search { position: relative; display: block; max-width: 520px; }
.search svg { position: absolute; left: 14px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.search input { width: 100%; min-height: 48px; padding: 0 48px 0 42px; border-radius: 6px; border: 1px solid var(--line); background: rgba(7, 7, 13, .72); color: var(--fg); font: 400 18px/1 var(--serif); -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: rgba(244, 237, 225, .4); font-style: italic; }
.search input:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; font-size: 22px; color: var(--dim); }
.search .clear[hidden] { display: none; }
.shop .chips button small { font: 400 12px/1 var(--mono); margin-left: 7px; opacity: .8; }
.found { margin-top: 18px; font: 400 12px/1 var(--mono); color: var(--dim); letter-spacing: .02em; }

/* the grid: every piece, scrolling */
.grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; margin-top: 16px; }
.card { display: block; text-decoration: none; border-radius: 4px; -webkit-tap-highlight-color: transparent; }
/* each piece on a little pool of darker ground, so the paper behind never crowds the work */
.card .cw { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; padding: 7%;
  background: radial-gradient(closest-side, rgba(7, 7, 13, .8), rgba(7, 7, 13, .55) 70%, rgba(7, 7, 13, 0)); }
.card .art { box-shadow: 0 2px 4px rgba(0, 0, 0, .55), 0 14px 30px rgba(0, 0, 0, .6); transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; background: #15131f; }
.card .ct { display: block; padding: 10px 2px 0; }
.card b { display: block; font: italic 400 19px/1.15 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .ct span { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font: 400 12px/1.3 var(--mono); color: var(--dim); }
.card .ct em { font-style: normal; color: var(--fg); }
.card:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
.card.away .art { visibility: hidden; }   /* the piece is out in the room; its place in the grid waits for it */
@media (hover: hover) { .card:hover .art { transform: translateY(-4px); box-shadow: 0 4px 8px rgba(0, 0, 0, .5), 0 24px 44px rgba(0, 0, 0, .6); } .card:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; } }
.more { display: flex; justify-content: center; margin-top: 28px; }
.more[hidden], .none[hidden] { display: none; }
.more button, .none button { min-height: 48px; padding: 0 22px; border-radius: 6px; border: 1px solid var(--line); font-size: 18px; background: rgba(7, 7, 13, .6); }
.none { margin-top: 24px; font: italic 400 21px/1.4 var(--serif); color: var(--dim); }
.none button { margin-top: 14px; color: var(--fg); font-style: normal; }

/* sizes, to scale; how ordering works */
.guide, .ordering { position: relative; }
.guide { margin-top: 72px; padding-top: 34px; border-top: 1px solid var(--line); display: grid; gap: 26px; }
.guide h2, .ordering h2 { font: 400 clamp(32px, 5vw, 44px)/1 var(--serif); }
.guide .gtext > p { font: 400 19px/1.4 var(--serif); color: var(--dim); margin-top: 10px; max-width: 28em; }
.ptable { width: 100%; max-width: 460px; margin-top: 20px; border-collapse: collapse; font: 400 13px/1 var(--mono); }
.ptable th { text-align: left; font-weight: 400; color: var(--dim); padding: 0 0 10px; font-size: 12px; }
.ptable th:not(:first-child), .ptable td:not(:first-child) { text-align: right; }
.ptable td { padding: 0; border-top: 1px solid var(--line); }
.ptable td button { display: block; width: 100%; min-height: 48px; text-align: inherit; font: 400 18px/1 var(--serif); color: var(--dim); }
.ptable td:first-child button { font: 400 14px/1 var(--mono); }
.ptable tr.on td button { color: var(--fg); }
.ptable tr.on td:first-child button::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 9px 1px 0; border-radius: 50%; background: var(--fg); }
.ptable td.fon button { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.fine, .guide .gtext > p.fine { margin-top: 12px; font: 400 12px/1.5 var(--mono); color: var(--dim); }
.gfig { margin: 0; padding: 14px 10px 10px; border-radius: 4px; background: rgba(7, 7, 13, .7); }
.gfig svg { display: block; width: 100%; height: auto; }
.gfig figcaption { margin-top: 10px; font: italic 400 15px/1.35 var(--serif); color: var(--dim); }
.gfig figcaption b { font: 400 12px/1 var(--mono); font-style: normal; color: var(--fg); margin-right: 6px; }
.ordering { margin-top: 64px; padding-top: 34px; border-top: 1px solid var(--line); }
.ordering ol { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 18px; counter-reset: n; max-width: 980px; }
.ordering li { counter-increment: n; font: 400 19px/1.4 var(--serif); padding-left: 38px; position: relative; }
.ordering li::before { content: counter(n); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font: 400 12px/1 var(--mono); color: var(--dim); background: var(--bg); }
.ordering li i { color: var(--dim); }

/* ---- one piece, open: the viewing room ---- */
html.sheeton { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 40; background: var(--room); opacity: 0; transition: opacity .28s; }
.sheet.on { opacity: 1; }
.sheet.flying { background: transparent; }
.sheet.flying { opacity: 1; transition: none; }
.sheet[hidden] { display: none; }
.roomgl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* the room on top (left on a wide screen), the piece view in its own scrolling panel: they never overlap, so the room is always in view while you choose */
.scroller { position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column; }
.sbar { position: relative; flex: none; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: var(--barh); padding: env(safe-area-inset-top) var(--pad) 0; background: var(--night); border-bottom: 1px solid rgba(244, 237, 225, .08); }
.sbar .right { display: flex; align-items: center; gap: 4px; }
.sbar button { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 18px; color: var(--dim); border-radius: 6px; }
.sbar button:hover { color: var(--fg); }
.sbar .back { padding-right: 10px; margin-left: -8px; color: var(--fg); }
.sbar .step { display: flex; align-items: center; gap: 2px; font: 400 12px/1 var(--mono); color: var(--dim); }
.sbar .step button { font-size: 22px; }
.sbar .scart { gap: 7px; padding: 0 6px 0 10px; margin-right: -6px; color: var(--fg); font-size: 17px; }
.sbar .scart[hidden] { display: none; }
.sbar .scart b { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: var(--fg); color: #111020; font: 400 12px/1 var(--mono); }
.sbar button:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.swrap { flex: 1; min-height: 0; display: grid; grid-template-rows: 46svh minmax(0, 1fr); }
.stage { position: relative; z-index: 2; overflow: hidden; touch-action: pan-y; -webkit-user-select: none; user-select: none; background: var(--room); }
.stage.gl { background: transparent; }
.stage .vig { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(4, 2, 1, .5)); }
.stage .grain { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; transition: transform 1.15s cubic-bezier(.65, 0, .25, 1); }
.world.still { transition: none; }
.world > * { position: absolute; }
/* the camera rig: the Shop animates this element's transform and the 3D camera follows it; without WebGL it holds a plain dressed piece */
.stage.gl .world { visibility: hidden; }
.world .hang { display: grid; place-items: center; z-index: 2; transition: left 1.15s cubic-bezier(.65, 0, .25, 1), top 1.15s cubic-bezier(.65, 0, .25, 1), width 1.15s, height 1.15s; cursor: pointer; }
.world .hang .lsd { box-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 28px rgba(0, 0, 0, .5); }
.stage .hud { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px var(--pad) 12px; pointer-events: none; }
.stage .zoom { pointer-events: auto; white-space: nowrap; flex: none; min-height: 44px; padding: 0 18px; border-radius: 999px; background: rgba(244, 237, 225, .93); color: #111020; font: 400 17px/1 var(--serif); box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.stage .zoom:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.stage .cap { font: 400 12px/1.35 var(--mono); color: rgba(244, 237, 225, .74); text-align: right; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }

/* the right column: the plain Shop's piece view */
/* the room's warmth carries a little way into the panel beside it, so the two meet as one place */
.sinfo { position: relative; z-index: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px var(--pad) 40px; background: linear-gradient(rgba(42, 28, 18, .42), rgba(42, 28, 18, 0) 140px) no-repeat, var(--night); box-shadow: 0 -1px 0 rgba(244, 237, 225, .08); }
.sinfo h2 { font: 400 clamp(36px, 9vw, 52px)/1 var(--serif); }
.sinfo .meta { margin-top: 8px; font: 400 12px/1.4 var(--mono); color: var(--dim); }
.sinfo .lsbuy { margin-top: 20px; }
.sinfo .desc { margin-top: 22px; font: 400 19px/1.4 var(--serif); color: rgba(244, 237, 225, .82); }
.sinfo .desc[hidden] { display: none; }
.slinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.slinks a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line); text-decoration: none; font-size: 17px; color: var(--fg); }
.slinks a.dream { background: #2a1f4a; color: #e4dcff; border-color: rgba(201, 184, 255, .45); }
.slinks a[hidden] { display: none; }
.sinfo .lspair { margin-top: 22px; border-top: 1px solid var(--line); }
.sinfo .lspair .th { background: rgba(244, 237, 225, .035); }
.sinfo .lspair .art { max-width: 82%; max-height: 82%; box-shadow: 0 6px 14px rgba(0, 0, 0, .5); }
/* the frame: three or four to shift through, each worked out at the true size */
.frames { margin-top: 18px; }
.frames[hidden] { display: none; }
.frames .lbl { font: 400 12px/1 var(--mono); color: rgba(244, 237, 225, .7); letter-spacing: .02em; margin-bottom: 8px; }
.frames .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.frames button { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-height: 64px; padding: 8px 8px 9px; border-radius: 6px; border: 1px solid rgba(244, 237, 225, .16); background: rgba(255, 255, 255, .03); color: rgba(244, 237, 225, .75); font: 400 15px/1.1 var(--serif); text-align: left; }
.frames button i { display: block; width: 100%; height: 14px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.frames button[aria-checked="true"] { border-color: var(--fg); background: rgba(244, 237, 225, .1); color: var(--fg); }
.frames button:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.dims { margin-top: 12px; font: 400 12px/1.45 var(--mono); color: var(--dim); }
/* the way back out: keep scrolling past the end and the room pulls back into the grid */
.out { margin-top: 34px; padding: 26px 0 6px; border-top: 1px solid var(--line); text-align: center; color: var(--dim); }
.out .tiles { display: inline-grid; grid-template-columns: repeat(3, 9px); gap: 3px; margin-bottom: 12px; }
.out .tiles i { width: 9px; height: 11px; border-radius: 1px; background: rgba(244, 237, 225, .22); transition: background .2s; }
.out .tiles i:nth-child(5) { background: var(--fg); }
.out p { font: italic 400 17px/1.35 var(--serif); }
.out small { display: block; margin-top: 4px; font: 400 12px/1.4 var(--mono); }
.out .pull { display: block; width: 120px; height: 2px; margin: 14px auto 0; border-radius: 2px; background: rgba(244, 237, 225, .12); overflow: hidden; }
.out .pull i { display: block; height: 100%; width: 100%; background: var(--fg); transform-origin: 0 50%; transform: scaleX(var(--pull, 0)); }

/* while it grows out of its tile or pulls back into it, the room may reach past the stage */
.sheet.flying .stage { overflow: visible; }

/* the cart, always in reach on the Shop */
.cartbar { position: fixed; z-index: 50; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 7px 8px 7px 10px;
  border-radius: 12px; background: rgba(22, 20, 36, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(244, 237, 225, .14); box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  transform: translateY(0); transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s; text-align: left; }
.cartbar[hidden] { display: flex; transform: translateY(140%); opacity: 0; pointer-events: none; }
html.lscart .cartbar, html.sheeton .cartbar { transform: translateY(140%); opacity: 0; pointer-events: none; }
.cartbar .stack { display: flex; flex: none; gap: 5px; }
.cartbar .stack .art { width: 30px !important; box-shadow: 0 0 0 2px rgba(22, 20, 36, 1); border-radius: 1px; }
.cartbar .txt { flex: 1; min-width: 0; font: 400 18px/1.15 var(--serif); }
.cartbar .txt small { display: block; font: 400 12px/1.2 var(--mono); color: var(--dim); }
.cartbar .lsn { display: inline-block; }
.cartbar .go { flex: none; min-height: 44px; padding: 0 16px; border-radius: 8px; background: var(--fg); color: var(--bg); display: inline-flex; align-items: center; font: 400 17px/1 var(--serif); }
.cartbar:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
body.hasbar .foot { padding-bottom: 96px; }
.foot { background: rgba(7, 7, 13, .8); }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 34px 22px; }
  .cartbar { left: auto; right: 22px; bottom: 22px; width: 380px; }
}
@media (min-width: 900px) {
  .find { grid-template-columns: minmax(260px, 380px) 1fr; align-items: center; gap: 18px; }
  .find .chips { margin: 0; padding: 2px; }
  .guide { grid-template-columns: minmax(300px, 420px) 1fr; gap: 56px; align-items: start; }
  .ordering ol { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  /* the room fills the left, the piece view docks to the right edge and scrolls on its own */
  .swrap { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) 440px; }
  .sinfo { padding: 30px 34px 40px; box-shadow: inset 1px 0 0 rgba(244, 237, 225, .08); background: linear-gradient(90deg, rgba(42, 28, 18, .5), rgba(42, 28, 18, 0) 120px) no-repeat, var(--night); }
  .stage .hud { padding: 16px 24px 20px; }
}
@media (prefers-reduced-motion: reduce) { .sheet, .cartbar, .card .art, .world, .world > *, .world canvas.lit, .paper { transition: none !important; } }
