/* ------------------------------------------------------------------ tokens */
:root {
  --ink: #0a0a09;
  --ink-raised: #131311;
  --ink-plate: #171714;
  --paper: #f3f0e7;
  --paper-dim: rgba(243, 240, 231, .6);
  --paper-faint: rgba(243, 240, 231, .38);
  --rule: rgba(243, 240, 231, .13);
  --signal: #ff4b1f;

  --dark-on-paper: #1b1b18;
  --rule-on-paper: rgba(11, 11, 10, .13);
  --dim-on-paper: rgba(11, 11, 10, .46);

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --ease: cubic-bezier(.22, .9, .3, 1);
  --track: .02em;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

button,
a { font: inherit; color: inherit; }

button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

svg { display: block; }

svg path,
svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button:focus-visible,
a:focus-visible,
.frame:focus-visible {
  outline: 1px solid var(--signal);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.eyebrow {
  margin: 0;
  color: var(--dim-on-paper);
  font: 450 11px/1 var(--mono);
  letter-spacing: .04em;
}

/* ------------------------------------------------------------------- field */
#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background:
    radial-gradient(ellipse 120% 90% at 50% 42%, rgba(21, 21, 18, 0) 0%, #050504 100%),
    #0c0c0a;
}

/* Registration grid. Origin and scale come from the pan/zoom transform, so the
   module travels with the field instead of sitting still behind it. */
#stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(243, 240, 231, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 240, 231, .045) 1px, transparent 1px);
  background-size: var(--grid, 86px) var(--grid, 86px);
  background-position: var(--grid-x, 0px) var(--grid-y, 0px);
  -webkit-mask-image: radial-gradient(ellipse 74% 74% at 50% 50%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 74% 74% at 50% 50%, #000 30%, transparent 100%);
}

body.is-panning #stage { cursor: grabbing; }
body.is-keyboard #stage,
body.is-keyboard #stage * { cursor: none; }

#world {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  transform-origin: 0 0;
  will-change: transform;
}

/* ------------------------------------------------------------------ frames */
.frame {
  position: absolute;
  width: var(--w);
  margin: 0;
  transform: translate(-50%, -50%) rotate(var(--tilt, 0deg));
  cursor: pointer;
  user-select: none;
}

body:not(.is-keyboard) .frame:hover,
.frame:focus-visible,
.frame.is-aimed,
.frame.is-selected { z-index: 4; }

.frame::before {
  content: "";
  position: absolute;
  inset: -12px;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color .25s var(--ease);
}

body:not(.is-keyboard) .frame:hover::before,
.frame:focus-visible::before { border-color: rgba(243, 240, 231, .26); }
body.is-keyboard .frame.is-aimed::before { border-color: rgba(243, 240, 231, .26); }
.frame.is-selected::before { border-color: var(--signal); }

.frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: -5px;
  right: -5px;
  width: 5px;
  height: 5px;
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--ink);
  opacity: 0;
  transform: scale(.6);
  pointer-events: none;
  transition: opacity .25s ease, transform .35s var(--ease);
}

.frame.is-saved::after { opacity: .72; transform: none; }
body.is-keyboard .frame.is-aimed.is-saved::after { opacity: 1; }

.frame-plate {
  position: relative;
  aspect-ratio: var(--ar, .78);
  overflow: hidden;
  background: var(--ink-plate);
  box-shadow: 0 18px 44px -20px rgba(0, 0, 0, .78);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}

body:not(.is-keyboard) .frame:hover .frame-plate,
.frame:focus-visible .frame-plate,
body.is-keyboard .frame.is-aimed .frame-plate {
  transform: translateY(-5px);
  box-shadow: 0 32px 62px -22px rgba(0, 0, 0, .85);
}

/* Skeleton holds the exact footprint of the image, so nothing reflows on load. */
.frame-plate::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #131311 0%, #1e1e1a 45%, #131311 70%);
  background-size: 280% 100%;
  animation: sweep 2.6s linear infinite;
  transition: opacity .5s ease;
}

