/* typevalid — calm y2k: a white page where everything sits in a thin black border. one tungsten orange (from TV's night shots), one sparkle, mono labels. */

:root {
  --bg: #ffffff;
  --ink: #0b0b0d;
  --line: 1.5px solid var(--ink);
  --mute: #8a8a92;
  --accent: #ff5a14;
  --soft: #f3f4f8;
  --chrome: linear-gradient(180deg, #ffffff 0%, #e4e7ee 45%, #b9bfcb 52%, #eef0f4 100%);
  --wide: "Unbounded", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); transition: background-color .7s, color .7s; font-family: var(--mono); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.spk { width: 14px; height: 14px; fill: var(--accent); flex: none; }

/* the page: one outer border, every block a bordered cell that shares its lines */
.page { position: relative; max-width: 1240px; margin: 24px auto; border: var(--line); }

/* the ktrl+khaos x typevalid stamp: random on load, and wherever you click empty page */
.stamp { position: absolute; z-index: 30; width: 124px; height: 124px; color: var(--ink); pointer-events: none;
  mix-blend-mode: multiply; opacity: .9; filter: url(#ink); translate: -50% -50%; rotate: var(--r, 0deg);
  animation: thunk .28s cubic-bezier(.3,1.5,.5,1) both; }
.stamp.fade { opacity: 0; transition: opacity .6s; }
.prints { position: relative; z-index: 31; background: var(--bg); } /* the photos always sit above the ink */
@keyframes thunk { from { scale: 1.5; opacity: 0; } to { scale: 1; opacity: .9; } }
@media (max-width: 560px) { .stamp { width: 96px; height: 96px; } }
.cell { border: var(--line); margin: -0.75px; padding: 14px 18px; }
.label { font-size: 12px; color: var(--mute); text-transform: lowercase; margin: 0 0 10px; letter-spacing: .02em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; box-shadow: 0 0 0 3px rgba(255,90,20,.15);
  animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255,90,20,0); } }

/* ---------- top bar ---------- */
.top { display: grid; grid-template-columns: auto 1fr auto; }
/* the brand: a black "screen" cell, the TV logo big, the name in white; hover = shine + flash */
.brand { position: relative; display: flex; align-items: center; gap: 14px; padding: 6px 22px 6px 8px; overflow: hidden;
  background: #000; color: #fff; isolation: isolate; }
.brand::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.22) 50%, transparent 60%) no-repeat; background-size: 250% 100%;
  background-position: 140% 0; transition: background-position .8s ease; }
.brand:hover::after { background-position: -40% 0; }
.brand-logo { position: relative; display: block; flex: none; width: 104px; height: 64px; overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .35s cubic-bezier(.2,1.4,.4,1); }
.brand:hover .brand-logo img { transform: scale(1.08) rotate(-2deg); }
.brand-flash { position: absolute; left: 28%; top: 25%; width: 34%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fffbe0 0 12%, rgba(255,240,170,.8) 30%, transparent 68%); mix-blend-mode: screen; opacity: 0;
  animation: brandflash 4.5s ease-out 2s infinite; }
