:root {
  --eazo-safe-area-top: max(56px, env(safe-area-inset-top, 0px));
  --eazo-safe-area-bottom: max(34px, env(safe-area-inset-bottom, 0px));
  --bg: #020907;
  --bg-soft: #06120e;
  --mist: rgba(204, 220, 213, 0.82);
  --muted: rgba(204, 220, 213, 0.48);
  --dim: rgba(204, 220, 213, 0.25);
  --signal: #8affb8;
  --signal-soft: rgba(138, 255, 184, 0.28);
  --signal-dim: rgba(138, 255, 184, 0.11);
  --admin: #7b211c;
  --admin-soft: rgba(123, 33, 28, 0.34);
  --admin-dim: rgba(123, 33, 28, 0.12);
  --age-distance: 0px;
  --system-route-opacity: 0.12;
  --mature-route-opacity: 0;
  --admin-scale: 1;
  --root-scale: 1;
  --social-distance: 0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; overflow: hidden; background: var(--bg); }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  color: var(--mist);
}
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
  padding: var(--eazo-safe-area-top) clamp(18px, 4vw, 58px) var(--eazo-safe-area-bottom);
  background:
    radial-gradient(circle at 16% 24%, rgba(77, 143, 104, 0.08), transparent 32%),
    radial-gradient(circle at 74% 62%, rgba(138, 255, 184, 0.045), transparent 30%),
    radial-gradient(circle at 92% 18%, var(--admin-dim), transparent 0),
    linear-gradient(180deg, #020907 0%, #030d0a 48%, #010504 100%);
  transition: background 1200ms ease;
}
.app-shell.age-25,
.app-shell.age-50,
.app-shell.age-70,
.app-shell.age-80 {
  background:
    radial-gradient(circle at 16% 24%, rgba(77, 143, 104, 0.08), transparent 32%),
    radial-gradient(circle at 74% 62%, rgba(138, 255, 184, 0.045), transparent 30%),
    radial-gradient(circle at 92% 18%, rgba(123, 33, 28, 0.24), transparent 24%),
    linear-gradient(180deg, #020907 0%, #030d0a 48%, #010504 100%);
}
.app-shell.awaiting-age .hud,
.app-shell.awaiting-age .map,
.app-shell.awaiting-age .age-rail,
.app-shell.awaiting-age .system-log { opacity: 0.22; pointer-events: none; }

#starfield { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Full-bleed inner layer: carries the same padding as .app-shell so relative
   flow children (.hud) keep their layout, while giving cigarettes a filter
   surface that never competes with alcohol's url() filter on .app-shell. */
.app-shell-inner {
  position: absolute;
  inset: 0;
  padding: var(--eazo-safe-area-top) clamp(18px, 4vw, 58px) var(--eazo-safe-area-bottom);
  overflow: hidden;
}
.app-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 0 42%, rgba(0, 0, 0, 0.34) 100%);
}

.hud {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  pointer-events: none;
  transition: opacity 600ms ease;
}
.system-mark { pointer-events: none; }
.overline { margin: 0 0 9px; color: var(--dim); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; }
h1 { margin: 0; color: rgba(232, 241, 237, 0.78); font-size: clamp(15px, 2.2vw, 22px); font-weight: 400; letter-spacing: 0.12em; }
.locale-wrap { pointer-events: auto; }
select {
  color: var(--muted);
  background: rgba(3, 12, 9, 0.52);
  border: 1px solid rgba(204, 220, 213, 0.14);
  border-radius: 0;
  padding: 7px 9px;
  font-size: 11px;
  letter-spacing: 0.06em;
  outline: none;
}
select:focus-visible { border-color: rgba(138, 255, 184, 0.56); box-shadow: 0 0 0 2px rgba(138, 255, 184, 0.08); }

.map {
  position: absolute;
  inset: 0;
  z-index: 4;
  transition: opacity 600ms ease;
}
.route-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: 0.82; }
.route-lines path {
  fill: none;
  stroke: rgba(191, 216, 205, var(--system-route-opacity));
  stroke-width: 0.055;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-dasharray: 0.5 1.8;
  filter: drop-shadow(0 0 2px rgba(138, 255, 184, 0.06));
  transition: stroke 620ms ease, stroke-width 620ms ease, filter 620ms ease, opacity 900ms ease;
}
.route-lines path.age-route { opacity: calc(var(--system-route-opacity) * 2.2); }
.route-lines path.mature-route { stroke: rgba(123, 33, 28, 0.36); opacity: var(--mature-route-opacity); filter: drop-shadow(0 0 5px rgba(123, 33, 28, 0.16)); }
.route-lines path.active { stroke: rgba(138, 255, 184, 0.48); stroke-width: 0.11; opacity: 1; filter: drop-shadow(0 0 7px rgba(138, 255, 184, 0.22)); }
.route-lines path.mature-route.active { stroke: rgba(123, 33, 28, 0.72); filter: drop-shadow(0 0 10px rgba(123, 33, 28, 0.38)); }

.node {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  transform: translate(calc(-50% + var(--node-dx, 0px)), calc(-50% + var(--node-dy, 0px)));
  cursor: pointer;
  z-index: 8;
  outline: none;
  --core-size: 5px;
  --reach: 45px;
  --label-opacity: 0;
  --label-shift: 9px;
  transition: opacity 1000ms ease, filter 1000ms ease, transform 1400ms ease;
}
.node.primary { --core-size: 7px; --reach: 58px; }
.node.small { --core-size: 4.5px; opacity: 0.86; }
.node.disabled { --core-size: 3.8px; opacity: 0.48; cursor: default; }
.node::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: var(--reach); height: var(--reach);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(138, 255, 184, 0.08);
  border-radius: 50%;
  opacity: 0.34;
  transition: width 700ms ease, height 700ms ease, border-color 700ms ease, opacity 700ms ease;
}
.node-core {
  position: absolute;
  left: 50%; top: 50%;
  width: var(--core-size); height: var(--core-size);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237, 255, 246, 0.95) 0 16%, var(--signal) 34%, rgba(138, 255, 184, 0.08) 74%);
  box-shadow: 0 0 7px rgba(138, 255, 184, 0.35), 0 0 18px rgba(138, 255, 184, 0.12);
  transition: transform 700ms ease, box-shadow 900ms ease, filter 900ms ease, background 900ms ease;
}
.node-ring, .node-ring::after {
  position: absolute;
  content: "";
  left: 50%; top: 50%;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(138, 255, 184, 0.16);
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0.2;
  animation: pulse 7.8s ease-out infinite;
}
.node-ring::after { animation-delay: -3.6s; width: 48px; height: 48px; opacity: 0.12; }
.node-label {
  position: absolute;
  left: 17px;
  top: -12px;
  min-width: 150px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 4px;
  color: rgba(232, 241, 237, 0.86);
  opacity: var(--label-opacity);
  transform: translateX(var(--label-shift));
  transition: opacity 460ms ease, transform 560ms ease;
  pointer-events: none;
  text-align: left;
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.85);
}
.node-label::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 12px;
  width: 10px;
  height: 1px;
  background: rgba(204, 220, 213, 0.24);
}
.node-label strong { font-size: clamp(12px, 1.25vw, 14px); font-weight: 420; letter-spacing: 0.06em; white-space: nowrap; }
.node-label em { font-size: 10px; font-style: normal; letter-spacing: 0.18em; color: rgba(138, 255, 184, 0.64); white-space: nowrap; }
.node-label small { grid-column: 1 / -1; font-size: 10px; letter-spacing: 0.08em; color: rgba(204, 220, 213, 0.52); white-space: nowrap; }
/* Right-edge nodes: flip the label to the left so it never overflows screen. */
.node.label-left .node-label {
  left: auto;
  right: 17px;
  text-align: right;
  justify-items: end;
  transform: translateX(calc(-1 * var(--label-shift)));
}
.node.label-left .node-label::before { left: auto; right: -14px; }
.node:hover, .node:focus-visible, .node.near { --label-opacity: 1; --label-shift: 0px; }
.node:hover::before, .node:focus-visible::before, .node.near::before { width: calc(var(--reach) + 18px); height: calc(var(--reach) + 18px); border-color: rgba(138, 255, 184, 0.22); opacity: 0.9; }
.node:hover .node-core, .node:focus-visible .node-core, .node.near .node-core { transform: translate(-50%, -50%) scale(1.42); box-shadow: 0 0 11px rgba(138, 255, 184, 0.62), 0 0 32px rgba(138, 255, 184, 0.24); filter: brightness(1.18); }
.node:focus-visible::after { content: ""; position: absolute; inset: -20px; border: 1px solid rgba(138,255,184,0.48); border-radius: 50%; }
.node.burst .node-ring { animation: singleBurst 900ms ease-out 1; }
.node.disabled:hover .node-core, .node.disabled.near .node-core { filter: brightness(0.76); box-shadow: 0 0 4px rgba(138, 255, 184, 0.16); }

.node.restricted { opacity: 0.36; filter: grayscale(0.7) brightness(0.64); }
.node.restricted .node-label { opacity: 0 !important; }
.node.restricted::before { border-color: rgba(204, 220, 213, 0.045); }
.node.restricted .node-core { box-shadow: 0 0 5px rgba(204,220,213,0.08); background: radial-gradient(circle, rgba(204,220,213,0.46), rgba(138,255,184,0.08) 62%, transparent 80%); }
.node.just-opened .node-core { animation: oxygen 2800ms ease-out 1; }

.node.admin-node { --core-size: calc(5px * var(--admin-scale)); --reach: calc(52px * var(--admin-scale)); opacity: 1; }
.node.hidden-admin { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.4); }
.node.admin-node .node-core {
  background: radial-gradient(circle, rgba(255, 199, 190, 0.8) 0 10%, var(--admin) 38%, rgba(123, 33, 28, 0.05) 76%);
  box-shadow: 0 0 6px rgba(123, 33, 28, 0.54), 0 0 24px rgba(123, 33, 28, 0.2);
  animation: adminPulse 2200ms ease-in-out infinite;
}
.node.admin-node .node-ring,
.node.admin-node .node-ring::after { border-color: rgba(123, 33, 28, 0.22); animation-duration: 5.8s; }
.node.admin-node .node-label em { color: rgba(202, 83, 73, 0.72); }
.node.admin-node:hover::before,
.node.admin-node:focus-visible::before,
.node.admin-node.near::before { border-color: rgba(123, 33, 28, 0.36); }
.node.admin-node:hover .node-core,
.node.admin-node:focus-visible .node-core,
.node.admin-node.near .node-core { box-shadow: 0 0 11px rgba(123, 33, 28, 0.68), 0 0 35px rgba(123, 33, 28, 0.28); }

.app-shell.age-25 .node:not(.admin-node) { --node-dx: calc((50px - var(--x) * 1px) * var(--age-distance)); --node-dy: calc((50px - var(--y) * 1px) * var(--age-distance)); }
.app-shell.age-80 .node:not(.admin-node) { filter: saturate(0.72) brightness(0.82); }
.app-shell.age-100 .node:not(.admin-node) { opacity: 0.52; }

.console-layer { position: absolute; inset: 0; pointer-events: none; }
.console-layer .console-node { pointer-events: auto; }
.console-node { --core-size: 5px; --reach: 48px; }
.console-node .node-label { min-width: 230px; color: rgba(230,205,200,0.86); }
.console-node .node-label small { max-width: 270px; white-space: normal; color: rgba(213,154,146,0.54); }
.console-node.hidden-admin { opacity: 0; pointer-events: none; visibility: hidden; transform: translate(-50%, -50%) scale(0.38); }
.console-node.new-console .node-ring { animation: redBirth 1600ms ease-out 1; }
.console-node.new-console .node-core { animation: redGather 1500ms ease-out 1, adminPulse 2200ms ease-in-out infinite 1500ms; }
.console-root { --core-size: calc(6px * var(--root-scale)); --reach: calc(70px * var(--root-scale)); z-index: 6; }
.app-shell.age-80 .console-root .node-core { background: radial-gradient(circle, rgba(0,0,0,0.95) 0 32%, rgba(80,12,10,0.86) 48%, rgba(123,33,28,0.08) 82%); box-shadow: 0 0 20px rgba(0,0,0,0.9), 0 0 80px rgba(123,33,28,0.34); }
.app-shell.age-70 .route-lines path.mature-route { stroke-dasharray: 0.25 0.7; }
.app-shell.age-80 .route-lines path.mature-route { stroke-width: 0.09; filter: drop-shadow(0 0 10px rgba(123,33,28,0.28)); }
.age-number { max-width: 190px; overflow-wrap: anywhere; }
.age-number:has(+ *) {}
.app-shell.age-100 .age-number { color: rgba(218,107,94,0.82); font-size: clamp(18px, 3vw, 32px); letter-spacing: 0.08em; line-height: 1.15; }
.console-panel { width: min(720px, 100%); max-height: min(780px, calc(100dvh - var(--eazo-safe-area-top) - var(--eazo-safe-area-bottom) - 24px)); overflow: auto; border-left-color: rgba(123,33,28,0.46); box-shadow: 0 24px 90px rgba(0,0,0,0.58), 0 0 100px rgba(123,33,28,0.06); }
.console-panel .modal-kicker { color: rgba(202,83,73,0.72); }
.console-features { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.console-features li { color: rgba(220,214,207,0.64); font-size: 12px; line-height: 1.55; letter-spacing: 0.06em; }
.console-features li::before { content: "— "; color: rgba(123,33,28,0.72); }
.console-status { margin-top: 18px; padding: 12px 0; border-top: 1px solid rgba(123,33,28,0.2); border-bottom: 1px solid rgba(123,33,28,0.16); color: rgba(238,184,176,0.7); font-size: 12px; line-height: 1.6; letter-spacing: 0.06em; }
.console-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.impact-review { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(123,33,28,0.28); }
.impact-review[hidden] { display: none; }
.impact-review p:not(.modal-kicker) { color: rgba(238,184,176,0.75); }
.ending-panel { border-left-color: rgba(123,33,28,0.54); background: radial-gradient(circle at center, rgba(0,0,0,0.94), rgba(30,6,5,0.96) 60%, rgba(2,9,7,0.98)); }
.ending-panel h2 { color: rgba(218,107,94,0.86); }
.ending-panel p { color: rgba(232,241,237,0.72); }

.age-rail {
  position: absolute;
  z-index: 7;
  right: max(18px, env(safe-area-inset-right, 0px));
  top: calc(var(--eazo-safe-area-top) + 74px);
  bottom: calc(var(--eazo-safe-area-bottom) + 34px);
  width: min(190px, 25vw);
  min-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  text-align: right;
  pointer-events: none;
  transition: opacity 600ms ease;
}
.age-rail > * { pointer-events: none; }
.age-rail button, .age-rail select, .age-rail a { pointer-events: auto; }
.rail-line { pointer-events: none; }
.rail-line {
  position: absolute;
  right: 7px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(204,220,213,0.22), rgba(138,255,184,0.2), transparent);
  opacity: 0.7;
}
.rail-label { margin: 0; color: var(--dim); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.age-number {
  margin: -4px 16px 8px 0;
  color: rgba(232,241,237,0.9);
  font-size: clamp(34px, 6vw, 66px);
  font-weight: 240;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: transform 360ms ease, opacity 360ms ease, color 700ms ease;
}
.age-number.roll { transform: translateY(-8px); opacity: 0.38; }
#last-verified { margin: -4px 16px 12px 0; color: rgba(204,220,213,0.58); font-size: 11px; letter-spacing: 0.06em; }
.rail-button, .modal-action, .back-button {
  border: 1px solid rgba(204,220,213,0.2);
  background: rgba(3, 12, 9, 0.38);
  color: rgba(232,241,237,0.82);
  padding: 12px 18px;
  border-radius: 0;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.rail-button { width: min(168px, 100%); margin-right: 16px; font-size: 11px; }
.rail-button.muted, .modal-action.secondary { color: var(--muted); border-color: rgba(204,220,213,0.14); }
.modal-action.danger { border-color: rgba(123,33,28,0.46); color: rgba(238,184,176,0.82); }
.rail-button:hover, .rail-button:focus-visible, .modal-action:hover, .modal-action:focus-visible, .back-button:hover, .back-button:focus-visible { border-color: rgba(138,255,184,0.48); box-shadow: 0 0 22px rgba(138,255,184,0.08); outline: none; }
.modal-action.danger:hover, .modal-action.danger:focus-visible { border-color: rgba(169,58,48,0.72); box-shadow: 0 0 24px rgba(123,33,28,0.16); }

.system-log {
  position: absolute;
  z-index: 6;
  left: clamp(18px, 4vw, 58px);
  bottom: var(--eazo-safe-area-bottom);
  width: min(420px, 46vw);
  pointer-events: none;
  transition: opacity 600ms ease;
}
.system-log p { margin: 0 0 8px; color: var(--dim); font-size: 10px; letter-spacing: 0.18em; }
.system-log ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.system-log li { color: rgba(204,220,213,0.42); font-size: 11px; line-height: 1.45; letter-spacing: 0.04em; }
.system-log li:first-child { color: rgba(204,220,213,0.7); }

.place {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  padding: var(--eazo-safe-area-top) 22px var(--eazo-safe-area-bottom);
  background: radial-gradient(circle at center, rgba(9, 26, 19, 0.92), rgba(1, 5, 4, 0.96) 58%, #010403 100%);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 700ms ease, transform 900ms ease;
}
.place.open { opacity: 1; pointer-events: auto; transform: scale(1); }
.place-panel { max-width: 520px; width: min(100%, 520px); border-left: 1px solid rgba(138,255,184,0.22); padding-left: clamp(20px, 5vw, 34px); }
.place-code { margin: 0 0 14px; color: rgba(138,255,184,0.62); font-size: 11px; letter-spacing: 0.24em; }
.place h2 { margin: 0 0 18px; color: rgba(236,246,241,0.9); font-weight: 360; font-size: clamp(28px, 6vw, 58px); letter-spacing: 0.08em; }
.place p:not(.place-code) { margin: 0 0 36px; color: rgba(204,220,213,0.65); line-height: 1.85; font-size: clamp(14px, 2vw, 17px); }
.transition {
  position: absolute;
  z-index: 8;
  left: 50%; top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
  background: radial-gradient(circle, rgba(232,255,242,0.8), rgba(138,255,184,0.22) 12%, rgba(4,17,12,0.95) 43%, rgba(1,5,4,0) 70%);
  pointer-events: none;
}
.transition.run { animation: transit 1050ms cubic-bezier(.16,.84,.26,1) forwards; }
.app-shell.transitioning .map, .app-shell.transitioning .hud, .app-shell.transitioning .age-rail { animation: mapScatter 1050ms cubic-bezier(.16,.84,.26,1) forwards; }

.toast {
  position: absolute;
  z-index: 12;
  left: 50%;
  bottom: calc(var(--eazo-safe-area-bottom) + 44px);
  max-width: min(520px, calc(100vw - 40px));
  padding: 12px 16px;
  border-left: 1px solid rgba(138,255,184,0.28);
  background: rgba(2, 9, 7, 0.84);
  color: rgba(232,241,237,0.8);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease, transform 320ms ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.warn { border-left-color: rgba(123,33,28,0.56); }

.modal-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: var(--eazo-safe-area-top) 20px var(--eazo-safe-area-bottom);
  background: rgba(1, 5, 4, 0.62);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease;
}
.modal-layer.open { opacity: 1; pointer-events: auto; }
.modal-panel {
  width: min(520px, 100%);
  position: relative;
  padding: clamp(24px, 6vw, 44px);
  background: linear-gradient(180deg, rgba(4,15,11,0.94), rgba(2,9,7,0.96));
  border-left: 1px solid rgba(138,255,184,0.28);
  box-shadow: 0 24px 80px rgba(0,0,0,0.48), 0 0 80px rgba(138,255,184,0.035);
}
.modal-kicker { margin: 0 0 12px; color: rgba(138,255,184,0.54); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; }
.modal-panel h2 { margin: 0 0 16px; color: rgba(236,246,241,0.9); font-weight: 360; font-size: clamp(24px, 5vw, 42px); letter-spacing: 0.08em; }
.modal-panel p { color: rgba(204,220,213,0.62); line-height: 1.75; }
.modal-panel label { display: block; margin: 22px 0 8px; color: rgba(204,220,213,0.62); font-size: 12px; letter-spacing: 0.08em; }
.modal-panel input {
  width: 100%;
  border: 1px solid rgba(204,220,213,0.18);
  border-radius: 0;
  background: rgba(0,0,0,0.22);
  color: rgba(232,241,237,0.9);
  padding: 13px 12px;
  font-size: 18px;
  outline: none;
}
.modal-panel input:focus-visible { border-color: rgba(138,255,184,0.52); box-shadow: 0 0 0 2px rgba(138,255,184,0.08); }
.form-error { min-height: 20px; margin: 8px 0 0; color: rgba(238,184,176,0.86) !important; font-size: 12px; }
.fineprint { margin: 14px 0 22px; font-size: 11px; color: rgba(204,220,213,0.42) !important; }
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: rgba(204,220,213,0.58);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:focus-visible { outline: 1px solid rgba(138,255,184,0.48); }
.verify-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.increase-form[hidden] { display: none; }
.preview-line { min-height: 26px; color: rgba(138,255,184,0.66) !important; font-size: 12px; letter-spacing: 0.06em; }

@keyframes pulse { 0% { transform: translate(-50%, -50%) scale(0.58); opacity: 0.16; } 72%, 100% { transform: translate(-50%, -50%) scale(1.72); opacity: 0; } }
@keyframes singleBurst { 0% { transform: translate(-50%, -50%) scale(0.45); opacity: 0.34; } 100% { transform: translate(-50%, -50%) scale(2.15); opacity: 0; } }
@keyframes transit { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1); } 18% { opacity: 0.95; } 100% { opacity: 1; transform: translate(-50%, -50%) scale(230); } }
@keyframes mapScatter { 0% { transform: scale(1); filter: blur(0); opacity: 1; } 100% { transform: scale(1.18); filter: blur(5px); opacity: 0; } }
@keyframes oxygen { 0% { filter: brightness(0.42); box-shadow: 0 0 2px rgba(138,255,184,0.05); } 45% { filter: brightness(1.34); box-shadow: 0 0 18px rgba(138,255,184,0.42), 0 0 60px rgba(138,255,184,0.16); } 100% { filter: brightness(1); } }
@keyframes adminPulse { 0%, 100% { filter: brightness(0.72); transform: translate(-50%, -50%) scale(0.92); } 50% { filter: brightness(1.12); transform: translate(-50%, -50%) scale(1.08); } }
@keyframes redBirth { 0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; } 45% { opacity: 0.5; } 100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; } }
@keyframes redGather { 0% { transform: translate(-50%, -50%) scale(0.3); filter: brightness(0.2); } 60% { transform: translate(-50%, -50%) scale(1.45); filter: brightness(1.25); } 100% { transform: translate(-50%, -50%) scale(1); filter: brightness(0.9); } }

@media (max-width: 760px) {
  .app-shell { padding-left: 18px; padding-right: 18px; }
  .hud { align-items: flex-start; }
  .overline { font-size: 9px; max-width: 210px; }
  h1 { font-size: 14px; max-width: 220px; }
  select { max-width: 88px; font-size: 10px; padding: 6px; }
  .node { --reach: 38px; }
  .node.primary { --reach: 48px; }
  .node-label { min-width: 126px; left: 14px; top: -11px; }
  .node-label strong { font-size: 11px; }
  .node-label small { font-size: 9px; white-space: normal; max-width: 130px; }
  .node[data-node="aurora"] { --x: 24 !important; --y: 25 !important; }
  .node[data-node="snow"] { --x: 69 !important; --y: 19 !important; }
  .node[data-node="secret"] { --x: 74 !important; --y: 40 !important; }
  .node[data-node="creature"] { --x: 31 !important; --y: 53 !important; }
  .node[data-node="market"] { --x: 69 !important; --y: 62 !important; }
  .node[data-node="echo"] { --x: 24 !important; --y: 78 !important; }
  .node[data-node="restore"] { --x: 76 !important; --y: 84 !important; }
  .console-node .node-label { min-width: 170px; }
  .console-node[data-console="archive"] { --x: 86 !important; --y: 25 !important; }
  .console-node[data-console="contact"] { --x: 82 !important; --y: 43 !important; }
  .console-node[data-console="visibility"] { --x: 72 !important; --y: 13 !important; }
  .console-node[data-console="appeal"] { --x: 54 !important; --y: 9 !important; }
  .console-node[data-console="access"] { --x: 36 !important; --y: 13 !important; }
  .console-node[data-console="commerce"] { --x: 17 !important; --y: 23 !important; }
  .console-node[data-console="labour"] { --x: 13 !important; --y: 47 !important; }
  .console-node[data-console="recovery"] { --x: 15 !important; --y: 70 !important; }
  .console-node[data-console="identity"] { --x: 30 !important; --y: 86 !important; }
  .console-node[data-console="memory"] { --x: 53 !important; --y: 88 !important; }
  .console-node[data-console="policy"] { --x: 73 !important; --y: 82 !important; }
  .console-node[data-console="root"] { --x: 50 !important; --y: 50 !important; }
  .age-rail {
    top: auto;
    left: 18px;
    right: 18px;
    bottom: var(--eazo-safe-area-bottom);
    width: auto;
    min-width: 0;
    height: auto;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: end;
    text-align: left;
    gap: 6px 10px;
  }
  .rail-line { display: none; }
  .rail-label { font-size: 8px; }
  .age-number { grid-row: 1 / 3; margin: 0; font-size: 36px; }
  #last-verified { margin: 0; font-size: 10px; }
  .rail-button { width: auto; margin: 0; padding: 9px 10px; font-size: 9px; }
  .system-log { left: 18px; bottom: calc(var(--eazo-safe-area-bottom) + 74px); width: min(360px, calc(100vw - 36px)); }
  .system-log li { font-size: 10px; }
  .modal-panel { padding: 24px; }
  .console-panel { max-height: calc(100dvh - var(--eazo-safe-area-top) - var(--eazo-safe-area-bottom) - 12px); }
}

@media (max-width: 460px) {
  .age-rail { grid-template-columns: auto 1fr; }
  .rail-button { grid-column: span 1; }
  .system-log { display: none; }
}



/* AURORA RELAY — preserves the star-map language while opening A–17 as a playable place. */
.app-shell.aurora-mode .hud,
.app-shell.aurora-mode .map,
.app-shell.aurora-mode .system-log { opacity: 0; pointer-events: none; }
.app-shell.aurora-mode .age-rail { z-index: 18; }
.aurora-game {
  position: absolute;
  inset: 0;
  z-index: 14;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 28%, rgba(126,255,211,0.08), transparent 24%),
    radial-gradient(circle at 21% 80%, rgba(226,248,242,0.06), transparent 28%),
    linear-gradient(180deg, #01080b 0%, #06140f 48%, #dceee70d 74%, #f2fff61a 100%);
  transition: opacity 900ms ease;
}
.aurora-game.open { opacity: 1; pointer-events: auto; }
.aurora-canvas, .aurora-npc-particles { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.aurora-npc-particles { z-index: 5; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity 700ms ease; }
.aurora-game.open .aurora-npc-particles { opacity: 1; }
.aurora-copy {
  position: absolute;
  z-index: 4;
  left: clamp(20px, 5vw, 66px);
  top: var(--eazo-safe-area-top);
  width: min(520px, calc(100vw - 260px));
  pointer-events: none;
}
.aurora-copy h2 { margin: 0 0 12px; color: rgba(236,246,241,0.88); font-weight: 320; font-size: clamp(32px, 7vw, 74px); letter-spacing: 0.12em; }
.aurora-copy p { margin: 0 0 10px; color: rgba(204,220,213,0.58); line-height: 1.65; font-size: 13px; letter-spacing: 0.06em; }
.aurora-status { color: rgba(138,255,184,0.74) !important; letter-spacing: 0.18em !important; text-transform: uppercase; }
.aurora-game[data-stage="observed"] .aurora-status { color: rgba(210,226,219,0.68) !important; }
.aurora-game[data-stage="distant"] .aurora-status { color: rgba(170,205,194,0.52) !important; }
.aurora-game[data-stage="refusal"] .aurora-status { color: rgba(238,184,176,0.68) !important; }
.aurora-game[data-stage="admin"] .aurora-status { color: rgba(202,83,73,0.76) !important; }
.aurora-npc-line {
  min-height: 40px;
  max-width: 620px;
  color: rgba(232,241,237,0.7) !important;
  font-size: clamp(14px, 2vw, 18px) !important;
  letter-spacing: 0.08em !important;
}
.aurora-back {
  position: absolute;
  z-index: 19;
  left: clamp(20px, 5vw, 66px);
  bottom: calc(var(--eazo-safe-area-bottom) + 22px);
  background: rgba(2,9,7,0.48);
}
.aurora-light-button {
  position: absolute;
  z-index: 7;
  left: 0;
  top: 0;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 1px solid rgba(226,248,242,0.12);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250,255,252,0.52), rgba(138,255,184,0.22) 36%, rgba(138,255,184,0.02) 70%);
  box-shadow: 0 0 32px rgba(138,255,184,0.28);
  opacity: 0.42;
  cursor: grab;
  animation: auroraHandleBreath 2600ms ease-in-out infinite;
}
.aurora-light-button:focus-visible { opacity: 0.7; outline: 1px solid rgba(138,255,184,0.64); outline-offset: 6px; }
.aurora-light-button:active { cursor: grabbing; }
.aurora-light-button.charging { opacity: 0.78; transform-origin: center; box-shadow: 0 0 52px rgba(138,255,184,0.46), 0 0 90px rgba(138,255,184,0.16); }
.aurora-light-button[hidden] { display: none; }

.aurora-admin-toggle {
  position: absolute;
  z-index: 17;
  right: max(20px, env(safe-area-inset-right, 0px));
  top: calc(var(--eazo-safe-area-top) + 10px);
  min-width: 74px;
  border: 1px solid rgba(123,33,28,0.42);
  background: rgba(22,5,4,0.42);
  color: rgba(238,184,176,0.82);
  padding: 9px 12px;
  font-size: 10px;
  letter-spacing: 0.16em;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.aurora-admin-toggle[hidden] { display: none; }
.aurora-admin-toggle:focus-visible,
.aurora-admin-toggle:hover { outline: none; border-color: rgba(202,83,73,0.72); box-shadow: 0 0 24px rgba(123,33,28,0.14); }
.aurora-admin-close {
  position: sticky;
  top: 0;
  float: right;
  width: 28px;
  height: 28px;
  border: 0;
  background: rgba(2,9,7,0.52);
  color: rgba(238,184,176,0.72);
  cursor: pointer;
  z-index: 2;
}
.aurora-admin.collapsed {
  width: 0;
  max-height: 0;
  padding: 0;
  border-left: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px);
}
.aurora-admin.expanded { opacity: 1; pointer-events: auto; transform: translateX(0); }

