/* Hallmark · shape: app screen · genre: atmospheric · theme: brand · redesign: full
 * paper: oklch(12.5% 0.008 268) · accent: oklch(94% 0.006 268) · display: system sans (SF Pro Display) · body: system sans (SF Pro Text)
 * nav: kept (wordmark, search) plus an orbit pause · signature: the orbital plane tilted to the chrome ring, the chosen project docked in glass beneath it · states: selected, no matches, overview, overflow list, paused, short landscape
 * axes: night-field/system-sans/chrome · posture: one glass console over a dark sky · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S4 R4 V4 · weakest: S, a starfield alone could be anyone's; the orbit is tilted to the logo's own ring and the glass takes its sheen from the same light the ring reflects */
/* Hallmark · finish-review: subagent · 8 findings · 8 resolved · gap: none */
/* Hallmark · reworded "Clear filters" to "Clear search" · the page has search, no filters */
/* Hallmark · answered F7 · the pill radius sits on the search field, the buttons, the draft-preview tag and the phone project strip, each a control or a rail of controls; the console and overview take the glass radius */
/* Hallmark · waive 29 · the pointer-led light on the starfield and the sheen it places on the glass console, search and overview · the owner asked for cursor-led light and liquid glass on this map, and the light's menu-edge latching is existing Oriun behaviour */
@import url("./tokens.css");
@import url("./base.css");

/* Shell: one viewport, nothing scrolls. The map fills it; the header and the console float over the sky. */
html { background: var(--color-paper); }
body.visitor-experience {
  min-height: 100svh;
  background:
    radial-gradient(56% 46% at 50% 40%, var(--color-bloom), transparent 72%),
    radial-gradient(38% 34% at 88% 104%, var(--color-bloom-2), transparent 70%),
    var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
.app-shell { position: relative; height: 100svh; min-height: 560px; overflow: clip; }
#projects { position: absolute; inset: 0; outline: none; }
.map-workspace { position: absolute; inset: 0; overflow: clip; }
#orbit-field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.asset-filter { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Liquid glass: a tinted, blurred body; a lit rim; a thick inner edge; a sheen placed by the map's light. */
.glass {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  -webkit-backdrop-filter: blur(24px) saturate(160%) brightness(1.06);
  backdrop-filter: blur(24px) saturate(160%) brightness(1.06);
  box-shadow:
    inset 0 1px 0 var(--glass-rim),
    inset 0 -1px 0 var(--glass-under),
    inset 0 0 0 1px var(--glass-edge),
    inset 0 20px 32px -24px var(--glass-rim),
    0 28px 64px -24px var(--glass-shadow),
    0 2px 8px var(--glass-shadow-near);
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(440px circle at var(--light-x, 50vw) var(--light-y, 40vh), var(--glass-sheen), transparent 64%) fixed;
}
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background:
    radial-gradient(240px circle at var(--light-x, 50vw) var(--light-y, 40vh), var(--glass-rim-hot), transparent 72%) fixed,
    linear-gradient(160deg, var(--glass-edge-hi), transparent 36%, transparent 72%, var(--glass-edge-lo));
  -webkit-mask: linear-gradient(var(--color-ink) 0 0) content-box, linear-gradient(var(--color-ink) 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(var(--color-ink) 0 0) content-box exclude, linear-gradient(var(--color-ink) 0 0);
}

/* Header */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg) clamp(var(--space-md), 3vw, var(--space-xl));
}
.header-identity { display: flex; align-items: center; gap: var(--space-md); min-width: 0; }
.wordmark { position: relative; display: block; flex: none; width: 168px; height: 48px; overflow: hidden; border-radius: var(--radius-glass-s); }
.wordmark img { position: absolute; width: 224px; height: 112px; max-width: none; left: -29px; top: -31px; filter: url(#white-key); }
.wordmark:focus-visible { outline-offset: 4px; }
.constellation-caption {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  padding-left: var(--space-md);
  border-left: 1px solid var(--color-rule);
  font-size: var(--text-sm);
  line-height: 1.3;
  color: var(--color-ink-2);
  white-space: nowrap;
}
.map-summary { font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; }

.visitor-toolbar { margin-left: auto; min-width: 0; }
.search-box {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  width: 280px;
  height: 44px;
  padding: 0 var(--space-xs) 0 var(--space-md);
  border-radius: var(--radius-pill);
  cursor: text;
}
.search-box svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--color-muted); stroke-width: 1.6; stroke-linecap: round; }
.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  font-size: var(--text-sm);
}
.search-box input::placeholder { color: var(--color-muted); }
.search-box input:focus-visible { outline: 2px solid transparent; }
.search-box:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.search-key {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid var(--color-rule);
  font: inherit;
  font-size: var(--text-xs);
  color: var(--color-muted);
  transition: opacity var(--dur-micro) var(--ease-out);
}
.search-box:focus-within .search-key { opacity: 0; }
.visitor-toolbar { display: flex; align-items: center; gap: var(--space-xs); }
/* Orbit motion: a visible pause for the moving map, sharing the owner's oriun.motion.v1 preference key. */
.motion-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--color-ink-2);
  cursor: pointer;
  transition: color var(--dur-micro) var(--ease-out);
}
.motion-toggle input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.motion-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.motion-toggle .icon-play { display: none; fill: currentColor; stroke-width: 1.2; }
.motion-toggle:has(input:not(:checked)) .icon-pause { display: none; }
.motion-toggle:has(input:not(:checked)) .icon-play { display: block; }
.motion-toggle:hover { color: var(--color-ink); }
.motion-toggle:active { translate: 0 1px; }
.motion-toggle:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.motion-toggle input:focus-visible { outline: 2px solid transparent; }
.motion-toggle:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.motion-toggle input:disabled { cursor: not-allowed; }