.frame-plate::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(243, 240, 231, .06);
  pointer-events: none;
}

.frame.is-loaded .frame-plate::before {
  opacity: 0;
  animation: none;
}

@keyframes sweep { to { background-position: -280% 0; } }

.frame-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  filter: saturate(.9) contrast(1.02);
  pointer-events: none;
  transition:
    opacity .8s ease var(--in, 0ms),
    transform .9s var(--ease) var(--in, 0ms),
    filter .35s ease;
}

.frame.is-loaded .frame-image {
  opacity: 1;
  transform: none;
}

body:not(.is-keyboard) .frame:hover .frame-image,
.frame:focus-visible .frame-image,
.frame.is-selected .frame-image,
body.is-keyboard .frame.is-aimed .frame-image { filter: none; }

.frame-caption {
  position: absolute;
  top: calc(100% + 13px);
  left: 0;
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font: 400 11px/1.4 var(--mono);
  letter-spacing: var(--track);
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
  text-shadow: 0 1px 7px rgba(6, 6, 5, .95), 0 0 2px rgba(6, 6, 5, .8);
  transition: opacity .25s ease, transform .25s var(--ease);
}

body:not(.is-keyboard) .frame:hover .frame-caption,
.frame:focus-visible .frame-caption,
.frame.is-selected .frame-caption,
body.is-keyboard .frame.is-aimed .frame-caption {
  opacity: 1;
  transform: none;
}

.frame-caption b {
  min-width: 0;
  overflow: hidden;
  color: var(--paper);
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frame-caption i {
  flex: none;
  color: var(--paper-faint);
  font-style: normal;
}

.frame.is-selected .frame-caption i,
.frame.is-saved .frame-caption i { color: var(--signal); }

/* ----------------------------------------------------------------- reticle */
.reticle {
  position: fixed;
  z-index: 6;
  left: 50%;
  top: 50%;
  width: 19px;
  height: 19px;
  margin: -9.5px 0 0 -9.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}

body.is-navigating .reticle { opacity: .4; }
body.is-keyboard .reticle { opacity: .5; }

.reticle span { position: absolute; background: var(--paper); }
.reticle span:first-child { top: 9px; left: 0; width: 19px; height: 1px; }
.reticle span:last-child { left: 9px; top: 0; width: 1px; height: 19px; }

.save-feedback {
  position: fixed;
  z-index: 7;
  left: 50%;
  top: calc(50% + 22px);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--paper-dim);
  font: 400 10px/1 var(--mono);
  letter-spacing: var(--track);
  opacity: 0;
  transform: translate(-50%, -3px);
  pointer-events: none;
  transition: opacity .25s ease, transform .35s var(--ease);
}

.save-feedback::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--signal);
}