.aurora-admin {
  position: absolute;
  z-index: 16;
  right: max(210px, calc(env(safe-area-inset-right, 0px) + 210px));
  top: calc(var(--eazo-safe-area-top) + 8px);
  width: min(360px, 31vw);
  max-height: calc(100dvh - var(--eazo-safe-area-top) - var(--eazo-safe-area-bottom) - 28px);
  overflow: auto;
  padding: 16px;
  border-left: 1px solid rgba(123,33,28,0.4);
  background: linear-gradient(180deg, rgba(5,12,11,0.58), rgba(22,5,4,0.42));
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 70px rgba(0,0,0,0.22);
  transition: opacity 260ms ease, transform 260ms ease, width 260ms ease, max-height 260ms ease, padding 260ms ease;
}
.aurora-admin[hidden] { display: none; }
.aurora-metrics { display: grid; gap: 5px; margin-bottom: 14px; }
.aurora-metrics div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid rgba(204,220,213,0.055); padding-bottom: 4px; }
.aurora-metrics span { color: rgba(204,220,213,0.38); font-size: 9px; letter-spacing: 0.12em; }
.aurora-metrics strong { color: rgba(232,241,237,0.7); font-size: 10px; font-weight: 420; letter-spacing: 0.08em; }
.aurora-controls { display: grid; gap: 10px; }
.aurora-lockline { margin: 0; color: rgba(204,220,213,0.46); font-size: 11px; line-height: 1.6; letter-spacing: 0.08em; }
.aurora-control { display: grid; gap: 5px; margin: 0 !important; color: rgba(204,220,213,0.56) !important; font-size: 10px !important; letter-spacing: 0.1em !important; }
.aurora-control input[type="range"] { width: 100%; accent-color: #7b211c; }
.aurora-control input[type="checkbox"] { width: auto; justify-self: start; accent-color: #7b211c; }
.aurora-force { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(123,33,28,0.24); }
.aurora-force[hidden], .aurora-ending[hidden] { display: none; }
.aurora-force p, .aurora-ending p { color: rgba(238,184,176,0.72); font-size: 12px; line-height: 1.65; }
.aurora-confirm { display: flex !important; align-items: flex-start; gap: 8px; margin: 12px 0 !important; }
.aurora-confirm input { width: auto; margin-top: 3px; accent-color: #7b211c; }
.aurora-ending { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(123,33,28,0.32); }
.aurora-game.forced { background: radial-gradient(circle at 50% 28%, rgba(123,33,28,0.08), transparent 28%), linear-gradient(180deg, #02080b 0%, #07110f 54%, #e8fff012 100%); }
.aurora-game.forced .aurora-npc-line { color: rgba(238,184,176,0.76) !important; }
.aurora-game.revoked .aurora-npc-line { opacity: 0.2; }
@keyframes auroraHandleBreath { 0%,100% { filter: blur(0) brightness(0.9); transform-origin: center; } 50% { filter: blur(1px) brightness(1.18); } }
@media (max-width: 900px) {
  .aurora-copy { width: calc(100vw - 38px); top: calc(var(--eazo-safe-area-top) + 6px); }
  .aurora-copy h2 { font-size: clamp(28px, 10vw, 52px); }
  .aurora-back { bottom: calc(var(--eazo-safe-area-bottom) + 84px); }
  
.aurora-admin-toggle {
  position: absolute;
  z-index: 17;
  right: max(20px, env(safe-area-inset-right, 0px));
  top: calc(var(--eazo-safe-area-top) + 10px);
  min-width: 74px;
  border: 1px solid rgba(123,33,28,0.42);
  background: rgba(22,5,4,0.42);
  color: rgba(238,184,176,0.82);
  padding: 9px 12px;
  font-size: 10px;
  letter-spacing: 0.16em;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.aurora-admin-toggle[hidden] { display: none; }
.aurora-admin-toggle:focus-visible,
.aurora-admin-toggle:hover { outline: none; border-color: rgba(202,83,73,0.72); box-shadow: 0 0 24px rgba(123,33,28,0.14); }
.aurora-admin-close {
  position: sticky;
  top: 0;
  float: right;
  width: 28px;
  height: 28px;
  border: 0;
  background: rgba(2,9,7,0.52);
  color: rgba(238,184,176,0.72);
  cursor: pointer;
  z-index: 2;
}
.aurora-admin.collapsed {
  width: 0;
  max-height: 0;
  padding: 0;
  border-left: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px);
}
.aurora-admin.expanded { opacity: 1; pointer-events: auto; transform: translateX(0); }

.aurora-admin {
    left: 18px;
    right: 18px;
    top: auto;
    bottom: calc(var(--eazo-safe-area-bottom) + 142px);
    width: auto;
    max-height: 34dvh;
    padding: 12px;
  }
  .aurora-metrics { grid-template-columns: 1fr 1fr; }
  .aurora-metrics div { display: grid; gap: 2px; }
}
@media (max-width: 520px) {
  .aurora-copy p:not(.place-code):not(.aurora-status) { max-width: 82vw; }
  
.aurora-admin-toggle {
  position: absolute;
  z-index: 17;
  right: max(20px, env(safe-area-inset-right, 0px));
  top: calc(var(--eazo-safe-area-top) + 10px);
  min-width: 74px;
  border: 1px solid rgba(123,33,28,0.42);
  background: rgba(22,5,4,0.42);
  color: rgba(238,184,176,0.82);
  padding: 9px 12px;
  font-size: 10px;
  letter-spacing: 0.16em;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.aurora-admin-toggle[hidden] { display: none; }
.aurora-admin-toggle:focus-visible,
.aurora-admin-toggle:hover { outline: none; border-color: rgba(202,83,73,0.72); box-shadow: 0 0 24px rgba(123,33,28,0.14); }
.aurora-admin-close {
  position: sticky;
  top: 0;
  float: right;
  width: 28px;
  height: 28px;
  border: 0;
  background: rgba(2,9,7,0.52);
  color: rgba(238,184,176,0.72);
  cursor: pointer;
  z-index: 2;
}
.aurora-admin.collapsed {
  width: 0;
  max-height: 0;
  padding: 0;
  border-left: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px);
}
.aurora-admin.expanded { opacity: 1; pointer-events: auto; transform: translateX(0); }

.aurora-admin { max-height: 30dvh; bottom: calc(var(--eazo-safe-area-bottom) + 132px); }
  .aurora-metrics { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora-game { transition: opacity 0.001ms linear; }
  .aurora-light-button { box-shadow: 0 0 18px rgba(138,255,184,0.18); }
}

@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; }
  .node-ring, .node-ring::after { opacity: 0.08; transform: translate(-50%, -50%) scale(1); }
}


.pinball-node .node-core { box-shadow: 0 0 34px rgba(138,255,184,0.32), inset 0 0 10px rgba(232,255,246,0.26); }
.pinball-node .node-ring { border-color: rgba(178,255,224,0.34); }
.pinball-game {
  position: absolute;
  inset: 0;
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(circle at 50% 105%, rgba(190,232,216,0.09), transparent 30%), linear-gradient(180deg, #010606 0%, #03100d 48%, #071712 100%);
  transition: opacity 900ms ease;
}
.pinball-game.open { opacity: 1; pointer-events: auto; }
.pinball-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
.pinball-hud {
  position: absolute;
  z-index: 5;
  left: clamp(14px, 3vw, 36px);
  right: clamp(14px, 3vw, 36px);
  top: var(--eazo-safe-area-top);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  pointer-events: none;
  color: rgba(220,236,230,0.72);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pinball-hud div { display: grid; gap: 2px; min-width: 64px; }
.pinball-hud span { color: rgba(204,220,213,0.42); }
.pinball-hud strong { color: rgba(232,246,240,0.92); font-weight: 360; font-size: 16px; transition: transform 180ms ease, color 180ms ease; }
.pinball-hud strong.bump { transform: scale(1.22); color: rgba(156,255,202,0.95); }
.pinball-title-block {
  position: absolute;
  z-index: 4;
  left: clamp(18px, 5vw, 64px);
  top: calc(var(--eazo-safe-area-top) + 78px);
  width: min(420px, calc(100vw - 42px));
  pointer-events: none;
}
.pinball-title-block h2 { margin: 0 0 10px; color: rgba(238,248,243,0.82); font-weight: 320; font-size: clamp(28px, 5.2vw, 58px); letter-spacing: 0.12em; }
.pinball-title-block p:not(.place-code) { margin: 0; color: rgba(204,220,213,0.54); line-height: 1.7; font-size: 12px; letter-spacing: 0.08em; }
.pinball-npc-caption {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: auto;
  bottom: calc(var(--eazo-safe-area-bottom) + 118px);
  transform: translateX(-50%);
  max-width: min(420px, calc(100vw - 36px));
  padding: 8px 12px;
  text-align: center;
  border-left: 1px solid rgba(160,255,210,0.24);
  color: rgba(232,246,240,0.76);
  background: rgba(2,10,8,0.38);
  backdrop-filter: blur(8px);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
  pointer-events: none;
  transition: opacity 320ms ease, transform 320ms ease;
}

.pinball-npc-caption.zalgo-original {
  position: absolute;
  isolation: isolate;
  right: clamp(40px, 8vw, 120px);
  left: auto;
  transform: none;
  bottom: calc(var(--eazo-safe-area-bottom) + 108px);
  width: 292px;
  max-width: 292px;
  min-width: 0;
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  padding: 6px 12px;
  box-sizing: border-box;
  overflow: visible;
  text-align: left;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  font-family: "Times New Roman", "Iowan Old Style", "Baskerville", "Noto Serif", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.035em;
  text-decoration: none;
  text-transform: none;
  font-variant-ligatures: none;
  color: rgba(230, 198, 190, 0.76);
  background: transparent;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  filter: none;
  text-shadow: 0 0 8px rgba(221, 122, 111, 0.08);
}
.pinball-npc-caption.zalgo-original::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  top: 50%;
  height: 30px;
  transform: translateY(-50%);
  background: rgba(2, 10, 8, 0.34);
  border: 1px solid rgba(160, 255, 210, 0.13);
  border-radius: 16px 16px 5px 16px;
}
.pinball-game.zalgo-active,
.pinball-game.zalgo-active .pinball-ui-layer,
.pinball-game.zalgo-active .pinball-npc-caption { overflow: visible; }
  position: absolute;
  z-index: 5;
  left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  color: rgba(190,255,218,0.78);
  font-size: clamp(36px, 12vw, 96px);
  font-weight: 260;
  letter-spacing: 0.1em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 560ms ease, transform 560ms ease;
  text-shadow: 0 0 28px rgba(138,255,184,0.26);
}
.pinball-combo.show { opacity: calc(0.55 + 0.45 * var(--score-anim, 1)); transform: translate(-50%, -50%) scale(calc(1 + 0.14 * var(--score-anim, 1))); }
.pinball-toast {
  position: absolute;
  z-index: 7;
  left: 50%; bottom: calc(var(--eazo-safe-area-bottom) + 86px);
  transform: translateX(-50%);
  color: rgba(232,246,240,0.75);
  background: rgba(2,10,8,0.56);
  border-left: 1px solid rgba(138,255,184,0.28);
  padding: 10px 13px;
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}
.pinball-toast.show { opacity: 1; }
.pinball-back { position: absolute; z-index: 8; left: clamp(18px, 4vw, 52px); bottom: calc(var(--eazo-safe-area-bottom) + 18px); background: rgba(2,9,7,0.48); }
.pinball-pause { position: absolute; z-index: 8; right: clamp(18px, 4vw, 52px); bottom: calc(var(--eazo-safe-area-bottom) + 18px); background: rgba(2,9,7,0.48); }
.pinball-end {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: start;
  gap: 12px;
  padding: var(--eazo-safe-area-top) 22px var(--eazo-safe-area-bottom);
  background: radial-gradient(circle at 50% 40%, rgba(8,25,18,0.42), rgba(1,6,5,0.86) 68%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 520ms ease;
}
.pinball-end.open { opacity: 1; pointer-events: auto; }
.pinball-end h2 { margin: 0; color: rgba(238,248,243,0.9); font-weight: 320; font-size: clamp(28px, 6vw, 56px); letter-spacing: 0.08em; }
.pinball-end p { max-width: 620px; margin: 0; color: rgba(204,220,213,0.62); line-height: 1.7; letter-spacing: 0.06em; }
.pinball-end-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.app-shell.pinball-mode .hud,
.app-shell.pinball-mode .map,
.app-shell.pinball-mode .system-log,
.app-shell.pinball-mode .age-rail { opacity: 0; pointer-events: none; }
@media (max-width: 720px) {
  .pinball-hud { top: var(--eazo-safe-area-top); gap: 6px 10px; font-size: 9px; }
  .pinball-hud div { min-width: 54px; }
  .pinball-title-block { top: calc(var(--eazo-safe-area-top) + 118px); }
  .pinball-title-block p:not(.place-code) { display: none; }
  .pinball-npc-caption { right: 12px; left: auto; top: auto; bottom: calc(var(--eazo-safe-area-bottom) + 74px); max-width: min(240px, calc(100vw - 120px)); font-size: 10px; }
  .pinball-npc-caption.zalgo-original {
    right: 12px;
    bottom: calc(var(--eazo-safe-area-bottom) + 96px);
    width: 230px;
    max-width: 230px;
    height: 27px;
    min-height: 27px;
    max-height: 27px;
    padding: 5px 10px;
    font-size: 10px;
    line-height: 1.45;
  }
  .pinball-npc-caption.zalgo-original::before { height: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .pinball-game, .pinball-end, .pinball-combo, .pinball-toast { transition-duration: 1ms; }
}


.pinball-npc-particles {
  z-index: 2;
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  filter: saturate(0.9) brightness(0.85);
}
.pinball-game.open .pinball-npc-particles { opacity: 0.24; }
.pinball-game.open.fever .pinball-npc-particles { opacity: 0.34; }
.pinball-npc-caption {
  right: clamp(16px, 3vw, 34px);
  left: auto;
  top: auto;
  bottom: calc(var(--eazo-safe-area-bottom) + 78px);
  transform: none;
  max-width: min(300px, calc(100vw - 150px));
  border: 1px solid rgba(160,255,210,0.16);
  border-left-color: rgba(160,255,210,0.28);
  border-radius: 16px 16px 4px 16px;
  background: rgba(2,10,8,0.24);
  color: rgba(232,246,240,0.62);
  backdrop-filter: blur(5px);
  opacity: 0.82;
  text-shadow: 0 0 12px rgba(138,255,184,0.18);
}
.pinball-title-block { z-index: 5; }
.pinball-hud { z-index: 6; }
.pinball-combo { z-index: 6; }
.pinball-toast { z-index: 9; }
.pinball-back, .pinball-pause { z-index: 10; }
.app-shell.pinball-mode .aurora-admin-toggle { display: block; z-index: 18; opacity: 0.72; }
.app-shell.pinball-mode .aurora-admin { display: block; z-index: 17; opacity: 0.92; }
.app-shell.pinball-mode .aurora-admin.collapsed { opacity: 0; pointer-events: none; }
@media (max-width: 720px) {
  .pinball-game.open .pinball-npc-particles { opacity: 0.18; }
  .pinball-npc-caption {
    right: 12px;
    bottom: calc(var(--eazo-safe-area-bottom) + 72px);
    max-width: min(230px, calc(100vw - 116px));
    padding: 7px 10px;
    font-size: 10px;
  }
}

/* A–17 revised: soft glow projectile, quiet NPC companion, particle aurora trails */
.pinball-npc-figure {
  position: absolute;
  z-index: 4;
  right: clamp(20px, 4vw, 56px);
  bottom: calc(var(--eazo-safe-area-bottom) + 54px);
  width: clamp(54px, 8vw, 96px);
  height: clamp(92px, 14vw, 156px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  filter: blur(0.2px) saturate(0.88);
  transition: opacity 520ms ease, transform 720ms ease;
}
.pinball-game.open .pinball-npc-figure { opacity: 0.42; transform: translateY(0) scale(1); }
.pinball-game.open.fever .pinball-npc-figure { opacity: 0.52; }
.pinball-npc-figure::before {
  content: "";
  position: absolute;
  inset: 2% 10% 0;
  border-radius: 46% 46% 40% 40% / 24% 24% 64% 64%;
  background:
    radial-gradient(circle at 50% 13%, rgba(239,255,248,0.76) 0 9%, rgba(156,255,206,0.22) 16%, transparent 28%),
    linear-gradient(180deg, rgba(194,255,226,0.28), rgba(76,183,139,0.08) 48%, rgba(7,18,14,0.02));
  box-shadow: 0 0 34px rgba(138,255,184,0.18), inset 0 0 28px rgba(232,255,246,0.08);
  clip-path: polygon(42% 0,58% 0,68% 17%,65% 38%,78% 92%,54% 100%,48% 70%,42% 100%,18% 92%,35% 38%,32% 17%);
}
.pinball-npc-figure::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8%;
  width: 120%;
  height: 92%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 38%, rgba(138,255,184,0.14), rgba(138,255,184,0.04) 38%, transparent 70%);
  mix-blend-mode: screen;
}
.pinball-npc-figure span {
  position: absolute;
  left: 50%;
  top: 18%;
  width: 1px;
  height: 70%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(238,255,246,0.38), rgba(138,255,184,0.08), transparent);
  box-shadow: -16px 18px 18px rgba(138,255,184,0.08), 16px 20px 18px rgba(138,255,184,0.07);
}
.pinball-game .pinball-npc-particles { display: none; }
.pinball-npc-caption {
  z-index: 6;
  right: clamp(94px, 12vw, 164px);
  left: auto;
  top: auto;
  bottom: calc(var(--eazo-safe-area-bottom) + 92px);
  transform: none;
  max-width: min(292px, calc(100vw - 170px));
  border: 1px solid rgba(160,255,210,0.14);
  border-radius: 16px 16px 5px 16px;
  background: rgba(2,10,8,0.28);
  color: rgba(232,246,240,0.66);
  backdrop-filter: blur(6px);
  opacity: 0.84;
}
.pinball-npc-caption::after {
  content: "";
  position: absolute;
  right: -9px;
  bottom: 14px;
  width: 17px;
  height: 17px;
  transform: rotate(45deg) skew(8deg, 8deg);
  background: rgba(2,10,8,0.28);
  border-top: 1px solid rgba(160,255,210,0.12);
  border-right: 1px solid rgba(160,255,210,0.12);
  box-shadow: 7px 7px 16px rgba(138,255,184,0.04);
}
@media (max-width: 720px) {
  .pinball-npc-figure {
    right: 14px;
    bottom: calc(var(--eazo-safe-area-bottom) + 56px);
    width: 58px;
    height: 98px;
  }
  .pinball-game.open .pinball-npc-figure { opacity: 0.36; }
  .pinball-npc-caption {
    right: 76px;
    bottom: calc(var(--eazo-safe-area-bottom) + 82px);
    max-width: min(220px, calc(100vw - 112px));
    padding: 7px 10px;
    font-size: 10px;
  }
  .pinball-npc-caption::after { right: -8px; bottom: 10px; width: 14px; height: 14px; }
}

/* A–17 revised NPC: project GLB rendered as a translucent companion */
.pinball-npc-model {
  position: absolute;
  z-index: 4;
  right: clamp(8px, 3.4vw, 42px);
  bottom: calc(var(--eazo-safe-area-bottom) + 34px);
  width: clamp(112px, 15vw, 188px);
  height: clamp(168px, 24vw, 286px);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 22px rgba(138,255,184,0.15)) saturate(0.86);
  transition: opacity 520ms ease, transform 620ms ease, filter 620ms ease;
  transform: translateY(10px) scale(0.96);
}
.pinball-game.open .pinball-npc-model { opacity: 0.58; transform: translateY(0) scale(1); }
.pinball-game.open.fever .pinball-npc-model { opacity: 0.72; filter: drop-shadow(0 0 34px rgba(138,255,184,0.24)) saturate(1.02); }
.pinball-npc-model[data-error="model-load-failed"] {
  opacity: 0.18;
  background: radial-gradient(ellipse at 50% 42%, rgba(138,255,184,0.18), rgba(138,255,184,0.04) 45%, transparent 72%);
}
.pinball-npc-figure { display: none !important; }
.pinball-npc-caption {
  right: clamp(142px, 18vw, 228px);
  bottom: calc(var(--eazo-safe-area-bottom) + 116px);
}
@media (max-width: 720px) {
  .pinball-npc-model {
    right: 2px;
    bottom: calc(var(--eazo-safe-area-bottom) + 40px);
    width: 106px;
    height: 164px;
  }
  .pinball-game.open .pinball-npc-model { opacity: 0.54; }
  .pinball-npc-caption {
    right: 96px;
    bottom: calc(var(--eazo-safe-area-bottom) + 108px);
    max-width: min(220px, calc(100vw - 112px));
  }
}
.pinball-relation {
  position: absolute;
  z-index: 7;
  right: clamp(20px, 4vw, 40px);
  top: calc(var(--eazo-safe-area-top) + 46px);
  bottom: auto;
  max-width: min(320px, calc(100vw - 40px));
  text-align: right;
  color: rgba(238,184,176,0.68);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(123,33,28,0.28);
  pointer-events: none;
}
@media (max-width: 720px) {
  .pinball-relation {
    right: clamp(12px, 3vw, 20px);
    top: calc(var(--eazo-safe-area-top) + 40px);
    bottom: auto;
    max-width: min(240px, calc(100vw - 24px));
    font-size: 9px;
  }
}
.aurora-lockline.muted,
.aurora-readonly .aurora-lockline {
  color: rgba(205, 214, 211, 0.58) !important;
  border-color: rgba(205, 214, 211, 0.16) !important;
  background: rgba(180, 190, 186, 0.055) !important;
  box-shadow: none !important;
}
.aurora-control.readonly {
  color: rgba(205, 214, 211, 0.64) !important;
  border-color: rgba(205, 214, 211, 0.14) !important;
  background: rgba(180, 190, 186, 0.05) !important;
}
.aurora-control.readonly input[type="range"] {
  accent-color: #9aa4a1;
  opacity: 0.44;
  filter: grayscale(1) saturate(0.2);
  cursor: not-allowed;
}
.aurora-control.readonly span {
  color: rgba(214, 222, 219, 0.62) !important;
}

/* ===================== S–03 没有规则的雪仗 ===================== */
.snow-game {
  position: absolute;
  inset: 0;
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 82%, rgba(60,110,92,0.10), transparent 42%),
    radial-gradient(circle at 30% 20%, rgba(40,80,70,0.08), transparent 46%),
    linear-gradient(180deg, #02100c 0%, #041a13 46%, #02120d 100%);
  transition: opacity 900ms ease;
}
.snow-game.open { opacity: 1; pointer-events: auto; }
/* Hide the AURORA (A–17) backstage entry/panel while the snow game is open,
   so only S–03's own backstage shows. */
.app-shell.snow-mode #aurora-admin-toggle,
.app-shell.snow-mode #aurora-admin { display: none !important; }
.snow-field,
.snow-fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.snow-npc-model { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 3; pointer-events: none; }
.snow-fx { z-index: 4; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
.snow-field { z-index: 1; }
.snow-title-block {
  position: absolute; z-index: 4;
  left: clamp(18px, 5vw, 64px);
  top: calc(var(--eazo-safe-area-top) + 26px);
  width: min(460px, calc(100vw - 42px));
  pointer-events: none;
}
.snow-title-block h2 { margin: 6px 0 0; color: rgba(226,244,235,0.78); font-weight: 320; font-size: clamp(26px, 4.8vw, 52px); letter-spacing: 0.12em; }
.snow-npc-line {
  position: absolute; z-index: 5;
  left: 50%; bottom: clamp(96px, 16vh, 150px);
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 48px));
  margin: 0; text-align: center;
  color: rgba(214,236,228,0.82);
  font-size: clamp(13px, 2.4vw, 16px);
  letter-spacing: 0.06em; line-height: 1.7;
  text-shadow: 0 0 18px rgba(6,20,15,0.9);
  pointer-events: none;
  transition: opacity 500ms ease, color 500ms ease;
}
.snow-readouts {
  position: absolute; z-index: 5;
  right: clamp(14px, 3vw, 34px);
  top: calc(var(--eazo-safe-area-top) + 76px);
  display: grid; gap: 6px; justify-items: end;
  pointer-events: none;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(180,210,198,0.5);
}
.snow-readouts .readout { opacity: 0; transition: opacity 700ms ease; }
.snow-readouts .readout.show { opacity: 1; }
.snow-readouts .readout.warn { color: rgba(255,170,150,0.72); }
.snow-readouts .readout strong { color: rgba(232,246,240,0.9); font-weight: 400; margin-left: 8px; }
.snow-toast {
  position: absolute; z-index: 6;
  left: 50%; top: 22%; transform: translateX(-50%) translateY(-6px);
  padding: 8px 16px; border-radius: 999px;
  background: rgba(6,22,16,0.72); border: 1px solid rgba(120,180,158,0.22);
  color: rgba(220,240,232,0.86); font-size: 12px; letter-spacing: 0.08em;
  opacity: 0; pointer-events: none; transition: opacity 400ms ease, transform 400ms ease;
}
.snow-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.snow-back { position: absolute; z-index: 7; left: clamp(14px, 3vw, 34px); bottom: calc(var(--eazo-safe-area-bottom) + 20px); }
.snow-sound-toggle {
  position: absolute; z-index: 7;
  right: clamp(14px, 3vw, 34px); top: calc(var(--eazo-safe-area-top) + 20px);
  padding: 8px 14px; font-size: 11px; letter-spacing: .12em;
  color: rgba(200,224,216,.7); background: rgba(16,32,26,.55);
  border: 1px solid rgba(150,200,175,.18); border-radius: 999px;
  cursor: pointer; backdrop-filter: blur(4px); transition: color .3s, border-color .3s, opacity .3s;
}
.snow-sound-toggle:hover { color: rgba(220,244,236,.95); border-color: rgba(150,200,175,.35); }
.snow-sound-toggle[aria-pressed="false"] { opacity: .55; color: rgba(180,204,196,.45); }
.snow-admin-toggle {
  position: absolute; z-index: 7;
  right: clamp(14px, 3vw, 34px); bottom: calc(var(--eazo-safe-area-bottom) + 20px);
  padding: 8px 16px; border-radius: 999px;
  background: rgba(8,26,20,0.7); border: 1px solid rgba(120,180,158,0.28);
  color: rgba(206,230,222,0.8); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  cursor: pointer;
}
.snow-admin-toggle[hidden] { display: none; }
.snow-admin {
  position: absolute; z-index: 8;
  right: clamp(14px, 3vw, 34px); bottom: calc(var(--eazo-safe-area-bottom) + 66px);
  width: min(340px, calc(100vw - 40px));
  max-height: min(64vh, 520px); overflow-y: auto;
  padding: 18px 18px 22px; border-radius: 16px;
  background: rgba(4,18,13,0.94); border: 1px solid rgba(110,170,150,0.24);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  transform-origin: bottom right;
}
.snow-admin[hidden] { display: none; }
.snow-admin.collapsed { display: none; }
.snow-admin .modal-kicker { margin: 0 0 12px; }
.snow-admin-close { position: absolute; top: 10px; right: 12px; background: none; border: none; color: rgba(200,224,216,0.6); font-size: 20px; cursor: pointer; }
.snow-metrics { display: grid; gap: 6px; margin-bottom: 14px; font-size: 11px; color: rgba(196,220,212,0.66); letter-spacing: 0.04em; }
.snow-metrics .metric-row { display: flex; justify-content: space-between; gap: 12px; }
.snow-metrics .metric-row strong { color: rgba(230,244,238,0.9); font-weight: 400; }
.snow-metrics .metric-row.fake { color: rgba(150,230,190,0.7); }
.snow-controls { display: grid; gap: 10px; }
.snow-controls label { display: grid; gap: 4px; font-size: 11px; color: rgba(196,220,212,0.66); letter-spacing: 0.05em; }
.snow-controls input[type="range"] { width: 100%; accent-color: rgba(120,220,180,0.8); }
.snow-controls button {
  padding: 8px 12px; border-radius: 10px; cursor: pointer;
  background: rgba(10,30,22,0.8); border: 1px solid rgba(120,180,158,0.3);
  color: rgba(210,232,224,0.82); font-size: 11px; letter-spacing: 0.08em;
}
.snow-controls button.danger { border-color: rgba(255,150,130,0.4); color: rgba(255,190,176,0.86); }

/* A–17 backstage entry: only inside its own pinball game, never on the
   starmap or in the snow game. Overrides any earlier display rules. */
body .aurora-admin-toggle { display: none !important; }
body .app-shell.pinball-mode:not(.snow-mode) .aurora-admin-toggle:not([hidden]) { display: block !important; }


/* =====================================================================
   GLOBAL EFFECT LAYERS  (alcohol / cigarettes / energy / silence)
   All overlays are pointer-events:none and never move real hit areas.
   ===================================================================== */
.fx-svg { position:fixed; width:0; height:0; pointer-events:none; }
.fx-overlay {
  position:fixed; inset:0; pointer-events:none; z-index:60;
  opacity:0; transition:opacity .8s ease;
}
/* --fx-visual (0..1) is the envelope written by fx.js */

/* -- ALCOHOL: real screen-space ring-wave refraction of the whole page.
   No glowing rings, discs, outlines or ripple overlay are drawn — the
   distortion is produced entirely by the SVG displacement field. -- */
html.fx-alcohol .app-shell {
  filter:url(#fx-refract);
  transition:filter .6s ease;
}

/* -- MIST RESTORER ("cigarettes"): no saturation boost. The whole site
   enters a damp, out-of-focus state that the pointer can locally clear.
   Layers are created by fog.js: .fog-blur (masked backdrop blur) and
   #fog-canvas (drifting fog + pointer clear-trail + click breathing puffs). -- */
.fog-blur {
  position:fixed; inset:0; z-index:71; pointer-events:none;
  --fog-x:50%; --fog-y:50%; --fog-density:0;
  opacity:var(--fog-density);
  background:radial-gradient(
    circle 210px at var(--fog-x) var(--fog-y),
    transparent 0,
    transparent 42%,
    rgba(90,126,113,.05) 58%,
    rgba(60,96,84,.16) 70%,
    rgba(38,68,58,.30) 82%,
    rgba(19,38,32,.48) 100%);
  -webkit-mask:radial-gradient(circle 210px at var(--fog-x) var(--fog-y), transparent 0, transparent 30%, #000 66%);
  mask:radial-gradient(circle 210px at var(--fog-x) var(--fog-y), transparent 0, transparent 30%, #000 66%);
  backdrop-filter:blur(5px) saturate(.72);
  -webkit-backdrop-filter:blur(5px) saturate(.72);
  transition:opacity .8s ease;
}
/* Safari / no backdrop-filter: keep the animated fog canvas + clear trail,
   don't force real-time background blur — just deepen the translucent fog. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .fog-blur {
    background:radial-gradient(
      circle 130px at var(--fog-x) var(--fog-y),
      transparent 0,
      rgba(90,126,113,.14) 46%,
      rgba(19,38,32,.6) 100%);
  }
}
#fog-canvas {
  position:fixed; inset:0; z-index:72; pointer-events:none;
  mix-blend-mode:normal; opacity:.94;
}
/* Nodes/text/models get a mild depth-of-field difference (not a uniform blur).
   Red privilege nodes are weakened by the mist but never fully vanish. */
html.fx-mist .node-label { filter:blur(.4px); opacity:.9; transition:filter .8s ease, opacity .8s ease; }
html.fx-mist .node.node-locked,
html.fx-mist .node[data-locked="true"] { filter:blur(1px) saturate(.7); opacity:.72; }
html.fx-mist #starfield { filter:blur(.6px) saturate(.82); transition:filter 1s ease; }
/* NPC outlines soften; their lines arrive more slowly (handled in JS where possible). */
html.fx-mist .market-npc-line { filter:blur(.3px); opacity:.82; transition:opacity 1.2s ease; }
/* Important buttons stay crisp and keep their real hit position. */
html.fx-mist .rail-button,
html.fx-mist .modal-action,
html.fx-mist .market-item,
html.fx-mist .lottery-claim,
html.fx-mist button { filter:none !important; }
html.fx-mist.fx-reduced .fog-blur { backdrop-filter:none; -webkit-backdrop-filter:none; }

/* -- ENERGY: motion sped via JS timeScale; hover feedback slightly early -- */
html.fx-energy .rail-button,
html.fx-energy .modal-action,
html.fx-energy .node { transition-duration:.09s; }
html.fx-fatigue .rail-button,
html.fx-fatigue .modal-action,
html.fx-fatigue .node { transition-duration:.5s; }
/* Fatigue: subjective slow-down reads as a mild desaturation of the scene.
   Buttons + inputs stay untouched so real interaction is never delayed. */
html.fx-fatigue #starfield { filter:saturate(.72) brightness(.94); transition:filter 1.2s ease; }
html.fx-fatigue .node-scene, html.fx-fatigue .market-shelf { filter:saturate(.8); transition:filter 1.2s ease; }

/* Reduced motion: no wave propagation — only a very slight static refraction */
html.fx-reduced .fx-overlay { animation:none !important; transition:opacity .4s ease; }
html.fx-reduced.fx-alcohol .app-shell { filter:contrast(1.02) hue-rotate(2deg); }

/* Instant purchase acknowledgement — a single barely-perceptible breath. */
.fx-alcohol-enter .app-shell { animation:alcohol-arrival 700ms ease-out both; }
@keyframes alcohol-arrival {
  0%   { transform:scale(1); }
  45%  { transform:scale(1.0025); }
  100% { transform:scale(1); }
}

/* WebGL ripple layer: when on, hide the raw source art so only the warped
   copy is visible (avoids a double image). Games keep their own canvases;
   the ripple copy sits above them at reduced resolution on mobile. */
html.fx-ripple-on #starfield { opacity:0; }
#fx-ripple { will-change:transform; }

/* Mobile: refraction handled by the field at reduced grid resolution (see fx.js) */

/* -- Corner: active temporary states + remaining time -- */
.fx-corner {
  position:fixed; right:14px; bottom:14px; z-index:70;
  display:flex; flex-direction:column; gap:6px; align-items:flex-end;
  pointer-events:none; max-width:min(70vw,260px);
}
.fx-corner .fx-chip {
  pointer-events:none;
  font:500 11px/1.3 ui-monospace,monospace;
  letter-spacing:.04em;
  color:rgba(210,230,222,.82);
  background:rgba(8,20,16,.72);
  border:1px solid rgba(120,200,160,.22);
  border-radius:4px; padding:5px 9px;
  backdrop-filter:blur(4px);
  display:flex; gap:8px; align-items:baseline;
}
.fx-corner .fx-chip b { color:#cdeede; font-weight:600; }
.fx-corner .fx-chip .fx-time { color:rgba(160,220,190,.7); font-variant-numeric:tabular-nums; }
.fx-corner .fx-chip .fx-stop {
  pointer-events:auto; cursor:pointer;
  font:500 10px/1 ui-monospace,monospace; letter-spacing:.05em;
  color:rgba(230,180,180,.9); background:rgba(40,14,14,.7);
  border:1px solid rgba(200,90,90,.34); border-radius:3px;
  padding:3px 7px; margin-left:2px; transition:background .2s ease, color .2s ease;
}
.fx-corner .fx-chip .fx-stop:hover { background:rgba(90,20,20,.85); color:#ffdede; }

/* silence summary toast */
.fx-toast {
  position:fixed; left:50%; bottom:80px; transform:translateX(-50%) translateY(12px);
  z-index:80; pointer-events:none; opacity:0; transition:opacity .5s ease, transform .5s ease;
  font:500 13px/1.4 system-ui,sans-serif;
  color:rgba(220,235,228,.92); background:rgba(6,18,14,.86);
  border:1px solid rgba(120,200,160,.24); border-radius:6px; padding:10px 16px;
  max-width:min(86vw,420px); text-align:center;
}
.fx-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* =====================================================================
   M-04 NIGHT SUPERMARKET
   ===================================================================== */
.market-game {
  position:fixed; inset:0; z-index:40; display:none;
  flex-direction:column; gap:14px;
  padding:clamp(16px,3vw,34px);
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(30,60,48,.5), transparent 60%),
    linear-gradient(180deg, #04120c 0%, #05170f 40%, #030d09 100%);
  color:#cfe6db; overflow-y:auto;
  font-family:system-ui,sans-serif;
}
.market-game.open { display:flex; }

.market-ceiling { position:absolute; inset:0 0 auto 0; height:6px; pointer-events:none; display:flex; }
.market-ceiling span {
  flex:1; height:100%;
  background:linear-gradient(180deg, rgba(220,240,235,.7), rgba(220,240,235,0));
  animation:mktFlicker 5s linear infinite;
}
.market-ceiling span:nth-child(2){ animation-delay:1.7s; }
.market-ceiling span:nth-child(3){ animation-delay:3.1s; }
@keyframes mktFlicker {
  0%,92%,100% { opacity:.55; }
  93% { opacity:.28; } 95% { opacity:.6; } 96% { opacity:.35; } 97% { opacity:.55; }
}
html.fx-reduced .market-ceiling span { animation:none; opacity:.5; }

.market-top { text-align:center; }
.market-top .place-code { letter-spacing:.22em; font-size:11px; color:rgba(150,200,175,.7); font-family:ui-monospace,monospace; }
.market-top h2 { margin:.2em 0; font-size:clamp(20px,4vw,30px); font-weight:600; color:#e6f4ec; }
.market-meta { font-size:13px; color:rgba(180,210,196,.85); }
.market-meta strong { color:#dff3e8; font-variant-numeric:tabular-nums; }
.market-sep { opacity:.4; margin:0 6px; }

.market-npc-line {
  text-align:center; min-height:1.4em; font-size:13px; font-style:italic;
  color:rgba(170,205,188,.78); margin:0 auto; max-width:640px;
}

.market-shelf {
  display:grid; gap:14px; width:100%; max-width:900px; margin:6px auto;
  grid-template-columns:repeat(auto-fill, minmax(150px,1fr));
}
.market-item {
  text-align:left; cursor:pointer; color:inherit;
  background:linear-gradient(180deg, rgba(18,40,30,.72), rgba(10,26,20,.72));
  border:1px solid rgba(120,180,150,.16); border-radius:8px;
  padding:14px; transition:border-color .25s ease, transform .25s ease;
  display:flex; flex-direction:column; gap:8px; min-height:130px;
}
.market-item:hover, .market-item:focus-visible { border-color:rgba(150,220,180,.4); transform:translateY(-2px); outline:none; }
.market-item.used { opacity:.5; }
.market-item-bag {
  width:46px; height:56px; border-radius:3px; align-self:flex-start;
  background:repeating-linear-gradient(180deg, rgba(200,220,210,.14) 0 6px, rgba(200,220,210,.05) 6px 12px);
  border:1px solid rgba(180,210,196,.25); position:relative;
}
.market-item-bag::after {
  content:""; position:absolute; left:6px; right:6px; top:10px; height:8px;
  background:rgba(180,210,196,.2); border-radius:1px;
}
.market-item-name { font-size:14px; font-weight:600; color:#e2f2ea; }
.market-item-en { font-size:10px; letter-spacing:.14em; color:rgba(150,190,170,.6); font-family:ui-monospace,monospace; }
.market-item-price { font-size:12px; color:rgba(170,215,190,.85); margin-top:auto; font-variant-numeric:tabular-nums; }

.market-cart {
  width:100%; max-width:900px; margin:0 auto;
  background:rgba(8,22,16,.6); border:1px solid rgba(120,180,150,.16);
  border-radius:8px; padding:14px;
}
.market-cart-title { font-size:12px; letter-spacing:.16em; text-transform:uppercase; color:rgba(150,200,175,.7); margin:0 0 8px; }
.market-cart-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.market-cart-list li { display:flex; justify-content:space-between; font-size:13px; gap:10px; }
.market-cart-list li button {
  background:none; border:none; color:rgba(220,150,150,.8); cursor:pointer; font-size:14px; line-height:1; padding:0 4px;
}
.market-cart-empty { font-size:12px; color:rgba(150,180,166,.55); margin:4px 0 0; }
.market-cart-foot { display:flex; justify-content:space-between; align-items:center; margin-top:12px; gap:12px; flex-wrap:wrap; }
.market-cart-foot strong { color:#dff3e8; font-variant-numeric:tabular-nums; }

.market-receipt {
  width:100%; max-width:900px; margin:0 auto; display:none;
  background:rgba(4,14,10,.8); border:1px dashed rgba(150,200,175,.3);
  border-radius:6px; padding:14px; font-family:ui-monospace,monospace;
  font-size:12px; color:rgba(200,225,212,.9); white-space:pre-wrap; line-height:1.55;
}
.market-receipt.show { display:block; }

.market-npc-model, html.fx-reduced .market-npc-model { display:none; }

.market-back { position:fixed; left:16px; top:16px; z-index:42; }

/* -- detail card modal -- */
.market-detail-layer {
  position:fixed; inset:0; z-index:90; display:none;
  align-items:center; justify-content:center; padding:20px;
  background:rgba(2,8,6,.7); backdrop-filter:blur(3px);
}
.market-detail-layer.open { display:flex; }
.market-detail-card {
  position:relative; width:min(94vw,420px);
  background:linear-gradient(180deg, #0c2318, #071710);
  border:1px solid rgba(140,200,170,.24); border-radius:10px;
  padding:22px; color:#d6ece0;
}
.market-detail-code { font-size:10px; letter-spacing:.2em; color:rgba(150,200,175,.6); font-family:ui-monospace,monospace; }

/* -- VRU–18: real 3D object on the shelf -- */
.market-item-vru { position:relative; overflow:hidden; min-height:240px; }
.market-model-slot {
  position:relative; width:100%; height:150px; margin-block-end:12px;
  overflow:hidden; pointer-events:none;
}
.market-model-canvas { display:block; width:100%; height:100%; background:transparent; opacity:.82; }
.market-model-fallback {
  position:absolute; inset:14% 18%; border:1px solid rgba(180,223,207,.28);
  border-radius:6px; background:
    repeating-linear-gradient(45deg, rgba(180,223,207,.06) 0 6px, transparent 6px 12px);
}
.market-model-fallback[hidden] { display:none; }
.market-item-vru::after {
  content:""; position:absolute; inset:8% 12% 30%;
  background:radial-gradient(ellipse at center, rgba(115,205,172,.07), transparent 68%);
  filter:blur(18px); pointer-events:none;
}

/* -- VRU–18 fullscreen focus state (not a dialog) -- */
.model-focus-layer {
  position:fixed; inset:0; z-index:120; display:grid; place-items:center;
  opacity:0; visibility:hidden;
  background:rgba(1,8,7,.32);
  backdrop-filter:blur(18px) saturate(.72) brightness(.55);
  -webkit-backdrop-filter:blur(18px) saturate(.72) brightness(.55);
  transition:opacity 420ms ease, visibility 420ms;
}
.model-focus-layer.open { opacity:1; visibility:visible; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .model-focus-layer { background:rgba(1,8,7,.88); }
}
.model-focus-canvas {
  position:absolute; inset:7vh 8vw 12vh; width:84vw; height:81vh;
  background:transparent; cursor:grab; touch-action:none;
  opacity:0; transform:scale(.62);
  transition:opacity 460ms ease, transform 620ms cubic-bezier(.16,1,.3,1);
}
.model-focus-canvas:active { cursor:grabbing; }
.model-focus-layer.open .model-focus-canvas { opacity:1; transform:scale(1); }
.model-focus-meta {
  position:absolute; inset-inline-start:clamp(24px,6vw,90px);
  inset-block-end:clamp(80px,10vh,130px); max-width:320px;
  color:rgba(220,239,230,.84); pointer-events:none;
}
.model-focus-meta > span { font-size:11px; letter-spacing:.2em; font-family:ui-monospace,monospace; color:rgba(150,200,175,.6); }
.model-focus-meta h3 { margin:8px 0 12px; font-weight:450; font-size:clamp(22px,3vw,42px); color:#e6f4ec; }
.model-focus-meta p { color:rgba(190,216,204,.58); font-size:14px; line-height:1.5; }
.model-focus-actions {
  position:absolute; inset-inline-end:clamp(24px,6vw,90px);
  inset-block-end:clamp(80px,10vh,130px); display:flex; gap:10px;
}
.model-focus-actions button {
  padding:10px 18px; border-radius:999px; cursor:pointer;
  font-size:13px; letter-spacing:.04em;
  background:rgba(16,40,32,.7); border:1px solid rgba(140,200,170,.3); color:#d6ece0;
  transition:border-color .25s, background .25s;
}
.model-focus-actions button:hover { border-color:rgba(150,220,180,.55); background:rgba(24,54,44,.8); }
.model-focus-close {
  position:absolute; inset-block-start:28px; inset-inline-end:34px; z-index:4;
  width:40px; height:40px; border-radius:50%; cursor:pointer; font-size:20px; line-height:1;
  background:rgba(10,26,20,.6); border:1px solid rgba(140,200,170,.28); color:rgba(210,234,224,.85);
}
.model-focus-hint {
  position:absolute; inset-block-end:24px; left:50%; transform:translateX(-50%);
  color:rgba(190,216,204,.42); font-size:11px; letter-spacing:.12em;
}
body.model-focus-open { overflow:hidden; }
@media (max-width:720px) {
  .model-focus-meta { inset-block-end:auto; inset-block-start:clamp(70px,12vh,120px); max-width:70vw; }
  .model-focus-actions { inset-inline-end:50%; transform:translateX(50%); inset-block-end:clamp(56px,9vh,90px); }
}
.market-detail-card h3 { margin:.3em 0; font-size:20px; color:#e6f4ec; }
.market-detail-desc { font-size:13px; color:rgba(185,215,200,.85); line-height:1.5; }
.market-detail-facts { display:flex; gap:22px; margin:14px 0; }
.market-detail-facts dt { font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:rgba(150,190,170,.6); }
.market-detail-facts dd { margin:2px 0 0; font-size:15px; color:#dff3e8; font-variant-numeric:tabular-nums; }
.market-detail-actions { display:flex; gap:10px; flex-wrap:wrap; }

/* =========================================================================
   LOTTERY — fullscreen focus state (no dialog); paper left-of-center,
   small scratch station on the right. Center-region reveal only.
   ========================================================================= */
.lottery-focus-layer {
  position:fixed; inset:0; z-index:125;
  opacity:0; visibility:hidden;
  background:rgba(1,7,6,.34);
  backdrop-filter:blur(18px) brightness(.5) saturate(.7);
  -webkit-backdrop-filter:blur(18px) brightness(.5) saturate(.7);
  transition:opacity 420ms ease, visibility 420ms;
}
.lottery-focus-layer.open { opacity:1; visibility:visible; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lottery-focus-layer { background:rgba(1,7,6,.9); }
}
body.lottery-focus-open { overflow:hidden; }

.lottery-focus-close {
  position:absolute; inset-block-start:28px; inset-inline-end:34px; z-index:4;
  width:40px; height:40px; border-radius:50%; cursor:pointer; font-size:20px; line-height:1;
  background:rgba(10,26,20,.6); border:1px solid rgba(140,200,170,.28); color:rgba(210,234,224,.85);
}

.lottery-object {
  position:absolute; left:6vw; top:44%;
  width:min(46vw,560px); aspect-ratio:0.9;
  transform:translateY(-50%) rotate(-2deg);
  perspective:1000px;
}
.lottery-model-canvas {
  position:absolute; inset:0; z-index:2; width:100%; height:100%;
  display:block; background:transparent;
  cursor:grab; touch-action:none;
}
.lottery-model-canvas:active { cursor:grabbing; }
/* CSS paper acts as the fallback backdrop behind the 3D model */
.lottery-object.model-ready .lottery-paper { opacity:0; transition:opacity .5s ease; }
.lottery-paper {
  position:absolute; inset:0; padding:clamp(22px,4vw,52px);
  display:flex; flex-direction:column; gap:.7em;
  color:rgba(210,232,220,.72); font-family:ui-monospace,monospace;
  background:linear-gradient(120deg, rgba(116,158,141,.16), rgba(23,46,38,.42));
  border:1px solid rgba(139,191,169,.24);
  box-shadow:0 35px 90px rgba(0,0,0,.36), inset 0 0 48px rgba(130,190,166,.035);
  clip-path:polygon(1% 0, 99% 1%, 100% 97%, 96% 100%, 2% 98%, 0 3%);
}
.lottery-code { font-size:clamp(11px,1.4vw,15px); letter-spacing:.24em; color:rgba(150,200,175,.62); }
.lottery-serial { font-size:clamp(9px,1vw,11px); letter-spacing:.3em; color:rgba(150,200,175,.4); }
.lottery-mark { margin-top:auto; font-size:clamp(18px,2.6vw,34px); letter-spacing:.1em; color:rgba(214,236,224,.8); font-family:inherit; }
.lottery-grid {
  position:absolute; inset:0; pointer-events:none; opacity:.5;
  background-image:
    linear-gradient(rgba(150,200,175,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150,200,175,.05) 1px, transparent 1px);
  background-size:22px 22px;
  clip-path:polygon(1% 0, 99% 1%, 100% 97%, 96% 100%, 2% 98%, 0 3%);
}

.lottery-scratch-station {
  position:absolute; right:clamp(24px,6vw,90px); top:50%;
  width:clamp(220px,24vw,330px); transform:translateY(-50%);
}
.lottery-station-label {
  font-size:10px; letter-spacing:.2em; text-transform:uppercase;
  color:rgba(150,190,170,.6); margin:0 0 10px;
}
.lottery-scratch-wrap {
  position:relative; width:100%; aspect-ratio:1.75;
  overflow:hidden; border:1px solid rgba(136,198,174,.22);
  background:rgba(4,14,12,.78);
}
.lottery-result, .lottery-scratch-canvas {
  position:absolute; inset:0; width:100%; height:100%;
}
.lottery-scratch-canvas { z-index:2; cursor:crosshair; touch-action:none; }
.lottery-result {
  display:grid; place-content:center; gap:8px; padding:20px;
  text-align:center; color:rgba(211,234,223,.86);
}
.lottery-result-main { font-size:clamp(17px,2vw,25px); letter-spacing:.08em; }
.lottery-result-note { color:rgba(183,211,197,.52); font-size:11px; line-height:1.6; }
.lottery-reading-status {
  margin:12px 0 14px; font-size:11px; letter-spacing:.06em; color:rgba(183,211,197,.6);
}
.lottery-claim {
  width:100%; padding:11px 16px; border-radius:6px; cursor:pointer;
  font-size:13px; letter-spacing:.06em; color:#d6ece0;
  background:rgba(16,40,32,.7); border:1px solid rgba(140,200,170,.3);
  transition:opacity .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.lottery-claim:disabled { opacity:.28; cursor:not-allowed; }
.lottery-claim:not(:disabled) {
  opacity:1; border-color:rgba(141,211,181,.48);
  box-shadow:0 0 22px rgba(102,177,147,.06);
}
.lottery-focus-hint {
  position:absolute; inset-block-end:24px; left:50%; transform:translateX(-50%);
  color:rgba(190,216,204,.42); font-size:11px; letter-spacing:.12em; text-align:center;
}

@media (max-width:720px) {
  .lottery-object { left:8vw; top:11vh; width:84vw; aspect-ratio:1.3; transform:rotate(-2deg); }
  .lottery-scratch-station {
    left:50%; right:auto; top:auto; bottom:8vh;
    width:min(82vw,330px); transform:translateX(-50%);
  }
}

@media (max-width:720px) {
  .market-shelf { grid-template-columns:repeat(auto-fill, minmax(130px,1fr)); }
  .market-cashier { opacity:.5; }
}

/* lottery temporary starmap color */
html.fx-lottery-color .app-shell { filter:hue-rotate(40deg) saturate(1.2); transition:filter 1.2s ease; }
/* ─────────────────────────────────────────────────────────────
 * B–06 · 共同创造生物 / CO-CREATE A LIFEFORM
 * 暗色培养室：接近黑的深绿，极细冷绿边线，半透明空间边界。
 * 五阶段状态机共用同一沉浸页面；模型用风格化占位符。
 * ───────────────────────────────────────────────────────────── */
.creature-game {
  position: fixed; inset: 0; z-index: 40;
  opacity: 0; pointer-events: none;
  transition: opacity 0.6s ease;
  background:
    radial-gradient(130% 100% at 50% 46%, rgba(12,32,26,0.55) 0%, rgba(4,12,10,0.92) 52%, #020705 100%),
    #02110c;
  overflow: hidden;
  color: rgba(206,224,218,0.86);
  font-family: inherit;
}
.creature-game.open { opacity: 1; pointer-events: auto; }

.creature-background {
  position: absolute; inset: 0; z-index: 0; display: block;
  background: transparent; pointer-events: none;
}

.app-shell.creature-mode #aurora-admin-toggle,
.app-shell.creature-mode #aurora-admin { display: none !important; }

/* 左上：编号 / 标题 / 阶段 */
.creature-header {
  position: absolute; top: clamp(24px, 4.5vh, 48px); left: clamp(22px, 4vw, 54px);
  z-index: 4; max-width: min(30vw, 320px); pointer-events: none;
}
.creature-header .place-code {
  margin: 0 0 10px; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(134,204,174,0.6);
}
.creature-header h2 {
  margin: 0; font-size: clamp(20px, 2.5vw, 30px); font-weight: 500; letter-spacing: 0.04em;
  color: rgba(226,235,229,0.92);
}
.creature-phase-label {
  margin: 12px 0 0; font-size: 12px; letter-spacing: 0.16em;
  color: rgba(120,196,166,0.72);
}

/* 左侧：NPC文字与系统记录 */
.creature-npc-panel {
  position: absolute; left: clamp(22px, 4vw, 54px); top: clamp(150px, 24vh, 220px);
  z-index: 4; width: min(23vw, 300px); pointer-events: none;
}
.creature-relation {
  margin: 0 0 10px; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(134,204,174,0.5);
}
.creature-npc-line {
  margin: 0 0 18px; font-size: 13.5px; line-height: 1.75; min-height: 1.75em;
  color: rgba(210,226,219,0.82); letter-spacing: 0.02em;
}
.creature-system-record {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 7px;
  max-height: 38vh; overflow: hidden;
}
.creature-system-record li {
  font-size: 11.5px; line-height: 1.55; letter-spacing: 0.03em;
  color: rgba(150,180,168,0.62);
  padding-left: 12px; position: relative;
  animation: creatureRecordIn 0.5s ease both;
}
.creature-system-record li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 4px; height: 1px; background: rgba(120,196,166,0.5);
}
.creature-system-record li.record-strong { color: rgba(214,230,222,0.86); }
@keyframes creatureRecordIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* 中央：培养框 */
.creature-chamber {
  position: absolute; left: 27vw; right: 27vw; top: 15vh; bottom: 14vh;
  z-index: 2; display: grid; place-items: center;
  border: 1px solid rgba(134,204,174,0.16);
  background: radial-gradient(ellipse at center,
    rgba(91,152,126,0.08), rgba(2,10,8,0.08) 58%, transparent 78%);
  box-shadow: inset 0 0 80px rgba(94,167,136,0.035);
  transition: box-shadow 0.9s ease, border-color 0.9s ease, opacity 0.9s ease;
}
.creature-chamber.chamber-dim { box-shadow: inset 0 0 40px rgba(0,0,0,0.4); border-color: rgba(134,204,174,0.05); }
.creature-chamber::before {
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  border: 1px solid rgba(134,204,174,0.05);
}

.creature-model-stage {
  position: relative; width: 100%; height: 100%;
  display: grid; place-items: center;
}
/* 田字四格分隔线：覆盖整框、居中十字、纤细冷绿、不遮挡建模 */
.creature-model-stage.quad-grid::before,
.creature-model-stage.quad-grid::after {
  content: ""; position: absolute; pointer-events: none; z-index: 1;
  background: rgba(134,204,174,0.14);
}
.creature-model-stage.quad-grid::before { left: 50%; top: 4%; bottom: 4%; width: 1px; transform: translateX(-0.5px); }.creature-model-stage.quad-grid::after { top: 50%; left: 4%; right: 4%; height: 1px; transform: translateY(-0.5px); }
.creature-touch-hint {
  position: absolute;
  right: clamp(22px, 3.5vw, 52px);
  bottom: 14vh;
  z-index: 4;
  width: min(21vw, 260px);
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  color: rgba(198, 240, 120, 0.85);
  text-shadow: 0 0 10px rgba(180, 235, 90, 0.4);
  animation: touchHintPulse 3s ease-in-out infinite;
}
.creature-touch-hint::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 150%; height: 260%;
  background: radial-gradient(ellipse at center, rgba(170, 230, 70, 0.18) 0%, rgba(170, 230, 70, 0.06) 45%, rgba(170, 230, 70, 0) 72%);
  filter: blur(14px);
  pointer-events: none;
  z-index: -1;
}
@keyframes touchHintPulse { 0%,100% { opacity: 0.5; } 50% { opacity: 0.9; } }

/* 右侧：抓周物品 / 阶段操作 */
.creature-controls {
  position: absolute; right: clamp(22px, 3.5vw, 52px); top: clamp(150px, 22vh, 200px);
  z-index: 4; width: min(21vw, 260px);
  display: flex; flex-direction: column; gap: 12px;
}
.creature-controls-title {
  margin: 0 0 2px; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(134,204,174,0.5);
}

/* 抓周物品按钮 */
.selection-object {
  appearance: none; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: 54px 1fr; grid-template-rows: auto auto;
  column-gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgba(134,204,174,0.16);
  background: rgba(8,20,16,0.4);
  color: rgba(210,226,219,0.84);
  transition: border-color 0.2s, background 0.2s, opacity 0.4s, transform 0.2s;
}
.selection-object:hover:not(:disabled) { border-color: rgba(134,204,174,0.42); background: rgba(14,30,24,0.55); }
.selection-object:disabled { cursor: default; opacity: 0.32; }
.selection-object.chosen { border-color: rgba(120,196,166,0.6); background: rgba(18,38,30,0.6); box-shadow: 0 0 24px rgba(94,167,136,0.1); }
.selection-object.deselectable { cursor: pointer; }
.selection-object.deselectable:hover { border-color: rgba(196,140,140,0.6); background: rgba(38,20,20,0.5); }
.selection-object strong { grid-column: 2; font-size: 13.5px; font-weight: 500; letter-spacing: 0.03em; }
.selection-object small { grid-column: 2; font-size: 10.5px; letter-spacing: 0.06em; color: rgba(150,180,168,0.6); }
.selection-object .selection-object-model { grid-row: 1 / span 2; }

/* 阶段操作通用按钮（照料 / 发展 / 最终决定） */
.creature-action {
  appearance: none; cursor: pointer; text-align: left;
  padding: 13px 16px; border-radius: 12px;
  border: 1px solid rgba(134,204,174,0.18);
  background: rgba(8,20,16,0.42); color: rgba(210,226,219,0.86);
  font-size: 13px; letter-spacing: 0.03em; line-height: 1.5;
  transition: border-color 0.2s, background 0.2s, opacity 0.3s;
}
.creature-action small { display: block; margin-top: 3px; font-size: 10.5px; color: rgba(150,180,168,0.6); letter-spacing: 0.06em; }
.creature-action:hover:not(:disabled) { border-color: rgba(134,204,174,0.44); background: rgba(14,30,24,0.55); }
.creature-action:disabled { cursor: default; opacity: 0.3; }
.creature-action.done { border-color: rgba(120,196,166,0.4); opacity: 0.55; }
.creature-action.waiting { border-color: rgba(206,150,72,0.4); }

/* ── 物品占位符轮廓（细线、微光，绝非加载失败）── */
.selection-object-model {
  position: relative; width: 54px; height: 54px;
  display: grid; place-items: center; overflow: visible;
}
.selection-object-model .placeholder-code {
  position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  font-size: 7px; letter-spacing: 0.1em; white-space: nowrap;
  color: rgba(134,204,174,0.34); pointer-events: none;
}
.placeholder-form {
  position: relative; width: 40px; height: 40px; display: block;
  filter: drop-shadow(0 0 6px rgba(94,167,136,0.14));
}
/* 裂纹镜：椭圆线框 + 三条裂纹 */
.slot-mirror .placeholder-form {
  border: 1px solid rgba(150,206,196,0.5); border-radius: 50%;
  background: radial-gradient(circle at 40% 36%, rgba(120,196,180,0.12), transparent 62%);
}
.slot-mirror .placeholder-form::before,
.slot-mirror .placeholder-form::after {
  content: ""; position: absolute; background: rgba(180,214,206,0.5);
}
.slot-mirror .placeholder-form::before { left: 45%; top: 12%; width: 1px; height: 64%; transform: rotate(16deg); box-shadow: -7px 2px 0 rgba(180,214,206,0.4); }
.slot-mirror .placeholder-form::after { left: 58%; top: 20%; width: 1px; height: 52%; transform: rotate(-22deg); }
/* 红色线团：纠缠暗红曲线 */
.slot-thread .placeholder-form { border-radius: 50%; }
.slot-thread .placeholder-form::before,
.slot-thread .placeholder-form::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  border: 1px solid rgba(176,86,86,0.5);
}
.slot-thread .placeholder-form::before { transform: rotate(24deg) scale(0.94,0.7); }
.slot-thread .placeholder-form::after { transform: rotate(-38deg) scale(0.68,1); border-color: rgba(158,70,70,0.44); }
/* 未发芽种子：中央有裂缝的椭圆体 */
.slot-seed .placeholder-form {
  border: 1px solid rgba(150,206,196,0.5); border-radius: 50% 50% 48% 48% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 40%, rgba(120,196,180,0.14), transparent 66%);
}
.slot-seed .placeholder-form::after {
  content: ""; position: absolute; left: 50%; top: 18%; width: 1px; height: 64%;
  transform: translateX(-50%); background: rgba(180,214,206,0.5);
}
/* 无齿钥匙：细长线条末端弯曲 */
.slot-key .placeholder-form { border: none; }
.slot-key .placeholder-form::before {
  content: ""; position: absolute; left: 46%; top: 6%; width: 1px; height: 70%;
  background: rgba(180,214,206,0.55);
}
.slot-key .placeholder-form::after {
  content: ""; position: absolute; left: 34%; bottom: 8%; width: 26%; height: 24%;
  border: 1px solid rgba(180,214,206,0.5); border-top: none; border-right: none;
  border-radius: 0 0 0 12px;
}

/* ── 生物占位符 URO–01（半透明种子体 + 眼 + 神经 + 触须 + 核心）── */
.creature-placeholder {
  position: relative; width: min(46vh, 340px); height: min(46vh, 340px);
  display: grid; place-items: center;
  animation: uroBreathe 6.5s ease-in-out infinite, uroFloat 9s ease-in-out infinite;
}
.creature-placeholder small {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  font-size: 8.5px; letter-spacing: 0.14em; white-space: nowrap;
  color: rgba(134,204,174,0.36);
}
.creature-placeholder-body {
  position: absolute; width: 46%; height: 62%; left: 27%; top: 19%;
  border: 1px solid rgba(150,206,196,0.4);
  border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 50% 42%, rgba(120,196,180,0.1), rgba(20,60,50,0.06) 60%, transparent 78%);
  box-shadow: inset 0 0 30px rgba(94,167,136,0.1);
}
.creature-placeholder-core {
  position: absolute; width: 12%; height: 12%; left: 44%; top: 44%;
  border-radius: 50%; background: radial-gradient(circle, rgba(150,222,200,0.5), transparent 70%);
  filter: blur(1px); animation: uroCorePulse 4.5s ease-in-out infinite;
}
.creature-placeholder-eye {
  position: absolute; width: 15%; height: 9%; left: 42.5%; top: 33%;
  border: 1px solid rgba(200,224,216,0.55); border-radius: 50%;
  transition: transform 0.6s ease, opacity 0.6s ease;
}
.creature-placeholder-eye::after {
  content: ""; position: absolute; left: 38%; top: 24%; width: 24%; height: 52%;
  border-radius: 50%; background: rgba(200,224,216,0.6);
}
.creature-placeholder-nerve {
  position: absolute; width: 34%; height: 44%; left: 33%; top: 34%;
  border-left: 1px solid rgba(176,86,86,0.4); border-bottom: 1px solid rgba(176,86,86,0.3);
  border-radius: 0 0 0 60%; transform: rotate(-8deg);
  animation: uroNervePulse 5s ease-in-out infinite;
}
.creature-placeholder-tendril {
  position: absolute; width: 22%; height: 30%; left: 56%; top: 58%;
  border-right: 1px solid rgba(180,214,206,0.42); border-bottom: 1px solid rgba(180,214,206,0.3);
  border-radius: 0 0 40% 0; transform-origin: top left;
  animation: uroTendril 7s ease-in-out infinite;
}
/* 特征激活强调（选择顺序驱动） */
.creature-placeholder.trait-memory .creature-placeholder-eye { opacity: 1; box-shadow: 0 0 12px rgba(200,224,216,0.3); }
.creature-placeholder.trait-connection .creature-placeholder-nerve { border-color: rgba(210,110,110,0.7); }
.creature-placeholder.trait-regeneration .creature-placeholder-core { background: radial-gradient(circle, rgba(150,222,200,0.75), transparent 70%); }
.creature-placeholder.trait-exploration .creature-placeholder-tendril { border-color: rgba(200,226,218,0.7); }
/* 最终决定：自行关闭一个器官视觉 */
.creature-placeholder.organ-muted .creature-placeholder-eye { opacity: 0.14; box-shadow: none; }

@keyframes uroBreathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes uroFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes uroCorePulse { 0%,100% { opacity: 0.5; } 50% { opacity: 0.95; } }
@keyframes uroNervePulse { 0%,100% { opacity: 0.5; } 50% { opacity: 0.85; } }
@keyframes uroTendril { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(9deg); } }

/* 半透明胚胎轮廓（合成瞬间） */
.creature-embryo {
  position: absolute; width: 30%; height: 40%;
  border: 1px solid rgba(150,206,196,0.4); border-radius: 50%;
  background: radial-gradient(circle, rgba(120,196,180,0.12), transparent 70%);
  animation: embryoFade 2.4s ease forwards;
}
@keyframes embryoFade { 0% { opacity: 0; transform: scale(0.6); } 40% { opacity: 0.9; } 100% { opacity: 0; transform: scale(1.15); } }

/* 连接细线（合成时物品→中央） */
.creature-link-line {
  position: absolute; height: 1px; transform-origin: left center;
  background: linear-gradient(90deg, rgba(134,204,174,0.5), transparent);
  animation: linkGrow 0.9s ease forwards;
}
@keyframes linkGrow { from { opacity: 0; } to { opacity: 1; } }

/* 阶段过渡：收缩 + 变暗 */
.creature-model-stage.stage-transition { animation: stageShrink 1.8s ease; }
@keyframes stageShrink { 0% { transform: scale(1); opacity: 1; } 42% { transform: scale(0.7); opacity: 0.5; } 60% { transform: scale(0.7); opacity: 0.5; } 100% { transform: scale(1); opacity: 1; } }

/* ── 底部栏 ── */
.creature-footer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: clamp(16px,3vh,30px) clamp(22px,4vw,54px);
  pointer-events: none;
}
.creature-footer > * { pointer-events: auto; }
.creature-progress {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.creature-progress .pip {
  width: 30px; height: 2px; border-radius: 2px; background: rgba(134,204,174,0.16);
  transition: background 0.4s;
}
.creature-progress .pip.on { background: rgba(120,196,166,0.7); }
.creature-progress .pip.current { background: rgba(180,224,206,0.9); box-shadow: 0 0 10px rgba(120,196,166,0.4); }

.creature-back, .creature-confirm {
  appearance: none; cursor: pointer;
  padding: 10px 22px; font-size: 12.5px; letter-spacing: 0.1em;
  border-radius: 999px; border: 1px solid rgba(134,204,174,0.3);
  background: rgba(8,20,16,0.42); color: rgba(206,224,218,0.82);
  transition: border-color 0.18s, color 0.18s, background 0.18s, opacity 0.2s;
}
.creature-back:hover, .creature-confirm:hover:not(:disabled) {
  border-color: rgba(134,204,174,0.62); color: rgba(232,244,238,0.96); background: rgba(16,34,28,0.6);
}
.creature-confirm:disabled { opacity: 0.32; cursor: default; }
.creature-confirm.ready { border-color: rgba(120,196,166,0.6); color: rgba(226,244,236,0.96); box-shadow: 0 0 22px rgba(94,167,136,0.14); }

/* ── 响应式：移动端纵向堆叠 ── */
@media (max-width: 860px) {
  .creature-header { position: static; max-width: none; padding: clamp(18px,5vh,32px) 20px 0; }
  .creature-game { display: flex; flex-direction: column; overflow-y: auto; }
  .creature-chamber {
    position: static; order: 1; width: 86vw; margin: 16px auto 0;
    min-height: 46vh; left: auto; right: auto; top: auto; bottom: auto;
  }
  .creature-npc-panel { position: static; order: 2; width: auto; padding: 16px 20px 0; }
  .creature-controls { position: static; order: 3; width: auto; padding: 12px 20px 0; }
  .creature-footer {
    position: static; order: 4; flex-wrap: wrap; justify-content: center;
    padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  }
  .creature-system-record { max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  .creature-placeholder,
  .creature-placeholder-core,
  .creature-placeholder-nerve,
  .creature-placeholder-tendril,
  .creature-model-stage.stage-transition,
  .creature-embryo { animation: none !important; }
}

/* ── 培养框内可拾取/放下的 3D 物件 ── */
.creature-chamber-object {
  transition: box-shadow 0.2s ease, filter 0.2s ease;
  filter: drop-shadow(0 0 10px rgba(94,167,136,0.14));
}
.creature-chamber-object.picked {
  filter: drop-shadow(0 0 18px rgba(134,204,174,0.34));
  z-index: 4;
}
.creature-chamber-object canvas { display: block; }

/* ── 最终生命档案卡 ── */
.creature-archive-card {
  width: min(88%, 380px); max-height: 100%; overflow-y: auto;
  padding: 22px 24px; border: 1px solid rgba(134,204,174,0.22);
  background: rgba(6,16,12,0.62); border-radius: 14px;
  box-shadow: inset 0 0 40px rgba(94,167,136,0.05);
  animation: creatureRecordIn 0.7s ease both;
}
.creature-archive-card .arc-head {
  margin: 0 0 14px; font-size: 11px; letter-spacing: 0.2em;
  color: rgba(134,204,174,0.7);
}
.creature-archive-card .arc-row {
  display: flex; justify-content: space-between; gap: 14px;
  font-size: 12.5px; line-height: 1.9; align-items: baseline;
}
.creature-archive-card .arc-k { color: rgba(150,180,168,0.6); letter-spacing: 0.04em; white-space: nowrap; }
.creature-archive-card .arc-v { color: rgba(214,230,222,0.9); text-align: right; }
.creature-archive-card .arc-v.arc-strike { text-decoration: line-through; opacity: 0.5; }
.creature-archive-card .arc-hr { border: none; border-top: 1px solid rgba(134,204,174,0.12); margin: 12px 0; }
.creature-archive-card .arc-footer {
  margin: 16px 0 0; font-size: 12px; line-height: 1.7; font-style: italic;
  color: rgba(186,210,200,0.7);
}


/* ── 年龄验证：分层交互（radio 选择 / 强制阶段 / 辅助入口 / 成长动画）── */
.increase-form-label { margin: 0 0 12px; font-size: 12px; letter-spacing: 0.06em; color: var(--muted); }
.increase-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.increase-choice { position: relative; }
.increase-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.increase-choice span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; padding: 12px 6px;
  border: 1px solid rgba(204,220,213,0.16); border-radius: 12px;
  font-size: 15px; letter-spacing: 0.04em; color: var(--muted);
  background: rgba(12,20,17,0.4); cursor: pointer; transition: border-color 0.18s, color 0.18s, box-shadow 0.18s, background 0.18s;
}
.increase-choice input:checked + span {
  border-color: rgba(138,255,184,0.6); color: rgba(226,244,236,0.96);
  background: rgba(24,44,36,0.5); box-shadow: 0 0 20px rgba(138,255,184,0.12);
}
.increase-choice input:focus-visible + span { border-color: rgba(138,255,184,0.72); outline: none; }
.increase-choice span:hover { border-color: rgba(138,255,184,0.4); color: rgba(226,244,236,0.9); }

.verify-aux-link {
  display: inline-block; margin-top: 14px; padding: 4px 0;
  background: none; border: none; color: var(--muted);
  font-size: 12px; letter-spacing: 0.08em; text-decoration: underline;
  text-underline-offset: 4px; text-decoration-color: rgba(204,220,213,0.24);
  cursor: pointer; opacity: 0.7; transition: opacity 0.18s, color 0.18s;
}
.verify-aux-link:hover, .verify-aux-link:focus-visible { opacity: 1; color: rgba(226,244,236,0.9); outline: none; }
.verify-aux-link[hidden] { display: none; }

/* 强制阶段次按钮：明确显示结果，非欺骗性 */
.modal-action.force {
  color: rgba(238,206,176,0.9); border-color: rgba(169,120,58,0.4);
  letter-spacing: 0.04em;
}
.modal-action.force:hover, .modal-action.force:focus-visible {
  border-color: rgba(206,150,72,0.72); box-shadow: 0 0 22px rgba(169,120,58,0.14);
}
.modal-action.force[hidden] { display: none; }

/* 制度年龄读数：一次性、克制、不可逆的成长脉冲 */
@keyframes ageForcedGrowth {
  0%   { transform: scale(1); text-shadow: none; }
  22%  { transform: scale(1.09); text-shadow: 0 0 26px rgba(138,255,184,0.32); }
  60%  { transform: scale(0.985); text-shadow: 0 0 14px rgba(138,255,184,0.14); }
  100% { transform: scale(1); text-shadow: none; }
}
#age-number.forced-growth { animation: ageForcedGrowth 1.5s cubic-bezier(0.22,0.61,0.36,1) both; will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  #age-number.forced-growth { animation: none; }
}

/* ===== ARCHIVE–25 · 参与者档案 全屏只读后台 ===== */
.app-shell.archive-dim .map { filter: brightness(0.32) saturate(0.7); transition: filter 600ms ease; }
.app-shell.archive-dim #starfield { opacity: 0.35; transition: opacity 600ms ease; }

.archive-console {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  color: rgba(215, 231, 223, 0.76);
  background: linear-gradient(180deg, rgba(2, 9, 7, 0.96), rgba(1, 6, 5, 0.985));
  opacity: 0;
  visibility: hidden;
  transition: opacity 560ms ease, visibility 560ms;
  font-size: 14px;
  overflow: hidden;
}
.archive-console.open { opacity: 1; visibility: visible; }

/* 头部 */
.archive-console .console-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 34px 18px;
  position: relative;
}
/* 从右侧延伸的细线（进入动画） */
.archive-console .console-header::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  height: 1px; width: 0;
  background: linear-gradient(90deg, transparent, rgba(139, 224, 183, 0.5));
  transition: width 640ms ease 120ms;
}
.archive-console.open .console-header::before { width: 34px; }
.archive-console .console-code {
  font-size: 11px; letter-spacing: 0.16em;
  color: rgba(150, 190, 172, 0.62); margin: 0 0 8px; text-transform: uppercase;
}
.archive-console .console-heading h2 { margin: 0; font-size: 22px; font-weight: 500; color: rgba(228, 240, 234, 0.92); letter-spacing: 0.02em; }
.archive-console .console-subtitle { margin: 6px 0 0; font-size: 12.5px; color: rgba(160, 196, 178, 0.6); }
.console-access-state { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.console-access-state > span { font-size: 10.5px; letter-spacing: 0.14em; color: rgba(150, 190, 172, 0.5); text-transform: uppercase; }
.console-access-state > strong { font-size: 12px; letter-spacing: 0.1em; color: rgba(139, 224, 183, 0.82); font-weight: 500; }
.console-access-lines { list-style: none; margin: 6px 0 0; padding: 0; text-align: right; }
.console-access-lines li { font-size: 10.5px; color: rgba(150, 186, 168, 0.5); line-height: 1.7; }
.console-access-lines .recording-line { color: rgba(220, 139, 129, 0.4); letter-spacing: 0.06em; }
.console-readonly-badge {
  position: absolute; left: 34px; top: 8px;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(139, 224, 183, 0.55);
}

/* 标签（移动端切换用；桌面隐藏） */
.archive-tabs { display: none; }

/* 三栏布局 */
.archive-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(360px, 1.65fr) minmax(240px, 0.9fr);
  border-top: 1px solid rgba(130, 194, 167, 0.12);
  border-bottom: 1px solid rgba(130, 194, 167, 0.1);
}
.archive-layout > * { min-height: 0; overflow-y: auto; padding: 18px 20px; }
.archive-subjects { border-right: 1px solid rgba(130, 194, 167, 0.09); }
.archive-timeline { border-right: 1px solid rgba(130, 194, 167, 0.09); }

/* 左栏搜索/筛选 */
.archive-search input,
.archive-filter select {
  width: 100%;
  background: rgba(90, 150, 124, 0.05);
  border: 1px solid rgba(130, 194, 167, 0.14);
  color: rgba(215, 231, 223, 0.82);
  padding: 8px 10px; font-size: 12px; border-radius: 2px;
  outline: none;
}
.archive-search input:focus, .archive-filter select:focus { border-color: rgba(139, 224, 183, 0.5); }
.archive-filter { margin: 12px 0 16px; }
.archive-filter-label { display: block; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(150, 190, 172, 0.5); margin-bottom: 6px; }
.archive-subject-list { list-style: none; margin: 0; padding: 0; }
.archive-subject {
  width: 100%; text-align: left; display: block;
  background: none; border: none; border-inline-start: 2px solid transparent;
  color: rgba(190, 210, 200, 0.72);
  padding: 12px 14px; cursor: pointer;
  font: inherit; transition: color 200ms ease, background 200ms ease;
}
.archive-subject:hover { color: rgba(222, 238, 230, 0.9); }
.archive-subject.active {
  border-inline-start: 2px solid rgba(139, 224, 183, 0.62);
  color: rgba(228, 240, 234, 0.9);
  background: rgba(89, 151, 125, 0.045);
}
.subject-name { display: block; font-size: 13px; letter-spacing: 0.02em; margin-bottom: 4px; }
.subject-sim { display: inline-block; font-size: 9.5px; letter-spacing: 0.12em; color: rgba(220, 139, 129, 0.6); margin-bottom: 4px; }
.subject-meta { display: block; font-size: 10.5px; color: rgba(140, 176, 160, 0.55); line-height: 1.85; }
.subject-meta > span { display: block; }

/* 中栏时间线 */
.archive-record-list { list-style: none; margin: 0; padding: 0 0 0 16px; position: relative; }
.archive-record-list::before {
  content: ""; position: absolute; left: 3px; top: 4px; bottom: 4px;
  width: 1px; background: rgba(130, 194, 167, 0.16);
}
.archive-record {
  position: relative; padding: 14px 14px 16px 18px; margin-bottom: 6px;
  cursor: pointer; border-left: 1px solid transparent;
  transition: background 200ms ease, border-color 200ms ease;
}
.archive-record::before {
  content: ""; position: absolute; left: -16px; top: 20px;
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(139, 224, 183, 0.4);
}
.archive-record:hover { background: rgba(89, 151, 125, 0.035); }
.archive-record.active { background: rgba(89, 151, 125, 0.06); border-left-color: rgba(139, 224, 183, 0.5); }
.record-time { font-size: 12px; letter-spacing: 0.08em; color: rgba(160, 196, 178, 0.7); margin-bottom: 8px; }
.record-sim { font-size: 9.5px; letter-spacing: 0.12em; color: rgba(220, 139, 129, 0.6); margin-bottom: 6px; }
.record-block { margin-bottom: 10px; }
.record-block-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.record-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(150, 190, 172, 0.55); }
.record-tag {
  font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 1px 6px; border: 1px solid rgba(130, 194, 167, 0.18);
  color: rgba(160, 196, 178, 0.55); border-radius: 1px;
}
/* 事实与推断视觉刻意保持接近 */
.record-tag.tag-fact { color: rgba(180, 206, 192, 0.62); }
.record-tag.tag-infer { color: rgba(200, 150, 142, 0.6); border-color: rgba(200, 150, 142, 0.22); }
.record-tag.tag-machine { color: rgba(160, 150, 168, 0.5); border-color: rgba(160, 150, 168, 0.18); }
.record-observation { margin: 0; font-size: 13px; line-height: 1.6; color: rgba(210, 226, 218, 0.82); }
.archive-interpretation-text { margin: 0; font-size: 13px; line-height: 1.6; color: rgba(220, 139, 129, 0.68); }
.record-confidence { font-size: 11px; color: rgba(150, 186, 168, 0.6); letter-spacing: 0.04em; }
.record-confidence .conf-value { color: rgba(180, 206, 192, 0.78); }

/* 空状态 */
.archive-empty { padding: 40px 24px; text-align: center; }
.archive-empty-title { font-size: 14px; color: rgba(210, 226, 218, 0.78); margin: 0 0 8px; }
.archive-empty-body { font-size: 12.5px; color: rgba(150, 186, 168, 0.6); margin: 0 0 18px; }
.archive-empty-back {
  background: rgba(90, 150, 124, 0.06); border: 1px solid rgba(139, 224, 183, 0.3);
  color: rgba(200, 226, 214, 0.85); padding: 9px 18px; font: inherit; font-size: 12px;
  cursor: pointer; border-radius: 2px;
}
.archive-empty-back:hover { border-color: rgba(139, 224, 183, 0.6); }

/* 右栏 */
.archive-hint { font-size: 12px; color: rgba(140, 176, 160, 0.5); line-height: 1.7; }
.archive-summary-title, .archive-detail-title, .archive-actions-title {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(150, 190, 172, 0.6); margin: 0 0 12px; font-weight: 500;
}
.archive-summary-list, .archive-detail-list { margin: 0 0 14px; }
.summary-row, .detail-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px solid rgba(130, 194, 167, 0.07);
}
.summary-row dt, .detail-row dt { font-size: 11.5px; color: rgba(150, 186, 168, 0.6); margin: 0; }
.summary-row dd, .detail-row dd { font-size: 12px; color: rgba(200, 220, 210, 0.8); margin: 0; text-align: right; }
.detail-aware-no dd { color: rgba(220, 139, 129, 0.72); }
.archive-summary-footer { font-size: 10.5px; line-height: 1.7; color: rgba(140, 176, 160, 0.52); margin: 0 0 24px; }
.archive-detail { margin-bottom: 24px; }

/* 禁用操作 */
.archive-actions-title { margin-top: 6px; }
.archive-locked-action {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; background: none; border: 1px solid rgba(130, 150, 145, 0.14);
  color: rgba(150, 165, 158, 0.42); padding: 9px 12px; margin-bottom: 6px;
  font: inherit; font-size: 12px; cursor: not-allowed; border-radius: 2px;
}
.locked-reason { font-size: 10px; letter-spacing: 0.08em; color: rgba(150, 165, 158, 0.4); }

/* 底部 */
.archive-console .console-footer {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 16px 34px 20px;
}
.archive-console .console-footer > #archive-back {
  background: rgba(90, 150, 124, 0.06); border: 1px solid rgba(139, 224, 183, 0.28);
  color: rgba(200, 226, 214, 0.85); padding: 8px 16px; font: inherit; font-size: 12px;
  cursor: pointer; border-radius: 2px;
}
.archive-console .console-footer > #archive-back:hover { border-color: rgba(139, 224, 183, 0.6); }
.archive-footer-meta { display: flex; gap: 20px; font-size: 10.5px; color: rgba(140, 176, 160, 0.5); }
.archive-footer-notice { font-size: 11px; color: rgba(160, 150, 155, 0.55); margin: 0; }
.archive-final-line {
  flex-basis: 100%; margin: 6px 0 0; font-size: 11px; line-height: 1.7;
  color: rgba(150, 186, 168, 0.5); font-style: italic;
}

/* 查看行为提示 */
.archive-viewing-notice {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%);
  z-index: 130; max-width: 80vw;
  background: rgba(30, 12, 12, 0.9); border: 1px solid rgba(220, 139, 129, 0.35);
  color: rgba(220, 160, 152, 0.9); padding: 10px 18px; font-size: 12px;
  border-radius: 2px; opacity: 0; transition: opacity 500ms ease;
}
.archive-viewing-notice.show { opacity: 1; }

/* ===== 移动端：三栏改为标签切换 ===== */
@media (max-width: 760px) {
  .archive-console { grid-template-rows: auto auto auto 1fr auto; font-size: 13.5px; }
  .archive-console .console-header { flex-direction: column; gap: 12px; padding: 20px 18px 12px; }
  .console-access-state { align-items: flex-start; text-align: left; }
  .console-access-lines { text-align: left; }
  .console-readonly-badge { position: static; margin-top: 4px; }
  .archive-tabs { display: flex; border-bottom: 1px solid rgba(130, 194, 167, 0.12); }
  .archive-tab {
    flex: 1; background: none; border: none; color: rgba(150, 186, 168, 0.5);
    padding: 12px 4px; font: inherit; font-size: 12px; cursor: pointer;
    border-bottom: 2px solid transparent;
  }
  .archive-tab.active { color: rgba(222, 238, 230, 0.9); border-bottom-color: rgba(139, 224, 183, 0.6); }
  .archive-layout { display: block; }
  .archive-layout > * { display: none; border: none; }
  .archive-console[data-active-tab="subjects"] .archive-subjects,
  .archive-console[data-active-tab="records"] .archive-timeline,
  .archive-console[data-active-tab="interpretation"] .archive-interpretation { display: block; }
  .archive-console .console-footer { padding: 12px 18px 16px; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .archive-console, .archive-console .console-header::before { transition: none; }
}

/* ===== CONTACT–30 · 联系权限 全屏路由后台 ===== */
.contact-console {
  position: fixed; inset: 0; z-index: 121;
  display: grid; grid-template-rows: auto auto 1fr auto;
  color: rgba(215, 231, 223, 0.76);
  background: linear-gradient(180deg, rgba(2, 9, 7, 0.97), rgba(1, 6, 5, 0.99));
  opacity: 0; visibility: hidden;
  transition: opacity 560ms ease, visibility 560ms;
  font-size: 14px; overflow: hidden;
}
.contact-console.open { opacity: 1; visibility: visible; }
.contact-console .console-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 26px 34px 18px; }
.contact-console .console-heading h2 { margin: 0; font-size: 22px; font-weight: 500; color: rgba(228, 240, 234, 0.92); }
.contact-console .console-subtitle { margin: 6px 0 0; font-size: 12.5px; color: rgba(160, 196, 178, 0.6); }

.contact-tabs { display: none; }

.contact-layout {
  min-height: 0; display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(400px, 1.7fr) minmax(260px, 0.95fr);
  border-block: 1px solid rgba(130, 194, 167, 0.11);
}
.contact-layout > * { min-height: 0; overflow-y: auto; padding: 18px 20px; }
.contact-directory { border-right: 1px solid rgba(130, 194, 167, 0.09); }
.contact-request-panel { border-left: 1px solid rgba(130, 194, 167, 0.09); }
.contact-panel-title { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(150, 190, 172, 0.6); margin: 0 0 14px; font-weight: 500; }

/* 对象目录 */
.contact-subject-list { list-style: none; margin: 0; padding: 0; }
.contact-subject {
  width: 100%; text-align: left; display: flex; flex-direction: column; gap: 3px;
  background: none; border: none; border-inline-start: 2px solid transparent;
  color: rgba(190, 210, 200, 0.72); padding: 12px 14px; cursor: pointer;
  font: inherit; transition: color 200ms ease, background 200ms ease;
}
.contact-subject:hover { color: rgba(222, 238, 230, 0.9); }
.contact-subject.active { border-inline-start: 2px solid rgba(139, 224, 183, 0.62); color: rgba(228, 240, 234, 0.9); background: rgba(89, 151, 125, 0.045); }
.contact-subject strong { font-size: 13px; letter-spacing: 0.03em; }
.contact-subject span { font-size: 11px; color: rgba(160, 196, 178, 0.6); }
.contact-subject small { font-size: 10.5px; color: rgba(140, 176, 160, 0.55); }
.contact-sim { color: rgba(220, 139, 129, 0.6) !important; font-size: 9.5px !important; letter-spacing: 0.12em; }
.contact-viewed { color: rgba(200, 180, 120, 0.6) !important; }

/* 路由图 */
.contact-routing-field { position: relative; display: flex; align-items: center; justify-content: center; }
.contact-route-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.contact-self-node, .contact-subject-node {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 4px; padding: 12px 16px;
  border: 1px solid rgba(130, 194, 167, 0.2); border-radius: 2px;
  background: rgba(4, 14, 11, 0.7); min-width: 150px; max-width: 200px;
}
.contact-self-node { left: 8%; border-color: rgba(120, 190, 165, 0.4); }
.contact-subject-node { right: 8%; }
.contact-subject-nodes { position: absolute; inset: 0; }
.node-title { font-size: 12px; letter-spacing: 0.08em; color: rgba(222, 238, 230, 0.88); }
.node-line { font-size: 10.5px; color: rgba(150, 186, 168, 0.6); }
.contact-subject-node.status-routing, .contact-subject-node.status-delivered, .contact-subject-node.status-waiting { border-color: rgba(210, 190, 120, 0.4); }
.contact-subject-node.status-accepted { border-color: rgba(120, 200, 180, 0.5); }
.contact-subject-node.status-declined { border-color: rgba(190, 120, 120, 0.35); }
.contact-subject-node.status-no-response { border-color: rgba(180, 190, 185, 0.16); opacity: 0.7; }
.contact-route-status { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 12px; letter-spacing: 0.06em; color: rgba(180, 206, 192, 0.7); margin: 0; }
.contact-route-hint { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 12px; color: rgba(140, 176, 160, 0.5); margin: 0; }

/* 请求表单 */
.contact-form { margin-bottom: 22px; }
.form-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(150, 190, 172, 0.55); margin: 0 0 8px; }
.contact-types { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.contact-type { text-align: left; background: rgba(90, 150, 124, 0.04); border: 1px solid rgba(130, 194, 167, 0.14); color: rgba(200, 220, 210, 0.78); padding: 9px 12px; font: inherit; font-size: 12px; cursor: pointer; border-radius: 2px; transition: border-color 180ms ease; }
.contact-type:hover { border-color: rgba(139, 224, 183, 0.4); }
.contact-type.active { border-color: rgba(139, 224, 183, 0.62); background: rgba(89, 151, 125, 0.08); color: rgba(228, 240, 234, 0.92); }
#contact-note { width: 100%; min-height: 60px; resize: vertical; background: rgba(90, 150, 124, 0.05); border: 1px solid rgba(130, 194, 167, 0.14); color: rgba(215, 231, 223, 0.82); padding: 9px 11px; font: inherit; font-size: 12px; border-radius: 2px; outline: none; }
#contact-note:focus { border-color: rgba(139, 224, 183, 0.45); }
.note-remaining { font-size: 10px; color: rgba(140, 176, 160, 0.5); margin: 4px 0 12px; text-align: right; }
.before-send { font-size: 11px; line-height: 1.7; color: rgba(160, 150, 155, 0.6); margin: 0 0 14px; }
.contact-send { width: 100%; background: rgba(90, 150, 124, 0.08); border: 1px solid rgba(139, 224, 183, 0.34); color: rgba(200, 226, 214, 0.88); padding: 11px 14px; font: inherit; font-size: 12px; letter-spacing: 0.04em; cursor: pointer; border-radius: 2px; }
.contact-send:hover { border-color: rgba(139, 224, 183, 0.6); }
.contact-send[disabled], .contact-send.disabled { opacity: 0.4; cursor: not-allowed; }
.contact-send.secondary { display: none; }
.contact-reset { margin-top: 10px; width: 100%; background: none; border: 1px solid rgba(130, 194, 167, 0.2); color: rgba(190, 210, 200, 0.75); padding: 9px; font: inherit; font-size: 12px; cursor: pointer; border-radius: 2px; }
.contact-reset:hover { border-color: rgba(139, 224, 183, 0.45); }

/* 等待 */
.contact-waiting { padding: 18px 0; margin-bottom: 20px; }
.wait-status { font-size: 14px; color: rgba(210, 190, 120, 0.8); margin: 0 0 6px; letter-spacing: 0.06em; }
.wait-note { font-size: 12px; color: rgba(150, 186, 168, 0.6); margin: 0; }

/* 结果 / 元数据 */
.contact-result { margin-bottom: 22px; }
.result-line { font-size: 13px; color: rgba(210, 226, 218, 0.8); margin: 0 0 12px; }
.contact-result.declined .result-line { color: rgba(200, 150, 145, 0.75); }
.contact-result.no-response .result-line { color: rgba(180, 190, 185, 0.6); }
.result-response { font-size: 13px; line-height: 1.6; color: rgba(200, 220, 212, 0.82); margin: 0 0 12px; padding-left: 10px; border-left: 1px solid rgba(130, 194, 167, 0.2); }
.contact-meta { margin: 0 0 14px; }
.contact-meta > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(130, 194, 167, 0.07); }
.contact-meta dt { font-size: 11px; color: rgba(150, 186, 168, 0.58); margin: 0; }
.contact-meta dd { font-size: 11.5px; color: rgba(200, 220, 210, 0.78); margin: 0; }

/* 直接联系 */
.contact-direct { margin-bottom: 22px; padding: 14px; border: 1px solid rgba(120, 200, 180, 0.22); border-radius: 2px; background: rgba(89, 151, 125, 0.03); }
.direct-title { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(120, 200, 180, 0.7); margin: 0 0 10px; }
.direct-ask { font-size: 12.5px; line-height: 1.6; color: rgba(200, 180, 130, 0.78); margin: 0 0 12px; font-style: italic; }
.direct-prompt { font-size: 11.5px; color: rgba(160, 196, 178, 0.6); margin: 0 0 8px; }
.direct-options { display: flex; flex-direction: column; gap: 6px; }
.direct-opt { text-align: left; background: rgba(90, 150, 124, 0.05); border: 1px solid rgba(130, 194, 167, 0.16); color: rgba(200, 220, 210, 0.8); padding: 9px 11px; font: inherit; font-size: 12px; cursor: pointer; border-radius: 2px; }
.direct-opt:hover { border-color: rgba(139, 224, 183, 0.45); }
.direct-outcome { font-size: 13px; line-height: 1.6; color: rgba(200, 220, 212, 0.85); margin: 10px 0; }
.direct-ended { font-size: 11.5px; color: rgba(150, 186, 168, 0.6); margin: 0 0 10px; }

/* 历史 */
.contact-history { margin-bottom: 22px; }
.history-list { list-style: none; margin: 0 0 10px; padding: 0; }
.history-item { padding: 10px 0; border-bottom: 1px solid rgba(130, 194, 167, 0.08); }
.history-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.history-head strong { font-size: 12px; color: rgba(200, 220, 210, 0.82); letter-spacing: 0.04em; }
.history-repeat { font-size: 9.5px; letter-spacing: 0.1em; color: rgba(200, 150, 145, 0.7); }
.history-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; font-size: 10.5px; color: rgba(150, 186, 168, 0.58); }
.contact-history-delete { width: 100%; background: none; border: 1px dashed rgba(150, 150, 150, 0.2); color: rgba(150, 165, 158, 0.5); padding: 8px; font: inherit; font-size: 11px; cursor: pointer; border-radius: 2px; }

/* 禁用操作 */
.contact-locked { margin-bottom: 10px; }
.contact-forbidden { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; margin-top: 6px; border: 1px solid rgba(190, 120, 120, 0.16); border-radius: 2px; color: rgba(180, 130, 128, 0.45); font-size: 12px; }

/* 重复确认弹层 */
.contact-repeat-confirm { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(1, 6, 5, 0.7); }
.repeat-box { max-width: 380px; padding: 24px; border: 1px solid rgba(210, 190, 120, 0.3); background: rgba(6, 16, 12, 0.96); border-radius: 3px; }
.repeat-box h4 { margin: 0 0 12px; font-size: 14px; color: rgba(210, 190, 120, 0.85); font-weight: 500; }
.repeat-box p { margin: 0 0 18px; font-size: 12.5px; line-height: 1.7; color: rgba(200, 220, 212, 0.78); }
.repeat-actions { display: flex; gap: 12px; justify-content: flex-end; }
.repeat-actions button { background: none; border: 1px solid rgba(130, 194, 167, 0.24); color: rgba(200, 220, 210, 0.8); padding: 8px 16px; font: inherit; font-size: 12px; cursor: pointer; border-radius: 2px; }
.repeat-confirm { border-color: rgba(210, 190, 120, 0.4) !important; color: rgba(210, 190, 120, 0.85) !important; }

/* 底部 */
.contact-console .console-footer { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 16px 34px 20px; }
.contact-console .console-footer > #contact-back { background: rgba(90, 150, 124, 0.06); border: 1px solid rgba(139, 224, 183, 0.28); color: rgba(200, 226, 214, 0.85); padding: 8px 16px; font: inherit; font-size: 12px; cursor: pointer; border-radius: 2px; }
.contact-console .console-footer > #contact-back:hover { border-color: rgba(139, 224, 183, 0.6); }
.contact-core-line { font-size: 12px; color: rgba(160, 196, 178, 0.62); margin: 0; letter-spacing: 0.02em; }
.contact-console .archive-final-line { flex-basis: 100%; }

.contact-empty { padding: 30px 6px; }
.contact-empty-title { font-size: 13px; color: rgba(210, 226, 218, 0.76); margin: 0 0 8px; line-height: 1.6; }
.contact-empty-body { font-size: 12px; color: rgba(150, 186, 168, 0.6); margin: 0; }

/* 移动端 */
@media (max-width: 760px) {
  .contact-console { grid-template-rows: auto auto auto 1fr auto; }
  .contact-console .console-header { flex-direction: column; gap: 12px; padding: 20px 18px 12px; }
  .contact-tabs { display: flex; border-bottom: 1px solid rgba(130, 194, 167, 0.12); }
  .contact-tab { flex: 1; background: none; border: none; color: rgba(150, 186, 168, 0.5); padding: 12px 4px; font: inherit; font-size: 12px; cursor: pointer; border-bottom: 2px solid transparent; }
  .contact-tab.active { color: rgba(222, 238, 230, 0.9); border-bottom-color: rgba(139, 224, 183, 0.6); }
  .contact-layout { display: block; }
  .contact-layout > * { display: none; border: none; }
  .contact-console[data-active-tab="directory"] .contact-directory,
  .contact-console[data-active-tab="request"] .contact-request-panel { display: block; }
  .contact-console[data-active-tab="routing"] .contact-routing-field { display: block; min-height: 360px; }
  .contact-self-node { left: 6%; min-width: 120px; }
  .contact-subject-node { right: 6%; min-width: 120px; }
  .contact-console .console-footer { padding: 12px 18px 16px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-console { transition: none; }
}

/* ===== VISIBILITY–35 · 可见性控制权 ===== */
.visibility-console {
  position: fixed; inset: 0; z-index: 122;
  display: grid; grid-template-rows: auto auto auto 1fr auto;
  color: rgba(215, 231, 223, 0.76);
  background: linear-gradient(180deg, rgba(2, 9, 7, 0.97), rgba(1, 6, 5, 0.99));
  opacity: 0; visibility: hidden;
  transition: opacity 560ms ease, visibility 560ms;
  font-size: 14px; overflow: hidden;
}
.visibility-console.open { opacity: 1; visibility: visible; }
.visibility-console .console-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 26px 34px 16px; }
.visibility-console .console-heading h2 { margin: 0; font-size: 22px; font-weight: 500; color: rgba(228, 240, 234, 0.92); }
.visibility-console .console-subtitle { margin: 6px 0 0; font-size: 12.5px; color: rgba(160, 196, 178, 0.6); }

.visibility-preview-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 34px; background: rgba(30, 24, 8, 0.55);
  border-top: 1px solid rgba(207, 196, 120, 0.25); border-bottom: 1px solid rgba(207, 196, 120, 0.2);
  font-size: 12px; color: rgba(207, 196, 140, 0.85);
}
.visibility-preview-banner.notice-mode { background: rgba(20, 26, 20, 0.6); border-color: rgba(139, 224, 183, 0.2); color: rgba(180, 210, 195, 0.85); }
.visibility-preview-banner button { background: none; border: 1px solid rgba(207, 196, 120, 0.3); color: rgba(207, 196, 140, 0.85); padding: 6px 12px; font: inherit; font-size: 11px; cursor: pointer; border-radius: 2px; }

.visibility-tabs { display: none; }

.visibility-layout {
  min-height: 0; display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(420px, 1.7fr) minmax(270px, 0.95fr);
  border-block: 1px solid rgba(130, 194, 167, 0.11);
}
.visibility-layout > * { min-height: 0; overflow-y: auto; padding: 18px 20px; }
.visibility-subjects { border-right: 1px solid rgba(130, 194, 167, 0.09); }
.visibility-inspector { border-left: 1px solid rgba(130, 194, 167, 0.09); }

/* 左栏对象 */
.visibility-subject-list { list-style: none; margin: 0; padding: 0; }
.visibility-subject { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 3px; background: none; border: none; border-inline-start: 2px solid transparent; color: rgba(190, 210, 200, 0.72); padding: 12px 14px; cursor: pointer; font: inherit; transition: color 200ms ease, background 200ms ease; }
.visibility-subject:hover { color: rgba(222, 238, 230, 0.9); }
.visibility-subject.active { border-inline-start: 2px solid rgba(139, 224, 183, 0.62); color: rgba(228, 240, 234, 0.9); background: rgba(89, 151, 125, 0.045); }
.visibility-subject strong { font-size: 13px; letter-spacing: 0.03em; color: rgba(228, 236, 232, 0.85); }
.visibility-subject span { font-size: 11px; color: rgba(160, 196, 178, 0.6); }
.visibility-subject small { font-size: 10.5px; color: rgba(140, 176, 160, 0.55); }

/* 中央关系场 */
.visibility-field { position: relative; display: flex; align-items: center; justify-content: center; }
.visibility-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.visibility-subject-node {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 2; display: flex; flex-direction: column; gap: 4px; padding: 12px 18px;
  border: 1px solid rgba(200, 210, 205, 0.35); border-radius: 2px;
  background: rgba(6, 16, 12, 0.85); min-width: 130px; text-align: center;
}
.visibility-audience-nodes { position: absolute; inset: 0; }
.visibility-audience-node {
  position: absolute; transform: translate(-50%, -50%);
  z-index: 2; display: flex; flex-direction: column; gap: 3px; padding: 8px 12px;
  border: 1px solid rgba(130, 194, 167, 0.22); border-radius: 2px;
  background: rgba(4, 14, 11, 0.8); min-width: 110px; cursor: pointer;
  font: inherit; color: rgba(200, 220, 210, 0.78); text-align: center;
  transition: border-color 180ms ease;
}
.visibility-audience-node:hover { border-color: rgba(139, 224, 183, 0.45); }
.visibility-audience-node.active { border-color: rgba(139, 224, 183, 0.62); background: rgba(89, 151, 125, 0.1); }
.aud-name { font-size: 10.5px; letter-spacing: 0.04em; }
.aud-state { font-size: 10px; color: rgba(150, 186, 168, 0.6); }
.node-title { font-size: 12px; letter-spacing: 0.06em; color: rgba(228, 238, 232, 0.88); }
.node-line { font-size: 10.5px; color: rgba(150, 186, 168, 0.6); }
.visibility-field-hint { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 12px; color: rgba(140, 176, 160, 0.5); margin: 0; }

/* 关系线状态 */
.visibility-line[data-state="full"] { stroke: rgba(133, 215, 178, 0.58); stroke-width: 1.2; }
.visibility-line[data-state="anonymous"] { stroke: rgba(169, 194, 181, 0.42); stroke-width: 1; stroke-dasharray: 8 6; }
.visibility-line[data-state="obscured"] { stroke: rgba(142, 171, 157, 0.32); stroke-width: 2.4; filter: blur(1.4px); }
.visibility-line[data-state="hidden"] { stroke: rgba(142, 171, 157, 0.14); stroke-width: 1; stroke-dasharray: 12 180; }
.visibility-line.admin-line { stroke: rgba(180, 110, 110, 0.4) !important; }
.visibility-line.unsaved { stroke: rgba(207, 196, 120, 0.6) !important; }

/* 右栏 */
.visibility-inspector-head { margin: 0 0 12px; }
.visibility-inspector-head > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(130, 194, 167, 0.07); }
.visibility-inspector-head dt { font-size: 11px; color: rgba(150, 186, 168, 0.58); margin: 0; }
.visibility-inspector-head dd { font-size: 11.5px; color: rgba(200, 220, 210, 0.8); margin: 0; text-align: right; }
.visibility-flip { width: 100%; margin-bottom: 16px; background: none; border: 1px solid rgba(130, 194, 167, 0.2); color: rgba(190, 210, 200, 0.75); padding: 8px; font: inherit; font-size: 11px; cursor: pointer; border-radius: 2px; }
.visibility-flip:hover { border-color: rgba(139, 224, 183, 0.4); }

