/* Overlays: the open item, the About dialog, the copy slip's resting look. No blur, no glass. */
/* ---------- the open item (v3 Wall item page) ----------
   A fixed overlay with its own scroller: the work large at native aspect, a 360 px column, then "More like this" (the grid, virtualised against this scroller).
   Tokens only (tokens.css, motion.css). */
.viewer { position: fixed; inset: 0; z-index: 90; --col-w: 360px; }
.v-scrim { position: absolute; inset: 0; background: var(--ground); }
.v-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; outline: 0; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.v-page { padding-bottom: var(--s-9); }
.v-first { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--col-w); column-gap: var(--s-8); align-items: start; padding: var(--s-5) var(--gutter) 0; }
.v-stage { --max-h: calc(100dvh - var(--s-5) * 2); position: relative; display: flex; justify-content: center; min-width: 0; }
.print { margin: 0; position: relative; width: 100%; display: flex; justify-content: center; border-radius: var(--r-card); }   /* no standing will-change: open and close promote it while they run */
.print-media { position: relative; overflow: hidden; flex: none; background: var(--surface-1); border-radius: var(--r-card);
  aspect-ratio: calc(1 / var(--r, .625)); width: min(100%, calc(var(--max-h) / var(--r, .625)), var(--cap, 99999px)); }
.print-media.is-tall { width: min(100%, 560px, var(--cap, 99999px)); }
.print-media.vector { background: #fff; }
/* raster prints sit straight on the ground: a surface-1 letterbox behind object-fit: contain read as a frame around the image (video keeps its black, vectors their white) */
.print-media:not(.vector):not(:has(video)) { background: transparent; }
.print-media img, .print-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; cursor: crosshair; }
.print-media.vector img { padding: 6%; }
.print-media.is-tall img { object-fit: cover; object-position: top; }
.print-media img.full { opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.print-media img.full.in { opacity: 1; }
.print-media video { object-fit: contain; background: #000; }
.v-ghost { position: absolute; pointer-events: none; z-index: 1; }
.v-ghost.print-media { max-width: none; }
.viewer.not-found .print-media { display: grid; place-items: center; aspect-ratio: 4 / 3; width: min(100%, 420px); background: var(--surface-1); color: var(--text-2); }

/* ---------- the column ---------- */
.v-info { position: sticky; top: var(--s-5); min-width: 0; align-self: start; }
.v-head { display: flex; align-items: center; justify-content: space-between; margin-inline: calc(var(--s-3) * -1); }
.v-ib { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: var(--r-control); color: var(--text-2); transition: color var(--dur-hover) linear, background var(--dur-hover) linear; }
.v-ib:hover, .v-ib[aria-expanded="true"] { color: var(--text-1); background: var(--surface-2); }
.v-ib .ic, .v-send-chev .ic, .v-door .ic, .v-details summary .ic { width: var(--icon); height: var(--icon); }
.v-brand { margin: var(--s-3) 0 0; display: flex; align-items: center; gap: var(--s-1); font: var(--w-semibold) var(--t-28)/1.15 var(--font); letter-spacing: var(--track-display); min-width: 0; }
.v-brand .v-bn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: var(--s-1); text-decoration: none; }
.v-brand a.v-bn:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: var(--s-1); }
.v-src { flex: none; width: var(--tap); height: var(--tap); display: grid; place-items: center; color: var(--text-3); border-radius: var(--r-control); }
.v-src:hover { color: var(--text-1); }
.v-src .ic { width: var(--icon-s); height: var(--icon-s); }
.v-kind { margin: var(--s-1) 0 0; font-size: var(--t-14); color: var(--text-3); }
.v-note { margin: var(--s-4) 0 0; font-size: var(--t-14); line-height: 1.55; color: var(--text-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; text-wrap: pretty; }
.v-note[data-open] { display: block; -webkit-line-clamp: unset; }
.v-note.v-nf { display: block; -webkit-line-clamp: unset; }
.v-note-more { display: inline-flex; align-items: center; min-height: var(--tap); margin-top: var(--s-1); font-size: var(--t-13); font-weight: var(--w-semibold); color: var(--text-1); border-radius: var(--s-1); }
.v-note-more[hidden] { display: none; }

/* the action area */
.v-actions { margin-top: var(--s-5); padding: var(--s-5); display: grid; gap: var(--s-3); background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-card); }
.v-send { position: relative; display: flex; height: var(--s-8); border-radius: var(--r-pill); background: var(--primary-bg); color: var(--primary-text); }
.v-send:has(:focus-visible) { outline: var(--focus-w) solid var(--focus); outline-offset: var(--focus-gap); }
.v-send button { height: 100%; display: flex; align-items: center; justify-content: center; transition: background var(--dur-hover) linear; }
.v-send button:focus-visible { outline: 0; background: color-mix(in srgb, var(--primary-text) 12%, transparent); }
.v-send-main { flex: 1; min-width: 0; gap: var(--s-3); padding-left: var(--s-2); border-radius: var(--r-pill) 0 0 var(--r-pill); font-size: var(--t-16); font-weight: var(--w-semibold); white-space: nowrap; }
.v-send-main:hover, .v-send-chev:hover { background: color-mix(in srgb, var(--primary-text) 8%, transparent); }
.v-send-chev { position: relative; flex: none; width: calc(var(--s-7) + var(--s-2)); border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.v-send-chev::before { content: ""; position: absolute; left: 0; top: var(--s-4); bottom: var(--s-4); border-left: 1px solid color-mix(in srgb, var(--primary-text) 18%, transparent); }
.v-send-chev[aria-expanded="true"] .ic { rotate: 180deg; }
.v-marks { display: flex; gap: var(--s-1); color: var(--text-3); }
.v-marks svg { width: var(--icon-s); height: var(--icon-s); }
.v-send .v-marks, .v-s-send .v-marks { color: color-mix(in srgb, var(--primary-text) 55%, var(--primary-bg)); }
.v-row2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.v-btn2 { position: relative; height: var(--s-8); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-1); padding-inline: var(--s-1);
  border-radius: var(--r-control); background: var(--surface-2); font-size: var(--t-13); font-weight: var(--w-semibold); white-space: nowrap; transition: background var(--dur-hover) linear, scale var(--dur-quick) var(--ease-out); }
