:root {
  color-scheme: light;
  --bg: #fff;
  --fg: #000;
  --pad: clamp(14px, 1.8vw, 28px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000;
  --fg: #fff;
}

* { box-sizing: border-box; }

/* Public collection behaves as an interface, not a text document. Prevent
   accidental text highlights while keeping editable controls usable. */
body, body * {
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, select, option {
  -webkit-user-select: text;
  user-select: text;
}

html {
  min-width: 320px;
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  font-synthesis: none;
  font-size: 15px;
  line-height: 1.2;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { border: 0; }
.symbol-use { display: block; max-width: 100%; fill: currentColor; }
::selection { background: transparent; color: inherit; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 58px;
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--fg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--bg); }
}
.brandline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: baseline;
  min-width: 0;
}
.site-title {
  margin: 0;
  font-size: inherit;
  font-weight: 700;
  letter-spacing: -.02em;
}
.site-meta {
  color: var(--fg);
  white-space: nowrap;
  font-size: 13px;
}
.site-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.site-hover-name {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  max-width: min(34vw, 460px);
  overflow: hidden;
  color: var(--fg);
  font-size: inherit;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  transition: opacity 120ms var(--ease);
}
.site-hover-name.is-visible { opacity: 1; }

@media not ((hover: hover) and (pointer: fine)) {
  .site-hover-name { display: none; }
}

