/* Project star map — Žan Hrastnik
   Deep-space shell, warm-paper reading surfaces.
   Instrument Sans for UI; IBM Plex Mono for metadata only. */

:root {
  --shell: #0B0F14;
  --panel: #111820;
  --panel-deep: #0E141B;
  --rule: #2C3945;
  --text: #E6EDF3;
  --muted: #9FB0BF;
  --amber: #FFB454;
  --amber-soft: #FFC978;
  --focus: #6EA8FF;
  --green: #86C79A;

  --paper: #F4F1EA;
  --paper-2: #EDE8DC;
  --ink: #16181D;
  --ink-muted: #58616B;
  --link-paper: #8A4B00;
  --rule-paper: #D8D2C6;
  --focus-paper: #1F5FBF;

  --font-sans: "Instrument Sans", "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 6px;
  --transition: 150ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow: hidden;
  background-color: var(--shell);
  background-image:
    radial-gradient(ellipse 62% 52% at 74% 16%, rgba(110, 168, 255, 0.1), transparent 68%),
    radial-gradient(ellipse 52% 46% at 16% 82%, rgba(255, 180, 84, 0.075), transparent 70%),
    radial-gradient(circle at 50% 46%, #101a26 0%, #0B0F14 54%, #070a0e 100%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

a {
  color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--amber-soft);
}

button {
  font: inherit;
}

svg {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.4;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.dot {
  display: inline-block;
  flex: none;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(134, 199, 154, 0.13);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Stage ---------- */

.map-stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

#star-map {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

#star-map:active {
  cursor: grabbing;
}

.hud {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.hud button,
.hud a {
  pointer-events: auto;
}

.map-stage.panel-open .hud {
  opacity: 0;
}

.hud-top {
  inset: 0 0 auto 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 2.2vw, 1.75rem);
}

.identity {
  min-width: 0;
  max-width: min(62ch, 60vw);
  text-shadow: 0 2px 22px rgba(6, 9, 13, 0.75);
}

.identity-name {
  margin-bottom: 0.4rem;
  color: var(--text);
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
}

.identity-role {
  margin-bottom: 0.7rem;
  color: var(--text);
  font-size: clamp(0.84rem, 1.2vw, 0.96rem);
  font-weight: 500;
  letter-spacing: -0.005em;
}

.identity-avail {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.36rem 0.62rem;
  border: 1px solid rgba(159, 176, 191, 0.3);
  border-radius: 999px;
  background: rgba(17, 24, 32, 0.62);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.list-toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(159, 176, 191, 0.32);
  border-radius: 999px;
  background: rgba(17, 24, 32, 0.66);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: color var(--transition), border-color var(--transition), background-color var(--transition);
}

.list-toggle:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.list-icon {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 14px;
}

.list-icon span {
  height: 1px;
  background: currentColor;
}

.list-icon span:nth-child(2) {
  width: 10px;
}

.planet-controls {
  position: absolute;
  inset: 0;
  z-index: 2;
  visibility: hidden;
  pointer-events: none;
}

.is-ready .planet-controls {
  visibility: visible;
}

.planet-hit {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}

.planet-hit:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  background: rgba(110, 168, 255, 0.1);
}

.hud-bottom {
  left: 50%;
  bottom: clamp(1rem, 3vh, 1.8rem);
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: 0.5rem 0.8rem;
  transform: translateX(-50%);
  border: 1px solid rgba(159, 176, 191, 0.22);
  border-radius: 999px;
  background: rgba(11, 15, 20, 0.64);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.4;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hint-mobile {
  display: none;
}

/* ---------- Dialogs ---------- */

dialog {
  color: inherit;
}

dialog::backdrop {
  background: rgba(5, 8, 12, 0.4);
}

/* ---------- Data panel ---------- */

.data-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: min(760px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  height: auto;
  max-height: min(88dvh, 980px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  transform: translate(-50%, -50%);
}

.data-panel::backdrop {
  background: rgba(3, 6, 10, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.panel-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: min(88dvh, 980px);
  min-height: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(230, 237, 243, 0.14);
  border-radius: 20px;
  box-shadow:
    0 30px 120px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255, 180, 84, 0.08),
    0 0 90px rgba(255, 180, 84, 0.08);
}

.panel-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255, 180, 84, 0.1), transparent 55%);
}

.panel-meta {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.15rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, #131b24, var(--panel));
}

.panel-status {
  margin-bottom: 0.4rem;
  color: var(--amber);
  font-size: 0.62rem;
  overflow-wrap: anywhere;
}

.panel-title {
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  line-height: 1.05;
}

.panel-title:focus-visible {
  outline: none;
}