.v-btn2:hover { background: var(--surface-3); }
.v-btn2:active { scale: 0.94; transition-duration: 100ms; }
.v-btn2 .ic { width: var(--icon); height: var(--icon); }
.v-btn2[aria-pressed="true"] .ic { --ic-fill: currentColor; }
.v-btn2[data-act="like"] .ic { transition: color var(--dur-hover) linear; }
.v-btn2[data-act="like"][aria-pressed="true"] .ic { color: var(--like); }
/* Like pop: the red is held back until the heart's peak (viewer.js likePop adds .lk-wait for ~96 ms); the faint ring is a span sized to the heart */
.v-btn2[data-act="like"] .ic.lk-wait { color: inherit; --ic-fill: none; }
.v-btn2[data-act="like"] .ic.lk-hit { transition: none; }   /* the red lands in one frame at the peak, not a 120 ms wash through white */
.v-ring { position: absolute; border-radius: 50%; border: 1.5px solid var(--like); pointer-events: none; opacity: 0; }
.v-send-main:active, .v-s-send:active { scale: 0.97; }
/* accounts that do not exist (the static build) leave only Copy image */
.viewer[data-acc="off"] [data-needs-acc] { display: none; }
.viewer[data-acc="off"] .v-row2 { grid-template-columns: 1fr; }
.viewer[data-acc="off"] .v-actions { padding: var(--s-4); }
.only-phone { display: none !important; }