@media (max-width: 980px) {
  .site-hover-name { display: none; }
  /* Mid-size touch layouts stay opaque. Phone layouts below restore the
     translucent surface with a solid sampling edge for Safari chrome. */
  .site-header {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.symbol-use, .detail-symbol {
  -webkit-user-drag: none;
}
.search-wrap { position: relative; }
.search-input {
  width: clamp(128px, 14vw, 208px);
  padding: 0 12px;
  outline: none;
}
.search-input:focus {
  width: clamp(180px, 20vw, 260px);
}
.search-input::placeholder {
  color: var(--fg);
  opacity: 1;
}


.detail-actions { display: flex; align-items: center; gap: 6px; pointer-events: auto; }

/* Index */
.collection {
  padding: 0 var(--pad) var(--pad);
}
.collection-status {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  min-height: 48px;
  align-items: center;
  border-bottom: 1px solid var(--fg);
  color: var(--fg);
  font-size: 13px;
}
.collection-mode {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.collection-mode [data-sort-label] {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.symbol-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-left: 1px solid var(--fg);
}
.symbol-card {
  min-width: 0;
  contain: layout style;
  border-right: 1px solid var(--fg);
  border-bottom: 1px solid var(--fg);
}
.symbol-card[hidden] { display: none; }
.symbol-link {
  display: block;
  min-width: 0;
}
.symbol-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg);
}
.symbol-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0 solid var(--bg);
  pointer-events: none;
  transition: border-width .42s var(--ease);
}
.symbol-optical {
  display: grid;
  place-items: center;
  width: min(50%, 190px);
  height: min(50%, 190px);
  transform: scale(var(--optical-scale, 1));
  transform-origin: 50% 50%;
}
.symbol-art [data-symbol-image] {
  width: 100%;
  height: 100%;
  object-fit: contain;
  color: var(--fg);
  fill: currentColor;
  transform: scale(1);
  transition: transform .58s var(--ease);
  will-change: auto;
  scroll-margin-top: 22vh;
}
.symbol-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 16px;
  min-height: 82px;
  padding: 10px 10px 12px;
  align-content: start;
  background: var(--bg);
  border-top: 1px solid var(--fg);
}
.symbol-name {
  font-weight: 700;
  font-synthesis: weight;
  letter-spacing: -.012em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.symbol-year {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.symbol-designer {
  grid-column: 1 / -1;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}
.symbol-designer strong {
  color: var(--fg);
  font-weight: 500;
}

/* Density: Editorial is the reading view; Compact is the visual index. */
html[data-density="compact"] .symbol-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
html[data-density="compact"] .symbol-info {
  display: none;
}
html[data-density="compact"] .symbol-optical {
  /* Conservative fallback until the collection optical frame is ready. */
  width: min(62%, 150px);
  height: min(62%, 150px);
}

/* Strong hover: symbol/background swap, preserving the palette roles. */
.symbol-link:hover .symbol-art,
.symbol-link:focus-visible .symbol-art {
  background: var(--fg);
}
.symbol-link:hover .symbol-art [data-symbol-image],
.symbol-link:focus-visible .symbol-art [data-symbol-image] {
  transform: scale(1.15);
  color: var(--bg);
  fill: currentColor;
}
.symbol-link:hover .symbol-art::after,
.symbol-link:focus-visible .symbol-art::after {
  border-width: 7px;
}

.symbol-link:focus-visible,
.back-link:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: -2px;
}

/* Detail */
.detail-page {
  --detail-header-height: 58px;
  height: 100svh;
  overflow: hidden;
}
.detail-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "back identity actions";
  align-items: center;
  gap: 12px 18px;
  height: var(--detail-header-height);
  min-height: 58px;
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--fg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  pointer-events: none;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .detail-header { background: var(--bg); }
}
.detail-header > * { pointer-events: auto; }
.back-link {
  grid-area: back;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--bg);
}
.back-link svg { width: 13px; height: 13px; }
.back-link:hover { background: var(--fg); color: var(--bg); }
.detail-identity {
  grid-area: identity;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--fg);
}
.detail-header-name {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: inherit;
  font-weight: 700;
  font-synthesis: weight;
  letter-spacing: -.012em;
}
.detail-header-meta {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 1 auto;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.2;
}
.detail-header-designer {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-header-designer strong { font-weight: 500; }
.detail-header-year { flex: none; font-variant-numeric: tabular-nums; }
.detail-header-separator { flex: none; }
.detail-actions { grid-area: actions; justify-self: end; }

.detail-scroll {
  position: fixed;
  top: var(--detail-header-height);
  right: 0;
  bottom: 0;
  left: 0;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: pan-y pinch-zoom;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}
.detail-scroll::-webkit-scrollbar { display: none; }
.symbol-stage {
  position: relative;
  width: 100%;
  min-height: calc(100svh - var(--detail-header-height));
  display: grid;
  place-items: center;
  padding-top: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--fg);
}
.detail-symbol-shell {
  display: grid;
  place-items: center;
  transform: scale(var(--optical-scale, 1));
  transform-origin: 50% 50%;
}
.detail-symbol-shell--large {
  width: min(52vw, 620px, 60svh);
  height: min(52vw, 620px, 60svh);
}
.detail-symbol-shell--small {
  width: clamp(54px, 6.6vw, 104px);
  height: clamp(54px, 6.6vw, 104px);
}
.detail-symbol {
  width: 100%;
  height: 100%;
  object-fit: contain;
  color: var(--fg);
  fill: currentColor;
}
.scroll-cue {
  position: absolute;
  right: var(--pad);
  bottom: var(--pad);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  cursor: pointer;
  background: none;
  padding: 0;
  font-size: 13px;
}
.scroll-cue svg {
  width: 13px;
  height: 13px;
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(4px); }
}
.scroll-cue--up svg {
  animation-name: cue-up;
}
@keyframes cue-up {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-4px); }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1400px) {
  html[data-density="compact"] .symbol-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
  .symbol-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html[data-density="compact"] .symbol-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .detail-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "back actions"
      "identity identity";
    align-items: center;
    min-height: 0;
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .detail-identity {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding-top: 1px;
  }
  .detail-header-name {
    width: 100%;
    font-size: clamp(15px, 4vw, 17px);
    line-height: 1.08;
    letter-spacing: -.018em;
  }
  .detail-header-meta {
    width: 100%;
    gap: 5px;
    font-size: 12px;
    line-height: 1.15;
    opacity: .92;
  }
  .detail-header-designer {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .back-link {
    min-height: 38px;
    width: fit-content;
    padding: 0;
    gap: 7px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 14px;
    line-height: 1;
  }
  .back-link:hover { background: transparent; color: var(--fg); }
  .back-link svg { width: 12px; height: 12px; }
  .detail-designed-label { display: none; }
  .site-header {
    grid-template-columns: 1fr;
    align-items: start;
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .site-actions { width: 100%; }
  .search-wrap { flex: 1; }
  .search-input,
  .search-input:focus { width: 100%; }
  .collection-mode > span:last-child { display: none; }
  .symbol-grid { grid-template-columns: 1fr; }
  html[data-density="compact"] .symbol-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html[data-density="compact"] .symbol-optical {
    width: 62%;
    height: 62%;
  }
  .detail-symbol-shell--large {
    width: min(68vw, calc(100vw - 124px), 440px, 52svh);
    height: min(68vw, calc(100vw - 124px), 440px, 52svh);
  }
}

@media (max-width: 430px) {
  .detail-header-name { font-size: 15px; }
  .detail-header-meta { font-size: 11.5px; }
  .brandline { gap: 3px 11px; }
  .symbol-info { font-size: 13px; }
  .symbol-link:hover .symbol-art [data-symbol-image],
  .symbol-link:focus-visible .symbol-art [data-symbol-image] {
    transform: scale(1.10);
  }
  .detail-symbol-shell--large {
    width: min(66vw, calc(100vw - 124px), 50svh);
    height: min(66vw, calc(100vw - 124px), 50svh);
  }
  .scroll-cue {
    bottom: max(var(--pad), env(safe-area-inset-bottom));
  }
  .scroll-cue span { display: none; }
}

@media (hover: none) {
  .symbol-link:hover .symbol-art {
    background: var(--bg);
  }
  .symbol-link:hover .symbol-art [data-symbol-image] {
    transform: none;
    color: var(--fg);
    fill: currentColor;
  }
  .symbol-link:hover .symbol-art::after {
    border-width: 0;
  }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* Wall density layout. */
html[data-density="wall"] .symbol-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
html[data-density="wall"] .symbol-info { display: none; }
html[data-density="wall"] .symbol-optical {
  width: 70%;
  height: 70%;
}
html[data-density="wall"] .symbol-art::after { transition-duration: .28s; }
html[data-density="wall"] .symbol-link:hover .symbol-art [data-symbol-image],
html[data-density="wall"] .symbol-link:focus-visible .symbol-art [data-symbol-image] {
  transform: scale(1.09);
}
html[data-density="wall"] .symbol-link:hover .symbol-art::after,
html[data-density="wall"] .symbol-link:focus-visible .symbol-art::after {
  border-width: 3px;
}

.detail-neighbors {
  position: fixed;
  top: calc(var(--detail-header-height) + 30px);
  right: var(--pad);
  bottom: auto;
  left: var(--pad);
  z-index: 58;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0;
  pointer-events: none;
  transform: translateY(-50%);
}

@media (max-width: 1400px) {
  html[data-density="wall"] .symbol-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  html[data-density="wall"] .symbol-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  html[data-density="wall"] .symbol-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  html[data-density="wall"] .symbol-optical { width: 68%; height: 68%; }
  .detail-neighbors {
    top: calc(var(--detail-header-height) + 28px);
    right: 10px;
    left: 10px;
    height: 32px;
  }
}
@media (max-width: 420px) {
  html[data-density="wall"] .symbol-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (hover: none) {
  html[data-density="wall"] .symbol-link:hover .symbol-art [data-symbol-image] { transform: none; }
  html[data-density="wall"] .symbol-link:hover .symbol-art::after { border-width: 0; }
}


/* UI-free slideshow.
   Symbol-to-symbol changes are sequential: fully out, tiny gap, fully in.
   There is never a crossfade between two marks. */

html[data-slideshow="true"],
html[data-slideshow="true"] body {
  overflow: hidden;
  overscroll-behavior: none;
}
.slideshow {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100svh;
  height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  cursor: none;
  opacity: 1;
  will-change: opacity;
  touch-action: manipulation;
}
.slideshow-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 96px);
  overflow: hidden;
}
.slideshow-frame {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 1;
  transform: translate3d(0,0,0);
  transform-origin: 50% 50%;
  will-change: transform;
}
.slideshow-symbol {
  display: block;
  width: min(52vw, 620px, 60svh);
  height: min(52vw, 620px, 60svh);
  overflow: visible;
  fill: currentColor;
  color: var(--fg);
  transform: scale(var(--slide-optical-scale, 1));
  transform-origin: 50% 50%;
  -webkit-user-drag: none;
}
.slideshow-hud {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1002;
  transform: translateX(-50%);
  padding: 5px 7px;
  background: var(--fg);
  color: var(--bg);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .03em;
  opacity: 1;
  transition: opacity 180ms ease;
  pointer-events: none;
}
.slideshow-hud[hidden] { display: none; }
.slideshow-hud.is-leaving { opacity: 0; }

.slideshow-close {
  display: grid;
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 1004;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  opacity: .58;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 160ms ease, transform 160ms ease;
}
.slideshow-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}
.slideshow-close:hover,
.slideshow-close:focus-visible { opacity: 1; }
.slideshow-close:active { transform: scale(.9); }
.slideshow-close:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: -5px;
}

