/* Brand Board — Sir Newson house style: black stage, warm white type,
   sunset accent, Garamond display, Inter body, SUSE Mono labels. */

:root {
  --bg: #000;
  --surface: #0a0806;
  --surface-2: #16120f;
  --ink: #f7f3ed;
  --ink-70: rgb(247 243 237 / .7);
  --ink-50: rgb(247 243 237 / .5);
  --ink-30: rgb(247 243 237 / .3);
  --line: rgb(247 243 237 / .08);
  --line-strong: rgb(247 243 237 / .16);
  --sn: #f28b2c;           /* Sir Newson sunset — the frame */
  --accent: #f28b2c;       /* client accent — set per board */
  --accent-ink: #000;
  --radius: 12px;
  --gap: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  --font-sans: "Inter", system-ui, sans-serif;
  --font-display: "EB Garamond", Georgia, serif;
  --font-mono: "SUSE Mono", ui-monospace, monospace;
  --dots: radial-gradient(circle, rgb(247 243 237 / .085) 1px, transparent 1.25px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img, video, svg { display: block; max-width: 100%; }
button, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  margin: 0;
  font: 500 11px/1.2 var(--font-mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sn);
}
.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.02em;
}
.display em { font-style: italic; font-weight: 500; color: var(--ink-50); }
.display.sm { font-size: 30px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px var(--gutter);
  height: 62px;
  background: #000;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 28px; width: auto; }
.topbar-actions { display: flex; gap: 8px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px;
  background: rgb(10 8 6 / .7); backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong); border-radius: 10px;
  font: 500 11px var(--font-mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-70); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--sn); color: var(--ink); }
.btn-ghost svg { width: 17px; height: 17px; }
.count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px;
  display: inline-grid; place-items: center;
  background: var(--sn); color: #000; font: 600 11px var(--font-sans); letter-spacing: 0;
}
.count:empty, .count[data-zero] { background: var(--line-strong); color: var(--ink-70); }

.btn-accent {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border: 0; border-radius: 99px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 15px; cursor: pointer;
  transition: transform .2s var(--ease), filter .2s;
}
.btn-accent:hover { filter: brightness(1.08); }
.btn-accent:active { transform: scale(.97); }
.btn-accent svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.btn-accent[aria-pressed="true"] svg { fill: currentColor; }
.btn-accent.outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* ---------- Hero ---------- */
main { overflow-x: clip; background-image: var(--dots); background-size: 12px 12px; }
.hero { padding: clamp(40px, 9vw, 120px) var(--gutter) clamp(28px, 5vw, 56px); max-width: 1500px; margin: 0 auto; }
.hero .display { font-size: clamp(52px, 11vw, 148px); margin-top: 18px; }
.hero .display .line2 { display: block; font-style: italic; font-weight: 500; color: var(--ink-50); }
.hero .display .dot { color: var(--accent); }
.hero-foot { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px 64px; margin-top: clamp(28px, 4vw, 48px); align-items: end; }
.intro { margin: 0; max-width: 56ch; color: var(--ink-70); font-size: clamp(16px, 1.5vw, 19px); }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 18px 24px; margin: 0; }
.meta div { border-top: 1px solid var(--line-strong); padding-top: 10px; }
.meta dt { font: 500 10px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-50); }
.meta dd { margin: 4px 0 0; font-size: 15px; }
.meta .status { display: inline-flex; align-items: center; gap: 7px; }
.meta .status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }

/* ---------- Filters ---------- */
.filters {
  position: sticky; top: 62px; z-index: 20;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 10px max(var(--gutter), calc((100% - 1500px) / 2 + var(--gutter))) 16px;
  background: linear-gradient(#000 78%, rgb(0 0 0 / 0));
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 16px;
  border-radius: 99px; border: 1px solid var(--line-strong);
  background: rgb(10 8 6 / .85); backdrop-filter: blur(10px);
  color: var(--ink-70); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.chip sup { font: 500 10px var(--font-mono); margin-left: 4px; color: var(--ink-30); vertical-align: 2px; }
.chip:hover { color: var(--ink); border-color: var(--ink-30); }
.chip[aria-pressed="true"] { background: var(--ink); color: #000; border-color: var(--ink); }
.chip[aria-pressed="true"] sup { color: rgb(0 0 0 / .45); }

/* ---------- Masonry board ---------- */
.board {
  display: flex; flex-direction: column; gap: calc(var(--gap) * 2);
  padding: 6px var(--gutter) 40px;
  max-width: 1500px; margin: 0 auto;
  min-height: 50vh;
}
.masonry { display: flex; gap: var(--gap); align-items: flex-start; }
.pin-wide { margin: calc(var(--gap) * 1.5) 0; }
.pin-wide .pin-cap { display: flex; align-items: baseline; gap: 14px; padding-top: 14px; }
.pin-wide .pin-title { font-family: var(--font-display); font-size: clamp(24px, 3vw, 38px); font-weight: 600; line-height: 1; }
/* Cover: the client's banner becomes the hero — edge to edge, fading into the page. */
.cover { position: relative; }
.cover:empty { display: none; }
.pin-cover { cursor: zoom-in; }
.pin-cover .pin-cap, .pin-cover .pin-tag { display: none; }
.pin-cover .pin-media {
  border-radius: 0; box-shadow: none; background: #000;
  /* Height from the banner's own shape, but never a sliver on phones nor taller than the screen.
     aspect-ratio is dropped here: combined with a min-height it would widen the page. */
  aspect-ratio: auto !important;
  height: clamp(220px, calc(100vw * var(--r, .25)), 78vh);
  -webkit-mask-image: linear-gradient(#000 82%, transparent);
  mask-image: linear-gradient(#000 82%, transparent);
}
.pin-cover:hover .pin-media { box-shadow: none; }
.pin-cover .pin-media img { object-position: left center; animation: coverin 1.4s var(--ease) both; }
.pin-cover:hover .pin-media img { transform: scale(1.015); }
@keyframes coverin { from { transform: scale(1.06); filter: brightness(.4); } }
.pin-cover .pin-love { top: 14px; right: var(--gutter); }
.pin-cover .pin-dl { bottom: auto; top: 64px; right: var(--gutter); }
.cover + .hero { padding-top: clamp(20px, 4vw, 48px); }
.col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }

.pin {
  position: relative; display: block; width: 100%;
  padding: 0; border: 0; text-align: left; cursor: zoom-in;
  background: transparent;
}
.pin-media {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .25s;
}
.pin:hover .pin-media { box-shadow: 0 0 0 1px color-mix(in srgb, var(--sn) 45%, transparent); }
.pin-media img, .pin-media video { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .4s; }
.pin-media img { opacity: 0; }
.pin-media img.loaded { opacity: 1; }
.pin:hover .pin-media img, .pin:hover .pin-media video { transform: scale(1.03); }
.pin-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgb(0 0 0 / .45), transparent 30%, transparent 62%, rgb(0 0 0 / .6));
  opacity: 0; transition: opacity .25s;
}
.pin:hover .pin-media::after, .pin:focus-visible .pin-media::after { opacity: 1; }
.pin-tag {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  font: 500 10px var(--font-mono); letter-spacing: .18em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 6px; background: rgb(0 0 0 / .55); backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(-4px); transition: .25s var(--ease);
}
.pin:hover .pin-tag, .pin:focus-visible .pin-tag { opacity: 1; transform: none; }
.pin-love {
  position: absolute; right: 10px; top: 10px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  opacity: 0; transform: scale(.85); transition: .25s var(--ease);
}
.pin-love svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pin-love[aria-pressed="true"] { opacity: 1; transform: none; }
.pin-love[aria-pressed="true"] svg { fill: currentColor; }
.pin:hover .pin-love, .pin-love:focus-visible { opacity: 1; transform: none; }
.pin-love.pop { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.25); } }
.pin-dl {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgb(0 0 0 / .55); backdrop-filter: blur(8px); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  opacity: 0; transform: translateY(4px); transition: .25s var(--ease);
}
.pin-dl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pin-dl:hover { background: var(--ink); color: #000; }
.pin:hover .pin-dl, .pin-dl:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .pin-dl { opacity: 1; transform: none; width: 34px; height: 34px; } }