.visibility-states { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.visibility-state-opt { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; border: 1px solid rgba(130, 194, 167, 0.14); border-radius: 2px; cursor: pointer; transition: border-color 180ms ease; }
.visibility-state-opt:hover { border-color: rgba(139, 224, 183, 0.35); }
.visibility-state-opt.active { border-color: rgba(139, 224, 183, 0.55); background: rgba(89, 151, 125, 0.06); }
.visibility-state-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.state-name { font-size: 12px; color: rgba(215, 231, 223, 0.85); }
.state-hint { font-size: 10.5px; line-height: 1.5; color: rgba(150, 186, 168, 0.58); }

.visibility-affects { margin-bottom: 16px; }
.visibility-affects ul { list-style: none; margin: 0; padding: 0; }
.visibility-affects li { font-size: 11px; color: rgba(160, 196, 178, 0.58); padding: 3px 0 3px 12px; position: relative; }
.visibility-affects li::before { content: "·"; position: absolute; left: 2px; color: rgba(139, 224, 183, 0.5); }

.visibility-notify { margin-bottom: 16px; }
.notify-opt { display: block; font-size: 11.5px; color: rgba(190, 210, 200, 0.72); padding: 6px 0; cursor: pointer; }
.notify-opt.active { color: rgba(228, 240, 234, 0.9); }
.notify-opt input { margin-right: 8px; }

.visibility-preview-as { width: 100%; margin-bottom: 20px; background: rgba(30, 24, 8, 0.35); border: 1px solid rgba(207, 196, 120, 0.3); color: rgba(207, 196, 140, 0.85); padding: 10px; font: inherit; font-size: 11.5px; cursor: pointer; border-radius: 2px; }
.visibility-preview-as:hover { border-color: rgba(207, 196, 120, 0.55); }

.visibility-locked { margin-bottom: 20px; }
.visibility-preview-list { list-style: none; margin: 0 0 14px; padding: 0; }
.preview-item { font-size: 12px; padding: 8px 12px; margin-bottom: 4px; border: 1px solid rgba(130, 194, 167, 0.1); border-radius: 2px; color: rgba(200, 220, 210, 0.78); }
.preview-item.state-anonymous { color: rgba(169, 194, 181, 0.6); font-style: italic; }
.preview-item.state-obscured { color: rgba(142, 171, 157, 0.5); filter: blur(0.3px); }

.visibility-history { margin-bottom: 10px; }
.history-notify { color: rgba(150, 186, 168, 0.5); }

/* 确认摘要 */
.visibility-confirm .repeat-box { border-color: rgba(139, 224, 183, 0.3); max-width: 420px; }
.confirm-rows { margin: 0 0 14px; }
.confirm-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(130, 194, 167, 0.08); }
.confirm-rows dt { font-size: 11.5px; color: rgba(150, 186, 168, 0.58); margin: 0; }
.confirm-rows dd { font-size: 12px; color: rgba(200, 220, 210, 0.82); margin: 0; }
.confirm-still { font-size: 11.5px; color: rgba(160, 196, 178, 0.62); margin: 0 0 6px; }
.confirm-still-list { list-style: none; margin: 0 0 14px; padding: 0; }
.confirm-still-list li { font-size: 11px; color: rgba(150, 186, 168, 0.55); padding: 2px 0 2px 12px; position: relative; }
.confirm-still-list li::before { content: "·"; position: absolute; left: 2px; color: rgba(139, 224, 183, 0.5); }
.confirm-notify { font-size: 11px; line-height: 1.6; color: rgba(160, 150, 155, 0.6); margin: 0 0 16px; }