/* The planet */
.brand-object {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 5;
  width: clamp(240px, 26vw, 420px);
  aspect-ratio: 1;
  translate: -50% -50%;
  pointer-events: none;
}
.brand-object img { width: 100%; height: 100%; max-width: none; user-select: none; -webkit-user-drag: none; will-change: transform, filter; }

/* Projects on the orbit. Each button is anchored at its point; the label sits beneath, centred, so it never flips sides. */
.project-nodes { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.project-node {
  --point: 18px;
  position: absolute;
  left: 50%;
  top: 46%;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
  width: max-content;
  max-width: 168px;
  margin: 0;
  padding: var(--space-xs) var(--space-sm);
  border: 0;
  border-radius: var(--radius-glass-s);
  background: transparent;
  color: var(--color-ink);
  text-align: center;
  cursor: pointer;
  transform: translate(-50%, calc(-1 * (var(--space-xs) + var(--point) / 2)));
  will-change: translate;
}
.node-point { position: relative; display: grid; place-items: center; flex: none; width: var(--point); height: var(--point); }
.node-point::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-ink);
  box-shadow: 0 0 12px 1px var(--color-star-glow);
  scale: calc(0.72 + var(--depth, 0.6) * 0.5);
  transition: scale var(--dur-short) var(--ease-out);
}
.node-point::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--color-ink-2);
  opacity: 0;
  scale: 0.5;
  transition: opacity var(--dur-short) var(--ease-out), scale var(--dur-short) var(--ease-out);
}
.node-copy { display: flex; flex-direction: column; align-items: center; gap: var(--space-3xs); opacity: calc(0.8 + var(--depth, 0.6) * 0.2); transition: opacity var(--dur-short) var(--ease-out); }
.node-title {
  max-width: 100%;
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  overflow-wrap: break-word;
  text-shadow: 0 1px 2px var(--color-paper), 0 0 16px var(--color-paper), 0 0 28px var(--color-paper);
}
.node-context { font-size: var(--text-xs); line-height: 1.3; color: var(--color-muted); text-shadow: 0 1px 2px var(--color-paper), 0 0 14px var(--color-paper); }
.project-node:hover .node-point::after,
.project-node:focus-visible .node-point::after { opacity: 0.7; scale: 1; }
.project-node[aria-pressed="true"] .node-point::after { opacity: 1; scale: 1.15; border-color: var(--color-ink); }
.project-node[aria-pressed="true"] .node-point::before { scale: 1.3; }
.project-node[aria-pressed="true"] .node-copy,
.project-node:hover .node-copy,
.project-node:focus-visible .node-copy { opacity: 1; }
.project-node:active .node-point::before { scale: 0.9; }
.project-node:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 0; }

