:root {
  color-scheme: dark;
  --bg-0: #03060c;
  --bg-1: #081120;
  --bg-2: #0b1830;
  --ink: #eef4ff;
  --muted: rgba(228, 236, 255, 0.66);
  --line: rgba(158, 182, 238, 0.14);
  --line-strong: rgba(184, 206, 255, 0.24);
  --glass: rgba(8, 13, 26, 0.42);
  --glass-strong: rgba(9, 15, 30, 0.72);
  --accent: #90d6ff;
  --accent-strong: #ffd89a;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  --sans: "Aptos", "Segoe UI Variable Display", "Malgun Gothic", sans-serif;
  --mono: "Cascadia Mono", "Consolas", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--sans);
  background: var(--bg-0);
}

button,
textarea {
  font: inherit;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

.scene-canvas,
.scene-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.scene-canvas {
  z-index: 0;
}

.scene-vignette {
  z-index: 1;
  background:
    radial-gradient(circle at center, transparent 0 24%, rgba(4, 8, 18, 0.2) 44%, rgba(4, 8, 18, 0.9) 100%),
    linear-gradient(180deg, rgba(4, 8, 18, 0.84) 0%, rgba(4, 8, 18, 0.18) 26%, rgba(4, 8, 18, 0.92) 100%);
}

.page-shell {
  position: relative;
  z-index: 2;
  height: 100svh;
}

.topline {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  z-index: 10;
}

.brand-mark,
.utility-link {
  color: inherit;
  text-decoration: none;
}

.utility-button {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand-mark {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topline-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.utility-link {
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.utility-link:hover,
.sample-link:hover {
  color: var(--ink);
}

.app-shell {
  width: min(1000px, calc(100vw - 28px));
  height: 100svh;
  margin: 0 auto;
}

.hero-shell {
  position: relative;
  height: 100%;
  padding: 74px 0 92px;
}

.hub-scene {
  position: relative;
  height: 100%;
}

.hub-links,
.hub-layer {
  position: absolute;
  inset: 0;
}

.hub-links {
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.hub-layer {
  pointer-events: none;
}

.focus-symbol,
.hub-node {
  position: absolute;
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
}

.focus-symbol {
  left: 50%;
  top: 29%;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  pointer-events: auto;
  filter: drop-shadow(0 0 60px rgba(144, 214, 255, 0.18));
  animation: symbol-breathe 7s ease-in-out infinite;
}

.focus-aura,
.focus-shell,
.focus-core {
  position: absolute;
  border-radius: 50%;
}

.focus-aura {
  inset: -58%;
  background:
    radial-gradient(circle, rgba(144, 214, 255, 0.52) 0%, rgba(144, 214, 255, 0.18) 28%, rgba(144, 214, 255, 0) 70%),
    radial-gradient(circle at 72% 72%, rgba(255, 216, 154, 0.18), transparent 44%);
  filter: blur(18px);
}

.focus-shell {
  inset: -16%;
  border: 1px solid rgba(184, 209, 255, 0.18);
  box-shadow:
    0 0 40px rgba(144, 214, 255, 0.08),
    inset 0 0 30px rgba(144, 214, 255, 0.04);
}

.focus-core {
  inset: 0;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.92), rgba(179, 224, 255, 0.78) 22%, rgba(70, 112, 195, 0.56) 48%, rgba(8, 12, 25, 0.08) 72%),
    radial-gradient(circle at 76% 68%, rgba(255, 216, 154, 0.24), transparent 40%);
  border: 1px solid rgba(218, 232, 255, 0.24);
  box-shadow:
    inset 0 1px 20px rgba(255, 255, 255, 0.34),
    inset 0 -16px 26px rgba(2, 5, 16, 0.42),
    0 0 48px rgba(144, 214, 255, 0.14);
}

.hub-node {
  --float-x: 0px;
  --float-y: 0px;
  --float-duration: 8s;
  --float-delay: 0s;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  text-align: center;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: rgba(236, 243, 255, 0.94);
  cursor: pointer;
  transition: transform 160ms ease, opacity 180ms ease, color 180ms ease, text-shadow 180ms ease;
  text-shadow: 0 0 16px rgba(30, 56, 108, 0.26);
  animation: hub-node-float var(--float-duration) ease-in-out infinite;
  animation-delay: var(--float-delay);
}

.hub-node:hover {
  animation-play-state: paused;
  transform: translate(-50%, calc(-50% - 3px));
}

.hub-node-label {
  display: block;
  white-space: pre-line;
  word-break: keep-all;
}

.hub-node-sub {
  display: block;
  margin-top: 4px;
  color: rgba(228, 236, 255, 0.42);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hub-node.is-ref {
  max-width: 170px;
  font-weight: 760;
  font-size: clamp(1.22rem, 2.2vw, 2rem);
}

.hub-node.is-answer {
  display: none;
}

.hub-node.is-meta {
  max-width: 132px;
  font-weight: 700;
  font-size: clamp(0.92rem, 1.5vw, 1.16rem);
  letter-spacing: 0.02em;
  color: rgba(224, 233, 252, 0.84);
}

.hub-node.is-topic {
  max-width: 146px;
  font-weight: 700;
  font-size: clamp(0.88rem, 1.4vw, 1.08rem);
  color: rgba(224, 233, 252, 0.78);
}

.hub-node.is-selected {
  color: var(--ink);
  text-shadow: 0 0 20px rgba(163, 222, 255, 0.42);
}

.hub-node.is-highlight {
  color: rgba(255, 232, 188, 0.96);
}

.hub-node.is-dimmed {
  opacity: 0.22;
}

.hub-link {
  fill: none;
  stroke: rgba(120, 164, 232, 0.18);
  stroke-linecap: round;
  transition: opacity 180ms ease, stroke 180ms ease, stroke-width 180ms ease;
}

.hub-link.is-selected {
  stroke: rgba(144, 214, 255, 0.56);
}

.hub-link.is-highlight {
  stroke: rgba(255, 216, 154, 0.62);
}

.hub-link.is-dimmed {
  opacity: 0.12;
}

.detail-shell {
  display: grid;
  gap: 0;
  max-height: 0;
  padding: 0;
  margin: 0;
  overflow: auto;
  border-top: 1px solid transparent;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 220ms ease,
    transform 260ms ease,
    max-height 320ms ease,
    padding 220ms ease,
    margin 220ms ease,
    border-color 220ms ease;
  scrollbar-width: none;
}

.detail-shell::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.detail-card {
  display: grid;
  gap: 12px;
}

.detail-card.is-answer {
  gap: 12px;
}

.detail-header {
  display: grid;
  gap: 8px;
}

.detail-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 6px;
  flex-wrap: nowrap;
  margin-left: auto;
  white-space: nowrap;
}

.field-label,
.detail-chip,
.dock-label,
.fold-title {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.detail-title,
.passage-title {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.detail-title {
  font-size: clamp(1.18rem, 3vw, 2rem);
  font-weight: 420;
}

.detail-copy,
.passage-caption,
.passage-status,
.context-row-text,
.warning-band,
.fold-copy,
.signal-hint,
.meta-line {
  margin: 0;
}

.detail-copy,
.answer-body {
  color: var(--muted);
  line-height: 1.82;
}

.answer-body {
  display: grid;
  gap: 0.96em;
  font-size: 0.98rem;
}

.detail-card.is-answer .answer-body {
  gap: 0.65em;
  font-size: 0.96rem;
  line-height: 1.72;
}

.answer-body p {
  margin: 0;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-action,
.source-link,
.ghost-action,
.primary-action {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  cursor: pointer;
}

.detail-action,
.source-link,
.ghost-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

.detail-action-quiet {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.detail-action:hover,
.source-link:hover,
.ghost-action:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.detail-action.is-active {
  color: var(--ink);
  border-color: rgba(255, 216, 154, 0.3);
  background: rgba(255, 216, 154, 0.1);
}

.primary-action {
  border: 1px solid rgba(255, 216, 154, 0.28);
  background: linear-gradient(135deg, #8bd7ff, #ffd89a);
  color: #081121;
  font-weight: 700;
  box-shadow: 0 0 24px rgba(139, 215, 255, 0.18);
}

.reference-track,
.note-cluster {
  display: grid;
  gap: 12px;
}

.reference-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.reference-link {
  appearance: none;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  text-align: left;
  cursor: pointer;
}

.reference-index {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
}

.reference-copy {
  display: grid;
  gap: 4px;
}

.reference-ref {
  color: var(--ink);
  font-size: 0.96rem;
}

.reference-note {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.reference-link.is-active .reference-ref {
  color: var(--accent);
}

.passage-field {
  display: grid;
  gap: 10px;
}

.passage-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.passage-bar > :first-child {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.passage-controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.passage-title {
  margin-top: 2px;
  font-size: clamp(1.08rem, 2.6vw, 1.5rem);
  font-weight: 500;
}

.passage-caption,
.passage-status,
.meta-line {
  color: var(--muted);
  line-height: 1.68;
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.source-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

.source-link.is-active {
  border-color: rgba(255, 216, 154, 0.24);
  color: var(--ink);
  background: rgba(255, 216, 154, 0.08);
}

.focus-verse {
  padding: 14px 15px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17, 32, 69, 0.76), rgba(8, 15, 29, 0.52));
  border: 1px solid rgba(166, 191, 245, 0.12);
}

.focus-verse.is-pending,
.passage-placeholder {
  border-style: dashed;
}

.focus-verse-label {
  display: inline-block;
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.focus-verse-text {
  margin: 12px 0 0;
  font-size: 0.98rem;
  line-height: 1.72;
}

.passage-placeholder {
  padding: 14px 15px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17, 32, 69, 0.54), rgba(8, 15, 29, 0.36));
  border: 1px dashed rgba(166, 191, 245, 0.16);
}

.passage-loom {
  gap: 10px;
}

.range-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.context-list {
  display: grid;
  gap: 14px;
}

.context-list[hidden] {
  display: none;
}

.context-group {
  display: grid;
  gap: 8px;
}

.context-group-title {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.context-group-body {
  display: grid;
}

.context-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(166, 191, 245, 0.1);
}

.context-row:first-child {
  border-top: 0;
}

.context-row.is-selected .context-row-verse,
.context-row.is-selected .context-row-text {
  color: var(--ink);
}

.context-row-verse {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.8;
}

.context-row-text {
  color: var(--muted);
  line-height: 1.72;
}

.warning-band {
  padding: 12px 14px;
  border: 1px solid rgba(255, 216, 154, 0.16);
  border-radius: 16px;
  color: #ffe9be;
  background: rgba(255, 216, 154, 0.08);
  line-height: 1.7;
}

.fold-shell {
  padding-top: 10px;
  border-top: 1px solid rgba(166, 191, 245, 0.1);
}

.fold-shell summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.fold-shell summary::-webkit-details-marker {
  display: none;
}

.fold-copy {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.58;
}

.fold-toggle {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fold-shell[open] .fold-toggle {
  color: var(--accent);
}

.fold-body {
  padding-top: 14px;
}

.compare-stack,
.word-grid,
.note-list,
.topic-row,
.signal-grid {
  display: grid;
}

.compare-stack {
  gap: 12px;
}

.compare-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(166, 191, 245, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.compare-card.is-selected {
  border-color: rgba(255, 216, 154, 0.16);
}

.compare-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.compare-card-verse,
.compare-card-state,
.compare-source-label {
  font-size: 0.8rem;
}

.compare-card-verse,
.compare-source-label {
  color: var(--accent-strong);
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.compare-card-state {
  color: var(--muted);
}

.compare-source-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.compare-source-text {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.word-grid {
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.word-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(166, 191, 245, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.word-form {
  font-size: 1.02rem;
  font-weight: 600;
}

.word-subform {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.word-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-meta-pill,
.topic-chip,
.signal-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.word-meta-pill,
.topic-chip {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.note-list {
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.74;
}

.topic-row {
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, max-content));
}

.query-dock {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: min(620px, calc(100vw - 24px));
  display: grid;
  gap: 8px;
  padding: 10px 14px 12px;
  transform: translateX(-50%);
  border: 1px solid rgba(158, 182, 238, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(14, 23, 48, 0.56), rgba(8, 13, 27, 0.32)),
    rgba(8, 13, 27, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  z-index: 9;
}

.composer-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.query-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
  font-size: clamp(1rem, 2.4vw, 1.34rem);
  line-height: 40px;
  letter-spacing: -0.04em;
}

.query-input::placeholder {
  color: rgba(227, 235, 255, 0.36);
}

.dock-preview {
  display: grid;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(166, 191, 245, 0.1);
  cursor: pointer;
}

.dock-preview-label {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dock-preview-copy {
  margin: 0;
  color: rgba(232, 239, 255, 0.82);
  font-size: 0.86rem;
  line-height: 1.45;
}

.dock-row {
  display: block;
}

.starter-strip {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 8px 12px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  white-space: nowrap;
  padding-bottom: 2px;
}

.starter-strip::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sample-link {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  flex: 0 0 auto;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.signal-drawer {
  position: fixed;
  right: 14px;
  bottom: 16px;
  width: min(236px, calc(100vw - 28px));
  z-index: 9;
  border: 1px solid rgba(166, 191, 245, 0.12);
  border-radius: 18px;
  background: rgba(7, 13, 26, 0.48);
  backdrop-filter: blur(16px);
}

.signal-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
}

.signal-summary::-webkit-details-marker {
  display: none;
}

.signal-summary span:first-child {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.signal-hint {
  color: var(--muted);
  font-size: 0.78rem;
}

.signal-grid {
  gap: 10px;
  padding: 0 14px 14px;
}

.signal-pill {
  padding: 10px 12px;
  font-size: 0.82rem;
  text-align: center;
}

.pending-loom {
  display: grid;
  gap: 12px;
}

.pending-line {
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(144, 214, 255, 0.22), rgba(255, 255, 255, 0.04));
  background-size: 220% 100%;
  animation: sheen 1.8s linear infinite;
}

.pending-line:nth-child(2) {
  width: 92%;
}

.pending-line:nth-child(3) {
  width: 82%;
}

.pending-line:nth-child(4) {
  width: 68%;
}

body[data-panel-kind="idle"] .detail-shell,
body[data-panel-kind="answer"] .detail-shell {
  pointer-events: none;
  opacity: 0;
  max-height: 0;
  padding: 0;
  margin: 0;
  border-top-color: transparent;
  transform: translateY(10px);
}

body[data-panel-kind="busy"] .detail-shell,
body[data-panel-kind="sheet"] .detail-shell,
body[data-panel-kind="detail"] .detail-shell,
body[data-panel-kind="passage"] .detail-shell {
  opacity: 1;
  pointer-events: auto;
  margin: 2px 0 0;
  padding: 12px 0 0;
  border-top-color: rgba(166, 191, 245, 0.12);
  transform: translateY(0);
  max-height: min(34svh, 320px);
}

body[data-panel-kind="sheet"] .detail-shell,
body[data-panel-kind="detail"] .detail-shell {
  max-height: min(30svh, 280px);
}

body[data-panel-kind="passage"] .detail-shell {
  max-height: min(42svh, 420px);
}

body[data-panel-kind="sheet"] .starter-strip,
body[data-panel-kind="detail"] .starter-strip,
body[data-panel-kind="passage"] .starter-strip {
  display: none;
}

body[data-panel-kind="sheet"] .dock-label,
body[data-panel-kind="detail"] .dock-label,
body[data-panel-kind="passage"] .dock-label {
  display: none;
}

body[data-panel-kind="sheet"] .query-dock,
body[data-panel-kind="detail"] .query-dock,
body[data-panel-kind="passage"] .query-dock {
  width: min(860px, calc(100vw - 20px));
  gap: 7px;
  padding-top: 10px;
  padding-bottom: 10px;
}

body[data-panel-expanded="true"][data-panel-kind="sheet"] .detail-shell,
body[data-panel-expanded="true"][data-panel-kind="detail"] .detail-shell {
  max-height: min(46svh, 520px);
}

body[data-panel-expanded="true"][data-panel-kind="passage"] .detail-shell {
  max-height: min(54svh, 620px);
}

body[data-panel-expanded="true"][data-panel-kind="sheet"] .query-dock,
body[data-panel-expanded="true"][data-panel-kind="detail"] .query-dock,
body[data-panel-expanded="true"][data-panel-kind="passage"] .query-dock {
  width: min(1040px, calc(100vw - 16px));
  top: 24px;
  bottom: 10px;
  padding-top: 14px;
  padding-bottom: 12px;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  align-content: stretch;
}

body[data-panel-expanded="true"][data-panel-kind="sheet"] .detail-shell,
body[data-panel-expanded="true"][data-panel-kind="detail"] .detail-shell,
body[data-panel-expanded="true"][data-panel-kind="passage"] .detail-shell {
  max-height: none;
  min-height: 0;
  height: 100%;
}

body[data-phase="busy"] .detail-shell {
  border-color: rgba(144, 214, 255, 0.24);
}

body[data-phase="session"] .focus-symbol,
body[data-phase="busy"] .focus-symbol {
  filter: drop-shadow(0 0 84px rgba(144, 214, 255, 0.22));
}

body[data-phase="busy"] .focus-symbol {
  animation-duration: 2.3s;
}

body:not(.has-draft) .ghost-action {
  opacity: 0.42;
}

@keyframes symbol-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, calc(-50% - 4px)) scale(1.02); }
}

@keyframes hub-node-float {
  0%, 100% {
    transform: translate(calc(-50% - var(--float-x)), calc(-50% - var(--float-y)));
  }
  50% {
    transform: translate(calc(-50% + var(--float-x)), calc(-50% + var(--float-y)));
  }
}

@keyframes sheen {
  from { background-position: 200% 0; }
  to { background-position: -20% 0; }
}

@media (max-width: 780px) {
  .topline {
    padding: 14px 12px;
  }

  .app-shell {
    width: calc(100vw - 20px);
  }

  .focus-symbol {
    top: 26%;
    width: 104px;
    height: 104px;
  }

  .detail-shell {
    max-height: 0;
    padding: 0;
    margin: 0;
  }

  body[data-panel-kind="sheet"] .detail-shell,
  body[data-panel-kind="detail"] .detail-shell {
    max-height: min(28svh, 220px);
  }

  body[data-panel-kind="passage"] .detail-shell {
    max-height: min(38svh, 360px);
  }

  body[data-panel-expanded="true"][data-panel-kind="sheet"] .detail-shell,
  body[data-panel-expanded="true"][data-panel-kind="detail"] .detail-shell {
    max-height: min(42svh, 420px);
  }

  body[data-panel-expanded="true"][data-panel-kind="passage"] .detail-shell {
    max-height: min(56svh, 560px);
  }

  body[data-panel-expanded="true"][data-panel-kind="sheet"] .query-dock,
  body[data-panel-expanded="true"][data-panel-kind="detail"] .query-dock,
  body[data-panel-expanded="true"][data-panel-kind="passage"] .query-dock {
    top: 50px;
    bottom: 8px;
    width: calc(100vw - 12px);
  }

  body[data-panel-kind="sheet"] .query-dock,
  body[data-panel-kind="detail"] .query-dock,
  body[data-panel-kind="passage"] .query-dock {
    width: calc(100vw - 16px);
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .dock-preview-copy {
    font-size: 0.82rem;
  }

  .query-dock {
    bottom: 8px;
    width: calc(100vw - 18px);
    padding: 10px 12px 11px;
    border-radius: 20px;
    gap: 8px;
  }

  .composer-row {
    gap: 8px;
  }

  .passage-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .dock-actions {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 8px;
  }

  .source-row {
    width: 100%;
    justify-content: flex-start;
  }

  .source-tools {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .starter-strip {
    width: 100%;
  }

  .query-input {
    height: 42px;
    font-size: clamp(1rem, 5vw, 1.24rem);
    line-height: 42px;
  }

  .sample-link {
    font-size: 0.86rem;
  }

  .context-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .signal-drawer {
    display: none;
  }

  .hub-node.is-ref {
    max-width: 126px;
    font-size: clamp(0.98rem, 4vw, 1.4rem);
  }

  .hub-node.is-meta,
  .hub-node.is-topic {
    max-width: 104px;
    font-size: 0.84rem;
  }
}

/* Immersive response-sheet refinements */
.brand-block {
  display: grid;
  gap: 4px;
}

.brand-copy {
  margin: 0;
  color: rgba(228, 236, 255, 0.48);
  font-size: 0.8rem;
  line-height: 1.45;
}

.response-sheet {
  --sheet-left: 50%;
  --sheet-top: 220px;
  --sheet-width: min(820px, calc(100vw - 34px));
  --sheet-height: min(48svh, 520px);
  --sheet-anchor-x: 50%;
  position: absolute;
  left: var(--sheet-left);
  top: var(--sheet-top);
  width: var(--sheet-width);
  height: var(--sheet-height);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(158, 182, 238, 0.14);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(11, 18, 36, 0.52), rgba(7, 12, 24, 0.34)),
    rgba(7, 12, 24, 0.22);
  backdrop-filter: blur(22px);
  box-shadow: 0 28px 84px rgba(0, 0, 0, 0.3);
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 18px, 0) scale(0.96);
  transform-origin: var(--sheet-anchor-x) 0;
  transition:
    opacity 220ms ease,
    transform 260ms ease,
    height 240ms ease,
    width 220ms ease,
    left 220ms ease,
    top 220ms ease;
}

.response-sheet::before {
  content: "";
  position: absolute;
  left: calc(var(--sheet-anchor-x) - 11px);
  width: 22px;
  height: 22px;
  border-left: 1px solid rgba(158, 182, 238, 0.14);
  border-top: 1px solid rgba(158, 182, 238, 0.14);
  background: rgba(8, 14, 28, 0.78);
  transform: rotate(45deg);
  pointer-events: none;
  opacity: 0.92;
}

.response-sheet[data-anchor-edge="top"] {
  transform-origin: var(--sheet-anchor-x) 0;
}

.response-sheet[data-anchor-edge="bottom"] {
  transform-origin: var(--sheet-anchor-x) 100%;
}

.response-sheet[data-anchor-edge="top"]::before {
  top: -11px;
}

.response-sheet[data-anchor-edge="bottom"]::before {
  bottom: -11px;
  transform: rotate(225deg);
}

.signal-ribbon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.signal-drawer {
  display: none !important;
}

.response-sheet .detail-shell {
  display: block;
  max-height: none !important;
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 0 !important;
  margin: 0 !important;
  border-top: 0 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

.response-sheet .detail-card {
  gap: 14px;
}

.response-sheet .detail-card.is-empty,
.response-sheet .detail-card.is-answer,
.response-sheet .passage-field,
.response-sheet .compare-card,
.response-sheet .word-card,
.response-sheet .detail-card:not(.is-empty) {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(166, 191, 245, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.response-sheet .detail-card.is-answer {
  background: linear-gradient(180deg, rgba(12, 20, 40, 0.84), rgba(7, 12, 24, 0.78));
}

.response-sheet .detail-card.is-empty {
  background: linear-gradient(180deg, rgba(14, 24, 49, 0.72), rgba(8, 13, 27, 0.42));
}

.empty-title {
  margin: 0;
  font-size: clamp(1.04rem, 2vw, 1.36rem);
  font-weight: 620;
  letter-spacing: -0.03em;
}

.empty-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.empty-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.empty-item {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(166, 191, 245, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.empty-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}

.empty-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.62;
}

.inline-folds {
  display: grid;
  gap: 12px;
}

.reference-track,
.note-cluster,
.inline-folds {
  padding-top: 2px;
}

.reference-link {
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(166, 191, 245, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.reference-link.is-active,
.reference-link:hover {
  border-color: rgba(144, 214, 255, 0.16);
}

.response-sheet .word-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

body[data-phase="idle"] .response-sheet {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 22px, 0) scale(0.95);
}

body[data-phase="session"] .response-sheet,
body[data-phase="busy"] .response-sheet {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.query-dock {
  width: min(640px, calc(100vw - 24px));
  gap: 6px;
  padding: 10px 14px 12px;
}

body[data-panel-kind="sheet"] .query-dock,
body[data-panel-kind="detail"] .query-dock,
body[data-panel-kind="passage"] .query-dock,
body[data-panel-expanded="true"][data-panel-kind="sheet"] .query-dock,
body[data-panel-expanded="true"][data-panel-kind="detail"] .query-dock,
body[data-panel-expanded="true"][data-panel-kind="passage"] .query-dock {
  width: min(640px, calc(100vw - 24px));
  top: auto;
  bottom: 18px;
  padding: 10px 14px 12px;
  grid-template-rows: none;
  align-content: normal;
}

.query-input {
  font-size: clamp(1rem, 2.2vw, 1.28rem);
}

.dock-preview {
  padding-top: 6px;
}

.scene-vignette {
  background:
    radial-gradient(circle at center, transparent 0 22%, rgba(4, 8, 18, 0.16) 44%, rgba(4, 8, 18, 0.88) 100%),
    linear-gradient(180deg, rgba(4, 8, 18, 0.8) 0%, rgba(4, 8, 18, 0.14) 26%, rgba(4, 8, 18, 0.9) 100%);
}

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

@media (max-width: 780px) {
  .brand-copy {
    display: none;
  }

  .response-sheet {
    padding: 12px 12px 14px;
    border-radius: 22px;
  }

  .signal-ribbon {
    justify-content: flex-start;
  }

  .signal-pill {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.76rem;
  }
}

@media (max-width: 620px) {
  .brand-mark {
    font-size: 0.92rem;
    letter-spacing: 0.14em;
  }

  .topline-links {
    gap: 10px;
  }

  .utility-link {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
  }

  .response-sheet {
    left: 6px !important;
    right: 6px !important;
    width: auto !important;
    padding: 10px 10px 12px;
    border-radius: 24px 24px 18px 18px;
  }

  body[data-phase="idle"] .response-sheet {
    display: none;
  }

  .response-sheet::before {
    display: none;
  }

  .query-dock {
    bottom: 8px;
    width: calc(100vw - 16px);
    padding: 10px 12px 11px;
    border-radius: 18px;
  }

  body[data-panel-kind="sheet"] .query-dock,
  body[data-panel-kind="detail"] .query-dock,
  body[data-panel-kind="passage"] .query-dock,
  body[data-panel-expanded="true"][data-panel-kind="sheet"] .query-dock,
  body[data-panel-expanded="true"][data-panel-kind="detail"] .query-dock,
  body[data-panel-expanded="true"][data-panel-kind="passage"] .query-dock {
    width: calc(100vw - 16px);
    bottom: 8px;
    top: auto;
    padding: 10px 12px 11px;
  }

  .composer-row {
    gap: 8px;
  }

  .query-input {
    height: 42px;
    font-size: 0.98rem;
    line-height: 42px;
  }

  .primary-action,
  .ghost-action {
    min-height: 40px;
    padding: 0 14px;
  }

  .dock-preview {
    display: none !important;
  }

  .starter-strip {
    gap: 8px;
  }

  .sample-link {
    font-size: 0.82rem;
  }

  .focus-symbol {
    top: 26%;
    width: 104px;
    height: 104px;
  }

  .hub-layer {
    padding-bottom: 140px;
  }

  .hub-node.is-ref {
    max-width: 126px;
    font-size: clamp(0.98rem, 4vw, 1.34rem);
  }

  .hub-node.is-meta,
  .hub-node.is-topic {
    max-width: 104px;
    font-size: 0.82rem;
  }

  .response-sheet .detail-card.is-empty,
  .response-sheet .detail-card.is-answer,
  .response-sheet .passage-field,
  .response-sheet .compare-card,
  .response-sheet .word-card,
  .response-sheet .detail-card:not(.is-empty) {
    padding: 14px;
    border-radius: 18px;
  }

  .response-sheet .word-grid,
  .empty-grid {
    grid-template-columns: 1fr;
  }

  .passage-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .detail-tools {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left: 0;
    white-space: normal;
  }

  .passage-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .source-row,
  .source-tools {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .focus-verse-text {
    word-break: keep-all;
  }
}

/* Bible AI v2: the entry view is a study desk, not an empty visual state. */
body[data-phase="idle"] .response-sheet {
  --sheet-left: 50%;
  --sheet-top: clamp(252px, 43svh, 390px);
  --sheet-width: min(720px, calc(100vw - 34px));
  --sheet-height: min(34svh, 350px);
  --sheet-anchor-x: 50%;
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

body[data-phase="idle"] .focus-symbol {
  top: 24%;
  width: 92px;
  height: 92px;
  filter: drop-shadow(0 0 46px rgba(144, 214, 255, 0.2));
}

body[data-phase="idle"] .focus-aura {
  opacity: 0.78;
}

.research-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.research-step {
  display: grid;
  gap: 10px;
  min-height: 122px;
  padding: 13px;
  border: 1px solid rgba(166, 191, 245, 0.1);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(144, 214, 255, 0.055), rgba(255, 255, 255, 0.015));
}

.research-step-number {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.research-step strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}

.research-step p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  word-break: keep-all;
}

.starter-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.starter-action {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
  text-align: left;
}

.starter-action span {
  color: var(--ink);
  font-weight: 700;
}

.starter-action small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.query-input {
  min-height: 48px;
  max-height: 124px;
  height: 48px;
  padding-top: 12px;
  padding-bottom: 12px;
  line-height: 1.45;
  overflow-y: auto;
  resize: none;
}

.book-navigator,
.word-search-results {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(144, 214, 255, 0.13);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(144, 214, 255, 0.065), rgba(255, 255, 255, 0.018));
}

.explorer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.explorer-title {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.explorer-stats {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: right;
}

.explorer-copy,
.explorer-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px;
}

.chapter-link {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid rgba(166, 191, 245, 0.1);
  border-radius: 14px;
  background: rgba(4, 10, 22, 0.24);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.chapter-link:hover {
  border-color: rgba(144, 214, 255, 0.35);
  background: rgba(144, 214, 255, 0.1);
  transform: translateY(-1px);
}

.chapter-number {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 700;
}

.chapter-count {
  color: var(--muted);
  font-size: 0.7rem;
}

.word-result-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.word-result-link {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(166, 191, 245, 0.09);
  border-radius: 14px;
  background: rgba(4, 10, 22, 0.2);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.word-result-link:hover {
  border-color: rgba(144, 214, 255, 0.3);
}

.word-result-index {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(144, 214, 255, 0.11);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.word-result-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.word-result-ref {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.word-result-text {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.composer-row {
  align-items: flex-end;
}

@media (max-width: 780px) {
  .research-steps {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .research-step {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    min-height: 0;
    padding: 10px 11px;
  }

  .research-step p {
    margin-top: 3px;
    font-size: 0.76rem;
  }

  .starter-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body[data-phase="idle"] .response-sheet {
    display: grid;
    --sheet-top: clamp(230px, 37svh, 300px);
    --sheet-height: min(43svh, 365px);
  }

  body[data-phase="idle"] .focus-symbol {
    top: 20%;
    width: 76px;
    height: 76px;
  }

  .response-sheet .detail-card.is-empty {
    padding: 13px;
  }

  .response-sheet .detail-card.is-empty .note-cluster {
    display: none;
  }

  .empty-title {
    font-size: 1.08rem;
  }

  .empty-copy {
    font-size: 0.82rem;
    line-height: 1.56;
  }

  .research-step strong {
    font-size: 0.84rem;
  }

  .starter-action {
    padding: 9px 10px;
  }

  .query-input {
    min-height: 42px;
    height: 42px;
    padding-top: 9px;
    padding-bottom: 9px;
    line-height: 1.4;
  }

  .book-navigator,
  .word-search-results {
    padding: 12px;
    border-radius: 17px;
  }

  .explorer-header {
    display: grid;
    gap: 7px;
  }

  .explorer-stats {
    justify-items: start;
    text-align: left;
  }

  .chapter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .chapter-link {
    min-height: 54px;
    padding: 8px;
  }
}

/* Reader-first layout: keep the research engine, remove the graph from the reading path. */
.hub-links,
.hub-node {
  display: none !important;
}

.focus-symbol {
  visibility: hidden;
  pointer-events: none;
}

.scene-canvas {
  opacity: 0.28;
}

.scene-vignette {
  background:
    radial-gradient(circle at 50% 0%, rgba(71, 121, 186, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(3, 8, 16, 0.36), rgba(3, 8, 16, 0.86));
}

.hero-shell {
  min-height: 100svh;
  padding: 74px 0 138px;
}

.response-sheet,
body[data-phase="idle"] .response-sheet,
body[data-phase="session"] .response-sheet,
body[data-phase="busy"] .response-sheet {
  top: 74px !important;
  right: 0 !important;
  bottom: 126px !important;
  left: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(12, 20, 34, 0.96), rgba(6, 12, 23, 0.96));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
}

.response-sheet::before {
  display: none !important;
}

.signal-ribbon {
  padding: 12px 15px 0;
  gap: 6px;
}

#enginePill,
#apiPill {
  display: none;
}

.signal-pill {
  font-size: 0.72rem;
  padding: 6px 9px;
}

.detail-shell {
  padding-bottom: 18px;
}

.query-dock,
body[data-panel-kind="sheet"] .query-dock,
body[data-panel-kind="detail"] .query-dock,
body[data-panel-kind="passage"] .query-dock,
body[data-panel-expanded="true"][data-panel-kind="sheet"] .query-dock,
body[data-panel-expanded="true"][data-panel-kind="detail"] .query-dock,
body[data-panel-expanded="true"][data-panel-kind="passage"] .query-dock {
  right: 0 !important;
  bottom: 12px !important;
  left: 0 !important;
  width: auto !important;
  transform: none !important;
  border-radius: 18px;
}

.explorer-actions {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 14px 0 16px;
  color: var(--muted);
  font-size: 0.8rem;
}

.reading-route {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
  padding: 13px;
  border: 1px solid rgba(144, 214, 255, 0.14);
  border-radius: 17px;
  background: rgba(144, 214, 255, 0.045);
}

.reading-route-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
}

.reading-route-step span {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(144, 214, 255, 0.13);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.reading-route-step strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.reading-route-step p {
  grid-column: 2;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.reading-route-action {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 3px;
}

.reference-guide {
  margin: 7px 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

/* The graph is a secondary research view, never the default route into a passage. */
body[data-graph-view="open"] .hub-links {
  display: block !important;
}

body[data-graph-view="open"] .hub-node {
  display: grid !important;
}

body[data-graph-view="open"] .focus-symbol {
  visibility: visible;
  pointer-events: auto;
}

body[data-graph-view="open"] .response-sheet {
  top: clamp(360px, 50svh, 510px) !important;
  background: linear-gradient(165deg, rgba(12, 20, 34, 0.92), rgba(6, 12, 23, 0.94));
}

@media (max-width: 620px) {
  .app-shell {
    width: calc(100vw - 16px);
  }

  .topline {
    padding: 11px 12px;
  }

  .brand-copy {
    display: none;
  }

  .hero-shell {
    padding-top: 62px;
    padding-bottom: 116px;
  }

  .response-sheet,
  body[data-phase="idle"] .response-sheet,
  body[data-phase="session"] .response-sheet,
  body[data-phase="busy"] .response-sheet {
    top: 62px !important;
    bottom: 108px !important;
    border-radius: 17px;
  }

  .query-dock,
  body[data-panel-kind="sheet"] .query-dock,
  body[data-panel-kind="detail"] .query-dock,
  body[data-panel-kind="passage"] .query-dock,
  body[data-panel-expanded="true"][data-panel-kind="sheet"] .query-dock,
  body[data-panel-expanded="true"][data-panel-kind="detail"] .query-dock,
  body[data-panel-expanded="true"][data-panel-kind="passage"] .query-dock {
    bottom: 7px !important;
    border-radius: 15px;
  }

  .explorer-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .reading-route {
    grid-template-columns: 1fr;
  }

  .reading-route-action {
    grid-column: auto;
  }

  body[data-graph-view="open"] .response-sheet {
    top: 300px !important;
  }
}