/* File pin (PDF etc.) */
.file-pin { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 18px; background: var(--surface); }
.file-ext { align-self: flex-start; margin-bottom: auto; padding: 6px 10px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: 600 12px var(--font-mono); letter-spacing: .12em; }
.file-name { font-family: var(--font-display); font-size: 22px; line-height: 1.1; word-break: break-word; }
.file-size { font: 500 11px var(--font-mono); letter-spacing: .14em; color: var(--ink-50); }

.pin-cap { padding: 9px 4px 2px; }
.pin-title { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.35; }
.pin-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-50); }
.pin-noted { display: inline-block; margin-left: 6px; color: var(--sn); }
.play {
  position: absolute; left: 50%; top: 50%; z-index: 2; translate: -50% -50%;
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(0 0 0 / .5); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.play::before { content: ""; margin-left: 4px; border-left: 15px solid var(--ink); border-block: 9px solid transparent; }

/* Swatch pin */
.swatch { display: flex; flex-direction: column; justify-content: space-between; padding: 16px; height: 100%; }
.swatch .sw-name { font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1; }
.swatch .sw-codes { font: 500 11px/1.7 var(--font-mono); letter-spacing: .08em; opacity: .75; }
.swatch .sw-role { font: 500 10px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; opacity: .7; }

/* Palette pin */
.palette { display: grid; height: 100%; }
.palette span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; min-height: 0; overflow: hidden; font: 500 10px var(--font-mono); letter-spacing: .1em; white-space: nowrap; }
.palette span i { font-style: normal; }
.palette span b { font: 500 13px var(--font-sans); letter-spacing: 0; }
.lb-card .palette span { padding: 0 22px; font-size: 13px; }
.lb-card .palette span b { font-size: 18px; }

/* Type pin */
.type-pin { container-type: inline-size; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 18px; background: var(--surface); }
.type-pin .aa { font-size: min(92px, 34cqw); line-height: 1; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; }
.type-pin .glyphs { font-size: 15px; line-height: 1.5; color: var(--ink-70); word-break: break-all; }
.type-pin .tp-name { font: 500 10px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-50); }