/* The console: the selected project, docked beneath the orbit. */
.selected-detail {
  position: absolute;
  z-index: var(--z-raised);
  left: 50%;
  bottom: max(var(--space-lg), env(safe-area-inset-bottom));
  translate: -50% 0;
  width: min(720px, calc(100% - 48px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "stage links" "head links" "desc nav";
  align-items: start;
  gap: var(--space-xs) var(--space-xl);
  padding: var(--space-lg);
  border-radius: var(--radius-glass);
  color: var(--color-ink);
  outline: none;
}
.selected-detail:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.visitor-stage {
  grid-area: stage;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  height: 24px;
  margin: 0;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-rule);
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  white-space: nowrap;
}
.detail-heading { grid-area: head; min-width: 0; padding-top: var(--space-2xs); }
.detail-name { font-size: var(--text-3xl); font-weight: 500; line-height: 1.04; letter-spacing: -0.026em; max-width: none; }
.detail-description {
  grid-area: desc;
  margin: 0;
  max-width: 52ch;
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--color-ink-2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.detail-links { grid-area: links; align-self: end; display: flex; flex-direction: column; align-items: stretch; gap: var(--space-xs); }
.selected-detail .visitor-navigation { grid-area: nav; justify-self: end; align-self: center; margin-right: calc(-1 * var(--space-sm)); }

.detail-primary,
.detail-secondary,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 var(--space-lg);
  border: 0;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), translate var(--dur-micro) var(--ease-out);
}
.detail-primary {
  background-color: var(--chrome-2);
  background-image: linear-gradient(180deg, var(--chrome-1), var(--chrome-2));
  color: var(--color-accent-ink);
  box-shadow: inset 0 1px 0 var(--chrome-hi), inset 0 -1px 0 var(--chrome-lo), 0 8px 20px -10px var(--glass-shadow);
}
.detail-primary:hover { background-image: linear-gradient(180deg, var(--chrome-1), var(--chrome-1)); }
.detail-secondary,
.secondary-button { background-color: var(--glass-chip); color: var(--color-ink); box-shadow: inset 0 0 0 1px var(--color-rule); }
.detail-secondary:hover,
.secondary-button:hover { background-color: var(--glass-chip-hover); }
.detail-primary:active,
.detail-secondary:active,
.secondary-button:active { translate: 0 1px; }
.detail-primary:focus-visible,
.detail-secondary:focus-visible,
.secondary-button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.detail-primary:disabled,
.secondary-button:disabled { opacity: 0.5; cursor: not-allowed; }

.visitor-navigation { display: flex; align-items: center; gap: var(--space-2xs); }
.visitor-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-micro) var(--ease-out);
}
.visitor-navigation a:hover { color: var(--color-ink); text-decoration: underline; }
.visitor-navigation a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 0; }

/* A selection change re-lights the console from the top, line by line. */
.selected-detail.is-entering > * { animation: console-in var(--dur-long) var(--ease-out) both; }
.selected-detail.is-entering > :nth-child(2) { animation-delay: 40ms; }
.selected-detail.is-entering > :nth-child(3) { animation-delay: 80ms; }
.selected-detail.is-entering > :nth-child(n + 4) { animation-delay: 120ms; }
@keyframes console-in { from { opacity: 0; translate: 0 8px; } }

/* No matches */
.empty-state {
  position: absolute;
  z-index: var(--z-raised);
  left: 50%;
  bottom: max(var(--space-lg), env(safe-area-inset-bottom));
  translate: -50% 0;
  width: min(440px, calc(100% - 32px));
  display: grid;
  justify-items: start;
  gap: var(--space-xs);
  padding: var(--space-lg);
  border-radius: var(--radius-glass);
}
.empty-state h2 { font-size: var(--text-xl); }
.empty-state p { color: var(--color-ink-2); font-size: var(--text-sm); }
.empty-state .secondary-button { margin-top: var(--space-xs); }