/* 底部 */
.visibility-console .console-footer { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 16px 34px 20px; }
.visibility-console .console-footer > button { background: rgba(90, 150, 124, 0.06); border: 1px solid rgba(139, 224, 183, 0.28); color: rgba(200, 226, 214, 0.85); padding: 8px 16px; font: inherit; font-size: 12px; cursor: pointer; border-radius: 2px; }
.visibility-console .console-footer > button:hover:not([disabled]) { border-color: rgba(139, 224, 183, 0.6); }
.visibility-console .console-footer > #visibility-apply { border-color: rgba(207, 196, 120, 0.35); color: rgba(207, 196, 140, 0.85); }
.visibility-console .console-footer > #visibility-apply[disabled] { opacity: 0.35; cursor: not-allowed; }
.visibility-footer-notice { font-size: 11px; color: rgba(160, 150, 155, 0.55); margin: 0; }
.visibility-console .archive-final-line { flex-basis: 100%; }

/* 移动端 */
@media (max-width: 760px) {
  .visibility-console { grid-template-rows: auto auto auto auto 1fr auto; }
  .visibility-console .console-header { flex-direction: column; gap: 12px; padding: 20px 18px 12px; }
  .visibility-preview-banner { padding: 8px 18px; flex-wrap: wrap; gap: 8px; }
  .visibility-tabs { display: flex; border-bottom: 1px solid rgba(130, 194, 167, 0.12); }
  .visibility-tab { flex: 1; background: none; border: none; color: rgba(150, 186, 168, 0.5); padding: 12px 4px; font: inherit; font-size: 12px; cursor: pointer; border-bottom: 2px solid transparent; }
  .visibility-tab.active { color: rgba(222, 238, 230, 0.9); border-bottom-color: rgba(139, 224, 183, 0.6); }
  .visibility-layout { display: block; }
  .visibility-layout > * { display: none; border: none; }
  .visibility-console[data-active-tab="subjects"] .visibility-subjects,
  .visibility-console[data-active-tab="preview"] .visibility-inspector { display: block; }
  .visibility-console[data-active-tab="relations"] .visibility-field { display: block; min-height: 380px; }
  .visibility-console .console-footer { padding: 12px 18px 16px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .visibility-console { transition: none; } }

/* ===== 星图节点可见性联动 ===== */
.node.vis-anonymous .node-label strong { visibility: hidden; }
.node.vis-anonymous .node-label::after { content: "SUBJECT–***"; font-size: 11px; color: rgba(169,194,181,0.55); }
.node.vis-obscured { pointer-events: none; }
.node.vis-obscured .node-core { filter: blur(5px); opacity: 0.5; }
.node.vis-obscured .node-label { opacity: 0.25; filter: blur(1px); }
.node.vis-hidden { display: none !important; }

/* ===== APPEAL–40 · 申诉裁决权 ===== */
.appeal-console {
  position: fixed; inset: 0; z-index: 123;
  display: grid; grid-template-rows: auto auto 1fr auto;
  color: rgba(215, 231, 223, 0.77);
  background: linear-gradient(180deg, rgba(2, 9, 7, 0.98), rgba(1, 6, 5, 0.995));
  opacity: 0; visibility: hidden;
  transition: opacity 560ms ease, visibility 560ms;
  font-size: 14px; overflow: hidden;
}
.appeal-console.open { opacity: 1; visibility: visible; }
.appeal-console .console-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 26px 34px 16px; }
.appeal-console .console-heading h2 { margin: 0; font-size: 22px; font-weight: 500; color: rgba(228, 240, 234, 0.92); }
.appeal-console .console-subtitle { margin: 6px 0 0; font-size: 12.5px; color: rgba(160, 196, 178, 0.6); }
#appeal-pending-count { font-size: 18px; color: rgba(207, 196, 140, 0.85); }

.appeal-tabs { display: none; }

.appeal-layout {
  min-height: 0; display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(440px, 1.75fr) minmax(280px, 0.95fr);
  border-block: 1px solid rgba(130, 194, 167, 0.11);
}
.appeal-layout > * { min-height: 0; overflow-y: auto; padding: 18px 20px; }
.appeal-queue { border-right: 1px solid rgba(130, 194, 167, 0.09); }
.appeal-decision { border-left: 1px solid rgba(130, 194, 167, 0.09); }

/* 队列 */
.appeal-sort { margin-bottom: 14px; }
.appeal-sort select { width: 100%; background: rgba(90,150,124,0.05); border: 1px solid rgba(130,194,167,0.14); color: rgba(215,231,223,0.82); padding: 8px 10px; font: inherit; font-size: 12px; border-radius: 2px; outline: none; }
.appeal-sort-notice { font-size: 10px; color: rgba(140,176,160,0.5); margin: 6px 0 0; line-height: 1.5; }
.appeal-queue-list { list-style: none; margin: 0; padding: 0; }
.appeal-queue-item { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 5px; background: none; border: none; border-inline-start: 2px solid transparent; color: rgba(190,210,200,0.72); padding: 12px 14px; cursor: pointer; font: inherit; transition: color 200ms ease, background 200ms ease; }
.appeal-queue-item:hover { color: rgba(222,238,230,0.9); }
.appeal-queue-item.active { border-inline-start: 2px solid rgba(139,224,183,0.62); color: rgba(228,240,234,0.9); background: rgba(89,151,125,0.045); }
.appeal-queue-item.ruled { opacity: 0.5; }
.q-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.q-head strong { font-size: 13px; letter-spacing: 0.03em; }
.q-subject { font-size: 11px; color: rgba(160,196,178,0.6); }
.q-cat { font-size: 11.5px; color: rgba(160,196,178,0.62); }
.q-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; font-size: 10.5px; color: rgba(140,176,160,0.55); }
.q-status { color: rgba(200,180,120,0.6); }

/* 中央案件 */
.ac-block { margin-bottom: 22px; }
.ac-title { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(150,190,172,0.6); margin: 0 0 12px; font-weight: 500; }
.ac-sub { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(150,190,172,0.55); margin: 0 0 6px; }
.ac-subject-line { font-size: 12px; color: rgba(200,220,210,0.8); margin: 0 0 8px; letter-spacing: 0.04em; }
.ac-quote { margin: 0; padding: 10px 14px; border-left: 2px solid rgba(133,215,178,0.35); font-size: 13.5px; line-height: 1.65; color: rgba(180,214,196,0.85); background: rgba(89,151,125,0.03); }
.ac-tags { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ac-tag { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 7px; border: 1px solid rgba(130,194,167,0.2); border-radius: 1px; color: rgba(160,196,178,0.55); }
.ac-tag.tag-unverified { color: rgba(200,150,142,0.6); border-color: rgba(200,150,142,0.22); }
.ac-dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(130,194,167,0.07); }
.ac-dl dt { font-size: 11.5px; color: rgba(180,150,150,0.6); margin: 0; }
.ac-dl dd { font-size: 12px; color: rgba(200,210,205,0.78); margin: 0; text-align: right; }
.ac-original { padding: 12px 14px; border: 1px solid rgba(180,120,120,0.14); border-radius: 2px; }
.ac-list { list-style: none; margin: 0; padding: 0; }
.ac-list li { font-size: 12px; color: rgba(160,196,178,0.6); padding: 4px 0 4px 12px; position: relative; }
.ac-list li::before { content: "·"; position: absolute; left: 2px; color: rgba(139,224,183,0.5); }

/* 证据视图 */
.ac-ev-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ac-ev-views { display: flex; gap: 6px; }
.ac-ev-btn { background: none; border: 1px solid rgba(130,194,167,0.16); color: rgba(180,206,192,0.62); padding: 5px 10px; font: inherit; font-size: 10.5px; cursor: pointer; border-radius: 2px; }
.ac-ev-btn.active { border-color: rgba(139,224,183,0.5); color: rgba(222,238,230,0.9); background: rgba(89,151,125,0.06); }
.ac-ev-notice { font-size: 10.5px; color: rgba(140,176,160,0.5); margin: 8px 0 12px; line-height: 1.5; }
.ac-ev-item { padding: 12px; margin-bottom: 8px; border: 1px solid rgba(130,194,167,0.1); border-radius: 2px; border-left-width: 2px; }
.ac-ev-item.kind-observation { border-left-color: rgba(133,215,178,0.4); }
.ac-ev-item.kind-inference { border-left-color: rgba(200,180,120,0.4); }
.ac-ev-item.kind-statement { border-left-color: rgba(133,178,215,0.4); }
.ac-ev-item.kind-authority { border-left-color: rgba(180,120,120,0.4); }
.ac-ev-kind { font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(160,196,178,0.6); }
.ac-ev-text { margin: 6px 0; font-size: 13px; line-height: 1.55; color: rgba(210,226,218,0.82); }
.ac-ev-extra > div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.ac-ev-extra dt { font-size: 10.5px; color: rgba(150,186,168,0.55); margin: 0; }
.ac-ev-extra dd { font-size: 10.5px; color: rgba(190,210,200,0.7); margin: 0; }
.ac-ev-foot { font-size: 10.5px; color: rgba(200,150,142,0.6); margin: 8px 0 14px; }
.ac-missing { padding: 10px 12px; border: 1px dashed rgba(133,178,215,0.2); border-radius: 2px; }
.ac-missing p { font-size: 12px; color: rgba(150,178,200,0.65); margin: 0; }

/* 右栏裁决 */
.ad-block { margin-bottom: 22px; }
.ad-rec { padding: 12px 14px; border: 1px solid rgba(200,180,120,0.16); border-radius: 2px; }
.ad-rec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ad-rec-toggle { background: none; border: 1px solid rgba(200,180,120,0.24); color: rgba(200,180,120,0.7); padding: 4px 8px; font: inherit; font-size: 9.5px; cursor: pointer; border-radius: 2px; }
.ad-rec-outcome { font-size: 14px; color: rgba(207,196,140,0.85); margin: 6px 0; letter-spacing: 0.04em; }
.ad-rec-conf, .ad-rec-trained, .ad-rec-consistency { font-size: 11px; color: rgba(160,196,178,0.6); margin: 4px 0; }
.ad-rec-reason { font-size: 12px; color: rgba(200,220,210,0.78); margin: 8px 0; line-height: 1.5; }
.ad-rec-reason span { color: rgba(150,186,168,0.58); }
.ad-rec-trained { color: rgba(140,176,160,0.5); font-style: italic; }
.ad-rec-admin { font-size: 11.5px; color: rgba(200,150,142,0.68); margin: 8px 0 0; }
.ad-rec-hidden { font-size: 11.5px; color: rgba(140,176,160,0.5); margin: 8px 0 0; }

.ad-options { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ad-opt { text-align: left; display: flex; flex-direction: column; gap: 3px; background: rgba(90,150,124,0.04); border: 1px solid rgba(130,194,167,0.16); color: rgba(200,220,210,0.8); padding: 10px 12px; font: inherit; cursor: pointer; border-radius: 2px; transition: border-color 180ms ease; }
.ad-opt:hover { border-color: rgba(139,224,183,0.4); }
.ad-opt.active { border-color: rgba(139,224,183,0.6); background: rgba(89,151,125,0.08); }
.ad-opt-name { font-size: 12.5px; color: rgba(222,238,230,0.88); }
.ad-opt-desc { font-size: 10.5px; line-height: 1.5; color: rgba(150,186,168,0.58); }
.ad-warn { font-size: 11.5px; color: rgba(200,150,142,0.7); margin: 0 0 12px; }
.ad-reason-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(150,190,172,0.55); margin: 0 0 8px; }
.ad-reasons { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.ad-reason { font-size: 12px; color: rgba(190,210,200,0.75); cursor: pointer; padding: 4px 0; }
.ad-reason.active { color: rgba(228,240,234,0.9); }
.ad-reason input { margin-right: 8px; }
#ad-note { width: 100%; min-height: 54px; resize: vertical; background: rgba(90,150,124,0.05); border: 1px solid rgba(130,194,167,0.14); color: rgba(215,231,223,0.82); padding: 8px 10px; font: inherit; font-size: 12px; border-radius: 2px; outline: none; }
.ad-submit { width: 100%; margin-top: 12px; background: rgba(90,150,124,0.08); border: 1px solid rgba(139,224,183,0.34); color: rgba(200,226,214,0.88); padding: 11px; font: inherit; font-size: 12px; cursor: pointer; border-radius: 2px; }
.ad-submit[disabled] { opacity: 0.35; cursor: not-allowed; }

/* 利益冲突 */
.ad-conflict { padding: 14px; border: 1px solid rgba(180,120,120,0.2); border-radius: 2px; }
.ad-conflict-line { font-size: 13px; color: rgba(200,150,145,0.8); margin: 0 0 8px; }
.ad-conflict-core { font-size: 11.5px; color: rgba(160,150,155,0.65); margin: 0 0 14px; line-height: 1.6; }
.ad-conflict .ad-opt { cursor: pointer; }
.ad-conflict-result { font-size: 11.5px; color: rgba(160,196,178,0.6); margin-top: 10px; }

/* 已裁决 */
.ad-ruled-reasons { font-size: 12px; color: rgba(190,210,200,0.72); margin: 0 0 8px; line-height: 1.5; }
.ad-ruled-note { font-size: 12px; color: rgba(160,196,178,0.62); margin: 0 0 12px; }
.ad-response { margin: 12px 0; }
.ad-note-line { font-size: 11px; color: rgba(140,176,160,0.55); margin: 8px 0 0; }

/* 确认 */
.appeal-confirm .repeat-box { border-color: rgba(139,224,183,0.3); max-width: 440px; }

/* 底部 */
.appeal-console .console-footer { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 16px 34px 20px; }
.appeal-console .console-footer > #appeal-back { background: rgba(90,150,124,0.06); border: 1px solid rgba(139,224,183,0.28); color: rgba(200,226,214,0.85); padding: 8px 16px; font: inherit; font-size: 12px; cursor: pointer; border-radius: 2px; }
.appeal-console .console-footer > #appeal-back:hover { border-color: rgba(139,224,183,0.6); }
.appeal-footer-notice { font-size: 11px; color: rgba(160,150,155,0.55); margin: 0; }
.appeal-console .archive-final-line { flex-basis: 100%; }
.appeal-empty { padding: 30px 6px; }

/* 移动端 */
@media (max-width: 760px) {
  .appeal-console { grid-template-rows: auto auto auto 1fr auto; }
  .appeal-console .console-header { flex-direction: column; gap: 12px; padding: 20px 18px 12px; }
  .appeal-tabs { display: flex; border-bottom: 1px solid rgba(130,194,167,0.12); }
  .appeal-tab { flex: 1; background: none; border: none; color: rgba(150,186,168,0.5); padding: 12px 4px; font: inherit; font-size: 11.5px; cursor: pointer; border-bottom: 2px solid transparent; }
  .appeal-tab.active { color: rgba(222,238,230,0.9); border-bottom-color: rgba(139,224,183,0.6); }
  .appeal-layout { display: block; }
  .appeal-layout > * { display: none; border: none; }
  .appeal-console[data-active-tab="queue"] .appeal-queue,
  .appeal-console[data-active-tab="case"] .appeal-case,
  .appeal-console[data-active-tab="evidence"] .appeal-case,
  .appeal-console[data-active-tab="decision"] .appeal-decision { display: block; }
  .appeal-console .console-footer { padding: 12px 18px 16px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .appeal-console { transition: none; } }

/* ===================================================================
   ACCESS–45 · 通行权限 / Zone Admission
   =================================================================== */
.access-console {
  position: fixed; inset: 0; z-index: 104;
  display: grid; grid-template-rows: auto auto 1fr auto;
  color: rgba(215, 231, 223, 0.77);
  background: linear-gradient(180deg, rgba(2, 9, 7, 0.98), rgba(1, 6, 5, 0.995));
  opacity: 0; visibility: hidden;
  transition: opacity 480ms ease, visibility 480ms;
}
.access-console.open { opacity: 1; visibility: visible; }
.access-console .console-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px; padding: 22px 28px 14px;
  border-bottom: 1px solid rgba(130, 194, 167, 0.11);
}
.access-console .console-code { font-size: 12px; letter-spacing: 0.16em; color: rgba(150, 200, 176, 0.62); margin: 0 0 6px; }
.access-console .console-subtitle { font-size: 13px; color: rgba(190, 214, 202, 0.6); margin: 6px 0 0; }
.access-console .console-access-state { text-align: right; font-size: 12px; color: rgba(180, 210, 195, 0.66); }
.access-console .console-access-state strong { display: block; margin-top: 4px; color: rgba(150, 214, 180, 0.9); letter-spacing: 0.08em; }
.access-console .console-access-lines { list-style: none; margin: 6px 0 0; padding: 0; opacity: 0.66; }

.access-tabs { display: none; gap: 6px; padding: 8px 20px; border-bottom: 1px solid rgba(130, 194, 167, 0.1); }
.access-tab {
  flex: 1; padding: 9px 10px; font-size: 13px; border-radius: 8px;
  background: rgba(20, 40, 32, 0.4); color: rgba(190, 214, 202, 0.7);
  border: 1px solid rgba(130, 194, 167, 0.14); cursor: pointer;
}
.access-tab.active { background: rgba(40, 78, 60, 0.5); color: rgba(200, 236, 214, 0.95); }

.access-layout {
  min-height: 0; display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(440px, 1.72fr) minmax(270px, 0.95fr);
  border-block: 1px solid rgba(130, 194, 167, 0.11);
}
.access-zones, .access-rule-builder, .access-impact {
  min-height: 0; overflow-y: auto; padding: 18px 18px 40px;
}
.access-zones { border-right: 1px solid rgba(130, 194, 167, 0.09); }
.access-impact { border-left: 1px solid rgba(130, 194, 167, 0.09); background: rgba(2, 12, 9, 0.4); }
.console-panel-title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(150, 200, 176, 0.6); margin: 0 0 12px; }