.brand:hover .brand-flash { animation-duration: .9s; }
@keyframes brandflash { 0%, 86% { opacity: 0; scale: .5; } 90% { opacity: 1; scale: 1.3; } 100% { opacity: 0; scale: .9; } }
.brand-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand-word { font-family: var(--wide); font-weight: 800; font-size: 21px; letter-spacing: -.02em; line-height: 1; }
.brand-text small { display: flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #a3a3ad; }
.brand-text small i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: rec 1.4s steps(2) infinite; }
.nav { display: grid; grid-template-columns: repeat(4, 1fr); }
.nav .cell { display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, color .15s; }
.nav .cell:hover { background: var(--ink); color: #fff; }
.nav .is-soon { cursor: default; color: var(--mute); }
.nav .is-soon:hover { background: var(--soft); color: var(--mute); }
.tag { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; border: 1px solid currentColor; border-radius: 999px; padding: 0 6px; }
.clock { display: flex; align-items: center; gap: 10px; font-size: 13px; white-space: nowrap; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; }
.hero-main { padding: 28px 28px 32px; display: flex; flex-direction: column; justify-content: space-between; min-height: 300px; }
.hero h1 { font-family: var(--wide); font-weight: 500; font-size: clamp(44px, 8vw, 104px); line-height: .95; letter-spacing: -.04em; margin: 0;
  user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.hero h1 .line { display: block; }
.ch { display: inline-block; font-variation-settings: "wght" var(--w, 500); transform: translateY(var(--y, 0)); transition: font-variation-settings .35s, transform .35s; }
.hero h1.live .ch { transition: font-variation-settings .08s linear, transform .08s linear; }
.hint { position: absolute; right: 18px; bottom: 14px; margin: 0; font-size: 11px; color: var(--mute); }
.hero-main { position: relative; }
.accent { color: var(--accent); }
.hero-side { display: grid; grid-template-rows: auto 1fr auto; }

/* the TV logo on a black screen: tilts with the pointer, tap = camera flash */
.screen { position: relative; display: block; width: auto; padding: 0; background: #000; cursor: pointer; overflow: hidden;
  aspect-ratio: 16 / 10; perspective: 800px; -webkit-tap-highlight-color: transparent; }
/* the logo rig: the real logo + code-drawn life on top (positions are % of the cropped logo, 798x497) */
.rig-float { position: absolute; left: 4%; right: 4%; top: 50%; translate: 0 -50%; aspect-ratio: 798 / 497; display: block;
  animation: float 6s ease-in-out infinite; transform-style: preserve-3d; }
@keyframes float { 0%,100% { transform: translateY(0) rotateY(-5deg) rotateZ(-.6deg); } 50% { transform: translateY(-5px) rotateY(5deg) rotateZ(.6deg); } }
.rig { position: absolute; inset: 0; display: block; isolation: isolate;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1)); transition: transform .5s cubic-bezier(.2,.8,.2,1);
  animation: power-on .9s cubic-bezier(.2,.9,.2,1) .25s both; }
@keyframes power-on {
  0% { clip-path: inset(49.5% 50% 49.5% 50%); filter: brightness(4); }
  35% { clip-path: inset(49.5% 0 49.5% 0); filter: brightness(4); }
  100% { clip-path: inset(0 0 0 0); filter: brightness(1); } }
.rig img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.screen.tilting .rig { transition: transform .08s linear; }
/* a chrome shine sweeping across (overlay keeps black black, lights up the chrome) */
.glint { position: absolute; inset: 0; mix-blend-mode: overlay; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.95) 47%, rgba(255,255,255,.2) 52%, transparent 60%) no-repeat;
  background-size: 260% 100%; animation: glint 5.5s ease-in-out 1.4s infinite; }
@keyframes glint { 0% { background-position: 130% 0; } 45%, 100% { background-position: -40% 0; } }
/* the flash burst flares like a camera flash */
.burst-fx { position: absolute; left: 28.2%; top: 25.2%; width: 22%; translate: -50% -50%; overflow: visible; pointer-events: none;
  fill: #fff8cf; mix-blend-mode: screen; filter: drop-shadow(0 0 6px #fff3a0) drop-shadow(0 0 18px rgba(255,220,120,.8));
  opacity: 0; animation: flare 3.2s ease-out 1.6s infinite; }
@keyframes flare { 0%, 62% { opacity: 0; transform: scale(.4) rotate(0deg); } 66% { opacity: 1; transform: scale(1.15) rotate(8deg); }
  80% { opacity: .35; transform: scale(.9) rotate(14deg); } 100% { opacity: 0; transform: scale(.7) rotate(18deg); } }