/* The full list appears only when the map cannot hold every match. */
.project-index:not(body.has-overflow .project-index) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; padding: 0; }
.project-index:not(body.has-overflow .project-index):focus-within { position: absolute; z-index: var(--z-raised); left: clamp(var(--space-md), 3vw, var(--space-xl)); top: 50%; translate: 0 -50%; width: 208px; height: auto; overflow: visible; clip-path: none; white-space: normal; display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-md) var(--space-xs) var(--space-xs); border-radius: 22px; }
body.has-overflow .project-index {
  position: absolute;
  z-index: var(--z-raised);
  left: clamp(var(--space-md), 3vw, var(--space-xl));
  top: 50%;
  translate: 0 -50%;
  width: 208px;
  max-height: calc(100% - 320px);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-xs) var(--space-xs);
  border-radius: 22px;
}
.index-heading { display: flex; align-items: baseline; justify-content: space-between; padding: 0 var(--space-xs); }
.index-heading h1 { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; letter-spacing: 0; color: var(--color-ink-2); }
.index-heading span { font-size: var(--text-xs); color: var(--color-muted); }
.project-list { display: flex; flex-direction: column; gap: var(--space-3xs); min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.project-row {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--space-xs);
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.project-row:hover { background-color: var(--glass-chip); color: var(--color-ink); }
.project-row[aria-pressed="true"] { background-color: var(--glass-chip-hover); color: var(--color-ink); }
.project-row:active { translate: 0 1px; }
.project-row:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.row-dot { display: none; }
.row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Project overview */
.visitor-overview {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: var(--space-xl);
  border: 0;
  border-radius: var(--radius-glass);
  color: var(--color-ink);
  overflow: auto;
  opacity: 1;
  scale: 1;
  transition: opacity var(--dur-short) var(--ease-out), scale var(--dur-short) var(--ease-out), overlay var(--dur-short) allow-discrete, display var(--dur-short) allow-discrete;
}
@starting-style { .visitor-overview[open] { opacity: 0; scale: 0.97; } }
.visitor-overview:has(.project-live-preview) { width: min(1000px, calc(100% - 32px)); }
.visitor-overview::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-md); }
#overview-title { font-size: var(--text-3xl); font-weight: 500; line-height: 1.05; letter-spacing: -0.026em; outline: none; }
.icon-button {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background-color: transparent;
  color: var(--color-ink-2);
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.icon-button:hover { background-color: var(--glass-chip-hover); color: var(--color-ink); }
.icon-button:active { translate: 0 1px; }
.icon-button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.visitor-overview .visitor-stage { margin-top: var(--space-sm); }
.visitor-overview .detail-description { display: block; margin-top: var(--space-lg); max-width: 60ch; font-size: var(--text-lg); line-height: 1.5; color: var(--color-ink); -webkit-line-clamp: unset; }
.visitor-note { margin: var(--space-sm) 0 0; max-width: 60ch; font-size: var(--text-sm); line-height: 1.6; color: var(--color-muted); }
.visitor-overview .detail-primary { margin-top: var(--space-lg); }
.visitor-overview .visitor-navigation { margin: var(--space-lg) 0 0 calc(-1 * var(--space-sm)); }
.project-live-preview { display: block; width: 100%; height: min(480px, 56dvh); margin-top: var(--space-lg); border: 0; border-radius: 16px; background: var(--color-ink); }

/* Cursor: a point that opens into a lens over anything you can choose. */
.dot-cursor {
  position: fixed;
  left: -4px;
  top: -4px;
  z-index: var(--z-tooltip);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  background-color: var(--color-ink);
  box-shadow: 0 0 10px var(--color-star-glow);
  will-change: transform;
  transition: scale var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
html:has(.project-node:hover, .project-row:hover, button:hover, a:hover) .dot-cursor {
  scale: 4.5;
  background-color: var(--cursor-fill);
  box-shadow: inset 0 0 0 0.3px var(--color-ink);
}
@media (pointer: fine) {
  html.dot-pointer:not(:has(dialog[open], [popover]:popover-open)),
  html.dot-pointer:not(:has(dialog[open], [popover]:popover-open)) *:not(input):not(textarea):not(select):not([contenteditable]) { cursor: none !important; }
}
@media (pointer: coarse) { .dot-cursor { display: none; } }

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: var(--space-md);
  z-index: var(--z-toast);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--text-sm);
  text-decoration: none;
  translate: 0 -200%;
}
.skip-link:focus-visible { translate: 0 0; }
.noscript-message { position: fixed; inset: auto var(--space-md) var(--space-md); padding: var(--space-md); border-radius: var(--radius-glass-s); background: var(--color-paper-3); color: var(--color-ink); }

/* Tablet: the console stacks into two rows. */
@media (max-width: 1023px) {
  .selected-detail {
    width: calc(100% - 32px);
    bottom: max(var(--space-md), env(safe-area-inset-bottom));
    gap: var(--space-xs) var(--space-lg);
  }
  body.has-overflow .project-index {
    left: var(--space-md);
    right: var(--space-md);
    top: 80px;
    translate: none;
    width: auto;
    max-height: none;
    flex-direction: row;
    align-items: center;
    padding: var(--space-2xs);
    border-radius: var(--radius-pill);
  }
  body.has-overflow .index-heading { display: none; }
  body.has-overflow .project-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, var(--color-ink) calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, var(--color-ink) calc(100% - 40px), transparent); }
  body.has-overflow .project-row { flex: none; border-radius: var(--radius-pill); padding: 0 var(--space-sm); }
}