/* Words pin */
.words { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; height: 100%; padding: 22px 20px; }
.words blockquote { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 30px; line-height: 1.05; letter-spacing: -.01em; }
.words blockquote em { font-style: italic; }
.words .w-by { font: 500 10px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
.words ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.words li { padding: 5px 11px; border-radius: 99px; font-size: 13px; box-shadow: inset 0 0 0 1px currentColor; opacity: .85; }

.empty { flex: 1; text-align: center; color: var(--ink-50); padding: 80px 0; }

/* ---------- Closing ---------- */
.closing { max-width: 1500px; margin: 0 auto; padding: clamp(60px, 10vw, 140px) var(--gutter); border-top: 1px solid var(--line); }
.closing .display { font-size: clamp(44px, 8vw, 104px); margin: 16px 0 22px; }
.closing .intro { margin-bottom: 28px; }

.foot { max-width: 1500px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter) 30px; border-top: 1px solid var(--line); }
.foot-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--gap); margin: 18px 0 36px; }
.foot-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 180px;
  padding: 24px 64px 24px 24px; border-radius: calc(var(--radius) + 6px);
  background: var(--surface) var(--dots); background-size: 12px 12px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  text-decoration: none; overflow: hidden;
  transition: box-shadow .3s, transform .3s var(--ease);
}
.foot-card::before {
  content: ""; position: absolute; right: -80px; bottom: -120px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgb(242 139 44 / .35), transparent 65%);
  opacity: .5; transition: opacity .4s, transform .6s var(--ease);
}
.foot-card:hover { box-shadow: inset 0 0 0 1px var(--sn); transform: translateY(-3px); }
.foot-card:hover::before { opacity: 1; transform: scale(1.2); }
.foot-kicker { font: 500 10px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-50); }
.foot-title { margin-top: auto; font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3.4vw, 42px); line-height: 1; letter-spacing: -.01em; }
.foot-title em { display: block; font-style: italic; font-weight: 500; color: var(--sn); }
.foot-arrow {
  position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 18px;
  box-shadow: inset 0 0 0 1px var(--line-strong); transition: background .3s, color .3s, transform .3s var(--ease);
}
.foot-card:hover .foot-arrow { background: var(--sn); color: #000; transform: rotate(45deg); }
.foot-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 22px; border-top: 1px solid var(--line);
  font: 500 11px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-50);
}
.foot-base a { color: var(--sn); text-decoration: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  background: rgb(0 0 0 / .96); backdrop-filter: blur(16px);
  animation: fade .25s both;
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-stage { position: relative; display: grid; place-items: center; padding: 64px 72px; min-height: 0; overflow: hidden; }
.lb-stage > * { max-width: 100%; max-height: calc(100vh - 128px); border-radius: var(--radius); animation: zoomin .35s var(--ease) both; }
@keyframes zoomin { from { opacity: 0; transform: scale(.97); } }
.lb-stage img, .lb-stage video { object-fit: contain; width: auto; height: auto; }
.lb-stage .lb-card { width: min(520px, 100%); aspect-ratio: 4 / 5; overflow: hidden; }
.lb-stage .lb-card.wide { aspect-ratio: 16 / 10; width: min(760px, 100%); }
.lb-side {
  display: flex; flex-direction: column; gap: 14px;
  padding: 72px 28px 28px; border-left: 1px solid var(--line);
  background: var(--surface); overflow-y: auto;
}
.lb-title { margin: 0; font-family: var(--font-display); font-size: 36px; font-weight: 600; line-height: 1; letter-spacing: -.01em; }
.lb-note { margin: 0; color: var(--ink-70); }
.lb-note:empty { display: none; }
.lb-extra:empty { display: none; }
.lb-extra { display: grid; gap: 8px; }
.code-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent;
  font: 500 13px var(--font-mono); cursor: pointer; text-align: left;
}
.code-row:hover { border-color: var(--sn); }
.code-row span:first-child { color: var(--ink-50); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.lb-comment { display: grid; gap: 8px; margin-top: auto; }
.lb-comment textarea, #overallNote {
  width: 100%; resize: vertical; padding: 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line-strong); color: var(--ink);
  font-size: 14px; line-height: 1.5;
}
.lb-comment textarea:focus { outline: none; border-color: var(--accent); }
.lb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lb-actions .lb-pos { margin-left: auto; }
.lb-actions .btn-accent { height: 44px; padding: 0 18px; text-decoration: none; }
.lb-actions .btn-accent[hidden] { display: none; }
.btn-ghost { text-decoration: none; }
.btn-ghost[hidden] { display: none; }
.lb-pos { font: 500 11px var(--font-mono); letter-spacing: .16em; color: var(--ink-50); }
.lb-btn {
  position: absolute; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgb(22 18 15 / .8); border: 1px solid var(--line-strong); color: var(--ink);
  font-size: 18px; transition: border-color .2s, background .2s;
}
.lb-btn:hover { border-color: var(--sn); }
.lb-btn.static { position: static; flex: none; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 376px; top: 50%; translate: 0 -50%; }
.lightbox.presenting { grid-template-columns: 1fr; }
.lightbox.presenting .lb-side { display: none; }
.lightbox.presenting .lb-next { right: 16px; }
.lightbox.presenting .lb-stage { padding: 32px 72px; }
.lightbox.presenting .lb-stage > * { max-height: calc(100vh - 64px); }
.present-cap {
  position: absolute; left: 50%; bottom: 18px; translate: -50% 0; z-index: 2;
  font: 500 11px var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-50);
  white-space: nowrap; pointer-events: none; display: none;
}
.lightbox.presenting .present-cap { display: block; }