@media (max-width: 760px) {
  .slideshow-stage { padding: 22px; }
  .slideshow-symbol {
    width: min(68vw, calc(100vw - 124px), 440px, 52svh);
    height: min(68vw, calc(100vw - 124px), 440px, 52svh);
  }
  .slideshow-close {
    width: 50px;
    height: 50px;
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
  }
  .slideshow-close svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 430px) {
  .slideshow-symbol {
    width: min(66vw, calc(100vw - 124px), 50svh);
    height: min(66vw, calc(100vw - 124px), 50svh);
  }
}


/* Detail focus mode: H hides all interface; the next interaction restores it. */
.detail-header,.detail-neighbors,.scroll-cue { transition: opacity 160ms ease; }
html[data-detail-ui-hidden="true"] .detail-header,
html[data-detail-ui-hidden="true"] .detail-neighbors,
html[data-detail-ui-hidden="true"] .scroll-cue {
  opacity: 0;
  pointer-events: none;
}

/* Once measured, compact/wall use the full cell as their normalized square.
   Editorial keeps a bounded 60% canvas: its viewBox occupancy is compensated in
   JS, so the painted mark stays the same size while the shared View Transition
   snapshot no longer expands to an almost full-viewport square on mobile. */
html[data-collection-page] .symbol-optical.is-optically-framed {
  width: 100%;
  height: 100%;
  transform: none;
}
html[data-collection-page][data-density="editorial"] .symbol-optical.is-optically-framed {
  width: 60%;
  height: 60%;
}