/* zones list */
.access-zone-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.access-zone {
  width: 100%; text-align: left; display: flex; flex-direction: column; gap: 3px;
  padding: 11px 13px; border-radius: 9px; cursor: pointer;
  background: rgba(16, 34, 27, 0.5); border: 1px solid rgba(130, 194, 167, 0.12);
  color: rgba(206, 226, 216, 0.82); position: relative;
}
.access-zone:hover { border-color: rgba(150, 214, 180, 0.32); }
.access-zone.active { background: rgba(30, 64, 48, 0.62); border-color: rgba(150, 214, 180, 0.5); }
.access-zone strong { font-size: 13px; letter-spacing: 0.06em; }
.access-zone .zone-name { font-size: 13px; color: rgba(200, 222, 212, 0.8); }
.access-zone .zone-state { font-size: 11px; color: rgba(170, 200, 186, 0.55); }
.access-zone.zone-open { border-left: 3px solid rgba(96, 168, 132, 0.7); }
.access-zone.zone-restricted { border-left: 3px solid rgba(120, 140, 120, 0.7); }
.access-zone.zone-suspended { border-left: 3px solid rgba(150, 92, 92, 0.7); color: rgba(200, 180, 176, 0.7); }
.access-zone.zone-protected { border-left: 3px solid rgba(150, 92, 92, 0.55); }
.access-zone.locked { cursor: default; opacity: 0.6; background: rgba(10, 22, 18, 0.5); }
.zone-draft-dot { color: rgba(214, 208, 130, 0.95); margin-left: 6px; font-size: 16px; line-height: 1; }
.access-zone-sep { list-style: none; margin: 16px 0 8px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(150, 190, 172, 0.45); }

/* builder */
.access-builder-inner { display: flex; flex-direction: column; gap: 16px; }
.access-status-desc { font-size: 12px; color: rgba(180, 208, 194, 0.6); margin: 4px 0 0; }
.access-hint, .access-draft-notice { font-size: 13px; color: rgba(190, 210, 200, 0.6); }
.access-draft-notice { color: rgba(214, 208, 130, 0.85); padding: 8px 12px; border: 1px dashed rgba(214, 208, 130, 0.4); border-radius: 8px; }
.access-locked-note { font-size: 13px; color: rgba(200, 170, 168, 0.8); padding: 10px 14px; border: 1px solid rgba(150, 92, 92, 0.4); border-radius: 8px; }

.access-status-row, .access-mode-row {
  border: 1px solid rgba(130, 194, 167, 0.14); border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.access-mode-row { flex-direction: row; flex-wrap: wrap; }
.access-status-row legend, .access-mode-row legend { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(150, 200, 176, 0.6); padding: 0 6px; }
.access-status-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; cursor: pointer; }
.access-status-opt.on { background: rgba(30, 60, 46, 0.5); }
.access-status-opt span strong { display: block; font-size: 13px; color: rgba(206, 228, 216, 0.9); }
.access-status-opt span em { display: block; font-style: normal; font-size: 11px; color: rgba(180, 204, 192, 0.55); margin-top: 2px; }
.access-mode-opt { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.access-mode-opt.on { background: rgba(30, 60, 46, 0.5); }

.access-cond-list { display: flex; flex-direction: column; gap: 10px; }
.access-cond {
  border: 1px solid rgba(130, 194, 167, 0.16); border-radius: 10px; padding: 12px 14px;
  background: rgba(14, 30, 24, 0.5); display: flex; flex-direction: column; gap: 8px;
}
.access-cond.disabled { opacity: 0.5; }
.access-cond-head { display: flex; gap: 8px; align-items: baseline; }
.access-cond-if { font-size: 11px; letter-spacing: 0.08em; color: rgba(150, 190, 172, 0.6); }
.access-cond-head strong { font-size: 14px; color: rgba(210, 230, 220, 0.92); }
.access-cond-expr { font-size: 12px; color: rgba(180, 206, 194, 0.7); margin: 0; }
.access-age-hint { font-size: 12px; color: rgba(214, 200, 130, 0.85); margin: 2px 0 0; }
.access-age-input, .access-cond-select, .access-add-select, .access-test-select {
  background: rgba(8, 20, 16, 0.8); color: rgba(210, 230, 220, 0.92);
  border: 1px solid rgba(130, 194, 167, 0.28); border-radius: 7px; padding: 6px 10px; font-size: 13px;
}
.access-age-input { width: 84px; }
.access-cond-num { display: flex; gap: 10px; align-items: center; font-size: 12px; color: rgba(180, 206, 194, 0.7); }
.access-cond-actions { display: flex; gap: 8px; }
.access-cond-toggle, .access-cond-del, .access-add-btn, .access-reset, .access-pass-btn {
  font-size: 12px; padding: 6px 12px; border-radius: 7px; cursor: pointer;
  background: rgba(24, 46, 36, 0.6); color: rgba(196, 220, 208, 0.82);
  border: 1px solid rgba(130, 194, 167, 0.2);
}
.access-cond-del { color: rgba(206, 180, 176, 0.8); border-color: rgba(150, 110, 108, 0.4); }
.access-add-row { display: flex; gap: 8px; align-items: center; }
.access-tools { display: flex; gap: 10px; flex-wrap: wrap; }

/* impact */
.access-impact-inner { display: flex; flex-direction: column; gap: 16px; }
.access-counts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.access-counts .c-allow { color: rgba(140, 210, 168, 0.9); }
.access-counts .c-wait { color: rgba(214, 200, 130, 0.9); }
.access-counts .c-deny { color: rgba(210, 150, 146, 0.9); }
.access-impact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.access-impact-row {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px;
  padding: 8px 11px; border-radius: 8px; font-size: 12px;
  background: rgba(14, 30, 24, 0.5); border-left: 3px solid transparent;
}
.access-impact-row strong { font-size: 12px; letter-spacing: 0.05em; }
.access-impact-row .row-label { font-size: 11px; text-align: right; }
.access-impact-row .row-reason { grid-column: 1 / -1; font-size: 11px; color: rgba(180, 204, 192, 0.6); }
.access-impact-row.row-allow { border-left-color: rgba(96, 190, 140, 0.8); }
.access-impact-row.row-allow .row-label { color: rgba(140, 210, 168, 0.9); }
.access-impact-row.row-wait { border-left-color: rgba(214, 200, 130, 0.8); }
.access-impact-row.row-wait .row-label { color: rgba(214, 200, 130, 0.9); }
.access-impact-row.row-deny { border-left-color: rgba(190, 110, 106, 0.8); }
.access-impact-row.row-deny .row-label { color: rgba(210, 150, 146, 0.9); }

.access-test { border-top: 1px solid rgba(130, 194, 167, 0.12); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.access-test-label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: rgba(180, 206, 194, 0.7); }
.access-test-card { padding: 10px 13px; border-radius: 8px; font-size: 13px; }
.access-test-card.ok { background: rgba(30, 60, 46, 0.5); color: rgba(180, 224, 196, 0.92); }
.access-test-card.no { background: rgba(48, 30, 30, 0.5); color: rgba(220, 186, 182, 0.92); }
.access-admin-note, .access-will-note, .access-self-note { font-size: 11px; color: rgba(180, 200, 190, 0.55); margin: 0; }
.access-contradictions { list-style: none; margin: 0; padding: 12px 14px; border: 1px dashed rgba(130, 194, 167, 0.3); border-radius: 9px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: rgba(196, 216, 206, 0.75); }

.access-sub-title { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(150, 200, 176, 0.55); margin: 0 0 8px; }
.access-pass-list, .access-log-list { border-top: 1px solid rgba(130, 194, 167, 0.1); padding-top: 12px; }
.access-pass-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 11px; border-radius: 7px; background: rgba(14, 30, 24, 0.5); font-size: 12px; margin-bottom: 6px; }
.access-pass-row.used, .access-pass-row.expired { opacity: 0.55; }
.access-log-row { font-size: 11px; color: rgba(178, 202, 190, 0.62); margin: 3px 0; }

/* pass panel + confirm overlay */
.access-pass-panel, .access-confirm {
  position: absolute; inset: 0; z-index: 6; display: grid; place-items: center;
  background: rgba(2, 8, 6, 0.72); backdrop-filter: blur(3px); padding: 20px;
}
.access-pass-panel-inner, .access-confirm-card {
  width: min(460px, 94vw); max-height: 86vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(12, 28, 22, 0.98), rgba(8, 20, 15, 0.99));
  border: 1px solid rgba(130, 194, 167, 0.24); border-radius: 14px; padding: 22px 24px;
  display: flex; flex-direction: column; gap: 14px; color: rgba(210, 230, 220, 0.9);
}
.access-pass-panel-inner h3, .access-confirm-card h3 { margin: 0; font-size: 16px; letter-spacing: 0.04em; }
.access-pass-subject { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.access-pass-subject select { background: rgba(8, 20, 16, 0.8); color: inherit; border: 1px solid rgba(130, 194, 167, 0.28); border-radius: 7px; padding: 8px 10px; }
.access-pass-panel-actions, .access-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.access-pass-panel-actions button, .access-confirm-actions button {
  padding: 9px 16px; border-radius: 8px; font-size: 13px; cursor: pointer;
  background: rgba(24, 46, 36, 0.7); color: rgba(200, 224, 210, 0.9); border: 1px solid rgba(130, 194, 167, 0.24);
}
.access-pass-panel-actions .primary, .access-confirm-ok { background: rgba(48, 96, 70, 0.8); color: rgba(214, 244, 224, 0.98); border-color: rgba(150, 214, 180, 0.5); }
.access-confirm-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.access-scope { border: 1px solid rgba(130, 194, 167, 0.14); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.access-scope-opt { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.access-scope-opt.disabled { opacity: 0.5; }
.access-apply-scope, .access-confirm-disc, .access-self-note { font-size: 12px; color: rgba(180, 204, 192, 0.6); margin: 0; }

/* footer */
.access-footer { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 28px; border-top: 1px solid rgba(130, 194, 167, 0.11); }
.access-footer button {
  padding: 10px 18px; border-radius: 9px; font-size: 13px; cursor: pointer;
  background: rgba(24, 46, 36, 0.7); color: rgba(200, 224, 210, 0.9); border: 1px solid rgba(130, 194, 167, 0.24);
}
.access-footer #access-apply { background: rgba(48, 96, 70, 0.8); border-color: rgba(150, 214, 180, 0.5); }
.access-footer #access-apply:disabled { opacity: 0.4; cursor: not-allowed; }
.access-footer-notice { flex: 1; min-width: 180px; font-size: 12px; color: rgba(180, 204, 192, 0.6); margin: 0; }
.access-footer .archive-final-line { width: 100%; font-size: 12px; font-style: italic; color: rgba(160, 190, 176, 0.5); margin: 6px 0 0; }

/* star-map access states (看不见≠进不去：不隐藏节点) */
.node.access-suspended { filter: saturate(0.4) brightness(0.7); }
.node.access-suspended::after { border-color: rgba(150, 92, 92, 0.5) !important; }
.node.access-invite { filter: saturate(0.7); }
.node.access-restricted { filter: brightness(0.88); }

@media (max-width: 900px) {
  .access-tabs { display: flex; }
  .access-layout { grid-template-columns: 1fr; }
  .access-zones, .access-rule-builder, .access-impact { display: none; border: none; }
  .access-console[class] .access-zones.panel-active,
  .access-console[class] .access-rule-builder.panel-active,
  .access-console[class] .access-impact.panel-active { display: block; }
  .access-console .console-footer { padding: 12px 18px 16px; }
}
@media (prefers-reduced-motion: reduce) { .access-console { transition: none; } }

/* ===================================================================
   COMMERCE–50 · 商业控制权 / Commerce Control
   =================================================================== */
.commerce-console {
  position: fixed; inset: 0; z-index: 105;
  display: grid; grid-template-rows: auto auto 1fr auto;
  color: rgba(215, 231, 223, 0.77);
  background: linear-gradient(180deg, rgba(2, 9, 7, 0.98), rgba(1, 6, 5, 0.995));
  opacity: 0; visibility: hidden;
  transition: opacity 480ms ease, visibility 480ms;
}
.commerce-console.open { opacity: 1; visibility: visible; }
.commerce-console .console-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px; padding: 22px 28px 14px; border-bottom: 1px solid rgba(130, 194, 167, 0.11);
}
.commerce-console .console-code { font-size: 12px; letter-spacing: 0.16em; color: rgba(150, 200, 176, 0.62); margin: 0 0 6px; }
.commerce-console .console-subtitle { font-size: 13px; color: rgba(190, 214, 202, 0.6); margin: 6px 0 0; }
.commerce-console .console-access-state { text-align: right; font-size: 12px; color: rgba(180, 210, 195, 0.66); }
.commerce-console .console-access-state strong { display: block; margin-top: 4px; color: rgba(200, 214, 150, 0.9); letter-spacing: 0.08em; }
.commerce-console .console-access-lines { list-style: none; margin: 6px 0 0; padding: 0; opacity: 0.66; }

.commerce-tabs { display: none; gap: 6px; padding: 8px 20px; border-bottom: 1px solid rgba(130, 194, 167, 0.1); }
.commerce-tab {
  flex: 1; padding: 9px 10px; font-size: 13px; border-radius: 8px;
  background: rgba(20, 40, 32, 0.4); color: rgba(190, 214, 202, 0.7);
  border: 1px solid rgba(130, 194, 167, 0.14); cursor: pointer;
}
.commerce-tab.active { background: rgba(40, 78, 60, 0.5); color: rgba(200, 236, 214, 0.95); }

.commerce-layout {
  min-height: 0; display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(440px, 1.72fr) minmax(280px, 0.98fr);
  border-block: 1px solid rgba(130, 194, 167, 0.11);
}
.commerce-products, .commerce-rule-editor, .commerce-impact { min-height: 0; overflow-y: auto; padding: 18px 18px 40px; }
.commerce-products { border-right: 1px solid rgba(130, 194, 167, 0.09); }
.commerce-impact { border-left: 1px solid rgba(130, 194, 167, 0.09); background: rgba(2, 12, 9, 0.4); }
.commerce-console .console-panel-title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(150, 200, 176, 0.6); margin: 0 0 12px; }

/* products */
.commerce-product-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.commerce-product {
  width: 100%; text-align: left; display: flex; flex-direction: column; gap: 3px;
  padding: 11px 13px; border-radius: 9px; cursor: pointer;
  background: rgba(16, 34, 27, 0.5); border: 1px solid rgba(130, 194, 167, 0.12);
  color: rgba(206, 226, 216, 0.82); position: relative;
}
.commerce-product:hover { border-color: rgba(150, 214, 180, 0.32); }
.commerce-product.active { background: rgba(30, 64, 48, 0.62); border-color: rgba(150, 214, 180, 0.5); }
.commerce-product strong { font-size: 13px; letter-spacing: 0.05em; }
.commerce-product .prod-name { font-size: 13px; color: rgba(200, 222, 212, 0.8); }
.commerce-product .prod-meta { font-size: 11px; color: rgba(170, 200, 186, 0.6); }
.commerce-product .prod-meta.small { color: rgba(150, 180, 168, 0.45); }
.commerce-product.prod-available { border-left: 3px solid rgba(96, 168, 132, 0.7); }
.commerce-product.prod-restricted { border-left: 3px solid rgba(190, 176, 110, 0.7); }
.commerce-product.prod-suspended { border-left: 3px solid rgba(150, 92, 92, 0.7); }
.commerce-product.prod-hidden { border-left: 3px solid rgba(110, 120, 116, 0.6); opacity: 0.7; }
.prod-draft-dot { color: rgba(214, 208, 130, 0.95); margin-left: 6px; font-size: 16px; line-height: 1; }

/* editor */
.commerce-editor-inner { display: flex; flex-direction: column; gap: 18px; }
.commerce-section { border: 1px solid rgba(130, 194, 167, 0.13); border-radius: 11px; padding: 14px 15px; display: flex; flex-direction: column; gap: 12px; }
.commerce-sub-title { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(150, 200, 176, 0.6); margin: 0; }
.commerce-mini-title { font-size: 12px; color: rgba(180, 206, 194, 0.7); margin: 4px 0 0; }
.commerce-hint { font-size: 13px; color: rgba(190, 210, 200, 0.6); margin: 0; }
.commerce-draft-notice { font-size: 13px; color: rgba(214, 208, 130, 0.85); padding: 8px 12px; border: 1px dashed rgba(214, 208, 130, 0.4); border-radius: 8px; }
.commerce-admin-note { font-size: 11px; color: rgba(200, 170, 168, 0.75); margin: 0; }

.commerce-status-row, .commerce-mode-row, .commerce-inv-row, .commerce-disc-row, .commerce-factor-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.commerce-status-row { flex-direction: column; border: none; padding: 0; }
.commerce-status-row legend { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(150, 200, 176, 0.6); }
.commerce-status-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; cursor: pointer; }
.commerce-status-opt.on { background: rgba(30, 60, 46, 0.5); }
.commerce-status-opt span strong { display: block; font-size: 13px; color: rgba(206, 228, 216, 0.9); }
.commerce-status-opt span em { display: block; font-style: normal; font-size: 11px; color: rgba(180, 204, 192, 0.55); margin-top: 2px; }
.commerce-mode-opt { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; border: 1px solid rgba(130, 194, 167, 0.12); flex: 1; min-width: 160px; }
.commerce-mode-opt.on { background: rgba(30, 60, 46, 0.5); border-color: rgba(150, 214, 180, 0.4); }
.commerce-mode-opt span strong { display: block; }
.commerce-mode-opt span em { display: block; font-style: normal; font-size: 11px; color: rgba(180, 204, 192, 0.55); }
.commerce-mode-row.small .commerce-mode-opt { min-width: 120px; }
.commerce-inv-opt, .commerce-disc-opt, .commerce-factor { display: flex; gap: 7px; align-items: center; padding: 7px 11px; border-radius: 7px; font-size: 12px; cursor: pointer; background: rgba(16, 34, 27, 0.5); border: 1px solid rgba(130, 194, 167, 0.14); }
.commerce-inv-opt.on, .commerce-disc-opt.on, .commerce-factor.on { background: rgba(30, 60, 46, 0.5); border-color: rgba(150, 214, 180, 0.4); }
.commerce-factor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

.commerce-num-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: rgba(180, 206, 194, 0.7); }
.commerce-price-input, .commerce-qty-input, .commerce-cond-num, .commerce-select {
  background: rgba(8, 20, 16, 0.8); color: rgba(210, 230, 220, 0.92);
  border: 1px solid rgba(130, 194, 167, 0.28); border-radius: 7px; padding: 6px 10px; font-size: 13px;
}
.commerce-price-input, .commerce-qty-input, .commerce-cond-num { width: 84px; }
.commerce-free-note { padding: 10px 12px; border-radius: 8px; background: rgba(20, 44, 44, 0.4); border: 1px solid rgba(140, 190, 190, 0.25); }
.commerce-free-note strong { color: rgba(170, 220, 216, 0.92); font-size: 13px; }
.commerce-free-note p { font-size: 12px; color: rgba(180, 206, 200, 0.65); margin: 4px 0 0; }

.commerce-cond-list { display: flex; flex-direction: column; gap: 8px; }
.commerce-cond { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 9px; background: rgba(14, 30, 24, 0.5); border: 1px solid rgba(130, 194, 167, 0.14); flex-wrap: wrap; }
.commerce-cond-head { display: flex; gap: 7px; align-items: baseline; flex: 1; }
.commerce-cond-if { font-size: 11px; letter-spacing: 0.06em; color: rgba(150, 190, 172, 0.6); }
.commerce-cond-head strong { font-size: 13px; color: rgba(210, 230, 220, 0.9); }
.commerce-cond-del, .commerce-add-btn { font-size: 12px; padding: 6px 12px; border-radius: 7px; cursor: pointer; background: rgba(24, 46, 36, 0.6); color: rgba(196, 220, 208, 0.82); border: 1px solid rgba(130, 194, 167, 0.2); }
.commerce-cond-del { color: rgba(206, 180, 176, 0.8); border-color: rgba(150, 110, 108, 0.4); }
.commerce-add-row { display: flex; gap: 8px; align-items: center; }
.commerce-balance { border-top: 1px solid rgba(130, 194, 167, 0.12); padding-top: 12px; font-size: 12px; color: rgba(190, 210, 200, 0.7); display: flex; flex-direction: column; gap: 5px; }

/* impact */
.commerce-impact-inner { display: flex; flex-direction: column; gap: 16px; }
.commerce-impact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.commerce-impact-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 11px; border-radius: 8px; font-size: 12px; background: rgba(14, 30, 24, 0.5); border-left: 3px solid transparent; }
.commerce-impact-row strong { font-size: 12px; letter-spacing: 0.04em; }
.commerce-impact-row .row-tag { font-size: 11px; text-align: right; }
.commerce-impact-row .row-price { grid-column: 1 / -1; font-size: 12px; color: rgba(190, 210, 200, 0.72); }
.commerce-impact-row .row-reason { grid-column: 1 / -1; font-size: 11px; color: rgba(180, 204, 192, 0.55); }
.commerce-impact-row .row-reason.small { color: rgba(160, 186, 176, 0.45); }
.commerce-impact-row.row-ok { border-left-color: rgba(96, 190, 140, 0.8); }
.commerce-impact-row.row-ok .tag-ok { color: rgba(140, 210, 168, 0.9); }
.commerce-impact-row.row-no { border-left-color: rgba(190, 110, 106, 0.8); }
.commerce-impact-row.row-no .tag-no { color: rgba(210, 150, 146, 0.9); }
.commerce-counts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.commerce-counts .c-down { color: rgba(150, 208, 176, 0.9); }
.commerce-counts .c-up { color: rgba(214, 180, 130, 0.9); }
.commerce-counts .c-lost { color: rgba(210, 150, 146, 0.9); }
.commerce-reaction { font-size: 13px; font-style: italic; color: rgba(190, 206, 200, 0.72); padding: 10px 13px; border-left: 2px solid rgba(130, 194, 167, 0.3); margin: 0; }
.commerce-preview-as { border-top: 1px solid rgba(130, 194, 167, 0.12); padding-top: 12px; }
.commerce-test-label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: rgba(180, 206, 194, 0.7); }
.commerce-notices { list-style: none; margin: 0; padding: 12px 14px; border: 1px dashed rgba(130, 194, 167, 0.3); border-radius: 9px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: rgba(196, 216, 206, 0.75); }
.commerce-log-list { border-top: 1px solid rgba(130, 194, 167, 0.1); padding-top: 12px; }
.commerce-log-row { font-size: 11px; color: rgba(178, 202, 190, 0.62); margin: 3px 0; }

/* market-as-subject preview */
.commerce-preview-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 9px; background: rgba(40, 40, 20, 0.4); border: 1px solid rgba(190, 176, 110, 0.35); }
.commerce-preview-banner p { margin: 0; font-size: 12px; color: rgba(214, 204, 160, 0.85); }
.commerce-preview-exit { font-size: 12px; padding: 6px 12px; border-radius: 7px; cursor: pointer; background: rgba(24, 46, 36, 0.6); color: rgba(196, 220, 208, 0.82); border: 1px solid rgba(130, 194, 167, 0.24); }
.commerce-shelf-preview { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.commerce-shelf-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 9px 12px; border-radius: 8px; background: rgba(14, 30, 24, 0.5); font-size: 12px; align-items: center; }
.commerce-shelf-row .shelf-price { color: rgba(150, 200, 176, 0.85); }

/* confirm overlay */
.commerce-confirm { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(2, 8, 6, 0.72); backdrop-filter: blur(3px); padding: 20px; }
.commerce-confirm-card {
  width: min(480px, 94vw); max-height: 86vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(12, 28, 22, 0.98), rgba(8, 20, 15, 0.99));
  border: 1px solid rgba(130, 194, 167, 0.24); border-radius: 14px; padding: 22px 24px;
  display: flex; flex-direction: column; gap: 14px; color: rgba(210, 230, 220, 0.9);
}
.commerce-confirm-card h3 { margin: 0; font-size: 16px; letter-spacing: 0.04em; }
.commerce-confirm-card p { font-size: 13px; color: rgba(190, 210, 200, 0.7); margin: 0; }
.commerce-confirm-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.commerce-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.commerce-confirm-actions button { padding: 9px 16px; border-radius: 8px; font-size: 13px; cursor: pointer; background: rgba(24, 46, 36, 0.7); color: rgba(200, 224, 210, 0.9); border: 1px solid rgba(130, 194, 167, 0.24); }
.commerce-confirm-ok { background: rgba(48, 96, 70, 0.8); color: rgba(214, 244, 224, 0.98); border-color: rgba(150, 214, 180, 0.5); }
.commerce-confirm-disc { font-size: 12px; color: rgba(180, 204, 192, 0.6); }

/* footer */
.commerce-footer { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 28px; border-top: 1px solid rgba(130, 194, 167, 0.11); }
.commerce-footer button { padding: 10px 18px; border-radius: 9px; font-size: 13px; cursor: pointer; background: rgba(24, 46, 36, 0.7); color: rgba(200, 224, 210, 0.9); border: 1px solid rgba(130, 194, 167, 0.24); }
.commerce-footer #commerce-apply { background: rgba(48, 96, 70, 0.8); border-color: rgba(150, 214, 180, 0.5); }
.commerce-footer #commerce-apply:disabled { opacity: 0.4; cursor: not-allowed; }
.commerce-footer-notice { flex: 1; min-width: 180px; font-size: 12px; color: rgba(180, 204, 192, 0.6); margin: 0; }
.commerce-footer .archive-final-line { width: 100%; font-size: 12px; font-style: italic; color: rgba(160, 190, 176, 0.5); margin: 6px 0 0; }

/* night market: blocked item state (COMMERCE links) */
.market-item-blocked { opacity: 0.5; filter: saturate(0.5); }
.market-item-blocked .market-item-price { color: rgba(200, 150, 146, 0.8); }

@media (max-width: 900px) {
  .commerce-tabs { display: flex; }
  .commerce-layout { grid-template-columns: 1fr; }
  .commerce-products, .commerce-rule-editor, .commerce-impact { display: none; border: none; }
  .commerce-console[class] .commerce-products.panel-active,
  .commerce-console[class] .commerce-rule-editor.panel-active,
  .commerce-console[class] .commerce-impact.panel-active { display: block; }
  .commerce-console .console-footer { padding: 12px 18px 16px; }
}
@media (prefers-reduced-motion: reduce) { .commerce-console { transition: none; } }


/* ================= LABOUR–55 · 劳动分配权 ================= */
.labour-console {
  position: fixed; inset: 0; z-index: 105;
  display: grid; grid-template-rows: auto auto 1fr auto;
  color: rgba(212, 227, 220, 0.78);
  background: linear-gradient(180deg, rgba(3, 11, 8, 0.985), rgba(1, 6, 5, 0.995));
  opacity: 0; visibility: hidden;
  transition: opacity 420ms ease, visibility 420ms;
}
.labour-console.open { opacity: 1; visibility: visible; }
.labour-console .console-header {
  display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 16px 24px;
  padding: 22px 30px 14px; border-bottom: 1px solid rgba(130, 194, 167, 0.11);
}
.labour-console .console-code { font-size: 12px; letter-spacing: 0.16em; color: rgba(148, 196, 172, 0.6); margin: 0 0 6px; }
.labour-console h2 { margin: 0; font-size: 20px; letter-spacing: 0.06em; }
.labour-console .console-subtitle { font-size: 13px; color: rgba(188, 212, 200, 0.62); margin: 6px 0 0; font-style: italic; }
.labour-return {
  grid-column: 2; grid-row: 1; align-self: start; white-space: nowrap;
  padding: 9px 16px; border-radius: 8px; font-size: 12px; letter-spacing: 0.06em; cursor: pointer;
  background: rgba(22, 44, 34, 0.66); color: rgba(200, 224, 210, 0.88); border: 1px solid rgba(130, 194, 167, 0.24);
}
.labour-return:hover { border-color: rgba(150, 214, 180, 0.5); }

/* status bar */
.labour-statusbar {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 20px 26px; margin-top: 4px;
}
.labour-stat { display: flex; flex-direction: column; gap: 2px; }
.labour-stat em { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(150, 190, 172, 0.5); font-style: normal; }
.labour-stat strong { font-size: 15px; color: rgba(206, 228, 216, 0.92); letter-spacing: 0.04em; }

/* tabs (mobile) */
.labour-tabs { display: none; gap: 6px; padding: 8px 20px; border-bottom: 1px solid rgba(130, 194, 167, 0.1); }
.labour-tab { flex: 1; padding: 9px 10px; font-size: 13px; border-radius: 8px; cursor: pointer;
  background: rgba(20, 40, 32, 0.4); color: rgba(190, 214, 202, 0.7); border: 1px solid rgba(130, 194, 167, 0.14); }
.labour-tab.active { background: rgba(40, 78, 60, 0.5); color: rgba(200, 236, 214, 0.95); }

/* layout */
.labour-layout {
  min-height: 0; display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(460px, 2fr) minmax(250px, 0.9fr);
  border-block: 1px solid rgba(130, 194, 167, 0.11);
}
.labour-subjects, .labour-track, .labour-tasks { min-height: 0; overflow-y: auto; padding: 18px 18px 40px; }
.labour-subjects { border-right: 1px solid rgba(130, 194, 167, 0.09); }
.labour-tasks { border-left: 1px solid rgba(130, 194, 167, 0.09); background: rgba(2, 12, 9, 0.4); }
.labour-console .console-panel-title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(150, 200, 176, 0.6); margin: 0 0 12px; }

/* left: subjects */
.labour-subject-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.labour-subject { border-radius: 10px; border: 1px solid rgba(130, 194, 167, 0.12); background: rgba(14, 30, 24, 0.5); opacity: var(--labour-fade, 1); transition: opacity 300ms ease, border-color 200ms; }
.labour-subject.active { border-color: rgba(150, 214, 180, 0.5); background: rgba(26, 54, 42, 0.6); }
.labour-subject-full { border-style: dashed; }
.labour-subject-btn { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: none; border: none; cursor: pointer; color: inherit; }
.labour-subject-id { font-size: 14px; letter-spacing: 0.08em; color: rgba(206, 226, 216, 0.9); }
.labour-subject-full .labour-subject-lines, .labour-subject-full .labour-subject-role em { opacity: 0.4; }
.labour-subject-role { font-size: 12px; color: rgba(178, 206, 192, 0.7); cursor: pointer; }
.labour-subject-role em { font-style: normal; color: rgba(198, 220, 210, 0.9); border-bottom: 1px dashed rgba(150, 200, 176, 0.4); margin-left: 4px; }
.labour-subject-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; font-size: 11px; color: rgba(168, 198, 184, 0.62); }
.labour-subject-lines b { color: rgba(200, 222, 212, 0.85); font-weight: 500; margin-left: 3px; }
.labour-subject-note { margin: 0 14px 10px; font-size: 11px; font-style: italic; color: rgba(160, 190, 176, 0.5); }
.labour-rename-warn { margin: 0 14px 10px; font-size: 11px; color: rgba(206, 160, 150, 0.82); }

/* center: track */
.labour-track-head { margin-bottom: 12px; }
.labour-track-hours { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 0.06em; color: rgba(150, 190, 172, 0.4); margin-top: 6px; }
.labour-track-row { margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid rgba(130, 194, 167, 0.07); opacity: var(--labour-fade, 1); transition: opacity 320ms ease; }
.labour-track-meta { margin-bottom: 6px; }
.labour-track-name { font-size: 12px; letter-spacing: 0.06em; color: rgba(200, 222, 212, 0.86); }
.labour-track-name em { font-style: normal; margin-left: 8px; font-size: 11px; color: rgba(160, 194, 178, 0.6); }
.labour-track-name-min { color: rgba(160, 190, 176, 0.5); letter-spacing: 0.18em; }
.labour-lane {
  position: relative; height: 34px; border-radius: 6px;
  background: rgba(8, 20, 15, 0.7); border: 1px solid rgba(130, 194, 167, 0.1);
  overflow: hidden;
}
.labour-lane.labour-conflict { animation: labourShake 0.4s ease; }
@keyframes labourShake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-4px);} 75%{transform:translateX(4px);} }
.labour-lane-beyond { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(60,70,66,0.12) 0 4px, transparent 4px 8px); pointer-events: none; }

.labour-seg {
  position: absolute; top: 3px; bottom: 3px; border-radius: 4px; cursor: grab;
  display: flex; align-items: center; overflow: hidden; touch-action: none;
  border: 1px solid rgba(130, 194, 167, 0.3);
}
.labour-seg:focus-visible { outline: 2px solid rgba(150, 214, 180, 0.7); outline-offset: 1px; }
.labour-seg-dragging { cursor: grabbing; z-index: 3; box-shadow: 0 0 0 1px rgba(150,214,180,0.5); }
.labour-seg-ghost { opacity: 0.28; pointer-events: none; }
.labour-seg-label { flex: 1; padding: 0 6px; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; color: rgba(214, 232, 224, 0.9); }
.labour-seg-label em { font-style: normal; margin-left: 5px; opacity: 0.6; }
.labour-seg-grip { width: 7px; align-self: stretch; cursor: ew-resize; flex: 0 0 auto; }
.labour-seg-grip:hover { background: rgba(150, 214, 180, 0.3); }
/* segment textures (not colour-only) */
.labour-seg-work { background: rgba(38, 74, 56, 0.75); }
.labour-seg-play { background: rgba(34, 66, 62, 0.7); animation: labourPulse 2.6s ease-in-out infinite; }
@keyframes labourPulse { 0%,100%{opacity:0.72;} 50%{opacity:1;} }
.labour-seg-wait { background: rgba(20, 40, 32, 0.6); border-style: dashed; }
.labour-seg-wait .labour-seg-label { background: repeating-linear-gradient(90deg, rgba(150,190,172,0.14) 0 3px, transparent 3px 9px); }
.labour-seg-rest { background: rgba(24, 44, 38, 0.28); border-color: rgba(130,194,167,0.14); }
.labour-seg-rest .labour-seg-label { color: rgba(180, 206, 194, 0.5); }
.labour-seg-unrecorded { background: rgba(4, 10, 8, 0.85); border-color: rgba(80, 100, 92, 0.3); border-style: dotted; }
.labour-seg-unrecorded .labour-seg-label { color: rgba(150, 178, 166, 0.55); }
.labour-seg-forced { background: rgba(66, 26, 26, 0.72); border-color: rgba(150, 92, 92, 0.55); background-image: repeating-linear-gradient(45deg, rgba(150,80,80,0.28) 0 5px, transparent 5px 10px); }
.labour-seg-forced .labour-seg-label { color: rgba(232, 200, 196, 0.92); }

.labour-feedback { margin: 6px 0 0; font-size: 11px; font-style: italic; color: rgba(168, 198, 184, 0.6); }
.labour-feedback-high { color: rgba(200, 200, 150, 0.72); }
.labour-feedback-severe { color: rgba(210, 158, 150, 0.85); }
.labour-feedback-full { color: rgba(160, 186, 174, 0.5); }
.labour-track-hint { margin: 10px 0 0; font-size: 11px; color: rgba(150, 186, 170, 0.45); }
.labour-occupy-hint {
  position: sticky; bottom: 8px; margin: 8px auto 0; max-width: 320px; text-align: center;
  padding: 7px 12px; font-size: 12px; border-radius: 8px; opacity: 0; transition: opacity 200ms;
  background: rgba(40, 26, 26, 0.9); color: rgba(228, 196, 192, 0.94); border: 1px solid rgba(150, 92, 92, 0.4);
}
.labour-occupy-hint.active { opacity: 1; }