/* in collections, details */
.v-coll { margin-top: var(--s-6); }
.v-coll[hidden], .v-details[hidden] { display: none; }
.v-group { margin: 0 0 var(--s-3); font-size: var(--t-12); font-weight: var(--w-medium); letter-spacing: .02em; color: var(--text-3); }
.v-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.v-door { display: block; min-width: 0; border-radius: var(--r-control); text-decoration: none; }
.v-mosaic { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--s-1); aspect-ratio: 3 / 2; border-radius: var(--r-control); overflow: hidden; background: var(--surface-1); }
.v-mosaic span { display: block; overflow: hidden; background: var(--surface-2); }
.v-mosaic span:first-child { grid-row: span 2; }
.v-mosaic img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.v-door b { margin-top: var(--s-2); font-size: var(--t-13); font-weight: var(--w-medium); line-height: 1.3; color: var(--text-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.v-door:hover b { color: var(--text-1); }
.v-details { margin-top: var(--s-5); border-top: 1px solid var(--line); }
.v-details summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: var(--s-8); cursor: pointer; font-size: var(--t-14); font-weight: var(--w-medium); color: var(--text-2); border-radius: var(--r-control); }
.v-details summary::-webkit-details-marker { display: none; }
.v-details summary:hover { color: var(--text-1); }
.v-details summary .ic { transition: rotate var(--dur-base) var(--ease-out); }
.v-details[open] summary .ic { rotate: 180deg; }
.v-details-body { padding-bottom: var(--s-4); display: grid; gap: var(--s-5); }
.v-sws { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.v-sw { position: relative; width: var(--s-7); height: var(--s-7); border-radius: var(--r-control); box-shadow: inset 0 0 0 1px var(--hover-ring); }
.v-sw::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + var(--s-1)); translate: -50% 0; z-index: 2; padding: var(--s-1) var(--s-2); border-radius: var(--s-1); background: var(--pop-bg); box-shadow: var(--pop-shadow); color: var(--text-1);
  font: var(--w-medium) var(--t-12)/1 var(--mono); opacity: 0; pointer-events: none; white-space: nowrap; transition: opacity var(--dur-hover) linear; }
.v-sw:hover::after, .v-sw:focus-visible::after { opacity: 1; }
.v-tags { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
.v-tags button { display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--t-14); color: var(--text-2); border-radius: var(--s-1); }
.v-tags button:hover { color: var(--text-1); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: var(--s-1); }
.viewer :focus-visible { outline: var(--focus-w) solid var(--focus); outline-offset: var(--focus-gap); }

/* menus: the agent chooser and "..." hang off what opened them */
.v-menu { position: fixed; z-index: 20; min-width: var(--menu-w); padding: var(--s-2); background: var(--pop-bg); border-radius: var(--r-pop); box-shadow: var(--pop-shadow); }
.v-menu button, .v-menu a { display: flex; align-items: center; gap: var(--s-3); width: 100%; height: var(--tap); padding: 0 var(--s-3); border-radius: var(--r-control); font-size: var(--t-14); font-weight: var(--w-medium); color: var(--text-1); text-align: left; text-decoration: none; }
.v-menu button:hover, .v-menu button:focus-visible { background: var(--surface-3); outline: 0; }
.v-menu svg { width: var(--icon-s); height: var(--icon-s); flex: none; }
.v-menu .v-cur { margin-left: auto; width: var(--s-2); height: var(--s-2); border-radius: 50%; background: var(--text-2); }
.v-menu hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-2) var(--s-1); }

/* more like this */
.v-feed { margin-top: var(--s-8); }
.v-feed-label { margin: 0 var(--gutter) var(--s-4); font: var(--w-semibold) var(--t-16)/1.3 var(--font); letter-spacing: var(--track-display); }
.v-wall { margin-inline: var(--gutter); }

/* the sticky bar (phones) */
.v-sticky { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: var(--s-2); align-items: center; padding: var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom, 0px)); background: var(--ground); border-top: 1px solid var(--line); }
.v-sticky[hidden] { display: none; }
.v-s-send { flex: 1; min-width: 0; height: var(--s-8); display: flex; align-items: center; justify-content: center; gap: var(--s-3); border-radius: var(--r-pill); background: var(--primary-bg); color: var(--primary-text); font-size: var(--t-16); font-weight: var(--w-semibold); white-space: nowrap; }
.v-sticky .v-btn2 { flex: none; width: var(--s-8); padding: 0; }
.viewer.has-sticky .v-page { padding-bottom: calc(var(--s-9) + var(--s-8)); }