.save-feedback.is-visible { opacity: .8; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ empty state */
.empty-state {
  position: fixed;
  z-index: 10;
  left: 50%;
  top: 50%;
  width: min(340px, 82vw);
  margin: 0;
  transform: translate(-50%, -50%);
  color: var(--paper-dim);
  font: 400 12px/1.9 var(--mono);
  letter-spacing: var(--track);
  text-align: center;
  pointer-events: none;
}

.empty-state span { display: block; }
.empty-mark { margin-bottom: 16px; color: var(--signal); }
.empty-state span + span { margin-top: 10px; font-size: 11px; color: var(--paper-faint); }
.empty-state b { color: var(--paper); font-weight: 450; }

/* ------------------------------------------------------------------ chrome */
/* Two edge groups. Each surfaces only when the pointer nears its edge, when it
   holds focus, or when the keyboard asks for it. */
.chrome {
  position: fixed;
  z-index: 45;
  left: 0;
  right: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease, transform .45s var(--ease);
}

.chrome-top {
  top: 0;
  transform: translateY(-7px);
}

.chrome-bottom {
  bottom: 0;
  transform: translateY(7px);
}

.chrome.is-visible {
  opacity: 1;
  transform: none;
}

.chrome.is-visible .interactive { pointer-events: auto; }

.veil {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.veil-top {
  top: 0;
  height: 148px;
  background: linear-gradient(to bottom,
    rgba(10, 10, 9, .95) 0%,
    rgba(10, 10, 9, .86) 30%,
    rgba(10, 10, 9, .54) 56%,
    rgba(10, 10, 9, .15) 80%,
    rgba(10, 10, 9, 0) 100%);
}

.veil-bottom {
  bottom: 0;
  height: 144px;
  background: linear-gradient(to top,
    rgba(10, 10, 9, .94) 0%,
    rgba(10, 10, 9, .84) 28%,
    rgba(10, 10, 9, .5) 56%,
    rgba(10, 10, 9, .14) 80%,
    rgba(10, 10, 9, 0) 100%);
}

/* ------------------------------------------------------------------ topbar */
.topbar {
  position: relative;
  height: 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.wordmark {
  justify-self: start;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font: 400 29px/1 var(--serif);
  letter-spacing: -.012em;
  transition: opacity .2s ease;
}

.wordmark:hover { opacity: .7; }

.wordmark-dot {
  width: 4px;
  height: 4px;
  margin-top: 5px;
  background: var(--signal);
}

.filters {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 1px;
}

.filter {
  position: relative;
  padding: 9px 12px;
  color: var(--paper-faint);
  font: 400 12px/1 var(--mono);
  letter-spacing: var(--track);
  transition: color .22s ease;
}

.filter::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s var(--ease);
}

.filter:hover { color: rgba(243, 240, 231, .82); }
.filter.is-active { color: var(--paper); }
.filter.is-active::after { transform: scaleX(1); }

.filter sup {
  margin-left: 3px;
  font-size: 9px;
  vertical-align: super;
}

.filter.has-saved sup { color: var(--signal); }

.filters-rule {
  width: 1px;
  height: 11px;
  margin: 0 8px;
  background: var(--rule);
}

.topbar-end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ghost {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  color: var(--paper-faint);
  font: 400 12px/1 var(--mono);
  letter-spacing: var(--track);
  transition: color .22s ease;
}

.ghost:last-child { padding-right: 0; }
.ghost:hover { color: var(--paper); }

.ghost .glyph {
  width: 13px;
  height: 13px;
  color: var(--signal);
  transition: transform .5s var(--ease);
}

.ghost:hover .glyph { transform: rotate(180deg); }
.ghost.is-working .glyph { animation: spin 1.1s linear infinite; }

.keys-toggle::before {
  content: "";
  width: 1px;
  height: 11px;
  margin-right: 10px;
  background: var(--rule);
}

.keys-toggle[aria-expanded="true"] { color: var(--paper); }

@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------------- rail */
.rail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 0 20px 18px;
}

.statusline {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper-faint);
  font: 400 11px/1 var(--mono);
  letter-spacing: var(--track);
  white-space: nowrap;
}

#position { font-variant-numeric: tabular-nums; }
#feed-status { color: var(--paper-dim); }

.rail-rule {
  width: 1px;
  height: 9px;
  background: var(--rule);
}

#feed-status.is-loading::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 8px 1px 0;
  background: var(--signal);
  animation: blink 1.1s steps(2, end) infinite;
}

@keyframes blink { 50% { opacity: .18; } }

.field-note {
  position: absolute;
  left: 50%;
  bottom: 56px;
  margin: 0;
  transform: translateX(-50%);
  color: var(--paper-faint);
  font: 400 11px/1.4 var(--mono);
  letter-spacing: var(--track);
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 7px rgba(6, 6, 5, .95), 0 0 2px rgba(6, 6, 5, .8);
  transition: opacity .7s ease;
}

.field-note b {
  color: var(--paper-dim);
  font-weight: 400;
}