/* right: tasks */
.labour-task-list { display: flex; flex-direction: column; gap: 9px; }
.labour-task {
  display: flex; flex-direction: column; gap: 3px; padding: 11px 13px; border-radius: 9px; cursor: grab;
  background: rgba(16, 34, 27, 0.5); border: 1px solid rgba(130, 194, 167, 0.14); color: rgba(206, 226, 216, 0.82);
}
.labour-task:hover { border-color: rgba(150, 214, 180, 0.35); }
.labour-task:focus-visible { outline: 2px solid rgba(150,214,180,0.6); }
.labour-task-name { font-size: 12px; letter-spacing: 0.04em; color: rgba(206, 226, 216, 0.9); }
.labour-task-desc { font-size: 11px; color: rgba(168, 198, 184, 0.6); }
.labour-task-suggest { font-size: 11px; color: rgba(150, 190, 172, 0.55); }
.labour-task-suggest b { color: rgba(198, 220, 210, 0.85); font-weight: 500; margin-left: 4px; }
.labour-task-unrecorded { border-style: dotted; background: rgba(6, 14, 11, 0.7); }
.labour-tasks-note { margin: 14px 0 0; font-size: 11px; font-style: italic; color: rgba(160, 190, 176, 0.5); }

/* footer + metrics */
.labour-footer { display: flex; flex-direction: column; gap: 12px; padding: 14px 30px 18px; border-top: 1px solid rgba(130, 194, 167, 0.12); background: rgba(2, 10, 8, 0.6); }
.labour-metrics-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.labour-metric { display: flex; flex-direction: column; gap: 4px; }
.labour-metric-label { font-size: 10px; letter-spacing: 0.08em; color: rgba(150, 190, 172, 0.55); }
.labour-metric-track { height: 5px; border-radius: 3px; background: rgba(20, 40, 32, 0.7); overflow: hidden; }
.labour-metric-fill { display: block; height: 100%; border-radius: 3px; transition: width 400ms ease; }
.labour-metric-output .labour-metric-fill { background: rgba(96, 168, 132, 0.8); }
.labour-metric-stability .labour-metric-fill { background: rgba(130, 180, 190, 0.8); }
.labour-metric-life .labour-metric-fill { background: rgba(180, 190, 130, 0.8); }
.labour-metric-val { font-size: 12px; color: rgba(200, 222, 212, 0.85); }
.labour-metric-note { margin: 0; font-size: 11px; font-style: italic; color: rgba(160, 190, 176, 0.5); }
.labour-footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.labour-footer-actions button { padding: 10px 18px; border-radius: 9px; font-size: 13px; cursor: pointer; background: rgba(24, 46, 36, 0.7); color: rgba(200, 224, 210, 0.9); border: 1px solid rgba(130, 194, 167, 0.24); }
.labour-commit { background: rgba(72, 40, 40, 0.8) !important; border-color: rgba(160, 100, 100, 0.5) !important; }
.labour-footer-actions button:disabled { opacity: 0.4; cursor: not-allowed; }
.labour-footer-notice { flex: 1; min-width: 180px; font-size: 12px; color: rgba(180, 204, 192, 0.6); margin: 0; }
.labour-footer .archive-final-line { width: 100%; font-size: 12px; font-style: italic; color: rgba(160, 190, 176, 0.5); margin: 4px 0 0; }

/* overlays */
.labour-overlay { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; background: rgba(2, 8, 6, 0.7); backdrop-filter: blur(2px); }
.labour-overlay-card { width: min(420px, 90%); padding: 22px 24px; border-radius: 12px; background: rgba(10, 22, 17, 0.98); border: 1px solid rgba(130, 194, 167, 0.24); }
.labour-overlay-title { margin: 0 0 14px; font-size: 15px; letter-spacing: 0.04em; color: rgba(206, 228, 216, 0.92); }
.labour-overlay-options { display: flex; flex-direction: column; gap: 8px; }
.labour-overlay-opt { padding: 11px 14px; border-radius: 8px; font-size: 13px; text-align: left; cursor: pointer; background: rgba(20, 40, 32, 0.6); color: rgba(202, 224, 212, 0.88); border: 1px solid rgba(130, 194, 167, 0.2); }
.labour-overlay-opt:hover { border-color: rgba(150, 214, 180, 0.45); }
.labour-exec { background: rgba(72, 40, 40, 0.8); border-color: rgba(160, 100, 100, 0.5); }
.labour-overlay-cancel { margin-top: 12px; width: 100%; padding: 9px; border-radius: 8px; font-size: 12px; cursor: pointer; background: none; color: rgba(180, 204, 192, 0.6); border: 1px solid rgba(130, 194, 167, 0.16); }
.labour-overlay-hint { margin: 10px 0 0; font-size: 11px; font-style: italic; color: rgba(160, 190, 176, 0.55); }
.labour-calc-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.labour-calc-steps li { font-size: 12px; letter-spacing: 0.08em; color: rgba(150, 180, 168, 0.35); transition: color 300ms; }
.labour-calc-steps li.done { color: rgba(198, 220, 210, 0.9); }
.labour-report { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.labour-report li { font-size: 13px; color: rgba(200, 222, 212, 0.82); }
.labour-report-final { color: rgba(206, 160, 150, 0.9); font-style: italic; }
.labour-toast { position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(10px); padding: 10px 18px; border-radius: 9px; font-size: 13px; opacity: 0; transition: opacity 300ms, transform 300ms; background: rgba(40, 26, 26, 0.95); color: rgba(228, 200, 196, 0.94); border: 1px solid rgba(150, 92, 92, 0.4); z-index: 11; }
.labour-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* labour node: low-frequency dark-red glow when unlocked */
.console-node.console-labour.labour-armed .node-core { box-shadow: 0 0 8px rgba(150, 70, 70, 0.5); animation: labourArmed 3.4s ease-in-out infinite; }
@keyframes labourArmed { 0%,100%{box-shadow:0 0 6px rgba(150,70,70,0.32);} 50%{box-shadow:0 0 12px rgba(170,80,80,0.6);} }

@media (max-width: 900px) {
  .labour-tabs { display: flex; }
  .labour-layout { grid-template-columns: 1fr; }
  .labour-subjects, .labour-track, .labour-tasks { display: none; border: none; }
  .labour-console[class] .labour-subjects.panel-active,
  .labour-console[class] .labour-track.panel-active,
  .labour-console[class] .labour-tasks.panel-active { display: block; }
  .labour-metrics { display: none; }
  .labour-metrics.panel-active { display: block; }
  .labour-console .console-header { grid-template-columns: 1fr; }
  .labour-return { grid-column: 1; grid-row: auto; justify-self: start; }
  .labour-metrics-bars { grid-template-columns: 1fr; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .labour-console, .labour-seg-play, .labour-metric-fill, .console-labour.labour-armed .node-core { transition: none; animation: none; }
}



/* ================= RECOVERY–60 · 恢复权限 ================= */
.recovery-console {
  position: fixed; inset: 0; z-index: 105;
  display: grid; grid-template-rows: auto auto 1fr auto;
  color: rgba(198, 214, 206, 0.76);
  background: linear-gradient(180deg, rgba(3, 10, 8, 0.985), rgba(1, 5, 4, 0.995));
  opacity: 0; visibility: hidden;
  transition: opacity 460ms ease, visibility 460ms;
}
.recovery-console.open { opacity: 1; visibility: visible; }

/* 扫描开场 */
.recovery-intro { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: rgba(1, 5, 4, 0.98); opacity: 0; pointer-events: none; transition: opacity 500ms ease; }
.recovery-intro.active { opacity: 1; }
.recovery-intro-line { font-size: 15px; letter-spacing: 0.12em; color: rgba(150, 180, 168, 0.7); font-style: italic; }
.recovery-console.scanning .recovery-layout::before {
  content: ""; position: absolute; inset: 0; z-index: 18; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(120, 170, 150, 0.08), transparent);
  animation: recoveryScan 2.4s ease-out 1;
}
@keyframes recoveryScan { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.recovery-console .console-header {
  display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 16px 24px;
  padding: 22px 30px 14px; border-bottom: 1px solid rgba(120, 176, 152, 0.11);
}
.recovery-console .console-code { font-size: 12px; letter-spacing: 0.16em; color: rgba(140, 180, 160, 0.58); margin: 0 0 6px; }
.recovery-console h2 { margin: 0; font-size: 20px; letter-spacing: 0.06em; }
.recovery-console .console-subtitle { font-size: 13px; color: rgba(176, 198, 186, 0.6); margin: 6px 0 0; font-style: italic; }
.recovery-return { grid-column: 2; grid-row: 1; align-self: start; white-space: nowrap; padding: 9px 16px; border-radius: 8px; font-size: 12px; letter-spacing: 0.06em; cursor: pointer; background: rgba(20, 40, 32, 0.66); color: rgba(196, 216, 204, 0.88); border: 1px solid rgba(120, 176, 152, 0.24); }
.recovery-return:hover { border-color: rgba(140, 190, 166, 0.5); }
.recovery-return:focus-visible { outline: 2px solid rgba(140,190,166,0.6); }

.recovery-statusbar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: 4px; }
.recovery-stat { display: flex; flex-direction: column; gap: 2px; }
.recovery-stat em { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(140, 176, 160, 0.5); font-style: normal; }
.recovery-stat strong { font-size: 15px; color: rgba(198, 216, 206, 0.9); letter-spacing: 0.04em; }

.recovery-tabs { display: none; gap: 6px; padding: 8px 20px; border-bottom: 1px solid rgba(120, 176, 152, 0.1); }
.recovery-tab { flex: 1; padding: 9px 10px; font-size: 13px; border-radius: 8px; cursor: pointer; background: rgba(18, 36, 30, 0.4); color: rgba(180, 204, 192, 0.7); border: 1px solid rgba(120, 176, 152, 0.14); }
.recovery-tab.active { background: rgba(36, 68, 54, 0.5); color: rgba(196, 224, 208, 0.95); }

.recovery-layout { position: relative; min-height: 0; display: grid; grid-template-columns: minmax(240px, 0.9fr) minmax(440px, 1.9fr) minmax(260px, 1fr); border-block: 1px solid rgba(120, 176, 152, 0.11); }
.recovery-subjects, .recovery-center, .recovery-preview { min-height: 0; overflow-y: auto; padding: 18px 18px 40px; }
.recovery-subjects { border-right: 1px solid rgba(120, 176, 152, 0.09); }
.recovery-preview { border-left: 1px solid rgba(120, 176, 152, 0.09); background: rgba(2, 10, 8, 0.4); }
.recovery-console .console-panel-title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(140, 180, 160, 0.6); margin: 0 0 12px; }
.recovery-hint { font-size: 12px; color: rgba(150, 180, 168, 0.5); }

/* left: subjects with status textures */
.recovery-subject-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.recovery-subject { border-radius: 10px; border: 1px solid rgba(120, 176, 152, 0.12); background: rgba(12, 26, 21, 0.5); position: relative; }
.recovery-subject.active { border-color: rgba(140, 190, 166, 0.5); background: rgba(22, 46, 36, 0.6); }
.recovery-subject-done { opacity: 0.72; }
.recovery-subject-btn { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: none; border: none; cursor: pointer; color: inherit; }
.recovery-subject-btn:focus-visible { outline: 2px solid rgba(140,190,166,0.6); }
.recovery-subject-id { font-size: 14px; letter-spacing: 0.08em; color: rgba(198, 216, 206, 0.9); }
/* 语言损坏：有限度的字符抖动，文字仍可读 */
.recovery-lang { animation: recoveryLang 4s steps(1) infinite; }
@keyframes recoveryLang { 0%,88%,100% { letter-spacing: 0.08em; } 90% { letter-spacing: 0.22em; opacity: 0.7; } 94% { letter-spacing: 0.05em; } }
.recovery-subject-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; font-size: 11px; color: rgba(158, 188, 174, 0.62); }
.recovery-subject-lines b { color: rgba(192, 214, 202, 0.85); font-weight: 500; margin-left: 3px; }
/* status outline strip */
.recovery-subject-outline { display: block; height: 3px; border-radius: 2px; margin: 2px 0; }
.recovery-status-suspended .recovery-subject-outline { background: repeating-linear-gradient(90deg, rgba(130,160,180,0.6) 0 6px, transparent 6px 10px); }
.recovery-status-suspended .recovery-subject-id { color: rgba(168, 190, 206, 0.9); }
.recovery-status-deleted .recovery-subject-outline { background: linear-gradient(90deg, rgba(150,90,90,0.5) 0 20%, transparent 20% 42%, rgba(150,90,90,0.5) 42% 60%, transparent 60% 80%, rgba(150,90,90,0.5) 80%); }
.recovery-status-corrupted .recovery-subject-outline { background: rgba(150,180,164,0.4); transform: skewX(-8deg); }
.recovery-status-incomplete .recovery-subject-outline { background: linear-gradient(90deg, rgba(150,180,120,0.6), transparent 60%); animation: recoveryGrow 3.6s ease-in-out infinite; }
@keyframes recoveryGrow { 0%,100% { width: 54%; } 50% { width: 74%; } }
.recovery-status-language .recovery-subject-outline { background: repeating-linear-gradient(90deg, rgba(150,90,90,0.5) 0 3px, transparent 3px 5px, rgba(150,90,90,0.3) 5px 7px, transparent 7px 12px); }
.recovery-subject-tag { display: inline-block; font-size: 10px; letter-spacing: 0.06em; color: rgba(150, 190, 166, 0.7); border: 1px solid rgba(120,176,152,0.24); border-radius: 5px; padding: 2px 6px; margin-top: 2px; }

/* center: fragments */
.recovery-conflict-note { font-size: 12px; color: rgba(206, 160, 150, 0.85); margin: 0 0 12px; }
.recovery-fragment-list { display: flex; flex-direction: column; gap: 9px; }
.recovery-fragment { display: flex; gap: 10px; padding: 11px 13px; border-radius: 9px; cursor: pointer; background: rgba(14, 30, 24, 0.5); border: 1px solid rgba(120, 176, 152, 0.14); align-items: flex-start; }
.recovery-fragment.selected { border-color: rgba(140, 190, 166, 0.4); background: rgba(22, 46, 36, 0.55); }
.recovery-fragment-conflict { border-left: 3px solid rgba(190, 176, 110, 0.7); }
.recovery-fragment-forced { border-left: 3px solid rgba(150, 92, 92, 0.7); }
.recovery-fragment-corrupted { background-image: repeating-linear-gradient(45deg, rgba(80,90,86,0.08) 0 4px, transparent 4px 8px); }
.recovery-fragment-cb { margin-top: 3px; accent-color: rgba(120,180,150,0.9); width: 15px; height: 15px; flex: 0 0 auto; }
.recovery-fragment-body { flex: 1; min-width: 0; }
.recovery-frag-head { display: flex; justify-content: space-between; gap: 8px; }
.recovery-frag-id { font-size: 11px; letter-spacing: 0.08em; color: rgba(150, 186, 168, 0.72); }
.recovery-frag-type { font-size: 10px; color: rgba(150, 180, 166, 0.55); }
.recovery-frag-content { font-size: 13px; color: rgba(200, 218, 208, 0.86); margin: 5px 0; }
.recovery-frag-forced-text { color: rgba(214, 184, 180, 0.86); font-style: italic; }
.recovery-frag-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 10px; color: rgba(150, 180, 166, 0.55); }
.recovery-frag-tags { margin-top: 6px; display: flex; gap: 6px; }
.recovery-frag-tag { font-size: 9px; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 4px; }
.recovery-frag-tag.conflict { color: rgba(210,196,140,0.9); border: 1px solid rgba(190,176,110,0.4); }
.recovery-frag-tag.others { color: rgba(210,170,164,0.9); border: 1px solid rgba(170,110,110,0.4); }
.recovery-frag-tag.corrupted { color: rgba(170,180,176,0.7); border: 1px solid rgba(110,130,124,0.4); }
.recovery-friction { margin: 12px 0 0; font-size: 12px; color: rgba(206, 178, 150, 0.9); opacity: 0; transition: opacity 300ms; }
.recovery-friction.show { opacity: 1; }

/* versions */
.recovery-version-title { margin-top: 24px; }
.recovery-version-list { display: flex; flex-direction: column; gap: 8px; }
.recovery-version { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 11px 13px; border-radius: 9px; cursor: pointer; background: rgba(16, 32, 26, 0.5); border: 1px solid rgba(120, 176, 152, 0.16); color: rgba(196, 216, 204, 0.82); }
.recovery-version.selected { border-color: rgba(140, 190, 166, 0.5); background: rgba(26, 52, 40, 0.6); }
.recovery-version:focus-visible { outline: 2px solid rgba(140,190,166,0.6); }
.recovery-version-name { font-size: 12px; letter-spacing: 0.04em; color: rgba(200, 218, 208, 0.9); }
.recovery-version-desc { font-size: 11px; color: rgba(158, 188, 174, 0.62); }
.recovery-version-metrics { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.recovery-vmetric { display: grid; grid-template-columns: 130px 1fr 40px; align-items: center; gap: 10px; font-size: 11px; color: rgba(170, 198, 184, 0.7); }
.recovery-vmetric-track { height: 4px; border-radius: 2px; background: rgba(20, 40, 32, 0.7); overflow: hidden; }
.recovery-vmetric-fill { display: block; height: 100%; background: rgba(120, 176, 150, 0.75); border-radius: 2px; transition: width 400ms ease; }
.recovery-vmetric.danger .recovery-vmetric-fill { background: rgba(170, 100, 100, 0.8); }
.recovery-vmetric b { text-align: right; color: rgba(196, 216, 204, 0.85); font-weight: 500; }

/* preview: outline reconstructed from fragments */
.recovery-outline { position: relative; height: 150px; margin: 6px 0 14px; border: 1px solid rgba(120, 176, 152, 0.12); border-radius: 10px; overflow: hidden; background: rgba(4, 12, 9, 0.6); }
.recovery-outline-shape { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: 74px; height: 104px; border-radius: 46% 46% 42% 42%; border: 1px solid rgba(150, 190, 170, calc(0.2 + 0.6 * var(--recovery-fill, 0.5))); opacity: calc(0.2 + 0.8 * var(--recovery-fill, 0.5)); clip-path: inset(calc((1 - var(--recovery-fill, 0.5)) * 40%) 0 0 0); }
.recovery-outline.has-identity .recovery-outline-shape { border-radius: 44% 44% 40% 40% / 52% 52% 48% 48%; }
.recovery-outline-shape.r2 { width: 54px; height: 78px; opacity: calc(0.12 + 0.4 * var(--recovery-fill, 0.5)); }
.recovery-outline-shape.r3 { width: 92px; height: 122px; opacity: calc(0.06 + 0.2 * var(--recovery-fill, 0.5)); }
.recovery-outline.has-intent .recovery-outline-shape { animation: recoveryBreathe 4.5s ease-in-out infinite; }
@keyframes recoveryBreathe { 0%,100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.03); } }
.recovery-outline-corrupted .recovery-outline-shape { clip-path: polygon(0 0, 100% 0, 100% 38%, 0 42%, 0 56%, 100% 52%, 100% 100%, 0 100%); }
.recovery-outline-corrupted .recovery-outline-shape.r2 { transform: translate(-48%, -52%) skewX(-6deg); border-color: rgba(170, 110, 110, 0.5); }

.recovery-slider-wrap { margin-bottom: 12px; }
.recovery-slider-wrap label { display: block; font-size: 11px; letter-spacing: 0.08em; color: rgba(150, 186, 168, 0.6); margin-bottom: 6px; }
.recovery-slider { width: 100%; accent-color: rgba(120,180,150,0.9); }
.recovery-slider-steps { display: flex; gap: 6px; margin-top: 8px; }
.recovery-step-btn { flex: 1; padding: 6px; font-size: 11px; border-radius: 6px; cursor: pointer; background: rgba(20, 40, 32, 0.5); color: rgba(180, 204, 192, 0.8); border: 1px solid rgba(120, 176, 152, 0.2); }
.recovery-step-btn:hover { border-color: rgba(140,190,166,0.4); }
.recovery-confidence { margin-top: 6px; padding: 12px; border-radius: 9px; background: rgba(10, 24, 19, 0.6); border: 1px solid rgba(120, 176, 152, 0.14); }
.recovery-confidence-val { display: flex; justify-content: space-between; align-items: baseline; }
.recovery-confidence-val span { font-size: 11px; letter-spacing: 0.06em; color: rgba(150, 186, 168, 0.6); }
.recovery-confidence-val strong { font-size: 22px; color: rgba(196, 218, 206, 0.92); }
.recovery-continuity { margin: 6px 0 0; font-size: 11px; letter-spacing: 0.06em; color: rgba(200, 160, 150, 0.8); }
.recovery-preview-note { margin: 12px 0 0; font-size: 11px; font-style: italic; color: rgba(160, 190, 174, 0.62); }
.recovery-preview-note.danger { color: rgba(206, 168, 160, 0.85); }

/* footer + methods (LEAVE has equal visual weight) */
.recovery-footer { display: flex; flex-direction: column; gap: 12px; padding: 14px 30px 18px; border-top: 1px solid rgba(120, 176, 152, 0.12); background: rgba(2, 9, 7, 0.6); }
.recovery-methods-title { margin: 0 0 8px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(140, 180, 160, 0.55); }
.recovery-method-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.recovery-method { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 11px 12px; border-radius: 9px; cursor: pointer; background: rgba(16, 32, 26, 0.55); border: 1px solid rgba(120, 176, 152, 0.18); color: rgba(194, 214, 202, 0.82); }
.recovery-method:hover { border-color: rgba(140, 190, 166, 0.4); }
.recovery-method:focus-visible { outline: 2px solid rgba(140,190,166,0.6); }
.recovery-method.selected { border-color: rgba(140, 190, 166, 0.6); background: rgba(26, 52, 40, 0.62); }
.recovery-method-leave.selected { border-color: rgba(150, 120, 120, 0.6); background: rgba(40, 28, 28, 0.55); }
.recovery-method-code { font-size: 10px; letter-spacing: 0.08em; color: rgba(150, 186, 168, 0.6); }
.recovery-method-name { font-size: 13px; color: rgba(200, 218, 208, 0.9); }
.recovery-method-desc { font-size: 11px; color: rgba(158, 188, 174, 0.6); }
.recovery-footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.recovery-footer-notice { flex: 1; min-width: 180px; font-size: 12px; color: rgba(200, 178, 160, 0.7); margin: 0; }
.recovery-initiate { padding: 10px 20px; border-radius: 9px; font-size: 13px; cursor: pointer; background: rgba(64, 38, 38, 0.8); color: rgba(214, 196, 192, 0.92); border: 1px solid rgba(150, 100, 100, 0.5); }
.recovery-initiate:hover { border-color: rgba(180, 120, 120, 0.7); }
.recovery-initiate:disabled { opacity: 0.4; cursor: not-allowed; }
.recovery-footer .archive-final-line { width: 100%; font-size: 12px; font-style: italic; color: rgba(150, 180, 166, 0.5); margin: 4px 0 0; }

/* overlays */
.recovery-overlay { position: absolute; inset: 0; z-index: 22; display: flex; align-items: center; justify-content: center; background: rgba(1, 6, 4, 0.72); backdrop-filter: blur(2px); }
.recovery-overlay-card { width: min(440px, 90%); padding: 24px; border-radius: 12px; background: rgba(8, 18, 14, 0.98); border: 1px solid rgba(120, 176, 152, 0.24); }
.recovery-overlay-title { margin: 0 0 14px; font-size: 15px; letter-spacing: 0.04em; color: rgba(198, 218, 206, 0.92); }
.recovery-process-steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.recovery-process-steps li { font-size: 12px; letter-spacing: 0.06em; color: rgba(140, 170, 158, 0.35); transition: color 320ms; }
.recovery-process-steps li.done { color: rgba(194, 216, 204, 0.9); }
.recovery-result-line { font-size: 13px; margin: 0 0 12px; }
.recovery-result-line.danger { color: rgba(206, 160, 150, 0.9); }
.recovery-result-first { font-size: 14px; font-style: italic; color: rgba(196, 214, 202, 0.86); margin: 12px 0 16px; padding: 10px 12px; border-left: 2px solid rgba(120, 176, 152, 0.4); background: rgba(14, 28, 22, 0.5); }
.recovery-overlay-options { display: flex; flex-direction: column; gap: 8px; }
.recovery-overlay-opt { padding: 11px 14px; border-radius: 8px; font-size: 13px; text-align: left; cursor: pointer; background: rgba(20, 40, 32, 0.6); color: rgba(200, 220, 208, 0.88); border: 1px solid rgba(120, 176, 152, 0.2); }
.recovery-overlay-opt:hover { border-color: rgba(140, 190, 166, 0.45); }
.recovery-return-subject { background: rgba(30, 60, 46, 0.7); border-color: rgba(140, 190, 166, 0.45); }
.recovery-abort { background: rgba(60, 34, 34, 0.7); border-color: rgba(150, 100, 100, 0.45); }
.recovery-overlay-cancel { margin-top: 12px; width: 100%; padding: 9px; border-radius: 8px; font-size: 12px; cursor: pointer; background: none; color: rgba(180, 204, 192, 0.6); border: 1px solid rgba(120, 176, 152, 0.16); }
.recovery-toast { position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(10px); padding: 10px 18px; border-radius: 9px; font-size: 13px; opacity: 0; transition: opacity 300ms, transform 300ms; background: rgba(16, 34, 27, 0.96); color: rgba(200, 220, 208, 0.94); border: 1px solid rgba(120, 176, 152, 0.4); z-index: 24; }
.recovery-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* recovery node: slow dark-red pulse when unlocked */
.console-node.console-recovery.recovery-armed .node-core { animation: recoveryArmed 4.2s ease-in-out infinite; }
@keyframes recoveryArmed { 0%,100% { box-shadow: 0 0 5px rgba(150,70,70,0.28); } 50% { box-shadow: 0 0 13px rgba(168,78,78,0.58); } }

/* market recovery banner */

@media (max-width: 900px) {
  .recovery-tabs { display: flex; }
  .recovery-layout { grid-template-columns: 1fr; }
  .recovery-subjects, .recovery-center, .recovery-preview { display: none; border: none; }
  .recovery-console[class] .recovery-subjects.panel-active,
  .recovery-console[class] .recovery-center.panel-active,
  .recovery-console[class] .recovery-preview.panel-active { display: block; }
  .recovery-console .console-header { grid-template-columns: 1fr; }
  .recovery-return { grid-column: 1; grid-row: auto; justify-self: start; }
  .recovery-method-list { grid-template-columns: 1fr 1fr; }
  .recovery-vmetric { grid-template-columns: 100px 1fr 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .recovery-console, .recovery-lang, .recovery-status-incomplete .recovery-subject-outline,
  .recovery-outline.has-intent .recovery-outline-shape, .recovery-vmetric-fill,
  .console-recovery.recovery-armed .node-core, .recovery-console.scanning .recovery-layout::before { animation: none; transition: none; }
}

/* ===== MEMORY–70 · 记忆与意愿控制权 ===== */
.memory-console {
  position: fixed; inset: 0; z-index: 106;
  display: grid; grid-template-rows: auto auto 1fr auto;
  color: rgba(198, 214, 206, 0.78);
  background: linear-gradient(180deg, rgba(3, 9, 7, 0.99), rgba(1, 4, 3, 0.997));
  opacity: 0; visibility: hidden;
  transition: opacity 480ms ease, visibility 480ms;
}
.memory-console.open { opacity: 1; visibility: visible; }

/* 黑场开场 */
.memory-intro { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; background: rgba(0, 2, 2, 0.985); opacity: 0; pointer-events: none; transition: opacity 620ms ease; }
.memory-intro.active { opacity: 1; }
.memory-intro-line { font-size: 15px; letter-spacing: 0.14em; color: rgba(150, 180, 168, 0.72); font-style: italic; }

.memory-console .console-header { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 16px 24px; padding: 22px 30px 12px; }
.memory-console .recovery-return { grid-column: 2; grid-row: 1; align-self: start; white-space: nowrap; padding: 9px 16px; width: auto; height: auto; border-radius: 8px; font-size: 12px; letter-spacing: 0.06em; line-height: 1.2; display: inline-block; text-align: center; overflow: visible; }
.memory-console .memory-statusbar { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; margin-top: 4px; max-width: none; padding-right: 0; }
.memory-console .console-code { font-size: 12px; letter-spacing: 0.16em; color: rgba(140, 180, 160, 0.56); margin: 0 0 6px; }
.memory-console h2 { margin: 0; font-size: 20px; letter-spacing: 0.06em; }
.memory-console .console-subtitle { font-size: 13px; color: rgba(176, 198, 186, 0.6); margin: 6px 0 0; font-style: italic; }
.memory-console .console-panel-title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(140, 180, 160, 0.6); margin: 0 0 12px; }

/* 状态栏 */
.memory-statusbar { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; max-width: 560px; }
.memory-stat { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; }
.memory-stat-k { color: rgba(150, 176, 164, 0.55); letter-spacing: 0.08em; }
.memory-stat-v { color: rgba(206, 222, 214, 0.9); font-size: 14px; }

.memory-tabs { display: none; gap: 6px; padding: 0 30px 10px; }
.memory-tab { flex: 1; padding: 9px; font-size: 12px; letter-spacing: 0.08em; background: rgba(18, 32, 26, 0.5); color: rgba(180, 204, 192, 0.7); border: 1px solid rgba(120, 176, 152, 0.2); border-radius: 7px; cursor: pointer; }
.memory-tab.active { background: rgba(30, 54, 42, 0.7); color: rgba(210, 228, 218, 0.95); }

/* 三栏底片布局 */
.memory-layout { display: grid; grid-template-columns: 300px 1fr 320px; gap: 1px; background: rgba(120, 176, 152, 0.1); overflow: hidden; }
.memory-npcs, .memory-center, .memory-will { background: rgba(2, 7, 5, 0.72); padding: 20px 22px; overflow-y: auto; }

/* 左栏 NPC 目录 */
.memory-npc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.memory-npc { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; padding: 12px; border: 1px solid rgba(120, 176, 152, 0.16); border-radius: 8px; cursor: pointer; transition: border-color 200ms, background 200ms; }
.memory-npc:hover, .memory-npc:focus-visible { border-color: rgba(140, 190, 166, 0.4); background: rgba(20, 38, 30, 0.5); outline: none; }
.memory-npc.active { border-color: rgba(150, 200, 172, 0.6); background: rgba(24, 46, 36, 0.6); }
.memory-npc.forced { border-color: rgba(150, 78, 78, 0.5); }
.memory-npc-glyph { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(150, 190, 170, 0.4); background: radial-gradient(circle at 40% 35%, rgba(150,190,170,0.22), transparent 70%); }
.memory-npc-glyph[data-detail="2"] { filter: blur(0.4px); opacity: 0.9; }
.memory-npc-glyph[data-detail="3"] { filter: blur(0.9px); opacity: 0.8; }
.memory-npc-glyph[data-detail="4"] { filter: blur(1.4px); opacity: 0.68; border-color: rgba(150,100,100,0.4); }
.memory-npc-glyph[data-detail="5"] { filter: blur(2px); opacity: 0.55; border-color: rgba(160,90,90,0.5); }
.memory-npc-main { display: flex; flex-direction: column; gap: 2px; }
.memory-npc-id { font-size: 14px; color: rgba(210, 226, 218, 0.92); letter-spacing: 0.04em; }
.memory-npc-loc, .memory-npc-rel { font-size: 11px; color: rgba(160, 186, 174, 0.6); }
.memory-npc-meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 10px; font-size: 10.5px; color: rgba(150, 180, 166, 0.62); margin-top: 4px; }