.screen.snap .burst-fx { animation: flare-big .55s ease-out; }
@keyframes flare-big { 0% { opacity: 1; transform: scale(2.4) rotate(0); } 100% { opacity: 0; transform: scale(.8) rotate(25deg); } }
/* the four LEDs chase */
.leds i { position: absolute; width: 2.6%; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; mix-blend-mode: screen;
  background: radial-gradient(circle, #fff 0 18%, var(--c) 40%, transparent 72%); opacity: .25; animation: led 1.6s steps(1) infinite; }
.leds i:nth-child(1) { --c: #ff3b30; left: 73.7%; top: 42.3%; animation-delay: 0s; }
.leds i:nth-child(2) { --c: #ffd60a; left: 76.2%; top: 41.2%; animation-delay: .4s; }
.leds i:nth-child(3) { --c: #34ff6b; left: 78.4%; top: 40.4%; animation-delay: .8s; }
.leds i:nth-child(4) { --c: #3b82ff; left: 80.8%; top: 39.8%; animation-delay: 1.2s; }
@keyframes led { 0% { opacity: 1; scale: 1.6; } 25%, 100% { opacity: .25; scale: 1; } }
/* the viewfinder glows warm */
.lens { position: absolute; left: 58.9%; top: 22.1%; width: 9%; aspect-ratio: 1.4; translate: -50% -50%; border-radius: 40%; mix-blend-mode: screen;
  background: radial-gradient(ellipse, rgba(255,170,90,.9), rgba(255,90,20,.35) 45%, transparent 70%); animation: lens 2.8s ease-in-out infinite; }
@keyframes lens { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
/* a slow rolling scan band + the CRT line on power-on */
.crt { position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.06) 50%, transparent) no-repeat; background-size: 100% 30%;
  animation: roll 7s linear infinite; }
@keyframes roll { from { background-position: 0 -40%; } to { background-position: 0 140%; } }
.screen::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px); }
.screen-tl, .screen-br { position: absolute; z-index: 1; font-size: 11px; color: #d9d9de; letter-spacing: .1em; text-transform: uppercase; }
.screen-tl { top: 10px; left: 12px; display: flex; align-items: center; gap: 6px; }
.screen-tl i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: rec 1.4s steps(2) infinite; }
@keyframes rec { 50% { opacity: .15; } }
.screen-br { bottom: 10px; right: 12px; }
.flash { position: absolute; inset: 0; z-index: 2; background: #fff; opacity: 0; pointer-events: none; }
.screen.snap .flash { animation: snap .5s ease-out; }
.screen.snap .rig { --sc: .94; }
@keyframes snap { 0% { opacity: 1; } 100% { opacity: 0; } }
.pageflash { position: fixed; inset: 0; z-index: 80; background: #fff; opacity: 0; pointer-events: none; }
.pageflash.go { animation: pageflash .45s ease-out; }
@keyframes pageflash { 0% { opacity: .85; } 100% { opacity: 0; } }
.spec { margin: -0.75px; padding: 0; display: grid; }
.spec div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: var(--line); }
.spec div:last-child { border-bottom: 0; }
.spec dt { color: var(--mute); font-size: 12px; }
.spec dd { margin: 0; font-weight: 700; }
.pill { font-weight: 400; font-size: 12px; padding: 3px 12px; border: var(--line); border-radius: 999px; background: var(--chrome); }
.status { display: flex; align-items: center; gap: 10px; font-size: 13px; }

/* ---------- ticker ---------- */
.ticker { overflow: hidden; border-block: var(--line); margin-block: -0.75px; background: var(--soft); }
.ticker-track { display: flex; align-items: center; gap: 22px; width: max-content; padding: 8px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  will-change: transform; }
.ticker .spk { width: 11px; height: 11px; }

/* ---------- the prints ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.print { display: block; width: 100%; text-align: left; background: var(--bg); border: var(--line); margin: -0.75px; padding: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent; }
.print-head, .print-foot { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; font-size: 12px; }
.print-head { border-bottom: var(--line); color: var(--mute); }
.print-foot { border-top: var(--line); }
.print-foot .arrow { transition: transform .2s; }
.print-img { aspect-ratio: 4 / 5; position: relative; overflow: hidden; background: var(--soft); margin: 14px; border: var(--line); }
.print-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.print-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--mute);
  background-image: linear-gradient(var(--soft), var(--soft)), radial-gradient(circle, #d6d8e0 1px, transparent 1.4px);
  background-size: 100% 100%, 12px 12px; background-blend-mode: multiply; }
.print-empty b { font-family: var(--wide); font-weight: 400; font-size: 44px; color: #c9ccd6; letter-spacing: -.04em; }
.print-empty span { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.print:hover .print-img img { transform: scale(1.03); }
.print:hover .print-foot, .print:focus-visible .print-foot { background: var(--ink); color: #fff; }
.print:hover .arrow { transform: translateX(4px); }
.print:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

/* ---------- view switcher ---------- */
.views { display: grid; grid-template-columns: auto auto auto auto 1fr; font-size: 13px; }
.views .cell { padding: 10px 16px; display: flex; align-items: center; gap: 8px; background: var(--bg); }
.views-label { color: var(--mute); }
.views-btns { display: flex; }
.vbtn { cursor: pointer; transition: background .15s, color .15s; }
.vbtn:hover { background: var(--soft); }
.vbtn[aria-selected="true"] { background: var(--ink); color: #fff; }
.shuffle { cursor: pointer; }
.shuffle:hover { background: var(--accent); color: #fff; }
.shuffle:hover .spk { fill: #fff; }
.shuffle[hidden] { display: none; }
.views-hint { color: var(--mute); justify-content: flex-end; }

/* grid tilt + chrome glare (fine pointers) */
.grid .print-img { transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.grid .print.tilting .print-img { transition: transform .08s linear; }
.print-img::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.75), rgba(200,210,255,.18) 30%, transparent 60%);
  mix-blend-mode: soft-light; }
.grid .print.tilting .print-img::after { opacity: 1; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* the pile: loose prints on a desk, drag them */
.pile { position: relative; height: 680px; overflow: hidden; border: var(--line); margin: -0.75px;
  background: radial-gradient(circle, #dfe1e8 1px, transparent 1.4px) 0 0 / 16px 16px, var(--bg); }
.pile[hidden], .grid[hidden], .index[hidden] { display: none; }
.card { position: absolute; left: 0; top: 0; width: 210px; touch-action: none; cursor: grab;
  transform: translate(var(--x, 0px), var(--y, 0px)) rotate(var(--r, 0deg)) scale(var(--s, 1));
  transition: transform .55s cubic-bezier(.2,1.2,.3,1), box-shadow .2s; box-shadow: 3px 3px 0 var(--ink); }
.card.dragging { cursor: grabbing; transition: box-shadow .2s; --s: 1.04; box-shadow: 10px 12px 0 var(--ink); }
.card .print-img { margin: 10px; }
.card .print-empty b { font-size: 34px; }

/* the index: a list with a floating preview */
.index { display: block; }
.row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 120px 120px 40px; align-items: center; width: 100%; text-align: left;
  border: var(--line); margin: -0.75px; padding: 0; background: var(--bg); cursor: pointer; font-size: 13px; }
.row > span { padding: 14px 16px; }
.row .r-name { font-family: var(--wide); font-weight: 400; font-size: clamp(16px, 2vw, 22px); letter-spacing: -.02em; }
.row .r-mute { color: var(--mute); }
.row .r-go { text-align: right; transition: transform .2s; }
.row:hover, .row:focus-visible { background: var(--ink); color: #fff; outline: none; }
.row:hover .r-mute { color: #b9bccb; }
.row:hover .r-go { transform: translateX(4px); }
.peek { position: fixed; left: 0; top: 0; z-index: 40; width: 190px; pointer-events: none; background: var(--bg); border: var(--line);
  box-shadow: 6px 6px 0 var(--ink); padding: 8px; opacity: 0; transform: translate(-999px, -999px);
  transition: opacity .2s; }
.peek.on { opacity: 1; }
.peek .print-img { margin: 0; }

/* cursor label (fine pointers only) */
.cursor { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; transform: translate(-999px, -999px); }
.cursor span { display: inline-block; translate: 16px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  padding: 3px 10px; border: var(--line); border-radius: 999px; background: var(--chrome); scale: .4; opacity: 0;
  transition: scale .2s cubic-bezier(.2,1.4,.4,1), opacity .15s; }
.cursor.on span { scale: 1; opacity: 1; }
@media (pointer: coarse) { .cursor, .peek { display: none; } }

/* click sparkles */
.burst { position: fixed; z-index: 70; width: 12px; height: 12px; pointer-events: none; fill: var(--accent);
  animation: burst .65s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes burst { from { transform: translate(-50%, -50%) scale(.3) rotate(0); opacity: 1; }
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(90deg); opacity: 0; } }

/* ---------- about + shop ---------- */
.info { display: grid; grid-template-columns: minmax(0, 1fr) 360px; }
.info .cell { padding: 24px 28px 28px; }
.lead { font-family: var(--wide); font-weight: 400; font-size: clamp(18px, 2.2vw, 24px); line-height: 1.3; letter-spacing: -.02em; margin: 0 0 14px; max-width: 30ch; }
.placeholder { color: var(--mute); margin: 0; }
.sig { color: var(--mute); margin: 0; font-size: 13px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: var(--line); border-radius: 999px; cursor: pointer;
  background: var(--ink); color: #fff; font-size: 13px; transition: background .15s, color .15s; }
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: var(--chrome); color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- footer ---------- */
.foot { display: grid; grid-template-columns: 1fr auto 1fr; font-size: 12px; }
.foot .cell { padding: 12px 18px; }
.foot a.cell { text-align: right; }
.foot a.cell:hover { background: var(--ink); color: #fff; }
.foot-mid { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* ---------- viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.viewer[hidden] { display: none; }
.viewer-scrim { position: absolute; inset: 0; background: rgba(255,255,255,.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.viewer-win { position: relative; width: min(900px, 100%); max-height: calc(100svh - 32px); display: flex; flex-direction: column;
  background: var(--bg); border: var(--line); box-shadow: 8px 8px 0 var(--ink); animation: pop .22s cubic-bezier(.2,1.3,.4,1); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.viewer-bar { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 14px; border-bottom: var(--line); background: var(--chrome); font-size: 12px; }
.viewer-bar #viewerName { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dots { display: flex; gap: 5px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); background: #fff; display: block; }
.dots i:first-child { background: var(--accent); }
.x { width: 28px; height: 24px; border: var(--line); border-radius: 6px; background: #fff; cursor: pointer; font-size: 18px; line-height: 1; padding: 0; }
.x:hover { background: var(--ink); color: #fff; }
.viewer-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); overflow: auto; }
.viewer-frame { padding: 20px; border-right: var(--line); }
.viewer-frame .print-img { margin: 0; cursor: zoom-in; }
.viewer-frame { touch-action: pan-y; }
.loupe { position: fixed; left: 0; top: 0; z-index: 55; width: 170px; height: 170px; border-radius: 50%; border: var(--line);
  box-shadow: 4px 4px 0 var(--ink); pointer-events: none; background-repeat: no-repeat; background-color: var(--soft);
  opacity: 0; transform: translate(-999px, -999px); transition: opacity .15s; }
.loupe.on { opacity: 1; }
.viewer-tip { font-size: 11px; color: var(--mute); margin: 0 0 10px; }
.viewer-info { padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.viewer-subject { font-family: var(--wide); font-weight: 600; font-size: clamp(26px, 4vw, 40px); line-height: 1; letter-spacing: -.03em; margin: 0; }
.viewer-shop { color: var(--mute); margin: 4px 0 16px; }
.viewer-nav { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- smaller ---------- */
@media (max-width: 960px) {
  .top { grid-template-columns: 1fr auto; }
  .nav { grid-column: 1 / -1; grid-row: 2; }
  .hero, .info { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .views { grid-template-columns: auto 1fr auto auto; }
  .views .views-hint { display: none; }
  .row { grid-template-columns: 56px minmax(0, 1fr) 90px 36px; }
  .row .r-size { display: none; }
}
@media (max-width: 560px) {
  .page { margin: 16px; }
  .top { grid-template-columns: minmax(0, 1fr) auto; }
  .brand { padding: 8px 12px; gap: 8px; min-width: 0; }
  .brand-logo { width: 78px; height: 48px; }
  .brand-word { font-size: 17px; }
  .brand { gap: 10px; padding: 4px 14px 4px 6px; }
  .clock { padding: 10px 12px; font-size: 11px; gap: 7px; }
  .nav { grid-template-columns: repeat(2, 1fr); }
  .nav .cell { padding: 12px 8px; }
  .hero-main { min-height: 220px; padding: 20px 18px 24px; }
  .print-img { margin: 8px; }
  .print-head, .print-foot { padding: 7px 10px; font-size: 11px; }
  .print-empty b { font-size: 32px; }
  .views .views-label { display: none; }
  .views { grid-template-columns: 1fr auto auto; }
  .views .darkbtn { padding: 10px 12px; gap: 7px; }
  .views-btns .cell { flex: 1; justify-content: center; padding: 10px 6px; }
  .pile { height: 560px; }
  .card { width: 140px; }
  .card .print-img { margin: 7px; }
  .row { grid-template-columns: 48px minmax(0, 1fr) 30px; }
  .row .r-status { display: none; }
  .row > span { padding: 12px 10px; }
  .hint { display: none; }
  .hero-main .label { min-height: 74px; } /* room for the seal beside it */
  .info .cell { padding: 20px 18px 22px; }
  .viewer-body { grid-template-columns: 1fr; }
  .viewer-frame { border-right: 0; border-bottom: var(--line); padding: 14px; }
  .viewer-frame .flip { max-width: 300px; margin: 0 auto; }
  .viewer-info { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- darkroom: the lights go red, the prints develop ---------- */
.darkbtn { cursor: pointer; }
.darkbtn .bulb { width: 12px; height: 12px; border-radius: 50%; border: var(--line); background: var(--bg); transition: background .3s, box-shadow .3s; }
.darkbtn:hover { background: var(--soft); }
html.darkroom { --bg: #0e0404; --ink: #c9271c; --mute: #7a2f28; --soft: #1b0806;
  --chrome: linear-gradient(180deg, #3b1611 0%, #26100c 48%, #1a0a08 52%, #2c120e 100%); }
html.darkroom body { background: var(--bg); }
html.darkroom body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 45% at 50% -8%, rgba(255,40,20,.22), transparent 70%); animation: safelight 5s ease-in-out infinite; }
@keyframes safelight { 50% { opacity: .7; } }
html.darkroom .darkbtn .bulb { background: #ff2a1a; border-color: #ff2a1a; box-shadow: 0 0 10px 2px rgba(255,42,26,.7); }
html.darkroom .stamp { mix-blend-mode: screen; color: #ff3b2f; opacity: .55; }
html.darkroom .brand, html.darkroom .screen { filter: saturate(.6) sepia(.35) hue-rotate(-20deg); }
/* the print under the safelight: blank paper that develops */
html.darkroom .print-img::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: #ff2a1a; mix-blend-mode: multiply; opacity: .62; }
html.darkroom .print-img img { opacity: 0; filter: grayscale(1) brightness(2.4) contrast(.35);
  transition: opacity 2.6s ease, filter 3.4s cubic-bezier(.3,.6,.2,1), transform .5s cubic-bezier(.2,.8,.2,1); }
html.darkroom .print-img.dev img { opacity: 1; filter: grayscale(1) contrast(1.2) brightness(.92); }
/* lights on: the viewer and the peek show the real print */
html.darkroom .viewer .print-img::before, html.darkroom .peek .print-img::before { display: none; }
html.darkroom .viewer .print-img img, html.darkroom .peek .print-img img { opacity: 1; filter: none; }
html.darkroom .viewer-scrim { background-color: rgba(14,4,4,.86); }

/* ---------- flip-side: the back of the photo paper ---------- */
.viewer-frame { perspective: 1400px; }
.flip { position: relative; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3,1.25,.4,1); }
.flip.flipped { transform: rotateY(180deg); }
.face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.back { position: absolute; inset: 0; transform: rotateY(180deg); }
.flip.flipped .front .print-img { cursor: default; }
.back-paper { position: relative; height: 100%; overflow: hidden; border: 1.5px solid #0b0b0d; color: #3a3a44;
  display: grid; grid-template-rows: auto 1fr auto; padding: 16px 18px 30px;
  background:
    radial-gradient(circle at 1px 1px, rgba(0,0,0,.05) 1px, transparent 1.4px) 0 0 / 5px 5px,
    linear-gradient(160deg, #f8f5ec, #ece7da); }
.back-water { position: absolute; inset: -30%; display: flex; flex-direction: column; justify-content: center; gap: 18px;
  rotate: -28deg; pointer-events: none; font-family: var(--mono); font-size: 11px; letter-spacing: .5em; color: rgba(0,0,0,.055); white-space: nowrap; }
.back-top { display: flex; justify-content: space-between; align-items: baseline; position: relative; }
.back-top .hand { font-size: 30px; }
.back-top small { font-family: var(--mono); font-size: 9px; letter-spacing: .18em; color: #8b8794; }
.back-mid { align-self: center; position: relative; }
.back-mid .back-title { font-family: "Reenie Beanie", cursive; font-size: clamp(36px, 5vw, 50px); line-height: .95; color: #2f2f38; margin: 0; rotate: -2deg; }
.back-mid .back-ed { font-family: "Reenie Beanie", cursive; font-size: 28px; margin: 8px 0 0; color: #4a4a55; }
.back-foot { display: flex; align-items: flex-end; justify-content: space-between; position: relative; }
.back-sig { font-family: "Reenie Beanie", cursive; font-size: 46px; line-height: .8; color: #26262e; position: relative; }
.back-sig::after { content: ""; position: absolute; left: -4px; right: -18px; bottom: -6px; height: 2px; background: #3a3a44; border-radius: 2px; rotate: -4deg; opacity: .7; }
.back-seal { width: 104px; height: 104px; color: #3b3fc6; opacity: .82; mix-blend-mode: multiply; filter: url(#ink); rotate: 11deg; margin: -10px -6px -6px 0; }
.back-meta { position: absolute; left: 18px; right: 18px; bottom: 9px; font-family: var(--mono); font-size: 8px; letter-spacing: .14em; color: #9a96a3; text-transform: uppercase; }
.hand { font-family: "Reenie Beanie", cursive; }
.flipbtn[aria-pressed="true"] { background: var(--ink); color: #fff; }
@media (prefers-reduced-motion: reduce) { .flip { transition: none; } }