/* tablet: the work full width, then brand and note left, the action area right */
@media (max-width: 899px) {
  .v-first { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-5); padding-top: var(--s-4); }
  .v-stage { --max-h: 72dvh; }
  .v-info { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--col-w)); grid-template-areas: "body actions" "coll actions" "det det"; column-gap: var(--s-6); align-items: start; }
  .v-head { position: absolute; top: var(--s-3); left: calc(var(--gutter) + var(--s-3)); right: calc(var(--gutter) + var(--s-3)); margin: 0; z-index: 2; pointer-events: none; }
  .v-head .v-ib { pointer-events: auto; background: var(--img-btn-bg); color: var(--img-btn-text); border-radius: 50%; }
  .v-head .v-ib:hover { background: var(--img-btn-bg); color: var(--img-btn-text); }
  .v-body { grid-area: body; min-width: 0; }
  .v-brand { margin-top: 0; }
  .v-actions { grid-area: actions; margin-top: 0; }
  .v-coll { grid-area: coll; }
  .v-details { grid-area: det; }
}
/* phones: one column; Copy image goes into the "..." menu */
@media (max-width: 699px) {
  .v-first { padding-top: var(--s-2); row-gap: var(--s-4); }
  .v-stage { --max-h: 52dvh; }
  .v-info { display: block; }
  .v-head { top: calc(var(--s-2) + var(--s-3)); }
  .v-actions { margin-top: var(--s-4); padding: var(--s-4); }
  .v-copy { display: none; }
  .v-row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v-btn2 { flex-direction: row; gap: var(--s-2); }
  .only-phone { display: flex !important; }
  .v-feed { margin-top: var(--s-7); }
  .v-doors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .v-details summary .ic, .v-btn2 { transition: none; } .v-btn2:active, .v-send-main:active, .v-s-send:active { scale: none; } }

/* ---------- About ---------- */
.about { width: min(440px, calc(100vw - 32px)); padding: 32px; border: 1px solid var(--line-2); border-radius: var(--r-card); background: var(--s2); color: var(--t2); box-shadow: var(--float); margin: auto; }
.about::backdrop { background: var(--scrim); }
.about h2 { font: 600 var(--fs-20)/1.25 var(--sans); letter-spacing: -.01em; color: var(--t1); margin-bottom: 12px; }
.about p { font-size: var(--fs-14); line-height: 1.6; text-wrap: pretty; }
.about a { color: var(--t1); text-underline-offset: 3px; text-decoration-color: var(--t3); }
.about a:hover { text-decoration-color: var(--t1); }
.about .about-mail { margin-top: 12px; }
.about form { margin-top: 24px; display: flex; justify-content: flex-end; }

/* ---------- the copy slip: resting look (id selectors so they hold over css/cursor.css, which the animator restyles) ---------- */
#slip { position: fixed; left: 50%; bottom: 32px; z-index: 270; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 10px 18px 10px 14px; border-radius: var(--r-pill); background: var(--s2); color: var(--t1); border: 1px solid var(--line-2); box-shadow: var(--float); font-size: var(--fs-13); line-height: 1.35; transform: translate(-50%, 0); transition: none; }
#slip .ok { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--t1); color: var(--on-t1); flex: none; }
#slip .ok .tick { width: 12px; height: 12px; stroke-width: 2.4; }
#slip.err .ok { background: transparent; color: var(--t1); }
#slip.err .ok .ic { width: 16px; height: 16px; }
#slip b { font: 600 var(--fs-14)/1.2 var(--sans); margin-right: 4px; color: var(--t1); }
#slip .txt { color: var(--t2); }
@media (max-width: 820px) { #slip { bottom: 88px; } }