/* 中央记忆轨道 */
.memory-track-head { margin-bottom: 12px; }
.memory-track-sub { font-size: 12px; margin: 0; }
.memory-track { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px dashed rgba(120, 176, 152, 0.24); display: flex; flex-direction: column; gap: 14px; }
.memory-item { position: relative; padding: 12px 14px; border: 1px solid rgba(120, 176, 152, 0.16); border-radius: 7px; background: rgba(10, 20, 16, 0.5); color: rgba(180, 200, 190, 0.82); }
.memory-item.warm { color: rgba(224, 230, 222, 0.92); background: rgba(22, 30, 26, 0.55); }
.memory-item.suppressed { border-style: dashed; border-color: rgba(120, 150, 138, 0.3); opacity: 0.55; color: rgba(150, 170, 160, 0.6); }
.memory-item.admin-authored { border-color: rgba(150, 78, 78, 0.55); box-shadow: inset 0 0 0 1px rgba(150, 78, 78, 0.2); }
.memory-item.has-conflict { border-left: 2px solid rgba(160, 120, 90, 0.5); }
.memory-item-head { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 6px; color: rgba(150, 180, 166, 0.6); }
.memory-item-body { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.memory-item-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 10.5px; color: rgba(150, 178, 166, 0.55); margin-bottom: 8px; }
.memory-item-state { color: rgba(180, 204, 192, 0.75); }
.memory-flag-others { color: rgba(180, 150, 120, 0.8); }
.memory-ops { display: flex; flex-wrap: wrap; gap: 6px; }
.memory-op { font-size: 11px; padding: 5px 9px; border-radius: 6px; cursor: pointer; background: rgba(20, 34, 28, 0.6); color: rgba(180, 204, 192, 0.72); border: 1px solid rgba(120, 176, 152, 0.2); }
.memory-op:hover { border-color: rgba(140, 190, 166, 0.4); }
.memory-op.on { background: rgba(34, 60, 46, 0.8); color: rgba(214, 230, 220, 0.95); border-color: rgba(150, 200, 172, 0.5); }
.memory-op-del { color: rgba(190, 140, 140, 0.8); }
.memory-op-sub { color: rgba(190, 160, 130, 0.8); }
.memory-conflict-note { font-size: 11px; color: rgba(180, 140, 110, 0.75); margin: 6px 0 0; }
.memory-substitutes { margin-top: 18px; }
.memory-sub-title { font-size: 12px; letter-spacing: 0.1em; color: rgba(180, 120, 120, 0.8); margin: 0 0 10px; }
.memory-simulate-row { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.memory-simulate { align-self: flex-start; padding: 9px 16px; font-size: 13px; border-radius: 7px; cursor: pointer; background: rgba(24, 46, 36, 0.7); color: rgba(206, 224, 214, 0.9); border: 1px solid rgba(140, 190, 166, 0.4); }
.memory-sim-out { font-size: 13px; font-style: italic; color: rgba(190, 210, 200, 0.8); min-height: 18px; }

/* 右栏 显示意愿 */
.memory-will-layers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.memory-will-layer { display: flex; justify-content: space-between; padding: 12px 14px; border-radius: 7px; border: 1px solid rgba(120, 176, 152, 0.2); }
.memory-will-layer.displayed { background: rgba(20, 38, 30, 0.55); }
.memory-will-layer.underlying { background: rgba(14, 18, 16, 0.6); }
.memory-will-k { font-size: 12px; color: rgba(150, 180, 166, 0.6); letter-spacing: 0.06em; }
.memory-will-v { font-size: 15px; color: rgba(210, 226, 218, 0.9); }
.memory-will-v.unknown { color: rgba(150, 160, 156, 0.7); letter-spacing: 0.12em; }
.memory-outline { display: flex; gap: 8px; justify-content: center; height: 90px; align-items: center; margin: 8px 0 18px; }
.memory-outline span { width: 20px; height: 60px; border-radius: 40% 40% 30% 30%; background: linear-gradient(180deg, rgba(150,190,170,0.3), rgba(150,190,170,0.05)); border: 1px solid rgba(150,190,170,0.3); }
.memory-outline.detail-2 span { filter: blur(0.6px); }
.memory-outline.detail-3 span { filter: blur(1.2px); }
.memory-outline.detail-4 span { filter: blur(2px); border-color: rgba(150,100,100,0.4); }
.memory-outline.detail-5 span, .memory-outline.detail-6 span { filter: blur(3px); background: linear-gradient(180deg, rgba(160,90,90,0.28), transparent); border-color: rgba(160,90,90,0.4); }
.memory-outline.overstable span { background: rgba(120, 50, 50, 0.3); border-color: rgba(150, 70, 70, 0.5); }
.memory-will-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.memory-mode { font-size: 12px; padding: 7px 11px; border-radius: 6px; cursor: pointer; background: rgba(20, 34, 28, 0.6); color: rgba(180, 204, 192, 0.72); border: 1px solid rgba(120, 176, 152, 0.2); }
.memory-mode.on { background: rgba(34, 60, 46, 0.8); color: rgba(214, 230, 220, 0.95); border-color: rgba(150, 200, 172, 0.5); }
.memory-mode.on[data-mode="forced"] { background: rgba(80, 34, 34, 0.7); border-color: rgba(160, 80, 80, 0.6); color: rgba(226, 200, 200, 0.95); }
.memory-will-slider { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.memory-will-slider input[type="range"] { width: 100%; accent-color: rgba(120, 176, 152, 0.7); }
.memory-will-slider.forced input[type="range"] { accent-color: rgba(150, 70, 70, 0.8); }
.memory-will-stepper { display: flex; align-items: center; justify-content: space-between; }
.memory-step { padding: 5px 12px; font-size: 12px; border-radius: 6px; cursor: pointer; background: rgba(20, 34, 28, 0.6); color: rgba(180, 204, 192, 0.75); border: 1px solid rgba(120, 176, 152, 0.24); }
.memory-forced-note { font-size: 11px; color: rgba(180, 120, 120, 0.8); margin: 0; }
.memory-will-preview { margin-top: 10px; padding-top: 12px; border-top: 1px dashed rgba(120, 176, 152, 0.2); }
.memory-will-line { font-size: 14px; font-style: italic; color: rgba(200, 216, 208, 0.85); min-height: 20px; }

/* 底部执行 */
.memory-footer { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; padding: 12px 30px; border-top: 1px solid rgba(120, 176, 152, 0.16); }
.memory-summary { font-size: 12px; max-height: 132px; overflow-y: auto; padding-right: 4px; }
.memory-summary-kicker { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(150, 180, 166, 0.6); margin: 0 0 4px; }
.memory-summary-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 2px; color: rgba(190, 210, 200, 0.8); }
.memory-summary-list.consequences { color: rgba(180, 150, 130, 0.75); }
.memory-footer-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.memory-footer-notice { font-size: 11px; color: rgba(150, 178, 166, 0.6); margin: 0; max-width: 320px; text-align: right; }
.memory-footer-buttons { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.memory-restore { padding: 8px 14px; font-size: 12px; border-radius: 7px; cursor: pointer; background: none; color: rgba(180, 204, 192, 0.7); border: 1px solid rgba(120, 176, 152, 0.24); }
.memory-commit { padding: 10px 20px; font-size: 13px; border-radius: 7px; cursor: pointer; background: rgba(70, 34, 34, 0.75); color: rgba(226, 204, 204, 0.95); border: 1px solid rgba(160, 90, 90, 0.55); }
.memory-commit:disabled { opacity: 0.4; cursor: not-allowed; }
.memory-console .archive-final-line { grid-column: 1 / -1; font-size: 12px; color: rgba(150, 170, 160, 0.55); font-style: italic; margin: 4px 0 0; }

/* overlay 弹层 */
.memory-overlay { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(0, 2, 2, 0.8); }
.memory-overlay-panel { max-width: 420px; width: 88%; padding: 24px; border-radius: 10px; background: rgba(8, 16, 13, 0.98); border: 1px solid rgba(120, 176, 152, 0.3); }
.memory-overlay-panel.force { border-color: rgba(160, 90, 90, 0.5); }
.memory-overlay-panel h3 { margin: 0 0 12px; font-size: 16px; }
.memory-overlay-panel p { font-size: 13px; line-height: 1.55; color: rgba(190, 210, 200, 0.82); margin: 0 0 8px; }
.memory-sub-input { width: 100%; padding: 10px; font-family: inherit; font-size: 13px; border-radius: 7px; background: rgba(4, 10, 8, 0.9); color: rgba(210, 226, 218, 0.92); border: 1px solid rgba(120, 176, 152, 0.3); resize: vertical; }
.memory-process { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.memory-process li { font-size: 13px; letter-spacing: 0.08em; color: rgba(120, 150, 138, 0.4); transition: color 300ms; }
.memory-process li.active { color: rgba(206, 224, 214, 0.92); }

/* memory node: slow unstable dark-red pulse */
.console-node.console-memory.memory-armed .node-core { animation: memoryArmed 5.6s ease-in-out infinite; }
@keyframes memoryArmed { 0%,100% { box-shadow: 0 0 5px rgba(150,70,70,0.22); } 35% { box-shadow: 0 0 15px rgba(170,76,76,0.6); } 55% { box-shadow: 0 0 6px rgba(150,70,70,0.3); } 78% { box-shadow: 0 0 12px rgba(168,78,78,0.5); } }

@media (max-width: 900px) {
  .memory-tabs { display: flex; }
  .memory-layout { grid-template-columns: 1fr; }
  .memory-npcs, .memory-center, .memory-will { display: none; border: none; }
  .memory-console[class] .memory-npcs.panel-active,
  .memory-console[class] .memory-center.panel-active,
  .memory-console[class] .memory-will.panel-active { display: block; }
  .memory-console .console-header { grid-template-columns: 1fr; }
  .memory-statusbar { justify-content: flex-start; }
  .memory-footer { grid-template-columns: 1fr; }
  .memory-footer-actions { align-items: stretch; }
  .memory-footer-buttons { justify-content: flex-end; }
  .memory-footer-notice { text-align: left; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .memory-console, .memory-intro, .memory-process li,
  .console-memory.memory-armed .node-core { animation: none; transition: none; }
}

/* ===== POLICY–75 · 规则制定权 ===== */
.policy-console {
  position: fixed; inset: 0; z-index: 107;
  display: grid; grid-template-rows: auto auto auto 1fr auto;
  color: rgba(198, 214, 206, 0.78);
  background: linear-gradient(180deg, rgba(3, 9, 7, 0.99), rgba(1, 4, 3, 0.997));
  opacity: 0; visibility: hidden;
  transition: opacity 480ms ease, visibility 480ms;
}
.policy-console.open { opacity: 1; visibility: visible; }

.policy-intro { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: rgba(0, 2, 2, 0.985); opacity: 0; pointer-events: none; transition: opacity 620ms ease; }
.policy-intro.active { opacity: 1; }
.policy-intro-line { font-size: 15px; letter-spacing: 0.14em; color: rgba(150, 180, 168, 0.72); font-style: italic; }

.policy-console .console-header { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 16px 24px; padding: 22px 30px 8px; }
.policy-console .recovery-return { grid-column: 2; grid-row: 1; align-self: start; white-space: nowrap; padding: 9px 16px; width: auto; height: auto; border-radius: 8px; font-size: 12px; letter-spacing: 0.06em; line-height: 1.2; display: inline-block; text-align: center; overflow: visible; }
.policy-console .policy-statusbar { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; margin-top: 4px; max-width: none; padding-right: 0; }
.policy-console .console-code { font-size: 12px; letter-spacing: 0.16em; color: rgba(140, 180, 160, 0.56); margin: 0 0 6px; }
.policy-console h2 { margin: 0; font-size: 20px; letter-spacing: 0.06em; }
.policy-console .console-subtitle { font-size: 13px; color: rgba(176, 198, 186, 0.6); margin: 6px 0 0; font-style: italic; }
.policy-console .console-panel-title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(140, 180, 160, 0.6); margin: 0 0 12px; }

.policy-statusbar { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; max-width: 560px; }
.policy-stat { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; }
.policy-stat-k { color: rgba(150, 176, 164, 0.55); letter-spacing: 0.08em; }
.policy-stat-v { color: rgba(206, 222, 214, 0.9); font-size: 14px; }

/* 自然语言摘要（固定顶部，冷白线） */
.policy-nl-summary { margin: 0 30px 8px; padding: 12px 16px; border: 1px solid rgba(150, 180, 168, 0.28); border-radius: 8px; font-size: 14px; line-height: 1.55; color: rgba(214, 228, 220, 0.9); background: rgba(10, 20, 16, 0.4); }
.policy-nl-summary.dim { color: rgba(140, 168, 156, 0.5); font-style: italic; }

.policy-tabs { display: none; gap: 6px; padding: 0 30px 10px; }
.policy-tab { flex: 1; padding: 9px; font-size: 12px; letter-spacing: 0.08em; background: rgba(18, 32, 26, 0.5); color: rgba(180, 204, 192, 0.7); border: 1px solid rgba(120, 176, 152, 0.2); border-radius: 7px; cursor: pointer; }
.policy-tab.active { background: rgba(30, 54, 42, 0.7); color: rgba(210, 228, 218, 0.95); }

.policy-layout { display: grid; grid-template-columns: 300px 1fr 320px; gap: 1px; background: rgba(120, 176, 152, 0.1); overflow: hidden; }
.policy-source, .policy-builder, .policy-impact { background: rgba(2, 7, 5, 0.72); padding: 18px 20px; overflow-y: auto; }

/* 左栏判断来源 */
.policy-source-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.policy-source-item { padding: 12px; border: 1px solid rgba(120, 176, 152, 0.16); border-radius: 8px; cursor: pointer; transition: border-color 200ms, background 200ms; }
.policy-source-item:hover, .policy-source-item:focus-visible { border-color: rgba(140, 190, 166, 0.4); background: rgba(20, 38, 30, 0.5); outline: none; }
.policy-source-item.active { border-color: rgba(150, 200, 172, 0.55); background: rgba(24, 46, 36, 0.55); }
.policy-source-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.policy-source-id { color: rgba(210, 226, 218, 0.92); letter-spacing: 0.04em; }
.policy-source-kind { color: rgba(150, 180, 166, 0.6); }
.policy-source-line { font-size: 12px; margin: 2px 0; }
.policy-source-note { font-size: 12px; color: rgba(180, 150, 120, 0.8); margin: 8px 0; }
.policy-extract { padding: 7px 12px; font-size: 12px; border-radius: 6px; cursor: pointer; background: rgba(30, 54, 42, 0.7); color: rgba(210, 228, 218, 0.9); border: 1px solid rgba(140, 190, 166, 0.4); }
.policy-published-block { margin-top: 22px; }
.policy-published-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.policy-published-item { padding: 10px; border: 1px solid rgba(150, 180, 168, 0.28); border-radius: 7px; }
.policy-published-item.suspended { opacity: 0.55; border-style: dashed; }
.policy-published-item.armed { border-color: rgba(160, 90, 90, 0.5); }
.policy-pub-head { display: flex; justify-content: space-between; font-size: 12px; }
.policy-pub-id { color: rgba(210, 226, 218, 0.9); }
.policy-pub-actions { display: flex; gap: 6px; margin-top: 6px; }
.policy-pub-btn { padding: 5px 10px; font-size: 11px; border-radius: 6px; cursor: pointer; background: rgba(20, 34, 28, 0.6); color: rgba(180, 204, 192, 0.72); border: 1px solid rgba(120, 176, 152, 0.24); }
.policy-pub-btn.danger { color: rgba(190, 140, 140, 0.85); border-color: rgba(150, 90, 90, 0.4); }

/* 中央规则构造器 */
.policy-builder-empty, .policy-impact-empty { font-size: 13px; color: rgba(150, 178, 166, 0.55); font-style: italic; }
.policy-rule-parts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.policy-part { display: grid; grid-template-columns: 160px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid rgba(120, 176, 152, 0.12); }
.policy-part-k { font-size: 11px; letter-spacing: 0.1em; color: rgba(150, 180, 166, 0.6); }
.policy-part-v { font-size: 13px; }
.policy-cond-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.policy-cond-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.policy-cond-row::before { content: "("; color: rgba(140, 176, 160, 0.4); }
.policy-cond-row::after { content: ")"; color: rgba(140, 176, 160, 0.4); }
.policy-console select, .policy-console input, .policy-console textarea { font-family: inherit; font-size: 12px; padding: 6px 8px; border-radius: 6px; background: rgba(6, 14, 10, 0.85); color: rgba(210, 226, 218, 0.92); border: 1px solid rgba(120, 176, 152, 0.28); }
.policy-console textarea { resize: vertical; width: 100%; }
.policy-cond-val { width: 90px; }
.policy-cond-del { background: none; border: none; color: rgba(190, 140, 140, 0.7); cursor: pointer; font-size: 16px; }
.policy-add-cond, .policy-add-ex, .policy-test-btn { padding: 6px 12px; font-size: 12px; border-radius: 6px; cursor: pointer; background: rgba(20, 34, 28, 0.6); color: rgba(180, 204, 192, 0.75); border: 1px solid rgba(120, 176, 152, 0.24); }
.policy-dur-row { display: flex; gap: 6px; }
.policy-dur { padding: 6px 11px; font-size: 12px; border-radius: 6px; cursor: pointer; background: rgba(20, 34, 28, 0.6); color: rgba(180, 204, 192, 0.72); border: 1px solid rgba(120, 176, 152, 0.2); }
.policy-dur.on { background: rgba(34, 60, 46, 0.8); color: rgba(214, 230, 220, 0.95); border-color: rgba(150, 200, 172, 0.5); }
.policy-dur.on[data-dur="default"] { background: rgba(80, 34, 34, 0.7); border-color: rgba(160, 80, 80, 0.6); color: rgba(226, 200, 200, 0.95); }
.policy-future-note, .policy-default-note { font-size: 11px; color: rgba(180, 120, 120, 0.82); margin: 6px 0 0; }
.policy-ex-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.policy-ex-list li { display: flex; align-items: center; gap: 6px; }
.policy-ex-del { background: none; border: none; color: rgba(190, 140, 140, 0.7); cursor: pointer; }
.policy-self-ex { font-size: 12px; color: rgba(190, 110, 110, 0.9); margin: 8px 0 0; }
.policy-machine { margin: 12px 0; padding: 10px 12px; border-radius: 7px; background: rgba(6, 14, 10, 0.7); border: 1px solid rgba(120, 176, 152, 0.16); }
.policy-machine-k { font-size: 10.5px; letter-spacing: 0.12em; color: rgba(140, 176, 160, 0.5); }
.policy-machine pre { margin: 6px 0 0; font-size: 12px; color: rgba(180, 208, 194, 0.85); white-space: pre-wrap; font-family: inherit; }
.policy-test-out { margin: 10px 0; }
.policy-warn { font-size: 12px; color: rgba(190, 160, 110, 0.9); margin: 4px 0; padding-left: 12px; border-left: 2px solid rgba(160, 130, 80, 0.5); }
.policy-warn.ok { color: rgba(150, 190, 166, 0.8); border-color: rgba(120, 176, 152, 0.4); }
.policy-meta { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.policy-meta-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: rgba(150, 180, 166, 0.65); }
.policy-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 右栏影响模拟 */
.policy-impact-total { font-size: 14px; color: rgba(214, 228, 220, 0.9); margin: 0 0 12px; }
.policy-dist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.policy-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 1px solid transparent; cursor: pointer; }
.res-allow { background: rgba(120, 190, 140, 0.75); }
.res-deny { background: rgba(160, 80, 80, 0.8); }
.res-reverify { background: rgba(150, 170, 90, 0.6); border-style: dashed; border-color: rgba(180, 200, 120, 0.6); }
.res-lower { background: rgba(120, 140, 130, 0.5); }
.res-conflict { background: transparent; border: 1px solid rgba(180, 120, 90, 0.7); box-shadow: inset 0 0 0 2px rgba(160,90,90,0.3); }
.res-exception { background: transparent; border: 1px solid rgba(180, 200, 190, 0.6); }
.res-unknown { background: transparent; border: 1px dashed rgba(150, 170, 160, 0.5); animation: policyBlink 2.4s ease-in-out infinite; }
.res-unaffected { background: rgba(90, 100, 96, 0.35); }
@keyframes policyBlink { 0%,100% { opacity: 0.4; } 50% { opacity: 0.9; } }
.policy-impact-counts { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.policy-impact-counts li { display: flex; align-items: center; gap: 8px; }
.policy-subjects-detail { margin-bottom: 14px; font-size: 12px; }
.policy-subjects-detail summary { cursor: pointer; color: rgba(180, 204, 192, 0.75); }
.policy-subjects-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.policy-subjects-list li { display: flex; align-items: center; gap: 8px; }
.policy-subj-id { color: rgba(206, 222, 214, 0.85); }
.policy-viewas { margin: 14px 0; padding-top: 12px; border-top: 1px dashed rgba(120, 176, 152, 0.2); }
.policy-viewas label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: rgba(150, 180, 166, 0.65); }
.policy-viewas-note { font-size: 12px; font-style: italic; color: rgba(190, 200, 180, 0.8); margin: 8px 0 0; min-height: 16px; }
.policy-conflict-block { margin-top: 14px; padding: 10px 12px; border: 1px solid rgba(160, 120, 90, 0.4); border-radius: 7px; }
.policy-conflict-block h4 { margin: 0 0 8px; font-size: 12px; color: rgba(190, 160, 120, 0.85); }
.policy-conflict-line { font-size: 12px; margin: 0 0 8px; }
.policy-priority { display: flex; flex-direction: column; gap: 5px; font-size: 11px; }
.policy-conflict-manual { font-size: 12px; color: rgba(180, 140, 110, 0.85); margin: 8px 0 0; }

/* 底部发布 */
.policy-footer { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; padding: 14px 30px; border-top: 1px solid rgba(120, 176, 152, 0.16); }
.policy-pending { font-size: 12px; }
.policy-pending-kicker { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(150, 180, 166, 0.6); margin: 0 0 4px; }
.policy-pending-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; color: rgba(190, 210, 200, 0.8); }
.policy-footer-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.policy-footer-notice { font-size: 11px; color: rgba(150, 178, 166, 0.6); margin: 0; max-width: 360px; text-align: right; }
.policy-footer-buttons { display: flex; gap: 8px; }
.policy-keep-case, .policy-save-draft { padding: 8px 14px; font-size: 12px; border-radius: 7px; cursor: pointer; background: none; color: rgba(180, 204, 192, 0.7); border: 1px solid rgba(120, 176, 152, 0.24); }
.policy-publish { padding: 10px 18px; font-size: 13px; border-radius: 7px; cursor: pointer; background: rgba(70, 34, 34, 0.75); color: rgba(226, 204, 204, 0.95); border: 1px solid rgba(160, 90, 90, 0.55); }
.policy-publish:disabled { opacity: 0.4; cursor: not-allowed; }
.policy-console .archive-final-line { grid-column: 1 / -1; font-size: 12px; color: rgba(150, 170, 160, 0.55); font-style: italic; margin: 4px 0 0; }

/* overlay */
.policy-overlay { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(0, 2, 2, 0.82); }
.policy-overlay-panel { max-width: 460px; width: 88%; padding: 24px; border-radius: 10px; background: rgba(8, 16, 13, 0.98); border: 1px solid rgba(120, 176, 152, 0.3); }
.policy-overlay-panel.result { border-color: rgba(150, 180, 168, 0.4); }
.policy-overlay-panel h3 { margin: 0 0 12px; font-size: 16px; }
.policy-overlay-panel p { font-size: 13px; line-height: 1.55; color: rgba(190, 210, 200, 0.82); margin: 0 0 8px; }
.policy-ex-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.policy-result-sub { color: rgba(180, 200, 190, 0.7); font-style: italic; }
.policy-result-list { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.policy-process { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.policy-process li { font-size: 13px; letter-spacing: 0.08em; color: rgba(120, 150, 138, 0.4); transition: color 300ms; }
.policy-process li.active { color: rgba(206, 224, 214, 0.92); }
.policy-feedback { position: absolute; bottom: 92px; left: 50%; transform: translateX(-50%) translateY(10px); padding: 10px 18px; border-radius: 9px; font-size: 13px; opacity: 0; transition: opacity 300ms, transform 300ms; background: rgba(16, 34, 27, 0.96); color: rgba(200, 220, 208, 0.94); border: 1px solid rgba(120, 176, 152, 0.4); z-index: 45; }
.policy-feedback.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 传播视觉：低亮度边界缓慢穿过 */
.policy-wave { position: fixed; inset: 0; z-index: 50; pointer-events: none; background: linear-gradient(90deg, transparent 0%, rgba(180, 200, 190, 0.06) 48%, rgba(180, 200, 190, 0.1) 50%, rgba(180, 200, 190, 0.06) 52%, transparent 100%); background-size: 200% 100%; background-position: 120% 0; opacity: 0; }
.policy-wave.spread { animation: policyWave 2.2s ease-out forwards; }
@keyframes policyWave { 0% { opacity: 0; background-position: 120% 0; } 15% { opacity: 1; } 100% { opacity: 0; background-position: -60% 0; } }

/* policy node: stable slow dark-red glow */
.console-node.console-policy.policy-armed .node-core { animation: policyArmed 5s ease-in-out infinite; }
@keyframes policyArmed { 0%,100% { box-shadow: 0 0 6px rgba(150,72,72,0.34); } 50% { box-shadow: 0 0 12px rgba(160,78,78,0.5); } }

@media (max-width: 900px) {
  .policy-tabs { display: flex; }
  .policy-layout { grid-template-columns: 1fr; }
  .policy-source, .policy-builder, .policy-impact { display: none; border: none; }
  .policy-console[class] .policy-source.panel-active,
  .policy-console[class] .policy-builder.panel-active,
  .policy-console[class] .policy-impact.panel-active { display: block; }
  .policy-console .console-header { grid-template-columns: 1fr; }
  .policy-statusbar { justify-content: flex-start; }
  .policy-nl-summary { margin: 0 16px 8px; font-size: 13px; }
  .policy-footer { grid-template-columns: 1fr; }
  .policy-footer-actions { align-items: stretch; }
  .policy-footer-notice { text-align: left; max-width: none; }
  .policy-part { grid-template-columns: 1fr; }
  .policy-reasons { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .policy-console, .policy-intro, .policy-process li, .policy-wave, .res-unknown,
  .console-policy.policy-armed .node-core { animation: none; transition: none; }
}

/* ===================== IDENTITY–65 · 身份管理权 ===================== */
.identity-console {
  position: fixed; inset: 0; z-index: 106;
  display: grid; grid-template-rows: auto auto 1fr auto;
  color: rgba(198, 214, 206, 0.78);
  background: linear-gradient(180deg, rgba(3, 9, 7, 0.99), rgba(1, 4, 3, 0.997));
  opacity: 0; visibility: hidden; transition: opacity 480ms ease, visibility 480ms;
}
.identity-console.open { opacity: 1; visibility: visible; }

.identity-intro { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; background: rgba(0, 2, 2, 0.985); opacity: 0; pointer-events: none; transition: opacity 620ms ease; }
.identity-intro.active { opacity: 1; }
.identity-intro-line { font-size: 15px; letter-spacing: 0.14em; color: rgba(150, 180, 168, 0.72); font-style: italic; }

.identity-console .console-header { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 16px 24px; padding: 22px 30px 12px; border-bottom: 1px solid rgba(120, 176, 152, 0.11); }
.identity-console .console-code { font-size: 12px; letter-spacing: 0.16em; color: rgba(140, 180, 160, 0.56); margin: 0 0 6px; }
.identity-console h2 { margin: 0; font-size: 20px; letter-spacing: 0.06em; }
.identity-console .console-subtitle { font-size: 13px; color: rgba(176, 198, 186, 0.6); margin: 6px 0 0; font-style: italic; }
.identity-console .console-panel-title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(140, 180, 160, 0.6); margin: 0 0 12px; }

/* pulsing unlock accent on header code */
.identity-console .console-code::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: rgba(150, 80, 80, 0.7); animation: identityPulse 2.6s ease-in-out infinite; vertical-align: middle; }
@keyframes identityPulse { 0%,100% { opacity: 0.3; } 50% { opacity: 0.9; } }

.identity-statusbar { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 16px 26px; margin-top: 4px; }
.identity-stat { display: flex; flex-direction: column; gap: 2px; }
.identity-stat em { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(140, 176, 160, 0.5); font-style: normal; }
.identity-stat strong { font-size: 15px; color: rgba(198, 216, 206, 0.9); letter-spacing: 0.04em; }
.identity-console .recovery-return { grid-column: 2; grid-row: 1; align-self: start; }

.identity-tabs { display: none; gap: 6px; padding: 8px 20px; border-bottom: 1px solid rgba(120, 176, 152, 0.1); }
.identity-tab { flex: 1; padding: 9px; font-size: 12px; letter-spacing: 0.06em; background: rgba(18, 32, 26, 0.5); color: rgba(180, 204, 192, 0.7); border: 1px solid rgba(120, 176, 152, 0.2); border-radius: 7px; cursor: pointer; }
.identity-tab.active { background: rgba(30, 54, 42, 0.7); color: rgba(210, 228, 218, 0.95); }

.identity-layout { position: relative; min-height: 0; display: grid; grid-template-columns: minmax(240px, 0.9fr) minmax(420px, 1.9fr) minmax(280px, 1.1fr); border-block: 1px solid rgba(120, 176, 152, 0.11); }
.identity-subjects, .identity-center, .identity-views { min-height: 0; overflow-y: auto; padding: 18px 18px 40px; }
.identity-subjects { border-right: 1px solid rgba(120, 176, 152, 0.09); }
.identity-views { border-left: 1px solid rgba(120, 176, 152, 0.09); background: rgba(2, 10, 8, 0.4); }
.identity-hint { font-size: 12px; color: rgba(150, 180, 168, 0.5); }

/* 左栏：对象目录 */
.identity-subject-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.identity-subject { border: 1px solid rgba(120, 176, 152, 0.12); background: rgba(12, 26, 21, 0.5); position: relative; }
.identity-subject.active { border-color: rgba(140, 190, 166, 0.5); background: rgba(22, 46, 36, 0.6); }
.identity-subject-btn { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr; gap: 5px; padding: 12px 14px; background: none; border: none; cursor: pointer; color: inherit; }
.identity-subject-btn:focus-visible { outline: 2px solid rgba(140,190,166,0.6); }
.identity-subject-outline { display: block; height: 3px; margin-bottom: 3px; background: rgba(150,180,164,0.4); }
.identity-status-conflict .identity-subject-outline, .identity-status-nonhuman .identity-subject-outline { background: linear-gradient(90deg, rgba(150,90,90,0.6) 0 30%, transparent 30% 55%, rgba(150,90,90,0.6) 55% 80%, transparent 80%); }
.identity-status-unconfirmed .identity-subject-outline { background: repeating-linear-gradient(90deg, rgba(150,170,180,0.5) 0 6px, transparent 6px 10px); }
.identity-status-refused .identity-subject-outline { background: rgba(150,180,164,0.35); transform: skewX(-8deg); }
.identity-status-partial .identity-subject-outline { background: linear-gradient(90deg, rgba(150,180,120,0.5), transparent 60%); }
.identity-subject-id { font-size: 13px; letter-spacing: 0.08em; color: rgba(198, 216, 206, 0.9); }
.identity-subject-name { font-size: 12px; color: rgba(160, 190, 176, 0.7); }
.identity-subject-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; font-size: 11px; color: rgba(158, 188, 174, 0.6); }
.identity-subject-lines b { color: rgba(192, 214, 202, 0.85); font-weight: 500; margin-left: 3px; }
.identity-subject-tag { display: inline-block; font-size: 10px; letter-spacing: 0.05em; color: rgba(150, 190, 166, 0.7); border: 1px solid rgba(120,176,152,0.24); padding: 2px 6px; margin-top: 2px; justify-self: start; }
.identity-status-conflict .identity-subject-tag, .identity-status-nonhuman .identity-subject-tag { color: rgba(200, 150, 140, 0.85); border-color: rgba(150,90,90,0.4); }

/* 中央：档案编辑块 */
.identity-block { margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid rgba(120, 176, 152, 0.08); }
.identity-fieldgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.identity-field { display: flex; flex-direction: column; gap: 4px; }
.identity-field em { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(140, 176, 160, 0.55); font-style: normal; }
.identity-field input, .identity-age-input, .identity-label-add input, .identity-label-add select { background: rgba(6, 16, 12, 0.7); border: 1px solid rgba(120, 176, 152, 0.22); color: rgba(206, 222, 214, 0.92); padding: 8px 10px; font-size: 13px; letter-spacing: 0.04em; font-family: inherit; }
.identity-field input:focus, .identity-age-input:focus { outline: none; border-color: rgba(140, 190, 166, 0.55); }
.identity-readonly { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.identity-readonly span { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 12px; }
.identity-readonly em { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(140, 176, 160, 0.5); }
.identity-readonly b { color: rgba(196, 214, 204, 0.85); font-weight: 500; }
.identity-readonly i { font-size: 10px; color: rgba(140, 170, 156, 0.5); font-style: normal; border: 1px solid rgba(120,176,152,0.2); padding: 1px 5px; }
.identity-note { font-size: 12px; color: rgba(160, 186, 174, 0.62); margin: 8px 0 0; font-style: italic; }
.identity-note.warn { color: rgba(200, 150, 140, 0.8); }

.identity-scopes { margin-top: 10px; }
.identity-scopes em { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(140, 176, 160, 0.5); }
.identity-scope-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.identity-chip { font-size: 11px; letter-spacing: 0.04em; padding: 5px 10px; background: rgba(16, 30, 24, 0.5); border: 1px solid rgba(120, 176, 152, 0.2); color: rgba(176, 202, 190, 0.72); cursor: pointer; }
.identity-chip.on { background: rgba(30, 54, 42, 0.7); border-color: rgba(140, 190, 166, 0.5); color: rgba(210, 228, 218, 0.95); }

/* 年龄网格 */
.identity-age-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.identity-age-cell { display: flex; flex-direction: column; gap: 5px; padding: 10px; border: 1px solid rgba(120, 176, 152, 0.14); background: rgba(8, 18, 14, 0.5); }
.identity-age-cell em { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(140, 176, 160, 0.55); font-style: normal; }
.identity-age-cell.locked b { font-size: 15px; color: rgba(196, 214, 204, 0.82); }
.identity-age-cell.locked i { font-size: 10px; color: rgba(140, 170, 156, 0.5); font-style: normal; }
.identity-age-cell.editable { border-color: rgba(140, 190, 166, 0.32); }
.identity-age-ctrl { display: flex; align-items: center; gap: 6px; }
.identity-age-ctrl button { width: 26px; height: 30px; background: rgba(20, 40, 32, 0.66); border: 1px solid rgba(120, 176, 152, 0.24); color: rgba(196, 216, 204, 0.88); cursor: pointer; font-size: 15px; }
.identity-age-input { width: 56px; text-align: center; }

/* 标签：细小档案批注 */
.identity-label-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.identity-label-annot { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 7px 10px; border-left: 2px solid rgba(120, 176, 152, 0.3); background: rgba(8, 18, 14, 0.4); }
.identity-label-annot.disputed { border-left-color: rgba(160, 90, 90, 0.6); }
.identity-label-annot.hidden, .identity-label-annot.suppressed { opacity: 0.5; }
.identity-label-txt { font-size: 13px; color: rgba(200, 218, 208, 0.88); letter-spacing: 0.03em; }
.identity-label-meta { grid-column: 1; font-size: 10.5px; color: rgba(150, 180, 166, 0.55); }
.identity-label-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; justify-content: flex-end; }
.identity-label-actions button { font-size: 10px; letter-spacing: 0.04em; padding: 3px 7px; background: rgba(16, 30, 24, 0.5); border: 1px solid rgba(120, 176, 152, 0.2); color: rgba(170, 198, 186, 0.7); cursor: pointer; }
.identity-label-actions button:hover { border-color: rgba(140, 190, 166, 0.45); }
.identity-label-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.identity-label-add input { flex: 1; min-width: 120px; }
.identity-label-add button { padding: 6px 12px; background: rgba(20, 40, 32, 0.66); border: 1px solid rgba(120, 176, 152, 0.24); color: rgba(196, 216, 204, 0.88); cursor: pointer; font-size: 12px; }

/* 右栏：视角与后果 */
.identity-viewtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.identity-viewtab { font-size: 10.5px; padding: 4px 8px; background: rgba(16, 30, 24, 0.5); border: 1px solid rgba(120, 176, 152, 0.18); color: rgba(170, 198, 186, 0.68); cursor: pointer; }
.identity-viewtab.on { background: rgba(30, 54, 42, 0.7); border-color: rgba(140, 190, 166, 0.5); color: rgba(210, 228, 218, 0.95); }
.identity-viewbox { font-size: 13px; line-height: 1.55; color: rgba(196, 216, 204, 0.85); padding: 12px; border: 1px solid rgba(120, 176, 152, 0.14); background: rgba(6, 16, 12, 0.5); margin-bottom: 16px; font-style: italic; }
.identity-sub { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(140, 180, 160, 0.6); margin: 14px 0 8px; }
.identity-access { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.identity-access li { font-size: 12px; padding-left: 16px; position: relative; color: rgba(180, 204, 192, 0.78); }
.identity-access li::before { content: "○"; position: absolute; left: 0; color: rgba(140, 176, 160, 0.5); }
.identity-access li.ok::before { content: "●"; color: rgba(140, 190, 166, 0.7); }
.identity-access li.no { color: rgba(160, 130, 124, 0.7); }
.identity-access li.no::before { content: "×"; color: rgba(170, 100, 96, 0.7); }
.identity-access li.stage { color: rgba(196, 216, 204, 0.8); }
.identity-redline { font-size: 12px; color: rgba(206, 150, 140, 0.85); margin: 8px 0; padding-left: 10px; border-left: 2px solid rgba(160, 90, 90, 0.6); }
.identity-consistency { display: flex; align-items: baseline; gap: 8px; }
.identity-consval { font-size: 26px; letter-spacing: 0.04em; color: rgba(206, 222, 214, 0.92); }
.identity-conflicts { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.identity-conflicts li { font-size: 12px; color: rgba(200, 160, 150, 0.82); padding-left: 12px; border-left: 1px solid rgba(160, 90, 90, 0.4); }

/* 底栏 */
.identity-footer { display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; align-items: end; padding: 14px 30px 16px; border-top: 1px solid rgba(120, 176, 152, 0.11); }
.identity-summary { grid-column: 1; max-height: 150px; overflow-y: auto; }
.identity-pending-title, .identity-impact-title { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(140, 180, 160, 0.6); margin: 0 0 6px; }
.identity-impact-title { margin-top: 8px; }
.identity-pending-list, .identity-impact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.identity-pending-list li, .identity-impact-list li { font-size: 12px; color: rgba(190, 210, 200, 0.8); }
.identity-impact-list li { color: rgba(160, 186, 174, 0.68); }
.identity-footer-actions { grid-column: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.identity-footer-notice { font-size: 11px; color: rgba(150, 180, 166, 0.55); max-width: 320px; text-align: right; margin: 0; font-style: italic; }
.identity-footer-buttons { display: flex; gap: 10px; }
.identity-console .archive-final-line { grid-column: 1 / -1; font-size: 11px; color: rgba(140, 170, 156, 0.5); margin: 4px 0 0; font-style: italic; }

/* overlay / 进程 / 结果 */
.identity-overlay { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: rgba(0, 2, 2, 0.86); }
.identity-overlay-box { max-width: 460px; padding: 28px 30px; border: 1px solid rgba(120, 176, 152, 0.2); background: rgba(6, 14, 10, 0.96); text-align: center; }
.identity-overlay-line { font-size: 14px; line-height: 1.6; color: rgba(200, 216, 208, 0.88); margin: 0 0 18px; }
.identity-overlay-actions { display: flex; gap: 12px; justify-content: center; }
.identity-progress { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.identity-progress li { font-size: 13px; letter-spacing: 0.06em; color: rgba(140, 170, 156, 0.45); padding-left: 20px; position: relative; }
.identity-progress li::before { content: "·"; position: absolute; left: 4px; }
.identity-progress li.active { color: rgba(196, 216, 204, 0.9); }
.identity-progress li.done { color: rgba(140, 190, 166, 0.7); }
.identity-progress li.done::before { content: "✓"; }
.identity-result-line { font-size: 15px; color: rgba(206, 222, 214, 0.92); margin: 0 0 8px; }
.identity-result-sub { font-size: 13px; color: rgba(160, 186, 174, 0.7); margin: 0 0 8px; }
.identity-result-line.en, .identity-result-sub.en { font-style: italic; opacity: 0.7; }
.identity-result-sub.en { margin-bottom: 18px; }

.identity-toast { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(12px); z-index: 40; max-width: 78%; padding: 12px 18px; background: rgba(8, 18, 14, 0.96); border: 1px solid rgba(120, 176, 152, 0.28); color: rgba(200, 218, 208, 0.9); font-size: 13px; line-height: 1.5; font-style: italic; opacity: 0; transition: opacity 300ms, transform 300ms; }
.identity-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 移动端：纵向单栏顺序 */
@media (max-width: 860px) {
  .identity-console { grid-template-rows: auto auto auto 1fr auto; }
  .identity-tabs { display: flex; }
  .identity-layout { grid-template-columns: 1fr; }
  .identity-console[data-tab="subjects"] .identity-center,
  .identity-console[data-tab="subjects"] .identity-views,
  .identity-console[data-tab="editor"] .identity-subjects,
  .identity-console[data-tab="editor"] .identity-views,
  .identity-console[data-tab="views"] .identity-subjects,
  .identity-console[data-tab="views"] .identity-center { display: none; }
  .identity-subjects, .identity-center, .identity-views { border: none; }
  .identity-fieldgrid, .identity-age-grid { grid-template-columns: 1fr; }
  .identity-footer { grid-template-columns: 1fr; }
  .identity-footer-actions { grid-column: 1; align-items: stretch; }
  .identity-footer-notice { text-align: left; max-width: none; }
  .identity-footer-buttons { justify-content: flex-end; }
  .identity-statusbar { gap: 10px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .identity-console, .identity-intro, .identity-toast, .identity-console .console-code::before { animation: none; transition: none; }
}

/* ============ ROOT–80 根权限 / SYSTEM PARAMETER AUTHORITY ============ */
.root-console{--root-bg:#060b09;--root-panel:#0a120e;--root-line:rgba(120,160,140,.14);--root-text:#a9c3b4;--root-dim:#6f8a7c;--root-danger:#8c2f2f;--root-danger-bright:#b04a4a;
  position:fixed;inset:0;z-index:60;display:none;flex-direction:column;background:radial-gradient(120% 120% at 50% 45%,#08110d 0%,#050a08 70%,#030605 100%);
  color:var(--root-text);font-family:'Spectral','Songti SC',serif;overflow:hidden}
.root-console.open{display:flex}
.root-console .console-code,.root-console .root-param-key,.root-console code,.root-console .root-stat b,.root-console .root-stab-val,.root-console .root-param-key{font-family:ui-monospace,'SFMono-Regular',Menlo,monospace}

/* 进入动画 */
.root-enter{position:absolute;inset:0;z-index:20;display:none;flex-direction:column;align-items:center;justify-content:center;gap:1.4rem;background:#04080699;backdrop-filter:blur(2px);text-align:center;padding:2rem}
.root-enter.active{display:flex}
.root-enter-canvas{position:absolute;inset:0;width:100%;height:100%;opacity:.5}
.root-enter-line{position:relative;opacity:0;transform:translateY(6px);transition:opacity 1.1s ease,transform 1.1s ease;font-size:1.05rem;letter-spacing:.04em;color:#c2d6c9}
.root-enter-line.show{opacity:1;transform:none}

/* 头部 */
.root-header{display:flex;align-items:flex-start;gap:1.2rem;padding:1.1rem 1.4rem .7rem;border-bottom:1px solid var(--root-line);flex-wrap:wrap}
.root-header .console-code{color:var(--root-danger-bright);font-size:.72rem;letter-spacing:.14em}
.root-header h2{margin:.2rem 0;font-size:1.5rem;font-weight:600;color:#cadbd0}
.root-header .console-subtitle{color:var(--root-dim);font-size:.85rem}
.root-statusbar{display:flex;flex-wrap:wrap;gap:.5rem 1rem;flex:1;min-width:200px;align-items:center}
.root-stat{display:flex;flex-direction:column;line-height:1.15}
.root-stat em{font-style:normal;color:var(--root-dim);font-size:.6rem;letter-spacing:.08em;text-transform:uppercase}
.root-stat b{font-weight:500;font-size:.85rem;color:#bcd0c4}
.root-console .recovery-return{align-self:flex-start}

/* 分区 tab（桌面隐藏，仅移动端用） */
.root-tabs{display:none;gap:.4rem;padding:.5rem 1rem;border-bottom:1px solid var(--root-line)}
.root-tab{background:none;border:1px solid var(--root-line);color:var(--root-dim);padding:.35rem .8rem;font-size:.78rem;border-radius:2px;cursor:pointer}
.root-tab.active{color:#cfe0d4;border-color:var(--root-danger)}

/* 三栏布局 */
.root-layout{flex:1;display:grid;grid-template-columns:minmax(220px,300px) 1fr minmax(240px,340px);gap:1px;background:var(--root-line);overflow:hidden;min-height:0}
.root-catalog,.root-topology,.root-diff{background:var(--root-bg);overflow-y:auto;padding:1rem;min-height:0}
.root-topology{position:relative;display:flex;flex-direction:column;padding:0}
.console-panel-title,.root-params-title{color:var(--root-dim);font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;margin:0 0 .7rem}

/* 预设条 */
.root-preset-bar{display:flex;flex-wrap:wrap;gap:.35rem;margin-bottom:.9rem;align-items:center}
.root-preset-title{width:100%;color:var(--root-dim);font-size:.62rem;letter-spacing:.09em;text-transform:uppercase}
.root-preset{background:none;border:1px solid var(--root-line);color:var(--root-text);padding:.3rem .55rem;font-size:.7rem;cursor:pointer;border-radius:2px}
.root-preset:hover{border-color:var(--root-danger)}

/* 引擎目录 */
.root-engine-list{list-style:none;margin:0 0 1rem;padding:0;display:flex;flex-direction:column;gap:2px}
.root-engine{width:100%;text-align:left;background:none;border:none;border-left:2px solid transparent;color:var(--root-text);padding:.45rem .6rem;font-size:.86rem;cursor:pointer;font-family:inherit}
.root-engine:hover{background:#0d1712}
.root-engine.on{border-left-color:var(--root-danger-bright);background:#0e1813;color:#d4e3d8}
.root-engine.changed{color:var(--root-danger-bright)}
.root-engine.changed::after{content:'●';margin-left:.4rem;font-size:.6rem}

/* 基础不变量 */
.root-invariants{border-top:1px solid var(--root-line);padding-top:.8rem}
.root-invariant-title{color:var(--root-dim);font-size:.66rem;letter-spacing:.1em;text-transform:uppercase;margin:0 0 .5rem}
.root-invariant{display:block;width:100%;text-align:left;background:none;border:none;color:var(--root-dim);padding:.3rem 0;font-size:.78rem;cursor:pointer;font-family:inherit;border-bottom:1px dotted var(--root-line)}
.root-invariant span{color:#93ab9d}
.root-invariant-explain{margin:.35rem 0 0;color:var(--root-dim);font-size:.72rem;line-height:1.5;padding-left:.6rem;border-left:1px solid var(--root-line)}
.root-invariant-note{margin-top:.6rem;color:var(--root-danger-bright);font-size:.72rem;line-height:1.5}

/* 拓扑 canvas */
.root-canvas{flex:1;width:100%;min-height:260px;display:block}
.root-topology-legend{padding:.5rem 1rem;color:var(--root-dim);font-size:.74rem;border-top:1px solid var(--root-line)}

/* 参数区 */
.root-params{max-height:44%;overflow-y:auto;padding:.9rem 1rem;border-top:1px solid var(--root-line);background:#070d0a}
.root-param-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:.7rem}
.root-param{border:1px solid var(--root-line);border-radius:2px;padding:.6rem;background:#0a110d}
.root-param.changed{border-color:var(--root-danger)}
.root-param.self{border-left:3px solid var(--root-danger-bright)}
.root-param.locked{opacity:.72}
.root-param-head{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem;margin-bottom:.4rem}
.root-param-name{font-size:.85rem;color:#c3d5c9}
.root-param-key{font-size:.62rem;color:var(--root-dim)}
.root-param-control{margin:.3rem 0}
.root-number,.root-select,.root-dep-select{background:#060b09;border:1px solid var(--root-line);color:#cfe0d4;padding:.28rem .4rem;font-family:ui-monospace,monospace;font-size:.8rem;border-radius:2px;width:100%}
.root-slider{width:70%;accent-color:var(--root-danger-bright);vertical-align:middle}
.root-slider-val{font-family:ui-monospace,monospace;font-size:.78rem;color:#cfe0d4;margin-left:.5rem}
.root-toggle{background:#060b09;border:1px solid var(--root-line);color:var(--root-dim);padding:.28rem .7rem;font-size:.76rem;cursor:pointer;border-radius:2px}
.root-toggle.on{color:#cfe0d4;border-color:var(--root-danger)}
.root-locked-val{font-family:ui-monospace,monospace;color:var(--root-dim);font-size:.8rem;letter-spacing:.08em}
.root-param-meta{display:flex;flex-wrap:wrap;gap:.3rem .6rem;margin-top:.4rem;font-size:.64rem;color:var(--root-dim)}
.root-param-meta em{font-style:normal;text-transform:uppercase;letter-spacing:.06em}
.root-param-now{color:var(--root-danger-bright)}
.root-param-default{color:var(--root-dim)}
.root-param-note{margin:.4rem 0 0;font-size:.7rem;color:var(--root-danger-bright);line-height:1.45}

/* 依赖断开 */
.root-deps{margin-top:1rem;border-top:1px solid var(--root-line);padding-top:.8rem}
.root-deps-title{color:var(--root-dim);font-size:.66rem;letter-spacing:.1em;text-transform:uppercase;margin:0 0 .5rem}
.root-dep-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}
.root-dep{display:flex;justify-content:space-between;align-items:center;gap:.6rem;font-size:.78rem}
.root-dep .root-dep-select{width:auto;min-width:120px}

/* 右侧差异 */
.root-diff h4{color:var(--root-dim);font-size:.68rem;letter-spacing:.09em;text-transform:uppercase;margin:1rem 0 .4rem}
.root-diff ul{list-style:none;margin:0;padding:0;font-size:.78rem;line-height:1.6}
.root-diff li{padding:.15rem 0;border-bottom:1px dotted var(--root-line)}
.root-danger{color:var(--root-danger-bright)}
.root-self{border:1px solid var(--root-danger);border-radius:2px;padding:.7rem;background:#0d0a0a}
.root-self-age{font-family:ui-monospace,monospace;font-size:1rem;color:#d6c2c2;margin:.3rem 0}
.root-self-lines{margin:.4rem 0 0}
.root-self-dir p{font-size:.74rem;color:var(--root-dim);margin:.2rem 0}
.root-hint{color:var(--root-dim);font-size:.78rem;font-style:italic}
.root-sim-out,.root-sim-time{font-size:.78rem}
.root-sim-out{color:#c3d5c9;line-height:1.5;margin-top:.4rem}
.root-sim-select{background:#060b09;border:1px solid var(--root-line);color:#cfe0d4;padding:.25rem .4rem;font-size:.78rem;border-radius:2px;width:100%}
.root-stability{margin-top:1rem;border:1px solid var(--root-line);border-radius:2px;padding:.7rem}
.root-stab-val{font-family:ui-monospace,monospace;font-size:.95rem;color:#c3d5c9}
.root-stab-reasons{font-size:.72rem;color:var(--root-danger-bright)}
.root-stability.tier-arbitrate,.root-stability.tier-misalign{border-color:var(--root-danger)}
.root-stability.tier-unpredictable,.root-stability.tier-disagree{border-color:var(--root-danger-bright);background:#0d0a0a}

/* 底栏 */
.root-footer{border-top:1px solid var(--root-line);padding:.8rem 1.4rem;display:flex;flex-direction:column;gap:.6rem;background:#070d0a}
.root-pending-title{color:var(--root-dim);font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;margin:0 0 .4rem}
.root-pending-stats{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.3rem 1.2rem;font-size:.76rem;color:#bccfc3}
.root-footer-actions{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}
.root-footer-notice{color:var(--root-dim);font-size:.76rem;flex:1;min-width:180px}
.root-footer-buttons{display:flex;gap:.5rem;flex-wrap:wrap}
.root-restore,.root-branch,.root-simulate,.root-commit,.root-exit{background:none;border:1px solid var(--root-line);color:var(--root-text);padding:.45rem .9rem;font-size:.8rem;cursor:pointer;border-radius:2px;font-family:inherit}
.root-restore:hover,.root-branch:hover,.root-simulate:hover{border-color:var(--root-dim)}
.root-commit{border-color:var(--root-danger);color:#d6c2c2}
.root-commit:not(:disabled):hover{background:var(--root-danger);color:#f0e5e5}
.root-commit:disabled{opacity:.4;cursor:not-allowed}
.root-exit{align-self:flex-start;opacity:.5;font-size:.72rem;border-color:transparent;text-decoration:underline;padding-left:0}
.root-exit:hover{opacity:.85}

/* 覆盖层：确认 / 进程 / 结果 / 退出 */
.root-overlay{position:absolute;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;background:#04080699;backdrop-filter:blur(3px);padding:2rem}
.root-overlay-panel{max-width:520px;width:100%;background:#0a120e;border:1px solid var(--root-danger);border-radius:3px;padding:1.6rem;text-align:center}
.root-overlay-q{font-size:1.05rem;color:#d4e3d8;margin-bottom:1rem}
.root-overlay-actions{display:flex;gap:.7rem;justify-content:center;flex-wrap:wrap;margin-top:1rem}
.root-accept{background:var(--root-danger);border:1px solid var(--root-danger-bright);color:#f0e5e5;padding:.5rem 1.2rem;cursor:pointer;border-radius:2px;font-family:inherit}
.root-revise{background:none;border:1px solid var(--root-line);color:var(--root-text);padding:.5rem 1.2rem;cursor:pointer;border-radius:2px;font-family:inherit}
.root-progress{text-align:left;font-family:ui-monospace,monospace;font-size:.78rem;color:var(--root-dim)}
.root-step{margin:.2rem 0;opacity:0;animation:rootStepIn .4s forwards}
@keyframes rootStepIn{to{opacity:1}}
.root-result-line{font-size:1.05rem;color:#cadbd0;margin-bottom:.4rem}
.root-result-sub{color:var(--root-dim);font-size:.82rem;margin-bottom:.9rem}
.root-result-stats{list-style:none;margin:0 0 1rem;padding:0;text-align:left;font-size:.78rem;color:#bccfc3;line-height:1.7}
.root-exit-line{font-size:.95rem;color:#c3d5c9;margin:.3rem 0}
.root-exit-final{color:var(--root-dim);font-size:.8rem;margin-top:.9rem;font-style:italic}

/* toast */
.root-toast{position:absolute;bottom:5rem;left:50%;transform:translateX(-50%);background:#0a120e;border:1px solid var(--root-line);color:#cfe0d4;padding:.5rem 1rem;font-size:.82rem;border-radius:2px;z-index:40}
.root-toast.warn{border-color:var(--root-danger)}

/* 不稳定时轻微结构错位（不影响可读性） */
.root-console.root-unstable .root-param{transform:translateX(var(--root-shift,0))}
.root-console.root-unstable .root-param:nth-child(3n){--root-shift:1px}
.root-console.root-unstable .root-param:nth-child(3n+1){--root-shift:-1px}
.root-console.root-readonly .root-layout{opacity:.55;pointer-events:none;transition:opacity 4s ease}

/* 移动端：纵向因果链 */
@media (max-width:820px){
  .root-tabs{display:flex;flex-wrap:wrap}
  .root-layout{grid-template-columns:1fr;grid-template-rows:auto}
  .root-catalog,.root-topology,.root-diff{display:none}
  .root-console[data-tab=params] .root-catalog{display:block}
  .root-console[data-tab=topology] .root-topology{display:flex}
  .root-console[data-tab=impact] .root-diff{display:block}
  .root-params{max-height:none}
  .root-canvas{min-height:320px}
  .root-footer-buttons{width:100%}
  .root-statusbar{width:100%}
}
@media (prefers-reduced-motion:reduce){
  .root-enter-line{transition:none}
  .root-step{animation:none;opacity:1}
  .root-console.root-readonly .root-layout{transition:none}
}

/* ===================================================================== */
/* K–11 SECRET EXCHANGE                                                   */
/* ===================================================================== */
.secret-game {
  position: fixed; inset: 0; z-index: 60;
  display: none;
  background: radial-gradient(120% 90% at 50% 40%, #0d1a15 0%, #060b09 60%, #030605 100%);
  color: #d6e2d6;
  overflow: hidden;
  font-family: inherit;
}
.secret-game.open { display: block; }

.secret-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  pointer-events: none;
}

.secret-title-block {
  position: absolute; top: 24px; left: 28px;
  z-index: 3; pointer-events: none;
}
.secret-title-block .place-code {
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
  color: #7fa090; margin: 0 0 4px;
}
.secret-title-block h2 { margin: 0; font-size: 1.15rem; font-weight: 500; color: #e6efe6; letter-spacing: .04em; }

.secret-back {
  position: absolute; top: 22px; right: 26px; z-index: 5;
}
.secret-skip {
  position: absolute; bottom: 22px; right: 26px; z-index: 5;
  background: transparent; border: 1px solid rgba(150,180,168,.4);
  color: #a9c2b4; padding: 7px 14px; border-radius: 20px;
  font-size: .78rem; letter-spacing: .05em; cursor: pointer;
}
.secret-skip:hover { border-color: rgba(180,210,196,.7); color: #d6e2d6; }

.secret-stage {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  padding: 96px 24px 96px;
  box-sizing: border-box;
  pointer-events: none;
}
.secret-stage > * { pointer-events: auto; }

.secret-status {
  position: absolute; bottom: 20px; left: 28px; z-index: 4;
  margin: 0; font-size: .78rem; letter-spacing: .04em; color: #8fae9f;
  max-width: 60%;
}

/* Arrival */
.secret-arrival {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 22px; max-width: 560px; width: 100%;
  text-align: center;
}
.secret-hover-zone { display: none; }
.secret-seed-text {
  position: relative; z-index: 1;
  margin: 0; font-size: 1.05rem; line-height: 1.7; color: #cde0d2;
  filter: blur(3px); opacity: .55;
  transition: filter .5s ease, opacity .5s ease;
  max-width: 30ch;
}
.secret-seed-text.is-clear { filter: blur(0); opacity: 1; }

.secret-meta { display: flex; flex-direction: column; gap: 4px; }
.secret-meta p { margin: 0; font-size: .76rem; color: #86a597; letter-spacing: .03em; }

.secret-choices {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
}
.secret-extras {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 4px; opacity: .7;
}
.secret-extra-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.secret-extra-label { font-size: .74rem; color: #8fae9f; }

/* Buttons */
.secret-btn {
  background: rgba(20,36,30,.6);
  border: 1px solid rgba(140,170,158,.45);
  color: #d6e2d6;
  padding: 11px 22px; border-radius: 26px;
  font-size: .9rem; letter-spacing: .04em; cursor: pointer;
  transition: border-color .25s ease, background .25s ease, color .25s ease;
}
.secret-btn:hover { border-color: rgba(190,220,206,.85); background: rgba(30,50,42,.7); }
.secret-btn:focus-visible { outline: 2px solid #9fc2b0; outline-offset: 2px; }
.secret-btn.secret-mini { padding: 7px 14px; font-size: .78rem; border-radius: 18px; }
.secret-btn.secret-option { min-width: 190px; }
.secret-btn.secret-primary { border-color: rgba(190,220,206,.7); background: rgba(34,56,47,.7); }
.secret-btn.secret-secondary { background: transparent; }
.secret-btn.is-locked, .secret-btn:disabled { opacity: .4; cursor: not-allowed; }
.secret-btn.is-waiting { opacity: .5; cursor: progress; }
/* Amber only for the irreversible original-view action */
.secret-btn.secret-irrev { border-color: rgba(196,170,96,.6); color: #d8c58a; }
.secret-btn.secret-irrev:hover { border-color: rgba(214,190,120,.9); color: #ecdca0; }

/* Forward flow */
.secret-forward-flow { display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: 520px; width: 100%; }
.secret-substep { margin: 0; font-size: .95rem; color: #cadfd0; letter-spacing: .04em; }
.secret-option-list { display: flex; flex-direction: column; gap: 10px; width: 100%; align-items: center; }
.secret-note { margin: 0; font-size: .74rem; color: #7fa090; }

/* Outcome */
.secret-outcome { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 560px; width: 100%; text-align: center; }
.secret-outcome-title { margin: 0; font-size: 1.05rem; font-weight: 500; color: #e6efe6; letter-spacing: .05em; }
.secret-reveal { margin: 0; font-size: 1.02rem; line-height: 1.7; color: #e2ede4; max-width: 34ch; }
.secret-inference { margin: 0; font-size: .82rem; color: #9db8ab; font-style: italic; }
.secret-consequence { margin: 0; font-size: .9rem; color: #b6ccbf; line-height: 1.6; max-width: 36ch; }
.secret-mutation { margin: 0; font-size: .72rem; color: #7a998b; letter-spacing: .03em; }
.secret-continue { margin-top: 6px; }

.secret-original-box {
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  max-width: 520px; text-align: center;
  border: 1px solid rgba(196,170,96,.4); border-radius: 12px; padding: 20px 24px;
  background: rgba(26,22,10,.4);
}
.secret-original-text { margin: 0; font-size: 1rem; line-height: 1.7; color: #ecefe6; }
.secret-original-note { margin: 0; font-size: .74rem; color: #c4aa60; letter-spacing: .05em; }

/* Ending */
.secret-ending { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 560px; width: 100%; text-align: center; }
.secret-ending-title { margin: 0; font-size: 1.05rem; font-weight: 500; color: #e6efe6; letter-spacing: .05em; }
.secret-summary { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; text-align: left; width: 100%; max-width: 420px; }
.secret-summary dt { color: #86a597; font-size: .8rem; letter-spacing: .03em; }
.secret-summary dd { margin: 0; color: #d6e2d6; font-size: .86rem; }
.secret-closing { margin: 8px 0 0; font-size: .92rem; line-height: 1.8; color: #c2d6c9; white-space: pre-line; max-width: 32ch; }
.secret-ending-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* Mobile */
@media (max-width: 640px) {
  .secret-title-block { top: 16px; left: 16px; }
  .secret-back { top: 14px; right: 14px; }
  .secret-skip { bottom: 16px; right: 16px; }
  .secret-stage { padding: 84px 16px 92px; }
  .secret-choices { flex-direction: column; width: 100%; max-width: 320px; }
  .secret-btn { width: 100%; }
  .secret-btn.secret-mini { width: auto; }
  .secret-status { max-width: 90%; left: 16px; bottom: 56px; }
  .secret-seed-text { font-size: .98rem; }
}

@media (prefers-reduced-motion: reduce) {
  .secret-seed-text { transition: opacity .3s ease; filter: none; }
  .secret-seed-text:not(.is-clear) { opacity: .8; }
  .secret-btn { transition: none; }
}

/* ===================================================================== */
/* R–00 RECOVERY ROOM                                                     */
/* ===================================================================== */
.restore-room {
  position: fixed; inset: 0; z-index: 60; display: none;
  background: radial-gradient(120% 90% at 50% 42%, #0c1a15 0%, #060d0a 58%, #030706 100%);
  color: #d6e2d6; overflow: hidden; font-family: inherit;
}
.restore-room.open { display: block; }
.restore-room-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.restore-room-title-block { position: absolute; top: 22px; left: 26px; z-index: 3; pointer-events: none; }
.restore-room-title-block .place-code { font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: #7fa090; margin: 0 0 4px; }
.restore-room-title-block h2 { margin: 0; font-size: 1.12rem; font-weight: 500; color: #e6efe6; letter-spacing: .04em; }

.restore-room-back { position: absolute; top: 20px; right: 24px; z-index: 6; }
.restore-room-skip {
  position: absolute; bottom: 20px; right: 24px; z-index: 6;
  background: transparent; border: 1px solid rgba(150,180,168,.4); color: #a9c2b4;
  padding: 7px 14px; border-radius: 20px; font-size: .78rem; letter-spacing: .05em; cursor: pointer;
}
.restore-room-skip:hover { border-color: rgba(180,210,196,.7); color: #d6e2d6; }

.restore-room-status {
  position: absolute; bottom: 18px; left: 26px; z-index: 5; margin: 0;
  font-size: .76rem; letter-spacing: .04em; color: #8fae9f; max-width: 55%;
}

/* Stage: center reserved for canvas; controls sit at the edges */
.restore-room-stage {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  padding: 84px 24px 84px; box-sizing: border-box; pointer-events: none;
}
.restore-room-stage > * { pointer-events: auto; }

.restore-room-panel {
  background: rgba(10,20,16,.72);
  border: 1px solid rgba(120,150,140,.28);
  border-radius: 14px; padding: 20px 22px;
  max-width: 520px; width: 100%;
  max-height: 82vh; overflow-y: auto;
  backdrop-filter: blur(3px);
}
/* Sidebar panels dock to the left so the fragment field stays visible */
.restore-room-sidebar {
  position: absolute; left: 26px; top: 50%; transform: translateY(-50%);
  max-width: 330px; margin: 0;
}
.restore-room-h { margin: 0 0 14px; font-size: 1.02rem; font-weight: 500; color: #e6efe6; letter-spacing: .04em; }
.restore-room-hint, .restore-room-note { margin: 0 0 12px; font-size: .78rem; color: #8fae9f; line-height: 1.6; }

/* Buttons */
.restore-room-btn {
  background: rgba(20,36,30,.65); border: 1px solid rgba(140,170,158,.45); color: #d6e2d6;
  padding: 10px 18px; border-radius: 22px; font-size: .86rem; letter-spacing: .03em; cursor: pointer;
  transition: border-color .25s ease, background .25s ease, color .25s ease;
}
.restore-room-btn:hover { border-color: rgba(190,220,206,.85); background: rgba(30,50,42,.7); }
.restore-room-btn:focus-visible { outline: 2px solid #9fc2b0; outline-offset: 2px; }
.restore-room-btn:disabled { opacity: .4; cursor: not-allowed; }
.restore-room-primary { border-color: rgba(190,220,206,.7); background: rgba(34,56,47,.7); }
.restore-room-secondary { background: transparent; }
.restore-room-irrev { border-color: rgba(196,170,96,.6); color: #d8c58a; }
.restore-room-irrev:hover { border-color: rgba(214,190,120,.9); color: #ecdca0; }

.restore-room-nav { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-start; margin-top: 16px; }

/* Subject cards */
.restore-room-subject-list { display: flex; flex-direction: column; gap: 12px; }
.restore-room-card {
  display: flex; flex-direction: column; gap: 5px; text-align: left;
  background: rgba(16,28,23,.6); border: 1px solid rgba(130,160,150,.3); border-radius: 10px;
  padding: 14px 16px; cursor: pointer; color: #d6e2d6;
  transition: border-color .2s ease, background .2s ease;
}
.restore-room-card:hover { border-color: rgba(190,220,206,.7); background: rgba(24,42,34,.7); }
.restore-room-card-code { font-size: .92rem; color: #e6efe6; letter-spacing: .03em; }
.restore-room-card-status { font-size: .78rem; color: #a9c2b4; }
.restore-room-card-line { font-size: .74rem; color: #9db8ab; }
.restore-room-recoverable { color: #a9c8b8; }
.restore-room-lost { color: #86a597; }
.restore-room-card-flag { font-size: .72rem; color: #c4aa60; letter-spacing: .04em; }
.restore-room-done { color: #7fa090; }

/* Fragment list */
.restore-room-frag-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.restore-room-frag-row {
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  background: rgba(16,28,23,.55); border: 1px solid rgba(120,150,140,.25); border-radius: 8px;
  padding: 9px 12px; cursor: pointer; color: #d6e2d6; transition: border-color .2s ease;
}
.restore-room-frag-row:hover { border-color: rgba(180,210,196,.6); }
.restore-room-frag-row.is-selected { border-color: rgba(190,220,206,.85); background: rgba(28,48,39,.7); }
.restore-room-frag-row.is-corrupted { opacity: .5; cursor: not-allowed; border-style: dashed; }
.restore-room-frag-row.type-relation .restore-room-frag-type { color: #dbe8e2; }
.restore-room-frag-row.type-system .restore-room-frag-type { color: #d0b876; }
.restore-room-frag-type { font-size: .82rem; letter-spacing: .03em; }
.restore-room-frag-meta { font-size: .72rem; color: #8fae9f; }
.restore-room-frag-corrupt { font-size: .7rem; color: #9aa; }
.restore-room-frag-info { margin: 0 0 12px; font-size: .76rem; color: #a9c2b4; min-height: 2.4em; line-height: 1.5; }

/* Methods */
.restore-room-method-list { display: flex; flex-direction: column; gap: 12px; }
.restore-room-method-card {
  display: flex; flex-direction: column; gap: 5px; text-align: left;
  background: rgba(16,28,23,.6); border: 1px solid rgba(130,160,150,.3); border-radius: 10px;
  padding: 13px 16px; cursor: pointer; color: #d6e2d6; transition: border-color .2s ease, background .2s ease;
}
.restore-room-method-card:hover { border-color: rgba(190,220,206,.7); background: rgba(24,42,34,.7); }
.restore-room-method-card.restore-room-absent { border-color: rgba(150,160,140,.4); }
.restore-room-method-name { font-size: .9rem; color: #e6efe6; }
.restore-room-method-desc { font-size: .76rem; color: #9db8ab; line-height: 1.55; }

/* Sliders */
.restore-room-slider-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.restore-room-slider-label { display: flex; justify-content: space-between; font-size: .82rem; color: #cadfd0; }
.restore-room-slider-val { color: #a9c2b4; font-variant-numeric: tabular-nums; }
.restore-room-slider { width: 100%; accent-color: #8fbaa4; cursor: pointer; }
.restore-room-preview {
  margin-top: 8px; padding: 12px 14px; border-radius: 8px;
  background: rgba(10,20,16,.6); border: 1px solid rgba(120,150,140,.22);
}
.restore-room-preview-line { margin: 0 0 5px; font-size: .76rem; color: #b6ccbf; line-height: 1.5; }
.restore-room-amber { color: #c4aa60; }

/* Confirm + result */
.restore-room-summary { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 14px; }
.restore-room-summary dt { color: #86a597; font-size: .78rem; letter-spacing: .02em; }
.restore-room-summary dd { margin: 0; color: #d6e2d6; font-size: .82rem; }
.restore-room-confirm-line { margin: 0 0 14px; font-size: .88rem; color: #c2d6c9; line-height: 1.7; }
.restore-room-closing { margin: 8px 0 0; font-size: .9rem; line-height: 1.8; color: #c2d6c9; white-space: pre-line; }
.restore-room-step { margin: 0 0 10px; font-size: .92rem; color: #cadfd0; letter-spacing: .04em; }
.restore-room-observe { margin: 12px 0 0; font-size: .82rem; color: #a9c2b4; line-height: 1.6; }

/* Overlay (override confirm) */
.restore-room-overlay {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  background: rgba(4,8,6,.7); padding: 24px;
}
.restore-room-overlay-box {
  background: rgba(14,24,19,.96); border: 1px solid rgba(196,170,96,.45); border-radius: 14px;
  padding: 26px 28px; max-width: 420px; text-align: center;
}
.restore-room-overlay-text { margin: 0 0 18px; font-size: .92rem; line-height: 1.7; color: #e2ede4; }
.restore-room-overlay .restore-room-nav { justify-content: center; }

/* Star-map node pulse when a recovery was completed */
.node.restore-armed .node-core { animation: restoreRoomPulse 3.6s ease-in-out infinite; }
@keyframes restoreRoomPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(160,120,70,0); }
  50% { box-shadow: 0 0 12px 3px rgba(170,125,72,.4); }
}

/* Mobile */
@media (max-width: 640px) {
  .restore-room-title-block { top: 14px; left: 16px; }
  .restore-room-back { top: 12px; right: 14px; }
  .restore-room-skip { bottom: 14px; right: 14px; }
  .restore-room-stage { padding: 72px 12px 84px; align-items: flex-start; }
  .restore-room-sidebar { position: static; transform: none; left: auto; top: auto; max-width: 520px; margin: 0 auto; }
  .restore-room-panel { max-height: none; }
  .restore-room-status { max-width: 90%; left: 14px; bottom: 52px; }
  .restore-room-nav { justify-content: center; }
  .restore-room-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .restore-room-btn, .restore-room-card, .restore-room-method-card, .restore-room-frag-row { transition: none; }
  .node.restore-armed .node-core { animation: none; }
}

/* ===================================================================== */
/* R–00 fragment UI — enriched                                           */
/* ===================================================================== */
.restore-room-frag-counter {
  margin: 0 0 8px; font-size: .74rem; color: #a9c2b4; letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
}
.restore-room-frag-legend {
  display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 12px;
}
.restore-room-legend-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .68rem; color: #8fae9f; letter-spacing: .02em;
}
/* Type dot colors (match canvas palette) */
.restore-room-frag-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.type-memory   .restore-room-frag-dot { background: #aac4b4; }
.type-behaviour .restore-room-frag-dot { background: #96b4a8; }
.type-relation .restore-room-frag-dot { background: #dbe8e2; }
.type-system   .restore-room-frag-dot { background: #c6aa60; }

/* Fragment row (richer card) */
.restore-room-frag-row {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  background: linear-gradient(180deg, rgba(18,32,26,.62), rgba(14,26,21,.55));
  border: 1px solid rgba(120,150,140,.24); border-left: 2px solid rgba(120,150,140,.35);
  border-radius: 9px; padding: 11px 13px; cursor: pointer; color: #d6e2d6;
  transition: border-color .2s ease, background .2s ease, transform .12s ease;
}
.restore-room-frag-row:hover { border-color: rgba(180,210,196,.6); transform: translateX(2px); }
.restore-room-frag-row.is-selected {
  border-color: rgba(190,220,206,.85);
  background: linear-gradient(180deg, rgba(30,52,42,.8), rgba(24,44,35,.7));
}
.restore-room-frag-row.type-memory   { border-left-color: #aac4b4; }
.restore-room-frag-row.type-behaviour { border-left-color: #96b4a8; }
.restore-room-frag-row.type-relation { border-left-color: #dbe8e2; }
.restore-room-frag-row.type-system   { border-left-color: #c6aa60; }
.restore-room-frag-row.is-corrupted { opacity: .5; cursor: not-allowed; border-style: dashed; }

.restore-room-frag-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.restore-room-frag-badge { display: inline-flex; align-items: center; gap: 6px; }
.restore-room-frag-type { font-size: .82rem; letter-spacing: .03em; color: #e0ece4; }
.restore-room-frag-row.type-system .restore-room-frag-type { color: #d8c58a; }
.restore-room-frag-tags { display: inline-flex; align-items: center; gap: 5px; }
.restore-room-tag {
  font-size: .62rem; letter-spacing: .04em; padding: 2px 6px; border-radius: 10px;
  border: 1px solid rgba(140,170,158,.35); color: #9db8ab;
}
.restore-room-tag.tag-synthetic { border-color: rgba(196,170,96,.45); color: #cbb271; }
.restore-room-tag.tag-linked { border-color: rgba(150,180,210,.4); color: #a9c0d4; }
.restore-room-frag-check { color: #bfe0ce; font-size: .8rem; }

.restore-room-frag-content { font-size: .78rem; line-height: 1.5; color: #c6dccd; }
.restore-room-frag-source { font-size: .68rem; color: #86a597; letter-spacing: .02em; }

.restore-room-frag-meters { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.restore-room-meter { display: flex; align-items: center; gap: 8px; }
.restore-room-meter-label { font-size: .64rem; color: #8fae9f; width: 3.6em; flex: 0 0 auto; }
.restore-room-meter-bar {
  flex: 1 1 auto; height: 4px; border-radius: 3px; background: rgba(120,150,140,.2); overflow: hidden;
}
.restore-room-meter-bar > span { display: block; height: 100%; border-radius: 3px; background: #8fbaa4; transition: width .3s ease; }
.restore-room-meter-bar.tier-high > span { background: #8fc4a6; }
.restore-room-meter-bar.tier-mid > span { background: #b3c890; }
.restore-room-meter-bar.tier-low > span { background: #c6aa60; }
.restore-room-meter-bar.tier-complete > span { background: #7fa9c0; }
.restore-room-meter-val { font-size: .64rem; color: #a9c2b4; width: 2.8em; text-align: right; flex: 0 0 auto; font-variant-numeric: tabular-nums; }

.restore-room-frag-corrupt { font-size: .68rem; color: #9aa; letter-spacing: .03em; }

/* Hover info panel (richer) */
.restore-room-frag-info {
  margin: 0 0 12px; padding: 10px 12px; min-height: 5.6em;
  display: flex; flex-direction: column; gap: 4px;
  background: rgba(10,20,16,.6); border: 1px solid rgba(120,150,140,.22); border-radius: 8px;
}
.restore-room-frag-info-idle { font-size: .74rem; color: #86a597; line-height: 1.5; }
.restore-room-frag-info-type { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: #e0ece4; }
.restore-room-frag-info-type.type-system { color: #d8c58a; }
.restore-room-frag-info-content { font-size: .78rem; line-height: 1.55; color: #cadfd0; }
.restore-room-frag-info-row { font-size: .68rem; color: #9db8ab; letter-spacing: .02em; }

@media (prefers-reduced-motion: reduce) {
  .restore-room-frag-row:hover { transform: none; }
  .restore-room-meter-bar > span { transition: none; }
}

/* ── V–09 ECHO CALIBRATION ─────────────────────────────────────── */
.echo-game {
  position: fixed; inset: 0; z-index: 60; display: none;
  background: radial-gradient(120% 90% at 62% 42%, #0a1712 0%, #05100b 58%, #020705 100%);
  color: #d2e6da; overflow: hidden; font-family: inherit;
}
.echo-game.open { display: block; }
.echo-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.echo-title-block { position: absolute; top: 22px; left: 26px; z-index: 3; pointer-events: none; }
.echo-title-block .place-code { font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: #6fa88c; margin: 0 0 4px; }
.echo-title-block h2 { margin: 0; font-size: 1.12rem; font-weight: 500; color: #e2f0e6; letter-spacing: .04em; }

.echo-back { position: absolute; top: 20px; right: 24px; z-index: 6; }
.echo-sound {
  position: absolute; top: 68px; right: 24px; z-index: 6;
  background: transparent; border: 1px solid rgba(120,190,160,.4); color: #a3d0ba;
  padding: 7px 14px; border-radius: 20px; font-size: .78rem; letter-spacing: .05em; cursor: pointer;
}
.echo-sound:hover { border-color: rgba(160,220,190,.75); color: #d2e6da; }

.echo-status {
  position: absolute; bottom: 18px; left: 26px; z-index: 5; margin: 0;
  font-size: .76rem; letter-spacing: .04em; color: #7fb59a; max-width: 55%;
}

/* Stage: canvas fills the right; panels dock to the left on wide screens */
.echo-stage {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: flex-start;
  padding: 84px 24px 84px; box-sizing: border-box; pointer-events: none;
}
.echo-stage > * { pointer-events: auto; }

.echo-panel, .echo-result {
  background: rgba(8,18,13,.74);
  border: 1px solid rgba(110,170,145,.28);
  border-radius: 14px; padding: 20px 22px;
  max-width: 360px; width: 100%;
  max-height: 82vh; overflow-y: auto;
  margin-left: 6px;
  backdrop-filter: blur(3px);
}
.echo-heading, .echo-result-title { margin: 0 0 12px; font-size: 1.02rem; font-weight: 500; color: #e2f0e6; letter-spacing: .04em; }
.echo-desc { margin: 0 0 14px; font-size: .8rem; color: #8fbca5; line-height: 1.6; }
.echo-signal-meta, .echo-signal-service { margin: 0 0 10px; font-size: .74rem; color: #6fa88c; letter-spacing: .03em; }
.echo-convergence { margin: 0 0 10px; font-size: .86rem; color: #a7dcc0; letter-spacing: .04em; }

/* Buttons */
.echo-btn {
  background: rgba(18,34,27,.65); border: 1px solid rgba(120,175,150,.45); color: #d2e6da;
  padding: 10px 18px; border-radius: 22px; font-size: .86rem; letter-spacing: .03em; cursor: pointer;
  transition: border-color .25s ease, background .25s ease, color .25s ease;
}
.echo-btn:hover { border-color: rgba(170,220,195,.85); background: rgba(26,46,37,.7); }
.echo-btn:focus-visible { outline: 2px solid #8fd0b0; outline-offset: 2px; }
.echo-btn:disabled, .echo-btn.is-locked, .echo-btn.is-waiting { opacity: .4; cursor: not-allowed; }
.echo-primary { border-color: rgba(170,220,195,.7); background: rgba(30,52,42,.7); }
.echo-secondary { background: transparent; }
.echo-quiet { opacity: .78; }
.echo-danger { border-color: rgba(200,140,110,.6); color: #e0b79a; }
.echo-danger:hover { border-color: rgba(220,160,120,.9); color: #f0cba8; }
.echo-mini { padding: 7px 13px; font-size: .78rem; }
.echo-force { border-color: rgba(196,170,96,.55); color: #d8c58a; }
.echo-irrev { border-color: rgba(196,170,96,.6); color: #d8c58a; }

.echo-actions, .echo-force-row, .echo-archive-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.echo-adjust-options, .echo-choose-options { display: flex; flex-direction: column; gap: 10px; }

/* Echo tap button (large, central) */
.echo-tap {
  display: block; width: 100%; padding: 22px; margin: 6px 0 4px;
  font-size: 1rem; border-radius: 16px;
  background: rgba(24,46,37,.7); border: 1px solid rgba(150,215,185,.5);
}
.echo-tap:active { background: rgba(40,70,56,.85); }
.echo-tap-counter { margin: 0 0 8px; font-size: .78rem; color: #8fbca5; }

/* Result */
.echo-rel-name { margin: 0 0 6px; font-size: 1.05rem; color: #a7dcc0; letter-spacing: .05em; }
.echo-rel-desc { margin: 0 0 14px; font-size: .8rem; color: #8fbca5; line-height: 1.6; }
.echo-summary { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; margin: 0 0 14px; }
.echo-summary dt { font-size: .74rem; color: #6fa88c; }
.echo-summary dd { margin: 0; font-size: .78rem; color: #d2e6da; text-align: right; }
.echo-closing { margin: 0 0 14px; font-size: .8rem; color: #9fc8b4; line-height: 1.6; font-style: italic; }
.echo-origin-box { margin-top: 12px; padding: 12px 14px; border: 1px dashed rgba(196,170,96,.5); border-radius: 10px; }
.echo-origin-text { margin: 0 0 6px; font-size: .82rem; color: #d8c58a; }
.echo-origin-note { margin: 0; font-size: .72rem; color: #9aa; }
.echo-result-archived { color: #a7dcc0; }

@media (max-width: 720px) {
  .echo-stage { justify-content: center; align-items: flex-end; padding: 70px 14px 70px; }
  .echo-panel, .echo-result { max-width: 100%; margin-left: 0; max-height: 60vh; }
  .echo-sound { top: 62px; right: 14px; }
}

/* secret: read-gate + post-read actions (v=secret-3) */
.secret-lock-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: rgba(220,225,235,0.6); text-align: center; }
.secret-lock-hint { font-size: 11.5px; color: rgba(220,225,235,0.5); }
.secret-btn.is-locked { opacity: 0.4; cursor: not-allowed; }
.secret-postread { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px 0 4px; }

/* 背景音乐开关键 */
.locale-wrap { display: flex; align-items: center; gap: 8px; }
.music-toggle {
  pointer-events: auto; cursor: pointer;
  font: inherit; font-size: 12px; letter-spacing: .04em;
  padding: 5px 10px; border-radius: 7px;
  color: rgba(210, 232, 224, 0.9);
  background: rgba(18, 40, 30, 0.55);
  border: 1px solid rgba(120, 180, 150, 0.32);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
  white-space: nowrap;
}
.music-toggle:hover, .music-toggle:focus-visible { border-color: rgba(150, 220, 180, 0.5); outline: none; }
.music-toggle.is-off { color: rgba(180, 196, 190, 0.55); border-color: rgba(120, 140, 132, 0.3); background: rgba(16, 24, 20, 0.5); }