.panel-role {
  color: var(--muted);
  font-size: 0.62rem;
}

.panel-close,
.list-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.panel-close:hover,
.list-close:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.panel-close svg,
.list-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.panel-paper {
  --focus: var(--focus-paper);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.15rem;
  background: var(--paper);
  color: var(--ink);
}

/* ---------- Shared paper content ---------- */

.card-line {
  margin-bottom: 0.8rem;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.card-facts {
  display: grid;
  gap: 0.42rem;
  margin: 0 0 0.9rem;
  padding: 0;
  list-style: none;
}

.card-facts li {
  position: relative;
  padding-left: 0.95rem;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.card-facts li::before {
  content: "";
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 5px;
  height: 1.5px;
  background: var(--link-paper);
}

.card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.8rem;
  padding: 0;
  list-style: none;
}

.card-chips li {
  padding: 0.22rem 0.44rem;
  border: 1px solid #CFC7B7;
  border-radius: 999px;
  background: #EAE4D8;
  color: #3B3F46;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.card-fine {
  margin: 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--rule-paper);
  color: var(--ink-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.2rem 0 0.9rem;
}

.archive-item {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--rule-paper);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.archive-item:hover,
.archive-item:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 180, 84, 0.7);
  box-shadow: 0 10px 24px rgba(22, 24, 29, 0.12);
}

.archive-item img {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
  object-position: top center;
  background: #e8e2d6;
}

.archive-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.55rem 0.6rem 0.65rem;
}

.archive-text strong {
  font-size: 0.82rem;
  line-height: 1.2;
}

.archive-text span {
  color: rgba(22, 24, 29, 0.72);
  font-size: 0.68rem;
  line-height: 1.35;
}

.archive-stack {
  margin-top: 0.1rem;
  color: #8a4b00 !important;
  font-size: 0.55rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .archive-grid {
    grid-template-columns: 1fr;
  }

  .archive-item {
    flex-direction: row;
    align-items: stretch;
  }

  .archive-item img {
    width: 38%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .archive-text {
    justify-content: center;
  }
}

.card-visual {
  margin: 0 0 0.9rem;
}

.card-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--rule-paper);
  border-radius: 4px;
  background: #E6E0D3;
}