/* ---------- Drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 110; }
.drawer[hidden] { display: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .6); animation: fade .25s both; }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 100%);
  display: flex; flex-direction: column; gap: 18px; padding: 24px;
  background: var(--surface); border-left: 1px solid var(--line-strong);
  overflow-y: auto; animation: slidein .35s var(--ease) both;
}
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer-head .display { margin-top: 8px; }
.drawer-list { display: grid; gap: 10px; }
.pick { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.pick-thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.pick-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pick-title { margin: 0; font-size: 14px; font-weight: 500; }
.pick-note { margin: 2px 0 0; font-size: 13px; color: var(--ink-50); }
.pick-x { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); background: none; cursor: pointer; color: var(--ink-50); }
.pick-x:hover { color: var(--ink); border-color: var(--sn); }
.drawer-empty { padding: 28px 0; color: var(--ink-50); text-align: center; border: 1px dashed var(--line-strong); border-radius: 12px; }
.drawer-send { display: grid; gap: 8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 200; translate: -50% 20px;
  padding: 10px 16px; border-radius: 99px; background: var(--ink); color: #000;
  font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: .3s var(--ease);
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(.985);
  transition: opacity .8s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }
.pin-wide.reveal { transform: translateY(36px); }
.pin-wide.reveal.in .pin-media img { animation: widein 1.6s var(--ease) both; }
@keyframes widein { from { transform: scale(1.08); } }
.foot-card.reveal.in:hover { transform: translateY(-3px); }

/* Touch screens: no sticky hover zoom, controls always reachable. */
@media (hover: none) {
  .pin:hover .pin-media img, .pin:hover .pin-media video { transform: none; }
  .pin:hover .pin-media::after, .pin:hover .pin-tag { opacity: 0; }
  .pin-love, .pin-dl { opacity: 1; transform: none; }
  .foot-card:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-foot { grid-template-columns: 1fr; }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .lb-stage { padding: calc(64px + env(safe-area-inset-top)) 12px 12px; }
  .lb-stage > * { max-height: calc(56dvh - 80px); }
  .lb-side { padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); border-left: 0; border-top: 1px solid var(--line); max-height: 44dvh; gap: 10px; }
  .lb-title { font-size: 26px; }
  .lb-prev, .lb-next { top: calc(12px + env(safe-area-inset-top)); bottom: auto; translate: none; }
  .lb-prev { left: 12px; }
  .lb-next { left: 64px; right: auto; }
  .lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
  .lightbox.presenting .lb-stage > * { max-height: calc(100dvh - 96px); }
  .lightbox.presenting .lb-prev, .lightbox.presenting .lb-next { top: auto; bottom: 16px; }
  .lightbox.presenting .lb-next { left: auto; right: 16px; }
}
@media (max-width: 560px) {
  :root { --gap: 10px; --radius: 10px; }
  .topbar { padding-top: max(12px, env(safe-area-inset-top)); }
  .btn-ghost span:not(.count) { display: none; }
  .btn-ghost { padding: 0 11px; }
  .topbar-actions { gap: 6px; }
  .brand img { height: 24px; width: auto; }
  .filters { top: 60px; padding-top: 8px; padding-bottom: 12px; }
  .chip { height: 34px; padding: 0 14px; font-size: 13.5px; }
  .hero { padding-bottom: 24px; }
  .hero .display { font-size: clamp(46px, 14vw, 64px); }
  .meta { grid-template-columns: 1fr 1fr; gap: 14px 18px; }
  .pin-cap { padding: 7px 2px 0; }
  .pin-title { font-size: 13px; }
  .pin-sub { display: none; }
  .pin-love, .pin-dl { width: 34px; height: 34px; }
  .pin-love { top: 8px; right: 8px; background: rgb(0 0 0 / .45); color: var(--ink); backdrop-filter: blur(6px); }
  .pin-love svg, .pin-dl svg { width: 16px; height: 16px; }
  .pin-love[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
  .pin-dl { right: 8px; bottom: 8px; }
  .pin-cover .pin-love { top: 10px; }
  .pin-cover .pin-dl { top: 52px; }
  .pin-cover .pin-media { height: clamp(170px, calc(100vw * var(--r, .25)), 60vh); }
  .pin-wide { margin: 8px 0; }
  .pin-wide .pin-cap { display: block; }
  .pin-wide .pin-title { font-size: 24px; }
  .swatch { padding: 12px; }
  .swatch .sw-name { font-size: 20px; }
  .swatch .sw-codes { font-size: 10px; }
  .palette span { padding: 0 9px; font-size: 9px; }
  .pin .palette span i { display: none; }  /* names only on phones; codes are in the detail view */
  .palette span b { font-size: 11.5px; }
  .words { padding: 16px 14px; }
  .words blockquote { font-size: 22px; }
  .closing .btn-accent { width: 100%; }
  .foot-card { min-height: 150px; padding: 20px 60px 20px 20px; }
  .foot-base { flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
  .drawer-panel { padding: calc(18px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom)); }
  .lb-actions .btn-accent { flex: 1; padding: 0 12px; }
  .lb-actions .lb-pos { display: none; }
  .lb-comment textarea { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .reveal { opacity: 1; transform: none; }
}