.field-note i {
  margin: 0 7px;
  color: var(--signal);
  font-style: normal;
}

.field-note.is-dismissed { opacity: 0; }

.canvas-tools {
  justify-self: end;
  display: flex;
  border: 1px solid var(--rule);
  background: rgba(10, 10, 9, .6);
  backdrop-filter: blur(14px);
}

.canvas-tools button {
  width: 36px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--paper-faint);
  border-right: 1px solid var(--rule);
  transition: background .18s ease, color .18s ease;
}

.canvas-tools button svg { width: 13px; height: 13px; }
.canvas-tools button:last-child { border-right: 0; }

.canvas-tools button:hover {
  background: var(--paper);
  color: var(--ink);
}

#zoom-value {
  width: 56px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  color: var(--paper-dim);
  font: 400 11px/1 var(--mono);
  font-variant-numeric: tabular-nums;
}

#zoom-value i {
  color: var(--paper-faint);
  font-style: normal;
}

#zoom-value:hover,
#zoom-value:hover i { color: inherit; }

/* ------------------------------------------------------------------ keymap */
.keymap {
  position: fixed;
  z-index: 85;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 6, 5, .5);
  opacity: 0;
  transition: opacity .3s ease;
}

.keymap[hidden] { display: none; }
.keymap.is-open { opacity: 1; }

.keymap-panel {
  width: min(430px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 24px 26px 22px;
  border: 1px solid var(--rule);
  background: var(--ink-raised);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  transform: translateY(6px);
  transition: transform .3s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(243, 240, 231, .18) transparent;
}

.keymap-panel::-webkit-scrollbar { width: 3px; }
.keymap-panel::-webkit-scrollbar-track { background: transparent; }
.keymap-panel::-webkit-scrollbar-thumb { background: rgba(243, 240, 231, .18); }

.keymap.is-open .keymap-panel { transform: none; }

.keymap .eyebrow {
  margin-bottom: 18px;
  color: var(--signal);
}

.keymap dl { margin: 0; }

.keymap dl > div {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid rgba(243, 240, 231, .07);
}

.keymap dl > div:last-child { border-bottom: 0; }

.keymap dt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  color: var(--paper-faint);
  font-size: 11px;
}

.keymap dd {
  margin: 0;
  color: var(--paper-dim);
  font: 400 11.5px/1.5 var(--mono);
  letter-spacing: var(--track);
}

kbd {
  min-width: 20px;
  padding: 3px 5px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--rule);
  color: var(--paper);
  font: 400 10.5px/1 var(--mono);
}

/* --------------------------------------------------------------- inspector */
.inspector-veil {
  position: fixed;
  z-index: 70;
  inset: 0;
  background: rgba(6, 6, 5, .44);
  opacity: 0;
  transition: opacity .45s ease;
}

.inspector-veil.is-open { opacity: 1; }

.inspector {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  width: min(434px, 100vw);
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 44vh) minmax(0, 1fr) auto;
  background: var(--paper);
  color: var(--dark-on-paper);
  transform: translateX(101%);
  will-change: transform;
  transition: transform .5s var(--ease);
  box-shadow: -30px 0 90px rgba(0, 0, 0, .55);
}

.inspector.is-open { transform: none; }

.inspector-plate {
  position: relative;
  overflow: hidden;
  background: var(--ink-plate);
}

.inspector-plate img {
  position: absolute;
  inset: 13px;
  width: calc(100% - 26px);
  height: calc(100% - 26px);
  object-fit: contain;
  opacity: 0;
  transition: opacity .45s ease;
}

.inspector-plate.is-ready img { opacity: 1; }

.inspector-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: rgba(10, 10, 9, .45);
  backdrop-filter: blur(8px);
  transition: background .2s ease, color .2s ease;
}

.inspector-close svg { width: 14px; height: 14px; }

.inspector-close:hover {
  background: var(--paper);
  color: var(--ink);
}

