:root {
  --bg: #0f0e0c;
  --panel: #12121a;
  --off: #e8e4dc;
  --gold: #f9e795;
  --teal: #02c39a;
  --holo-magenta: #ff2d9a;
  --holo-cyan: #00ffd5;
  --holo-violet: #8b5cff;
  --holo-amber: #ffc400;
  --holo-lime: #b8ff2e;
  --muted: #94a3b8;
  --max: 52rem;
  --hearth-glow: #e8a87c;
  --hearth-deep: #2a1810;
  --hearth-text: #ffd4b8;
  --forge-glow: #7eb8ff;
  --forge-deep: #0c1420;
  --forge-text: #c8dcff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--off); line-height: 1.55; }
a { color: var(--teal); }
a:hover { color: var(--gold); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.wrap-nav { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

.hero { padding: 2.5rem 0 1.75rem; background: linear-gradient(180deg, #0f0e0c, #12121a); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; color: var(--muted); }
h1 { color: var(--gold); font-size: clamp(1.85rem, 4.5vw, 2.65rem); margin: 0.45rem 0; line-height: 1.15; }
.lead { font-size: 1.06rem; max-width: 44rem; }
.tier { display: inline-block; margin-top: 0.75rem; font-size: 0.85rem; color: var(--muted); border-left: 3px solid var(--teal); padding-left: 0.65rem; }

main { padding: 1.5rem 0 3.5rem; }
.card {
  background: rgba(18, 18, 26, 0.92);
  border: 1px solid rgba(2, 195, 154, 0.22);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}
.card h2 { color: var(--gold); font-size: 1.05rem; margin: 0 0 0.5rem; }
.card p, .card li { font-size: 0.95rem; }
.card ol { margin: 0.4rem 0 0 1.1rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin: 1.25rem 0; }
.btn {
  display: inline-block; padding: 0.7rem 1.15rem; border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  transition: filter 0.15s, transform 0.12s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); color: inherit; }
.btn-primary { background: var(--teal); color: #0a0a0f; }
.btn-secondary { border: 1px solid rgba(249, 231, 149, 0.35); color: var(--gold); background: transparent; }

.seal { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 2rem; letter-spacing: 0.06em; }
.mirror { font-size: 0.85rem; color: var(--muted); margin-top: 0.75rem; font-style: italic; }
code { font-size: 0.88em; background: rgba(0,0,0,0.35); padding: 0.1em 0.35em; border-radius: 4px; }

nav.top { padding: 0.85rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
nav.top a { text-decoration: none; color: var(--gold); font-weight: 600; }
.nav-path {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
  padding: 0.2rem 0.55rem; border-radius: 999px;
}
.nav-path-hearth { color: var(--hearth-text); background: rgba(232, 168, 124, 0.15); border: 1px solid rgba(232, 168, 124, 0.35); }
.nav-path-forge { color: var(--forge-text); background: rgba(126, 184, 255, 0.12); border: 1px solid rgba(126, 184, 255, 0.35); }

/* —— Choose (index) —— */
body.page-choose { background: #0a0908; }
.hero-split {
  background:
    radial-gradient(ellipse 55% 80% at 15% 20%, rgba(232, 168, 124, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 80% at 85% 25%, rgba(126, 184, 255, 0.12), transparent 55%),
    linear-gradient(180deg, #0f0e0c, #12121a);
}
.hero-split h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
}
.spell-line {
  font-size: 0.9rem; color: var(--muted); margin-top: 1.25rem;
  letter-spacing: 0.04em;
}
.spell-line strong { color: var(--gold); font-weight: 600; }

.dual-doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  margin: 0.25rem 0 1.5rem;
  position: relative;
}
.dual-doors::before {
  content: "◆ one fire ◆";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(249, 231, 149, 0.45);
  background: var(--bg);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  pointer-events: none;
  z-index: 1;
}
@media (max-width: 720px) {
  .dual-doors { grid-template-columns: 1fr; }
  .dual-doors::before { display: none; }
}

.door {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  padding: 1.5rem 1.45rem 1.35rem;
  min-height: 17rem;
  transition: transform 0.18s, box-shadow 0.18s;
  position: relative;
  overflow: hidden;
}
.door:hover { transform: translateY(-4px); color: inherit; }
.door-hearth {
  background: linear-gradient(145deg, rgba(42, 24, 16, 0.95), rgba(18, 14, 12, 0.98));
  border: 1px solid rgba(232, 168, 124, 0.35);
  box-shadow: 0 8px 32px rgba(232, 120, 60, 0.08);
}
.door-hearth:hover { box-shadow: 0 14px 40px rgba(232, 120, 60, 0.18); }
.door-forge {
  background: linear-gradient(145deg, rgba(12, 20, 32, 0.98), rgba(14, 14, 20, 0.98));
  border: 1px solid rgba(126, 184, 255, 0.32);
  box-shadow: 0 8px 32px rgba(60, 120, 220, 0.08);
}
.door-forge:hover { box-shadow: 0 14px 40px rgba(60, 120, 220, 0.16); }

.door-icon {
  font-size: 1.75rem; line-height: 1; margin-bottom: 0.5rem; opacity: 0.9;
}
.door-tag { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.door-hearth .door-tag { color: var(--hearth-glow); }
.door-forge .door-tag { color: var(--forge-glow); }
.door h2 { margin: 0.4rem 0 0.35rem; font-size: 1.75rem; line-height: 1.1; }
.door-hearth h2 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--hearth-text);
}
.door-forge h2 {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  color: var(--forge-text);
  letter-spacing: -0.03em;
}
.door-quote {
  margin: 0.65rem 0 0.85rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(255,255,255,0.12);
  font-size: 0.92rem;
  font-style: italic;
  color: rgba(232, 228, 220, 0.88);
  flex-grow: 1;
}
.door-hearth .door-quote { border-left-color: var(--hearth-glow); }
.door-forge .door-quote { border-left-color: var(--forge-glow); font-style: normal; font-size: 0.86rem; }
.door-bullets { margin: 0 0 1rem 1rem; font-size: 0.88rem; opacity: 0.92; }
.door-cta {
  font-weight: 700; font-size: 0.92rem; letter-spacing: 0.04em;
  margin-top: auto;
}
.door-hearth .door-cta { color: var(--hearth-glow); }
.door-forge .door-cta { color: var(--forge-glow); font-family: ui-monospace, Menlo, monospace; }

.dual-note { text-align: center; font-size: 0.92rem; color: var(--muted); max-width: 42rem; margin: 0 auto 1rem; line-height: 1.6; }
.love-line { color: var(--gold); margin-top: 1.1rem; font-family: Georgia, serif; font-size: 1.08rem; }

/* —— Hearth page —— */
body.page-hearth { background: var(--hearth-deep); color: #f0e6dc; }
body.page-hearth a { color: #ffb088; }
body.page-hearth a:hover { color: var(--gold); }
.hero-hearth {
  background:
    radial-gradient(ellipse 90% 70% at 20% 0%, rgba(232, 168, 124, 0.22), transparent 50%),
    linear-gradient(180deg, #1f1410, #12100e);
}
body.page-hearth h1 { font-family: Georgia, serif; color: var(--hearth-text); }
body.page-hearth .btn-primary {
  background: linear-gradient(180deg, #e8a87c, #c87850);
  color: #1a0f0a;
}
body.page-hearth .btn-secondary { border-color: rgba(232, 168, 124, 0.5); color: var(--hearth-text); }
body.page-hearth .card {
  border-color: rgba(232, 168, 124, 0.25);
  background: rgba(30, 20, 16, 0.85);
}
body.page-hearth .card h2 { color: var(--hearth-glow); }
body.page-hearth .card-highlight {
  border-color: rgba(249, 200, 150, 0.45);
  box-shadow: 0 0 24px rgba(232, 168, 124, 0.08);
}
.pullquote {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  color: var(--hearth-text);
  margin: 0;
  line-height: 1.45;
}

/* —— Forge page —— */
body.page-forge { background: var(--forge-deep); color: #dce4f0; }
body.page-forge a { color: var(--forge-glow); }
body.page-forge a:hover { color: #fff; }
.hero-forge {
  background:
    radial-gradient(ellipse 90% 70% at 80% 0%, rgba(126, 184, 255, 0.18), transparent 50%),
    linear-gradient(180deg, #0f1622, #0a0c12);
}
body.page-forge h1 {
  font-family: ui-monospace, Menlo, monospace;
  color: var(--forge-text);
  font-size: clamp(1.45rem, 3.8vw, 2.15rem);
  letter-spacing: -0.04em;
}
body.page-forge .btn-primary {
  background: linear-gradient(180deg, #5a9fd4, #3d72a8);
  color: #060a10;
}
body.page-forge .btn-secondary { border-color: rgba(126, 184, 255, 0.45); color: var(--forge-text); }
body.page-forge .card {
  border-color: rgba(126, 184, 255, 0.22);
  background: rgba(12, 18, 28, 0.9);
  border-radius: 8px;
}
body.page-forge .card h2 {
  color: var(--forge-glow);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.steps-plain { margin: 0.75rem 0 0 1.2rem; padding: 0; }
.steps-plain li { margin-bottom: 0.85rem; font-size: 1.02rem; }
.fine { font-size: 0.88rem; color: var(--muted); margin: 1rem 0 0; }
body.page-hearth .fine { color: rgba(240, 230, 220, 0.65); }

/* —— Workbench v0 —— */
body.page-workbench { background: #000; }
body.page-workbench .enterface-face-layer {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
}
body.page-workbench .memory-core-field--in-layer {
  z-index: 0;
}
body.page-workbench .enterface-face-layer > :not(.memory-core-field) {
  position: relative;
  z-index: 1;
}
body.page-workbench .memory-core-canvas {
  opacity: 0.82;
}
.hero-wb {
  background:
    radial-gradient(ellipse 50% 70% at 20% 30%, rgba(232, 168, 124, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 70% at 80% 30%, rgba(126, 184, 255, 0.08), transparent 50%),
    linear-gradient(180deg, #0f0e0c, #12121a);
}
.wb-layout {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .wb-layout { grid-template-columns: 1.35fr 1fr; align-items: start; }
}
.wb-input-card textarea {
  width: 100%;
  min-height: 11rem;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(2, 195, 154, 0.35);
  background: #0a0a0f;
  color: var(--off);
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
}
.wb-field { display: block; margin-bottom: 0.85rem; }
.wb-field span { display: block; font-size: 0.82rem; color: var(--gold); margin-bottom: 0.35rem; }
.wb-field input, .wb-field select {
  width: 100%;
  max-width: 24rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #12121a;
  color: var(--off);
}
.wb-log {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 12rem;
  overflow: auto;
  margin-top: 0.75rem;
  padding: 0.65rem;
  background: #0a0a0f;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.wb-nav-alt { font-size: 0.85rem; font-weight: 500; margin-left: auto; }
.wb-links { margin: 0; padding-left: 1.1rem; font-size: 0.9rem; }
.wb-links li { margin-bottom: 0.45rem; }
body.page-workbench[data-face="forge"] .wb-input-card { border-color: rgba(126, 184, 255, 0.28); }
button.btn { cursor: pointer; border: none; font: inherit; }
button.btn-secondary { border: 1px solid rgba(249, 231, 149, 0.35); color: var(--gold); background: transparent; }

/* —— Onboarding ladder —— */
body.page-onboard .onboard-ladder {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
@media (min-width: 720px) {
  body.page-onboard .onboard-ladder { grid-template-columns: 1fr 1fr; }
}
.onboard-step .step-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin: 0 0 0.35rem;
}
.onboard-pari ul { margin: 0.5rem 0 0 1rem; font-size: 0.92rem; }

.onboard-coach-banner {
  margin: 1rem 0 0;
  padding: 1rem 1.15rem;
  border-radius: 10px;
  border: 1px solid rgba(2, 195, 154, 0.35);
  background: rgba(2, 195, 154, 0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.onboard-coach-banner p { margin: 0; font-size: 0.95rem; max-width: 36rem; }

.wb-stepper { padding: 0.5rem 0 0; }
.wb-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.wb-step {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.wb-step span {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 1px solid #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
}
.wb-step-active { color: var(--gold); }
.wb-step-active span { border-color: var(--teal); background: rgba(2, 195, 154, 0.15); }
.wb-step-done { color: var(--teal); }
.wb-step-done span { background: var(--teal); color: #0a0a0f; border-color: var(--teal); }
.wb-substep { font-size: 0.95rem; color: var(--gold); margin: 1.25rem 0 0.5rem; font-weight: 600; }

/* —— Composer-first workbench v0.2 —— */
.hero-compact { padding: 1.25rem 0 0.75rem; }
.hero-compact h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 0.35rem; }
.hero-compact .lead { font-size: 0.95rem; max-width: 40rem; opacity: 0.92; }

.composer-main { padding-bottom: 5rem; }
.composer-wrap {
  max-width: 44rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.composer-thread {
  min-height: 12rem;
  max-height: 50vh;
  overflow-y: auto;
  padding: 1rem 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.thread-empty {
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
  margin: 2rem 0;
}
.thread-msg {
  max-width: 92%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.thread-msg-user {
  align-self: flex-end;
  background: rgba(2, 195, 154, 0.18);
  border: 1px solid rgba(2, 195, 154, 0.35);
}
.thread-msg-hold .hold-save {
  margin: 0.65rem 0 0.35rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
  border: 1px solid rgba(249, 231, 149, 0.35);
  background: transparent;
  color: var(--gold);
  border-radius: 8px;
  font-weight: 600;
}
.thread-msg-hold .hold-save:hover:not(:disabled) { filter: brightness(1.08); }
.thread-msg-hold .hold-save:disabled { opacity: 0.65; cursor: default; }

body.composer-has-thread .hero-compact { display: none; }
body.composer-has-thread .composer-main { padding-top: 0.75rem; }

body.page-enterface.page-composer {
  background: #000;
}
body.page-enterface .enterface-nav {
  border-bottom-color: rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.35);
}
body.composer-has-thread #family-details {
  margin-top: 1rem;
  opacity: 0.92;
}

.enterface-family-title,
#family-details summary.enterface-family-title {
  color: var(--gold);
  font-size: 1rem;
  margin: 0 0 0.35rem;
  cursor: pointer;
}
#family-details summary.enterface-family-title { margin: 0; list-style: none; }
#family-details summary.enterface-family-title::-webkit-details-marker { display: none; }
.enterface-family-lead { margin: 0 0 1rem; }

.family-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .family-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .family-grid { grid-template-columns: repeat(3, 1fr); }
}

.family-card {
  position: relative;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}
.family-card-here {
  border-color: rgba(2, 195, 154, 0.45);
  background: rgba(2, 195, 154, 0.06);
}
.family-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.family-card h3 {
  font-size: 0.92rem;
  color: var(--gold);
  margin: 0.35rem 0 0.25rem;
}
.family-blurb {
  font-size: 0.8rem;
  color: var(--off);
  opacity: 0.88;
  margin: 0 0 0.65rem;
  line-height: 1.4;
}
.family-here-mark {
  font-size: 0.75rem;
  color: var(--teal);
  font-weight: 600;
}
.family-open {
  display: inline-block;
  padding: 0.4rem 0.75rem !important;
  font-size: 0.78rem !important;
}
.family-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

.thread-msg-hold {
  align-self: flex-start;
  background: rgba(18, 18, 26, 0.95);
  border: 1px solid rgba(249, 231, 149, 0.2);
}
.thread-msg-reflect {
  align-self: flex-start;
  background: rgba(12, 20, 32, 0.95);
  border: 1px solid rgba(126, 184, 255, 0.35);
  max-width: 96%;
}
.msg-body-reflect {
  display: block;
  margin-top: 0.35rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.composer-loop {
  margin-bottom: 0.75rem;
  padding: 0.85rem 1rem;
}
.composer-loop summary {
  color: var(--gold);
  font-weight: 600;
  cursor: pointer;
}
.reflect-paste {
  width: 100%;
  margin: 0.65rem 0 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(126, 184, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: var(--off);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}
.composer-loop-actions {
  margin-top: 0.65rem;
  margin-bottom: 0;
}
.composer-loop-actions .btn {
  font-size: 0.82rem;
  padding: 0.5rem 0.85rem;
}
.msg-meta { font-size: 0.78rem; color: var(--muted); margin-top: 0.35rem; }
.thread-msg code { font-size: 0.75rem; }

.composer-lanes {
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
}
.composer-lanes-legend {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 0 0.25rem;
}
.composer-lanes-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}
.lane-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 18, 26, 0.6);
  cursor: pointer;
  user-select: none;
  min-height: 44px;
}
.lane-chip:has(input:checked) {
  border-color: rgba(2, 195, 154, 0.55);
  background: rgba(2, 195, 154, 0.12);
  color: var(--gold);
}
.lane-chip input {
  accent-color: var(--teal);
  margin: 0;
}
.composer-lane-hint {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
}
.composer-lane-actions {
  margin-top: 0.55rem;
}
.composer-lane-actions .btn {
  font-size: 0.82rem;
  padding: 0.5rem 0.85rem;
}

.composer-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(2, 195, 154, 0.35);
  background: rgba(12, 12, 18, 0.98);
  position: sticky;
  bottom: 0.75rem;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
}
.composer-bar textarea {
  flex: 1;
  min-height: 2.5rem;
  max-height: 10rem;
  resize: none;
  border: none;
  background: transparent;
  color: var(--off);
  font-size: 1rem;
  line-height: 1.45;
  padding: 0.45rem 0.25rem;
  font-family: inherit;
}
.composer-bar textarea:focus { outline: none; }
.composer-attach {
  cursor: pointer;
  padding: 0.45rem 0.55rem;
  font-size: 1.15rem;
  opacity: 0.85;
  user-select: none;
}
.composer-send { flex-shrink: 0; padding: 0.55rem 1.1rem; }
.composer-hint { font-size: 0.78rem; color: var(--muted); margin: 0.35rem 0 0 0.5rem; }

.shall-not-gate blockquote.shall-not-frog {
  margin: 1.25rem 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--forge-glow);
  background: rgba(126, 184, 255, 0.06);
  font-size: 0.92rem;
}
.shall-not-list li { margin-bottom: 0.45rem; }

.composer-advanced { margin-top: 1.5rem; }
.composer-advanced summary {
  cursor: pointer;
  color: var(--gold);
  font-weight: 600;
  padding: 0.5rem 0;
}
.advanced-grid {
  display: grid;
  gap: 1rem;
  margin-top: 0.75rem;
}
@media (min-width: 720px) {
  .advanced-grid { grid-template-columns: 1fr 1fr; }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.shore-sibling-link {
  margin-top: 1rem;
  opacity: 0.92;
}

/* —— EnterFaceRI · holo substrate (max sat · black field) —— */
body.page-opening,
body.page-enterface.page-composer {
  background: #000;
  position: relative;
  isolation: isolate;
}
body.page-opening::before,
body.page-enterface.page-composer::before {
  content: "";
  position: fixed;
  inset: -8%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 45, 154, 0.42), transparent 38%),
    radial-gradient(circle at 82% 18%, rgba(0, 255, 213, 0.38), transparent 36%),
    radial-gradient(circle at 72% 78%, rgba(139, 92, 255, 0.45), transparent 40%),
    radial-gradient(circle at 12% 82%, rgba(255, 196, 0, 0.32), transparent 34%),
    radial-gradient(circle at 48% 52%, rgba(184, 255, 46, 0.22), transparent 48%),
    radial-gradient(circle at 55% 12%, rgba(2, 195, 154, 0.35), transparent 32%);
  filter: saturate(2.15) contrast(1.12);
  opacity: 0.62;
  animation: enterface-holo-drift 22s ease-in-out infinite alternate;
}
body.page-opening::after,
body.page-enterface.page-composer::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      108deg,
      transparent 0,
      transparent 42px,
      rgba(255, 255, 255, 0.018) 42px,
      rgba(255, 255, 255, 0.018) 43px
    ),
    linear-gradient(
      125deg,
      transparent 0%,
      rgba(0, 255, 213, 0.09) 18%,
      rgba(255, 45, 154, 0.11) 38%,
      rgba(139, 92, 255, 0.1) 58%,
      rgba(255, 196, 0, 0.08) 78%,
      transparent 100%
    );
  background-size: auto, 220% 220%;
  mix-blend-mode: screen;
  opacity: 0.85;
  animation: enterface-holo-sheen 9s linear infinite;
}
body.page-opening .enterface-face-layer,
body.page-enterface.page-composer .enterface-face-layer {
  position: relative;
  z-index: 1;
}
body.page-opening .enterface-face-layer {
  flex: 1;
  display: flex;
  flex-direction: column;
}
@keyframes enterface-holo-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-2.5%, 1.5%) scale(1.04); }
}
@keyframes enterface-holo-sheen {
  0% { background-position: auto, 0% 40%; }
  100% { background-position: auto, 100% 60%; }
}

/* —— EnterFaceRI · Face Summon (blur → local clarity · not login) —— */
.enterface-face-veil {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background:
    conic-gradient(
      from 210deg at 50% 45%,
      rgba(255, 45, 154, 0.35),
      rgba(0, 255, 213, 0.32),
      rgba(139, 92, 255, 0.38),
      rgba(255, 196, 0, 0.28),
      rgba(2, 195, 154, 0.3),
      rgba(255, 45, 154, 0.35)
    ),
    radial-gradient(ellipse 120% 90% at 50% 42%, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.72) 100%);
  backdrop-filter: blur(22px) saturate(2.35) brightness(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(2.35) brightness(1.08);
  opacity: 1;
  mix-blend-mode: screen;
}
.enterface-face-veil-out {
  animation: enterface-clarity-veil 1.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
body.enterface-summon-active .enterface-face-layer {
  animation: enterface-clarity-face 1.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
body:not(.enterface-summon-active) .enterface-face-layer,
body.enterface-summon-done .enterface-face-layer {
  filter: none;
  transform: none;
  opacity: 1;
}
@keyframes enterface-clarity-veil {
  0% {
    opacity: 1;
    backdrop-filter: blur(22px) saturate(2.35) brightness(1.08);
    -webkit-backdrop-filter: blur(22px) saturate(2.35) brightness(1.08);
  }
  100% {
    opacity: 0;
    backdrop-filter: blur(0) saturate(1.2);
    -webkit-backdrop-filter: blur(0) saturate(1.2);
  }
}
@keyframes enterface-clarity-face {
  0% {
    filter: blur(16px) saturate(0.85);
    transform: scale(1.018);
    opacity: 0.58;
  }
  45% {
    filter: blur(4px) saturate(1.65)
      drop-shadow(0 0 28px rgba(0, 255, 213, 0.25))
      drop-shadow(0 0 48px rgba(255, 45, 154, 0.18));
    transform: scale(1.004);
    opacity: 0.94;
  }
  100% {
    filter: blur(0) saturate(1.15);
    transform: scale(1);
    opacity: 1;
  }
}
.opening-face-mark {
  margin: 0 0 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  opacity: 0;
  animation: enterface-face-mark-in 1.8s ease-out 0.35s forwards;
}
.opening-face-claim {
  font-size: clamp(0.72rem, 2.2vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: linear-gradient(
    92deg,
    var(--holo-cyan),
    var(--gold),
    var(--holo-magenta),
    var(--holo-violet),
    var(--holo-amber),
    var(--teal)
  );
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: enterface-holo-sheen 7s linear 1.2s infinite;
}
.opening-face-you {
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, var(--holo-amber), #fff8e7, var(--holo-magenta));
  background-size: 180% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(255, 196, 0, 0.45));
  animation: enterface-holo-sheen 4s linear 1s infinite;
}
.opening-face-product {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.38);
}
@keyframes enterface-face-mark-in {
  0% { opacity: 0; filter: blur(6px); letter-spacing: 0.28em; }
  100% { opacity: 1; filter: blur(0); letter-spacing: 0.2em; }
}
body.page-workbench .enterface-face-mark {
  position: fixed;
  top: max(0.65rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
  padding: 0.35rem 0.75rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(255, 45, 154, 0.25);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px) saturate(1.6);
  -webkit-backdrop-filter: blur(8px) saturate(1.6);
  color: rgba(245, 245, 247, 0.72);
  pointer-events: none;
  white-space: nowrap;
}
body.page-workbench .enterface-face-mark .opening-face-you {
  letter-spacing: 0.06em;
}
body.page-workbench.composer-has-thread .enterface-face-mark {
  opacity: 0.35;
  transition: opacity 0.4s ease;
}
@media (prefers-reduced-motion: reduce) {
  body.page-opening::before,
  body.page-opening::after,
  body.page-enterface.page-composer::before,
  body.page-enterface.page-composer::after {
    animation: none !important;
  }
  .enterface-face-veil,
  .enterface-face-veil-out,
  body.enterface-summon-active .enterface-face-layer,
  .opening-face-mark {
    animation: none !important;
    filter: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .opening-face-claim,
  .opening-face-you {
    color: var(--teal);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    filter: none;
    animation: none;
  }
  .opening-face-product { color: var(--muted); }
}

/* —— Opening screen (Apple-quiet · type to begin) —— */
body.page-opening {
  margin: 0;
  min-height: 100dvh;
  background: #000;
  color: #f5f5f7;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.opening-skip {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1.25rem, env(safe-area-inset-right));
  font-size: 0.85rem;
  color: rgba(245, 245, 247, 0.45);
  text-decoration: none;
  z-index: 2;
}
.opening-skip:hover { color: rgba(245, 245, 247, 0.85); }

.opening-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 4rem;
  text-align: left;
  width: 100%;
  max-width: 52rem;
  margin: 0 auto;
}

.opening-line {
  position: relative;
  width: 100%;
  min-height: 3.5rem;
  font-size: clamp(2rem, 6.5vw, 3.75rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.25;
  filter: drop-shadow(0 0 1px rgba(255, 45, 154, 0.15)) drop-shadow(0 0 1px rgba(0, 255, 213, 0.12));
}

.opening-ghost {
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(245, 245, 247, 0.28);
  pointer-events: none;
  user-select: none;
}

.opening-input {
  outline: none;
  min-height: 1.25em;
  white-space: pre-wrap;
  word-break: break-word;
  caret-color: var(--holo-cyan);
  text-shadow: 0 0 32px rgba(0, 255, 213, 0.12);
}
.opening-input:empty {
  caret-color: transparent;
}

.opening-caret {
  display: inline-block;
  width: 3px;
  height: 0.95em;
  background: #f5f5f7;
  vertical-align: text-bottom;
  margin-left: 2px;
  opacity: 0;
  animation: opening-blink 1.05s step-end infinite;
}
.opening-caret.opening-caret-active {
  opacity: 1;
  position: absolute;
  left: 0;
  top: 0.12em;
}
.opening-input:not(:empty) + .opening-caret {
  display: none;
}

@keyframes opening-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .opening-caret {
    animation: none;
    opacity: 1;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  background: var(--teal);
  color: #0a0a0f;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus {
  left: max(1rem, env(safe-area-inset-left));
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.skip-link-opening:focus {
  top: max(3.5rem, env(safe-area-inset-top));
}

/* Touch target floor (~44px) · EnterFace v0.4 */
.touch-target,
.composer-send,
.composer-attach,
.hold-save,
.family-open,
.opening-skip {
  min-height: 2.75rem;
  min-width: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.composer-attach { padding: 0.5rem 0.65rem; }
.opening-skip {
  padding: 0.5rem 0.75rem;
  min-height: 2.75rem;
  line-height: 1.2;
}

.opening-hint {
  margin-top: 2.5rem;
  font-size: 0.8rem;
  color: rgba(245, 245, 247, 0.35);
  text-align: center;
  width: 100%;
}
.opening-hint kbd {
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.opening-footer {
  padding: 1.25rem 1.5rem max(1.25rem, env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: center;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.32);
}
.opening-mark { color: rgba(245, 245, 247, 0.5); font-weight: 600; }
.opening-cookioe {
  color: rgba(2, 195, 154, 0.75);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.02em;
}
.opening-cookioe:hover { color: rgba(2, 195, 154, 1); }

/* —— Unpack —— */
.page-unpack .unpack-main { padding: 1.5rem 0 3rem; max-width: 44rem; }
.unpack-hero h1 { color: var(--gold); font-size: clamp(1.75rem, 4vw, 2.25rem); }
.unpack-subhead { color: var(--gold); font-size: 1.1rem; margin: 2rem 0 0.75rem; }
.unpack-prime-duo {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
  border-color: rgba(2, 195, 154, 0.35);
}
@media (min-width: 640px) {
  .unpack-prime-duo { grid-template-columns: 1fr 1fr; }
}
.unpack-duo-col h2 { font-size: 0.95rem; color: var(--teal); margin: 0 0 0.35rem; }
.unpack-duo-col p { margin: 0; font-size: 0.88rem; }
.unpack-layers { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.unpack-layer { position: relative; padding-left: 3.25rem; }
.unpack-layer-id {
  position: absolute;
  left: 1rem;
  top: 1.1rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.08em;
}
.unpack-layer-active { border-color: rgba(2, 195, 154, 0.45); }
.unpack-layer h2 { font-size: 1.05rem; margin: 0 0 0.35rem; color: var(--gold); }
.unpack-layer p { margin: 0; font-size: 0.92rem; }

/* —— Prompt Forum · query stack · front/gate/back → named moment —— */
body.page-forum .forum-main {
  padding: 1.25rem 0 3rem;
  max-width: 44rem;
}
body.page-forum .forum-hero h1 {
  color: var(--gold);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
}
.forum-hero-minimal {
  padding: 1.5rem 0 0.5rem;
}
.forum-hero-minimal h1 {
  margin: 0;
  font-weight: 300;
  letter-spacing: 0.06em;
}
.forum-form-bare,
.forum-stage-bare,
.forum-answer-bare {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.35);
}
.wb-field-bare span.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.forum-record-line {
  margin: 1rem 0 0;
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--muted);
}
.forum-record-seal { opacity: 0.75; }
.forum-answer-id {
  margin: 0 0 0.5rem;
  word-break: break-all;
}
.forum-answer-id code { color: var(--gold); font-size: 0.82rem; }
.forum-answer-seal {
  margin: 0 0 1rem;
  word-break: break-all;
}
.forum-answer-seal code {
  font-size: 0.68rem;
  color: var(--muted);
}
.forum-answer-first {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 213, 0.15);
  background: rgba(0, 0, 0, 0.45);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--off);
}
.forum-pipe-id:only-child {
  padding: 0.15rem 0;
}
.forum-form textarea {
  width: 100%;
  min-height: 5rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 45, 154, 0.25);
  background: rgba(0, 0, 0, 0.45);
  color: var(--off);
  font-size: 1rem;
  line-height: 1.45;
  resize: vertical;
}
.forum-form textarea:focus {
  outline: 2px solid rgba(0, 255, 213, 0.45);
  border-color: rgba(0, 255, 213, 0.35);
}
.forum-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--off);
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-ghost:hover { border-color: rgba(2, 195, 154, 0.45); color: var(--teal); }

.forum-stage {
  margin-top: 1.25rem;
  border-color: rgba(139, 92, 255, 0.35);
  overflow: hidden;
}
.forum-stage-title {
  font-size: 0.95rem;
  color: var(--holo-violet);
  margin: 0 0 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.forum-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.25rem;
  margin: 0.5rem 0 1rem;
}
.forum-pipe-step {
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.4;
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
  text-align: center;
  min-width: 4.5rem;
}
.forum-pipe-step.forum-step-lit {
  opacity: 1;
  transform: translateY(-2px);
  border-color: rgba(0, 255, 213, 0.45);
}
.forum-pipe-gate.forum-step-lit { border-color: rgba(255, 45, 154, 0.55); }
.forum-pipe-crystal.forum-step-lit {
  border-color: rgba(255, 196, 0, 0.5);
  box-shadow: 0 0 20px rgba(255, 196, 0, 0.2);
}
.forum-pipe-id {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}
.forum-pipe-desc { font-size: 0.62rem; color: var(--muted); }
.forum-pipe-arrow { color: rgba(245, 245, 247, 0.25); font-size: 0.85rem; }

.forum-stage[data-phase='crystal'] .forum-pipeline,
.forum-stage[data-phase='done'] .forum-pipeline {
  animation: enterface-clarity-face 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.forum-answer {
  margin-top: 1rem;
  border-color: rgba(255, 196, 0, 0.35);
  animation: enterface-face-mark-in 0.9s ease-out forwards;
}
.forum-answer-lead { margin: 0 0 0.35rem; color: var(--gold); }
.forum-answer-named { margin: 0 0 0.75rem; word-break: break-all; }
.forum-answer-list {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  line-height: 1.5;
}

body.page-forum .enterface-face-mark {
  position: fixed;
  top: max(0.65rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
  padding: 0.35rem 0.75rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(255, 45, 154, 0.25);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px) saturate(1.6);
  white-space: nowrap;
  color: rgba(245, 245, 247, 0.72);
}

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

/* —— Forum · chat · abyss black —— */
body.page-forum-chat {
  background: #000 !important;
  color: #e8e8ea;
  min-height: 100dvh;
}
body.page-forum-chat::before,
body.page-forum-chat::after {
  display: none !important;
}
body.page-forum-chat .forum-chat-layer {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: transparent;
  isolation: isolate;
}
body.page-forum-chat .forum-chat-header {
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
}
.forum-chat-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  max-width: 48rem;
  margin: 0 auto;
  font-size: 0.88rem;
}
.forum-chat-nav a {
  color: rgba(245, 245, 247, 0.55);
  text-decoration: none;
}
.forum-chat-nav a:hover { color: var(--teal); }
.forum-chat-title {
  color: rgba(245, 245, 247, 0.35);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.forum-chat-spacer { flex: 1; }
.forum-chat-tool {
  background: none;
  border: none;
  color: rgba(245, 245, 247, 0.45);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
}
.forum-chat-tool:disabled { opacity: 0.35; cursor: default; }
.forum-chat-tool:not(:disabled):hover { color: var(--teal); }

body.page-forum-chat .forum-chat-main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 48rem;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
  background: transparent;
}
.forum-thread {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.forum-thread-empty {
  flex: 1;
  margin: 0;
  padding: 2rem 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  user-select: none;
}
.forum-msg {
  max-width: 92%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-word;
}
.forum-msg-user {
  align-self: flex-end;
  background: rgba(2, 195, 154, 0.12);
  border: 1px solid rgba(2, 195, 154, 0.22);
  color: #f5f5f7;
}
.forum-msg-assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(232, 232, 234, 0.92);
}
.forum-msg-id { margin: 0 0 0.35rem; word-break: break-all; }
.forum-msg-id code { color: var(--gold); font-size: 0.78rem; }
.forum-msg-seal { margin: 0; word-break: break-all; }
.forum-msg-seal code { font-size: 0.65rem; color: rgba(148, 163, 184, 0.85); word-break: break-all; }
.forum-msg-meta {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
}
.forum-msg-meta summary {
  cursor: pointer;
  color: rgba(2, 195, 154, 0.75);
  user-select: none;
}
.forum-msg-meta[open] summary { margin-bottom: 0.35rem; }
.forum-msg-reply {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #f5f5f7;
}
.forum-msg-pending { margin: 0; color: rgba(255, 255, 255, 0.25); letter-spacing: 0.2em; }
.forum-msg-err { margin: 0; color: #f87171; }

.forum-pipeline-bar {
  flex-shrink: 0;
  padding: 0.35rem 0 0.75rem;
  opacity: 0.85;
}
.forum-pipeline-compact {
  margin: 0;
  gap: 0.2rem 0.15rem;
}
.forum-pipeline-compact .forum-pipe-step {
  min-width: 3.2rem;
  padding: 0.3rem 0.45rem;
}
.forum-pipeline-compact .forum-pipe-id {
  font-size: 0.58rem;
}

body.page-forum-chat .forum-chat-footer {
  flex-shrink: 0;
  padding: 0.65rem 1rem max(0.85rem, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 2;
}
.forum-enterface-law {
  max-width: 48rem;
  margin: 0 auto 0.5rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
}
.forum-enterface-law summary {
  cursor: pointer;
  list-style: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.forum-enterface-law summary::-webkit-details-marker {
  display: none;
}
.enterface-law-panel {
  margin-top: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(2, 195, 154, 0.15);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(232, 232, 234, 0.88);
}
.enterface-law-lead {
  margin: 0 0 0.5rem;
  color: rgba(255, 255, 255, 0.92);
}
.enterface-law-host {
  margin: 0 0 0.65rem;
  font-weight: 600;
  color: var(--teal, #02c39a);
}
.enterface-law-creed {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  opacity: 0.85;
}
.enterface-law-seats {
  margin: 0 0 0.65rem;
  display: grid;
  gap: 0.35rem 0.75rem;
  grid-template-columns: auto 1fr;
}
.enterface-law-seats dt {
  font-weight: 600;
  color: rgba(255, 90, 200, 0.85);
}
.enterface-law-seats dd {
  margin: 0;
}
.enterface-law-topo {
  margin: 0 0 0.65rem;
  padding-left: 1.1rem;
}
.enterface-law-portal {
  margin: 0;
  font-style: italic;
  opacity: 0.75;
}
.forum-chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: 48rem;
  margin: 0 auto;
  padding: 0.5rem 0.65rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}
.forum-chat-composer textarea {
  flex: 1;
  border: none;
  background: transparent;
  color: #f5f5f7;
  font-size: 1rem;
  line-height: 1.4;
  resize: none;
  max-height: 10rem;
  padding: 0.35rem 0.15rem;
  outline: none;
}
.forum-chat-composer textarea::placeholder {
  color: rgba(255, 255, 255, 0.22);
}
.forum-chat-send {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(2, 195, 154, 0.35);
  background: rgba(2, 195, 154, 0.15);
  color: var(--teal);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.forum-chat-send:hover { filter: brightness(1.12); }
.forum-chat-send:disabled { opacity: 0.4; cursor: default; }

body.page-forum-chat .enterface-face-veil {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.2) 0%, #000 70%) !important;
  backdrop-filter: blur(18px) saturate(1) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1) !important;
  mix-blend-mode: normal !important;
}

/* Core · Memory core field · behind Forum chat */
.memory-core-field,
.mirror-cube-field,
.mirror-hypercube-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: transparent;
}
.memory-core-field--in-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.memory-core-canvas,
.mirror-hypercube-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.88;
}
body.page-forum-chat .forum-chat-layer {
  position: relative;
  z-index: 1;
}
body.page-forum-chat .memory-core-canvas {
  opacity: 1;
}
body.page-hypercube-lane {
  background: #000;
  color: #e8e8ea;
  min-height: 100dvh;
}
body.page-hypercube-lane::before,
body.page-hypercube-lane::after {
  display: none !important;
}
.hypercube-lane-shell {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
body.page-memory-core .memory-core-shell {
  background: transparent;
}
.hypercube-lane-shell .mirror-hypercube-field {
  position: absolute;
  inset: 0;
}
.hypercube-lane-shell .mirror-hypercube-canvas {
  opacity: 0.92;
}
.hypercube-lane-head {
  position: relative;
  z-index: 1;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: baseline;
}
.hypercube-lane-head a {
  color: var(--teal);
}
.hypercube-lane-note {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 1.25rem;
  max-width: 42rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}
.hypercube-lane-slot {
  position: relative;
  z-index: 1;
  margin: 1rem 1.25rem 2rem;
  min-height: 8rem;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}

.filing-tree-wrap {
  position: relative;
  z-index: 1;
  padding: 0 1.25rem 2rem;
}
.filing-tree-facet {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 1.25rem 0.75rem;
  max-width: 44rem;
}
.filing-tree-facet code {
  color: var(--teal);
}
.filing-tree-empty p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}
.filing-tree-list em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.38);
  margin-left: 3rem;
}
.filing-tree-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 44rem;
}
@media (max-width: 640px) {
  .filing-tree-grid {
    grid-template-columns: 1fr;
  }
}
.filing-tree-col h2 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.filing-tree-pct {
  font-size: 0.72rem;
  color: var(--teal);
  letter-spacing: 0.02em;
}
.filing-tree-col:last-child .filing-tree-pct {
  color: rgba(255, 90, 200, 0.95);
}
.filing-tree-meter {
  display: block;
  height: 3px;
  margin: 0.2rem 0 0.15rem 3rem;
  max-width: 12rem;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}
.filing-tree-meter::after {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--fill, 0%);
  background: linear-gradient(90deg, var(--teal), rgba(255, 90, 200, 0.85));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(2, 195, 154, 0.35);
}
.filing-tree-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
}
.filing-tree-list li {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}
.filing-tree-list code {
  font-size: 0.72rem;
  color: var(--teal);
  min-width: 2.5rem;
}
.filing-tree-col:last-child .filing-tree-list code {
  color: rgba(255, 90, 200, 0.95);
}