/* Phone: the console becomes a sheet at the thumb, the orbit rounds out above it. */
@media (max-width: 760px) {
  .site-header { padding: var(--space-md); gap: var(--space-sm); }
  .wordmark { width: 132px; height: 40px; }
  .wordmark img { width: 176px; height: 88px; left: -23px; top: -25px; }
  .constellation-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; border: 0; }
  .visitor-toolbar { flex: 1; justify-content: flex-end; }
  .search-box { width: auto; flex: 1; min-width: 0; max-width: 240px; }
  .search-key { display: none; }
  .brand-object { width: 196px; }
  .project-node { max-width: 132px; padding: var(--space-xs); }
  .node-title { font-size: var(--text-md); }
  .selected-detail {
    left: var(--space-sm);
    right: var(--space-sm);
    bottom: max(var(--space-sm), env(safe-area-inset-bottom));
    width: auto;
    translate: none;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "stage nav" "head head" "desc desc" "links links";
    gap: var(--space-xs) var(--space-sm);
    padding: var(--space-md) var(--space-md) var(--space-md) var(--space-lg);
    border-radius: 24px;
  }
  .selected-detail .visitor-navigation { align-self: center; margin: calc(-1 * var(--space-sm)) calc(-1 * var(--space-xs)) calc(-1 * var(--space-sm)) 0; }
  .detail-name { font-size: var(--text-2xl); }
  .detail-description { font-size: var(--text-sm); -webkit-line-clamp: 2; }
  .detail-links { flex-direction: row; justify-content: stretch; margin-top: var(--space-2xs); }
  .detail-links > * { flex: 1; }
  .empty-state { bottom: max(var(--space-sm), env(safe-area-inset-bottom)); }
  body.has-overflow .project-index { top: 72px; left: var(--space-sm); right: var(--space-sm); }
  .visitor-overview { padding: var(--space-lg); width: calc(100% - 24px); }
  .visitor-overview:has(.project-live-preview) { width: calc(100% - 24px); }
  #overview-title { font-size: var(--text-2xl); }
}

@media (max-height: 640px) and (min-width: 761px) {
  .brand-object { width: clamp(180px, 16vw, 240px); }
}

/* Short landscape (a phone on its side): one compact row for the console, nothing scrolls. */
@media (max-height: 559px) and (min-width: 560px) {
  .app-shell { min-height: 0; }
  .site-header { padding: var(--space-sm) var(--space-md); }
  .wordmark { width: 132px; height: 40px; }
  .wordmark img { width: 176px; height: 88px; left: -23px; top: -25px; }
  .constellation-caption { display: none; }
  .search-box { width: 220px; }
  .brand-object, .map-workspace .brand-object { width: 136px; }
  .project-node { max-width: 140px; padding: var(--space-2xs) var(--space-xs); }
  .node-title { font-size: var(--text-sm); }
  .selected-detail {
    left: var(--space-sm);
    right: var(--space-sm);
    bottom: max(var(--space-sm), env(safe-area-inset-bottom));
    width: auto;
    translate: none;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "stage desc links nav" "head desc links nav";
    align-items: center;
    gap: 0 var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: 22px;
  }
  .detail-name { font-size: var(--text-xl); }
  .detail-description { -webkit-line-clamp: 2; font-size: var(--text-sm); }
  .detail-links { flex-direction: row; }
  .selected-detail .visitor-navigation { margin: 0; }
  .empty-state { bottom: var(--space-sm); }
  body.has-overflow .project-index { left: var(--space-md); right: var(--space-md); top: 64px; translate: none; width: auto; max-height: none; flex-direction: row; align-items: center; padding: var(--space-2xs); border-radius: var(--radius-pill); }
  body.has-overflow .index-heading { display: none; }
  body.has-overflow .project-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  body.has-overflow .project-row { flex: none; border-radius: var(--radius-pill); padding: 0 var(--space-sm); }
  .visitor-overview { max-height: calc(100dvh - 24px); padding: var(--space-lg); }
}

/* Reduced motion: the orbit holds still (scene.js), and nothing here eases or enters. */
@media (prefers-reduced-motion: reduce) {
  .selected-detail.is-entering > * { animation: none; }
  .visitor-overview,
  .dot-cursor,
  .node-point::before,
  .node-point::after,
  .node-copy,
  .search-key,
  .motion-toggle,
  .detail-primary,
  .detail-secondary,
  .secondary-button,
  .icon-button,
  .project-row,
  .visitor-navigation a { transition: none; }
}