/* Editorial project footer — the archive closes with its identity, not utility chrome. */
.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas:
    "masthead masthead masthead"
    "credit statement submit";
  align-items: end;
  gap: 18px 24px;
  min-height: 0;
  padding: clamp(72px, 10vw, 156px) var(--pad) max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  text-align: left;
}
.site-footer .site-credit {
  grid-area: credit;
  justify-self: start;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.2;
}
.site-footer .site-credit a {
  font-weight: 600;
  text-underline-offset: .22em;
}
.site-footer .submit-mark {
  grid-area: submit;
  justify-self: end;
  display: inline-flex;
  width: fit-content;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.2;
  text-underline-offset: .22em;
}
.site-footer .submit-mark::after { content: " ↗"; }
.site-footer .site-credit a:hover,
.site-footer .site-credit a:focus-visible,
.site-footer .submit-mark:hover,
.site-footer .submit-mark:focus-visible {
  text-decoration: underline;
}
.site-footer .site-credit a:focus-visible,
.site-footer .submit-mark:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .site-footer {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "masthead masthead"
      "statement statement"
      "credit submit";
    gap: 14px 18px;
    padding-top: clamp(60px, 18vw, 92px);
  }
}

@media (max-width: 390px) {
  .site-footer {
    gap: 12px 14px;
  }
  .site-footer .site-credit,
  .site-footer .submit-mark {
    font-size: 12px;
  }
}


/* Density control mirrors the active layout. */
.density-mode-icons {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
}
.density-mode-icon {
  position: absolute;
  inset: 0;
  width: 20px !important;
  height: 20px !important;
  opacity: 0;
  transform: scale(.72);
  transform-origin: 50% 50%;
  transition: opacity 130ms ease, transform 220ms var(--ease);
}
html:not([data-density]) .density-mode-icon--editorial,
html[data-density="editorial"] .density-mode-icon--editorial,
html[data-density="compact"] .density-mode-icon--compact,
html[data-density="wall"] .density-mode-icon--wall {
  opacity: 1;
  transform: scale(1);
}
/* Responsive public layout rhythm. Control geometry stays in ui-system.css;
   structural header, card-meta and detail-header spacing belongs here. */
@media (min-width: 1367px) {
  .site-header { min-height: 62px; padding-block: 11px; gap: 22px; }
  .site-actions { gap: 7px; }
  .symbol-info { min-height: 80px; padding: 13px 13px 14px; }
}

@media (min-width: 761px) and (max-width: 1366px) {
  .site-header { min-height: 58px; padding-block: 9px; gap: 16px; }
  .site-actions { gap: 5px; }
  .brandline { gap: 5px 14px; }
  .symbol-info { min-height: 78px; padding: 12px 12px 13px; }
}

@media (max-width: 760px) {
  .site-header { gap: 12px; padding: 13px var(--pad) 12px; }
  .site-actions { gap: 4px; }
  .symbol-info { min-height: 82px; padding: 14px 12px 15px; }
  .detail-page { --detail-header-height: calc(max(8px, env(safe-area-inset-top)) + 95px); }
  .detail-header { gap: 9px 12px; padding: max(8px, env(safe-area-inset-top)) var(--pad) 16px; }
  .detail-actions { gap: 4px; }
}

@media (min-width: 761px) {
  .detail-page { --detail-header-height: 64px; }
  .detail-header { min-height: 64px; height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .density-mode-icon { transition: none; }
}