.inspector-copy {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px 28px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(11, 11, 10, .2) transparent;
}

.inspector-copy::-webkit-scrollbar { width: 3px; }
.inspector-copy::-webkit-scrollbar-thumb { background: rgba(11, 11, 10, .2); }

.inspector h2 {
  margin: 14px 0 24px;
  font: 400 clamp(27px, 4.4vw, 37px)/1.06 var(--serif);
  letter-spacing: -.008em;
  text-wrap: balance;
}

.spec {
  margin: 0;
  border-top: 1px solid var(--rule-on-paper);
}

.spec-row {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-on-paper);
}

.spec dt {
  color: var(--dim-on-paper);
  font: 400 11px/1.6 var(--mono);
  letter-spacing: var(--track);
}

.spec dd {
  margin: 0;
  font: 400 12.5px/1.62 var(--mono);
}

#inspector-rights {
  color: rgba(11, 11, 10, .56);
  font-size: 11px;
}

.inspector-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 28px 18px;
  border-top: 1px solid var(--rule-on-paper);
  background: var(--paper);
}

.save-item,
.inspector-actions a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 400 12px/1 var(--mono);
  letter-spacing: var(--track);
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.save-item {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.save-item:hover { background: #26261f; border-color: #26261f; }

.save-item.is-saved {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--paper);
}

.inspector-actions a {
  border: 1px solid rgba(11, 11, 10, .26);
  color: var(--dark-on-paper);
}

.inspector-actions a span {
  margin-left: 5px;
  font-size: 11px;
}

.inspector-actions a:hover {
  border-color: var(--ink);
  background: rgba(11, 11, 10, .05);
}

/* -------------------------------------------------------------- error card */
.error-card {
  position: fixed;
  z-index: 90;
  left: 50%;
  top: 50%;
  width: min(318px, calc(100vw - 40px));
  padding: 24px 26px 26px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--rule);
  background: var(--ink-raised);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

.error-card .eyebrow {
  margin-bottom: 16px;
  color: var(--signal);
}

.error-line {
  margin: 0 0 22px;
  font: 400 21px/1.25 var(--serif);
  letter-spacing: -.005em;
}

#retry {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--signal);
  color: var(--signal);
  font: 400 12px/1.4 var(--mono);
  letter-spacing: var(--track);
}

/* ------------------------------------------------------------------ mobile */
@media (hover: none) {
  .frame-caption { display: none; }
}

/* Short viewports: give the reading column room instead of the image plate. */
@media (max-height: 640px) {
  .inspector { grid-template-rows: minmax(0, 36vh) minmax(0, 1fr) auto; }
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    padding: 12px 14px 10px;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 12px 10px;
  }

  .wordmark { grid-area: 1 / 1; font-size: 26px; }
  .topbar-end { grid-area: 1 / 2; }

  .filters {
    grid-area: 2 / 1 / 3 / 3;
    justify-self: stretch;
    margin: 0 -14px;
    padding: 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; padding-inline: 10px; }
  .filter::after { left: 10px; right: 10px; }
  .filters-rule { margin: 0 5px; }
  .keys-toggle { display: none; }
  .field-note { display: none; }

  .veil-top { height: 178px; }

  .rail {
    align-items: end;
    padding: 0 14px 14px;
  }

  .statusline {
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  #position,
  #feed-status {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rail-rule { display: none; }

  .inspector {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(88vh, 760px);
    grid-template-rows: minmax(0, 38vh) minmax(0, 1fr) auto;
    transform: translateY(101%);
    box-shadow: 0 -24px 70px rgba(0, 0, 0, .55);
  }

  .inspector-copy { padding: 22px 20px 22px; }
  .inspector-actions { padding: 14px 20px 18px; }
}

@media (max-width: 400px) {
  .inspector-actions { grid-template-columns: 1fr; }
  .spec-row { grid-template-columns: 60px 1fr; gap: 12px; }
}

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