.card-visual figcaption {
  margin-top: 0.4rem;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Field-operations diagram */

.diagram {
  padding: 0.5rem;
  border: 1px solid var(--rule-paper);
  border-radius: 4px;
  background: var(--paper-2);
}

.diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.d-box {
  fill: #FAF7F0;
  stroke: #B9B1A1;
  stroke-width: 1;
}

.d-box-accent {
  fill: #F0E3C8;
  stroke: #D0B47A;
}

.d-name {
  fill: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
}

.d-sub {
  fill: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.d-note {
  fill: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.d-line,
.d-arrow {
  fill: none;
  stroke: var(--link-paper);
  stroke-width: 1.2;
}

.d-arrow {
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* AI terminal */

.terminal {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #0A1016;
}

.terminal-bar {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.54rem;
}

.terminal pre {
  margin: 0;
  padding: 0.7rem;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal code {
  font-family: inherit;
}

.t-prompt {
  color: var(--amber);
}

.terminal figcaption {
  padding: 0.45rem 0.65rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Contact visual */

.contact-visual {
  position: relative;
  margin-bottom: 0.7rem;
  padding: 0.35rem 0.35rem 1.15rem;
  border: 1px solid var(--rule-paper);
  border-radius: 4px;
  background: var(--paper-2);
}

.contact-visual svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 150px;
}

.beacon-ring {
  fill: none;
  stroke: #C08B3E;
  stroke-width: 1;
  opacity: 0.5;
}

.beacon-ring.dashed {
  stroke-dasharray: 3 6;
  opacity: 0.3;
}

.beacon-core {
  fill: var(--link-paper);
}

.beacon-dot {
  fill: var(--link-paper);
  opacity: 0.45;
}

.contact-signal {
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  color: var(--ink);
  font-size: 0.54rem;
  white-space: nowrap;
}

.contact-form {
  display: grid;
  gap: 0.7rem;
  margin: 0.2rem 0 1.1rem;
  padding: 0.9rem;
  border: 1px solid var(--rule-paper);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.contact-form label {
  display: grid;
  gap: 0.3rem;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.58rem 0.66rem;
  border: 1px solid var(--rule-paper);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 400;
}

.contact-form textarea {
  resize: vertical;
  min-height: 92px;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: transparent;
}

.contact-form .optional {
  color: var(--ink-muted);
  font-weight: 400;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-submit {
  justify-self: start;
  padding: 0.62rem 0.95rem;
  border: 1px solid #1D4C3A;
  border-radius: 999px;
  background: #1D4C3A;
  color: #F4F1EA;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), opacity var(--transition);
}

.form-submit:hover {
  background: #14382B;
  border-color: #14382B;
}

.form-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.form-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.form-status.is-error {
  color: #8A1F11;
}

.form-status.is-ok {
  color: #1D4C3A;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.contact-links a {
  color: var(--link-paper);
  font-size: 0.85rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-links a:hover {
  color: #5F3300;
}

.placeholder-tag {
  padding: 0.16rem 0.38rem;
  border: 1px solid #D9BF8A;
  border-radius: 3px;
  background: #F3E3C2;
  color: #6B4200;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- List view ---------- */

.list-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--shell);
  color: var(--text);
}

.list-dialog::backdrop {
  background: rgba(4, 7, 10, 0.74);
}

.list-shell {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1rem, 4vw, 2.5rem);
  background-image:
    radial-gradient(ellipse 50% 40% at 82% 0%, rgba(110, 168, 255, 0.08), transparent 70%),
    radial-gradient(ellipse 40% 40% at 12% 100%, rgba(255, 180, 84, 0.06), transparent 70%);
}

.list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
}

.list-kicker {
  margin-bottom: 0.5rem;
  color: var(--amber);
  font-size: 0.62rem;
}

.list-title {
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  letter-spacing: -0.04em;
}

.list-intro {
  max-width: 52ch;
  color: var(--muted);
  font-size: 0.94rem;
}

.list-close {
  border-color: rgba(159, 176, 191, 0.32);
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1080px;
  margin: 1.5rem auto 0;
  padding-bottom: 1rem;
}

.project-card {
  --focus: var(--focus-paper);
  min-width: 0;
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--rule-paper);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

.project-card a {
  color: var(--link-paper);
}

.project-card a:hover {
  color: #5F3300;
}

.card-head {
  margin-bottom: 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule-paper);
}

.card-kicker {
  margin-bottom: 0.35rem;
  color: var(--link-paper);
  font-size: 0.56rem;
}

.card-title {
  margin-bottom: 0.3rem;
  color: var(--ink);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.card-status {
  color: var(--ink-muted);
  font-size: 0.56rem;
  overflow-wrap: anywhere;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .data-panel[open] .panel-shell {
    animation: panel-pop 420ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .data-panel[open]::backdrop {
    animation: backdrop-in 320ms ease-out;
  }

  @keyframes panel-pop {
    from {
      opacity: 0;
      transform: translateY(18px) scale(0.92);
      filter: blur(8px);
    }
    60% {
      opacity: 1;
      filter: blur(0);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
      filter: blur(0);
    }
  }

  @keyframes backdrop-in {
    from {
      opacity: 0;
    }
  }
}

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

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .list-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .identity {
    max-width: calc(100% - 110px);
  }

  .identity-name {
    font-size: 1.55rem;
  }

  .identity-role {
    margin-bottom: 0.55rem;
    font-size: 0.79rem;
  }

  .identity-avail {
    font-size: 0.58rem;
  }

  .list-toggle {
    min-height: 42px;
    padding: 0.45rem 0.7rem;
    font-size: 0.78rem;
  }

  .hint-desktop {
    display: none;
  }

  .hint-mobile {
    display: inline;
  }

  .data-panel {
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    transform: none;
  }

  .panel-shell {
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .panel-paper {
    max-height: none;
  }

  .hud-bottom {
    bottom: 0.85rem;
  }

  .list-dialog[open] .list-shell {
    animation: none;
  }
}

@media (max-width: 420px) {
  .identity-role {
    max-width: 22ch;
  }

  .list-toggle {
    padding-inline: 0.6rem;
  }

  .hint-desktop {
    display: none;
  }

  .hud-bottom {
    font-size: 0.56rem;
    letter-spacing: 0.04em;
  }

  .panel-meta {
    padding: 1rem;
  }

  .panel-paper {
    padding: 1rem;
  }

  .list-shell {
    padding: 1rem;
  }

  .list-head {
    gap: 0.6rem;
  }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 720px) {
  .data-panel[open] .panel-shell {
    animation: panel-pop 360ms cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* ---------- No-JavaScript fallback ---------- */

html.no-js body {
  overflow: auto;
}

html.no-js .skip-link,
html.no-js .map-stage {
  display: none;
}

html.no-js .list-dialog {
  display: block;
  position: static;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  background: var(--shell);
}

html.no-js .list-shell {
  height: auto;
}

html.no-js .list-close {
  display: none;
}
