/* Cast reading · Foundations layout (wired to live DIY / AI / Hex Board). */

#panel-stage.is-reading .cast-reading {
  width: 100%;
  max-width: none;
}

body.is-on-stage #panel-stage.is-reading {
  width: min(var(--content, 1320px), 100%);
  max-width: min(var(--content, 1320px), 100%);
}

.reading-layout {
  width: 100%;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 170px;
  gap: 30px;
  align-items: start;
}

.reading-rail {
  padding-top: 40px;
}

.rail-kicker {
  margin: 0 0 12px;
  color: rgba(248, 245, 236, 0.3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rail-nav {
  display: grid;
  gap: 3px;
}

.rail-link {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 9px 0 9px 13px;
  border: 0;
  border-radius: 0;
  background: none;
  color: rgba(248, 245, 236, 0.42);
  cursor: pointer;
  text-align: left;
  transition: color 0.25s ease;
}

.rail-link::before {
  content: "";
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 0;
  width: 1px;
  background: rgba(248, 245, 236, 0.1);
  transition: background 0.25s ease;
}

.rail-link:hover {
  color: rgba(248, 245, 236, 0.72);
}

.rail-link.is-on {
  color: rgba(248, 245, 236, 0.94);
}

.rail-link.is-on::before {
  background: var(--gold, #c4a35a);
}

.rail-link:focus {
  outline: none;
}

.rail-link:focus-visible {
  color: rgba(248, 245, 236, 0.86);
}

.rail-link span {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
}

.rail-link small {
  display: block;
  margin-top: 3px;
  color: rgba(248, 245, 236, 0.3);
  font-size: 11px;
  line-height: 1.35;
}

.rail-link.is-on small {
  color: rgba(248, 245, 236, 0.48);
}

.rail-note {
  margin: 24px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(248, 245, 236, 0.08);
  color: rgba(248, 245, 236, 0.3);
  font-size: 11px;
  line-height: 1.55;
}

.step-dots {
  display: none;
}

.reading-stage {
  min-width: 0;
  min-height: 0;
}

.cr-ai-shell {
  width: 100%;
}

.cr-board .cr-notes-slot {
  display: none;
}

.cr-board .foundation-mode-head #cr-board-title {
  margin: 0;
}

.cr-board .foundation-mode-head #cr-board-step {
  margin: 0;
  color: rgba(248, 245, 236, 0.7);
  font-size: 13px;
}

.cr-board-time {
  margin: 0 0 10px;
  color: rgba(248, 245, 236, 0.72);
  font-size: 14px;
}

.cr-board-time strong {
  margin-right: 10px;
  color: rgba(248, 245, 236, 0.42);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cr-board-pillars {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  width: 100%;
  margin: 0 0 14px;
  font-size: 13px;
}

.cr-board-pillars > span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.cr-board-pillars em {
  color: rgba(248, 245, 236, 0.42);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cr-theater--board .cr-derive {
  max-width: 52ch;
  margin: 0 auto 14px;
  text-align: center;
}

.detail-group,
.board-depth {
  display: none;
}

.detail-group.is-on,
.board-depth.is-on {
  display: block;
}

.cr-board-cell.is-focus {
  position: relative;
  color: #f8f5ec;
}

.cr-board-cell.is-focus::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 1px;
  background: var(--gold, #c4a35a);
}

.foundation-mode-head {
  min-height: 48px;
  margin: 0 0 18px;
  padding: 0 0 13px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid rgba(248, 245, 236, 0.09);
}

.foundation-mode-head div {
  display: grid;
  gap: 1px;
}

.foundation-mode-head span,
.foundation-mode-head #cr-derive {
  margin: 0;
  min-height: 0;
  max-width: none;
  color: rgba(196, 163, 90, 0.76);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: none;
}

.foundation-mode-head #diy-derive {
  margin: 0;
  color: rgba(248, 245, 236, 0.7);
  font-size: 13px;
}

.foundation-derivation {
  padding: 15px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  border-top: 1px solid rgba(248, 245, 236, 0.09);
  border-bottom: 1px solid rgba(248, 245, 236, 0.09);
}

.foundation-derivation__copy {
  max-width: 44ch;
}

.foundation-derivation__copy > span {
  display: block;
  margin-bottom: 4px;
  color: rgba(196, 163, 90, 0.66);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.foundation-derivation__copy h2 {
  margin: 0 0 4px;
  color: rgba(248, 245, 236, 0.88);
  font-family: "Philosopher", var(--font-d, serif);
  font-size: 18px;
  line-height: 1.3;
  text-wrap: balance;
}

.foundation-derivation__copy p {
  margin: 0;
  color: rgba(248, 245, 236, 0.48);
  font-size: 12px;
  line-height: 1.5;
}

.foundation-derivation__visual {
  min-width: 188px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.foundation-derivation .cr-compare {
  margin: 0;
  min-height: 0;
  gap: 0;
}

.foundation-derivation .cr-compare.is-dual {
  gap: 16px;
}

.foundation-derivation .cr-compare__label {
  font-size: 9px;
}

.foundation-derivation .cr-hex {
  width: 52px;
  gap: 4px;
}

.foundation-derivation .cr-hex .yao,
.foundation-derivation .cr-hex i {
  --yao-gap: 6px;
  width: 52px;
  height: 5px;
}

.foundation-art-column {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-top: 18px;
}

.foundation-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #10261b;
}

.foundation-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(5, 15, 11, 0.08) 35%, rgba(5, 15, 11, 0.88) 100%);
}

.foundation-art > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.foundation-art--reversed > img {
  transform: scaleX(-1);
}

.foundation-art__hex {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 52px;
  padding: 8px 7px;
  display: grid;
  gap: 4px;
  justify-items: center;
  border-radius: 8px;
  background: rgba(7, 22, 16, 0.78);
}

.foundation-art__hex,
.foundation-art__hex.cr-hex {
  width: 52px;
}

.foundation-art__hex .yao,
.foundation-art__hex.cr-hex .yao {
  --yao-gap: 4px;
  display: block;
  width: 38px;
  max-width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(248, 245, 236, 0.78);
}

.foundation-art__hex .yao.is-yin {
  -webkit-mask-image: linear-gradient(
    90deg,
    #000 0 calc(50% - var(--yao-gap) / 2),
    transparent calc(50% - var(--yao-gap) / 2) calc(50% + var(--yao-gap) / 2),
    #000 calc(50% + var(--yao-gap) / 2) 100%
  );
  mask-image: linear-gradient(
    90deg,
    #000 0 calc(50% - var(--yao-gap) / 2),
    transparent calc(50% - var(--yao-gap) / 2) calc(50% + var(--yao-gap) / 2),
    #000 calc(50% + var(--yao-gap) / 2) 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.foundation-art__hex .yao.is-moving {
  background: var(--gold, #c4a35a);
  box-shadow: 0 0 9px rgba(196, 163, 90, 0.35);
}

.foundation-art__badge {
  position: absolute;
  top: 18px;
  left: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(248, 245, 236, 0.9);
}

.foundation-art__badge[hidden] {
  display: none !important;
}

.foundation-art__badge b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold, #c4a35a);
  color: #102015;
  font-family: "Philosopher", var(--font-d, serif);
  font-size: 16px;
}

.foundation-art__badge span {
  font-size: 11px;
}

.foundation-art figcaption {
  position: absolute;
  left: 16px;
  right: 42%;
  bottom: 16px;
  z-index: 2;
}

.foundation-art figcaption span {
  display: block;
  margin-bottom: 3px;
  color: rgba(248, 245, 236, 0.56);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.foundation-art figcaption strong {
  display: block;
  color: rgba(248, 245, 236, 0.94);
  font-family: "Philosopher", var(--font-d, serif);
  font-size: 18px;
  line-height: 1.25;
}

.foundation-art-qr {
  position: static;
  justify-self: end;
  z-index: 1;
  margin: 2px 2px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(242, 208, 120, 0.92);
  cursor: pointer;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.foundation-art-qr:hover {
  color: rgba(226, 200, 138, 0.95);
}

.foundation-art-qr[hidden] {
  display: none !important;
}

.foundation-copy {
  min-width: 0;
  padding-top: 16px;
}

.foundation-step {
  margin: 0 0 5px;
  color: rgba(196, 163, 90, 0.72);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.foundation-copy > h1 {
  max-width: 18ch;
  margin: 0 0 8px;
  color: rgba(248, 245, 236, 0.95);
  font-family: "Philosopher", var(--font-d, serif);
  font-size: 29px;
  font-weight: 700;
  line-height: 1.12;
  text-wrap: balance;
}

.foundation-lede,
#cr-explain.foundation-lede {
  max-width: 58ch;
  margin: 0 0 18px;
  color: rgba(248, 245, 236, 0.67);
  font-size: 14px;
  line-height: 1.55;
  text-wrap: pretty;
}

.foundation-copy section > h2 {
  margin: 0 0 5px;
  color: rgba(248, 245, 236, 0.8);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.foundation-copy section > p {
  margin: 0;
  color: rgba(248, 245, 236, 0.55);
  font-size: 13px;
  line-height: 1.55;
}

.foundation-copy section > p strong {
  color: rgba(248, 245, 236, 0.82);
  font-weight: 600;
}

.foundation-answer {
  padding: 14px 0;
  border-top: 1px solid rgba(248, 245, 236, 0.09);
  border-bottom: 1px solid rgba(248, 245, 236, 0.09);
}

.foundation-more {
  display: inline-block;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(248, 245, 236, 0.88);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.foundation-more[hidden] {
  display: none !important;
}

.foundation-more:hover {
  color: rgba(226, 200, 138, 0.95);
}

.trigram-lab,
.why-plain,
.opposite-uses {
  padding: 15px 0;
  border-bottom: 1px solid rgba(248, 245, 236, 0.09);
}

.trigram-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
  margin-top: 9px;
}

.trigram-flow > div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(248, 245, 236, 0.045);
}

.trigram-flow > i {
  align-self: center;
  color: rgba(196, 163, 90, 0.56);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
}

.trigram-flow small {
  display: block;
  margin-bottom: 2px;
  color: rgba(248, 245, 236, 0.38);
  font-size: 9px;
  line-height: 1.3;
}

.trigram-flow b {
  display: block;
  color: rgba(248, 245, 236, 0.82);
  font-family: "Philosopher", var(--font-d, serif);
  font-size: 14px;
  line-height: 1.3;
}

.trigram-flow p {
  margin: 4px 0 0;
  color: rgba(248, 245, 236, 0.5);
  font-size: 11px;
  line-height: 1.52;
}

.trigram-pattern {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(248, 245, 236, 0.09);
}

.trigram-pattern h3 {
  margin: 0 0 6px;
  color: rgba(248, 245, 236, 0.88);
  font-family: "Philosopher", var(--font-d, serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
}

.trigram-pattern p {
  margin: 0;
  color: rgba(248, 245, 236, 0.62);
  font-size: 13px;
  line-height: 1.55;
}

.try-this {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 8px;
  background: rgba(42, 147, 95, 0.12);
}

.try-this h2 {
  color: rgba(248, 245, 236, 0.88) !important;
}

.try-this p {
  color: rgba(248, 245, 236, 0.63) !important;
}

.try-this a,
.try-this button {
  display: inline-block;
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(226, 200, 138, 0.78);
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.foundation-actions {
  margin-top: 15px;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(248, 245, 236, 0.08);
}

.foundation-actions button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(248, 245, 236, 0.46);
  cursor: pointer;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.24em;
}

.foundation-actions button:last-child {
  text-align: right;
}

.foundation-actions button:hover {
  color: rgba(226, 200, 138, 0.9);
}

.foundation-actions button[hidden] {
  visibility: hidden;
}

.perspective-swap {
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}

.perspective-swap > div {
  min-width: 0;
  padding: 11px;
  border-radius: 8px;
  background: rgba(248, 245, 236, 0.045);
}

.perspective-swap > i {
  color: rgba(196, 163, 90, 0.56);
  font-size: 9px;
  font-style: normal;
  text-align: center;
  text-transform: uppercase;
}

.perspective-swap span {
  display: block;
  margin-bottom: 2px;
  color: rgba(248, 245, 236, 0.38);
  font-size: 9px;
}

.perspective-swap b {
  display: block;
  color: rgba(248, 245, 236, 0.82);
  font-family: "Philosopher", var(--font-d, serif);
  font-size: 14px;
  line-height: 1.3;
}

.perspective-swap p {
  margin: 4px 0 0;
  color: rgba(248, 245, 236, 0.5);
  font-size: 11px;
  line-height: 1.52;
}

.opposite-uses > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.opposite-uses p {
  font-size: 12px !important;
}

.opposite-uses strong {
  display: block;
  margin-bottom: 3px;
  color: rgba(226, 200, 138, 0.8) !important;
}

.stage-track {
  margin: 22px 0 20px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid rgba(248, 245, 236, 0.11);
  border-bottom: 1px solid rgba(248, 245, 236, 0.11);
}

.stage-track > button {
  position: relative;
  margin: 0;
  padding: 13px 4px 12px;
  border: 0;
  background: none;
  color: rgba(248, 245, 236, 0.28);
  cursor: pointer;
  font-size: 12px;
  text-align: center;
}

.stage-track > button + button {
  border-left: 1px solid rgba(248, 245, 236, 0.07);
}

.stage-track small {
  display: block;
  margin-top: 2px;
  color: inherit;
  font-size: 9px;
  line-height: 1.25;
}

.stage-track .is-cast-moving {
  color: rgba(248, 245, 236, 0.72);
}

.stage-track .is-cast-moving::before {
  content: "";
  position: absolute;
  top: 7px;
  right: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold, #c4a35a);
  box-shadow: 0 0 8px rgba(196, 163, 90, 0.55);
}

.stage-track .is-active {
  color: rgba(248, 245, 236, 0.94);
  background: rgba(196, 163, 90, 0.1);
}

.stage-track .is-active::after {
  content: "";
  position: absolute;
  right: 18%;
  bottom: -1px;
  left: 18%;
  height: 1px;
  background: var(--gold, #c4a35a);
}

.stage-track > button:disabled {
  cursor: default;
  opacity: 0.42;
}

.line-asset {
  padding: 15px 0;
  border-bottom: 1px solid rgba(248, 245, 236, 0.09);
}

.line-asset > span {
  display: block;
  margin: 0 0 5px;
  color: rgba(196, 163, 90, 0.66);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.line-asset h2 {
  font-family: "Philosopher", var(--font-d, serif);
  font-size: 17px !important;
}

.line-asset p {
  max-width: 62ch;
}

.line-asset__block > h3 {
  margin: 0 0 5px;
  color: rgba(248, 245, 236, 0.8);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.line-asset__block > p {
  margin: 0;
  color: rgba(248, 245, 236, 0.55);
  font-size: 13px;
  line-height: 1.55;
}

.line-asset__block + .line-asset__block {
  margin-top: 14px;
}

.cr-diy .cr-theater,
.cr-diy .cr-rule,
.cr-diy .cr-switch {
  display: none !important;
}

.cr-diy .cr-body {
  margin: 0;
}

.cr-notes-slot--shared {
  width: min(680px, 100%);
  margin: 42px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(248, 245, 236, 0.1);
}

.cr-notes-slot--shared .cr-notes {
  max-width: none;
}

.cr-board .cr-name {
  margin: 0 0 8px;
  color: rgba(248, 245, 236, 0.94);
  font-family: "Philosopher", var(--font-d, serif);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
}

.cr-board .cr-explain {
  max-width: 62ch;
  margin: 0 0 16px;
  color: rgba(248, 245, 236, 0.56);
  font-size: 14px;
  line-height: 1.55;
}

.cr-board .cr-meaning {
  max-width: 62ch;
  margin: 0 0 16px;
  color: rgba(248, 245, 236, 0.78);
  font-size: 16px;
  line-height: 1.65;
}

.role-chooser {
  margin: 16px 0 12px;
  display: grid;
  border-top: 1px solid rgba(248, 245, 236, 0.09);
}

.role-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 2px;
  border-bottom: 1px solid rgba(248, 245, 236, 0.09);
}

.role-row:has(button.is-active) {
  padding-left: 10px;
  border-left: 1px solid var(--gold, #c4a35a);
  background: linear-gradient(90deg, rgba(196, 163, 90, 0.08), transparent 72%);
}

.role-chooser button {
  width: auto;
  flex: 0 1 auto;
  margin: 0;
  padding: 11px 0;
  border: 0;
  background: none;
  color: rgba(248, 245, 236, 0.48);
  cursor: pointer;
  text-align: left;
}

.role-chooser button:hover,
.role-chooser button.is-active {
  color: rgba(248, 245, 236, 0.9);
}

.role-chooser strong {
  font-family: "Philosopher", var(--font-d, serif);
  font-size: 15px;
  font-weight: 700;
}

.role-mark {
  margin-right: 6px;
  font-style: normal;
}

.role-kinds {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  flex: 1 1 36px;
  min-width: 36px;
  padding: 0 0 8px;
  color: rgba(248, 245, 236, 0.62);
}

.role-kinds summary {
  flex: 0 0 auto;
  cursor: pointer;
  font-size: 0;
  line-height: 1;
  list-style: none;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px 0 2px;
}

.role-kinds summary::-webkit-details-marker {
  display: none;
}

.role-kinds summary::after {
  content: "▾";
  font-family: "Philosopher", var(--font-d, serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: rgba(248, 245, 236, 0.92);
}

.role-kinds[open] summary::after {
  content: "▴";
}

.role-kinds > p,
.role-kinds > ul {
  flex: 1 0 100%;
}

.role-kinds p {
  margin: 8px 0 0;
  color: rgba(248, 245, 236, 0.72);
  font-size: 13px;
  line-height: 1.55;
}

.role-kinds ul {
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.role-kinds li {
  display: grid;
  gap: 2px;
}

.role-kinds li strong {
  font-family: "Philosopher", var(--font-d, serif);
  font-size: 13px;
  font-weight: 700;
  color: rgba(248, 245, 236, 0.88);
}

.role-kinds li span {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(248, 245, 236, 0.62);
}

.role-detail {
  min-height: 3.2em;
  margin: 0 0 4px;
  color: rgba(248, 245, 236, 0.56);
  font-size: 13px;
  line-height: 1.55;
}

.focus-path,
.moving-row {
  margin: 22px 0 18px;
  padding: 18px 0;
  display: grid;
  gap: 14px;
  align-items: center;
  border-top: 1px solid rgba(248, 245, 236, 0.09);
  border-bottom: 1px solid rgba(248, 245, 236, 0.09);
}

.focus-path {
  grid-template-columns: 1.15fr auto 0.8fr auto 0.65fr;
}

.moving-row {
  grid-template-columns: 1fr auto 1fr;
}

.focus-path > div,
.moving-row > div {
  display: grid;
  gap: 3px;
}

.focus-path span,
.moving-row span,
.side-reading span {
  color: rgba(248, 245, 236, 0.34);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.focus-path strong,
.moving-row strong,
.side-reading strong {
  color: rgba(248, 245, 236, 0.84);
  font-family: "Philosopher", var(--font-d, serif);
  font-size: 18px;
  line-height: 1.3;
}

.moving-row small {
  color: rgba(248, 245, 236, 0.42);
  font-size: 12px;
}

.focus-path > i,
.moving-row > i {
  color: rgba(196, 163, 90, 0.62);
  font-style: normal;
}

.side-reading {
  margin: 18px 0;
}

.side-reading section {
  padding: 16px 0;
  border-top: 1px solid rgba(248, 245, 236, 0.09);
}

.side-reading section:last-child {
  border-bottom: 1px solid rgba(248, 245, 236, 0.09);
}

.side-reading strong {
  display: block;
  margin: 3px 0 5px;
}

.side-reading p {
  max-width: 62ch;
  margin: 0;
  color: rgba(248, 245, 236, 0.5);
  font-size: 14px;
  line-height: 1.55;
}

.strength-list {
  margin: 15px 0 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(248, 245, 236, 0.09);
}

.strength-list section {
  min-width: 0;
  padding: 13px 14px 13px 0;
  border-bottom: 1px solid rgba(248, 245, 236, 0.09);
}

.strength-list section:nth-child(even) {
  padding-left: 14px;
  border-left: 1px solid rgba(248, 245, 236, 0.09);
}

.strength-list span,
.relation-sequence span {
  display: block;
  margin-bottom: 3px;
  color: rgba(196, 163, 90, 0.66);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.strength-list h2 {
  margin: 0 0 4px;
  color: rgba(248, 245, 236, 0.85);
  font-family: "Philosopher", var(--font-d, serif);
  font-size: 16px;
}

.strength-list p {
  margin: 0;
  color: rgba(248, 245, 236, 0.46);
  font-size: 12px;
  line-height: 1.48;
}

.relation-sequence {
  margin: 14px 0 20px;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(248, 245, 236, 0.09);
}

.relation-sequence li {
  padding: 13px 0;
  border-bottom: 1px solid rgba(248, 245, 236, 0.09);
}

.relation-sequence strong {
  display: block;
  color: rgba(248, 245, 236, 0.8);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.relation-sequence p {
  max-width: 62ch;
  margin: 3px 0 0;
  color: rgba(248, 245, 236, 0.46);
  font-size: 12px;
  line-height: 1.5;
}

.reading-checks {
  margin: 18px 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 28px;
  list-style: none;
  border-top: 1px solid rgba(248, 245, 236, 0.09);
}

.reading-checks li {
  min-width: 0;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  border-bottom: 1px solid rgba(248, 245, 236, 0.09);
}

.reading-checks li > b {
  color: rgba(196, 163, 90, 0.7);
  font-size: 11px;
  font-weight: 600;
}

.reading-checks li > span {
  color: rgba(248, 245, 236, 0.4);
  font-size: 12px;
  line-height: 1.35;
}

.reading-checks strong {
  display: block;
  margin-bottom: 2px;
  color: rgba(248, 245, 236, 0.8);
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 680px) {
  .role-row {
    display: flex;
  }

  .focus-path,
  .moving-row,
  .strength-list,
  .reading-checks {
    grid-template-columns: 1fr;
  }

  .strength-list section,
  .strength-list section:nth-child(even) {
    padding: 12px 0;
    border-left: 0;
  }

  .focus-path > i {
    justify-self: center;
    width: max-content;
    transform: rotate(90deg);
  }

  .moving-row > i {
    justify-self: center;
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
    text-align: center;
  }
}

@media (max-width: 980px) {
  .reading-layout {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .reading-rail--detail {
    grid-column: 1 / -1;
    padding-top: 8px;
  }

  .reading-rail--detail .detail-group.is-on {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 30px;
    align-items: start;
  }

  .reading-rail--detail .rail-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reading-rail--detail .rail-note {
    display: none;
  }
}

@media (max-width: 680px) {
  .reading-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .reading-stage,
  #cr-diy:not([hidden]),
  #cr-board:not([hidden]) {
    display: contents;
  }

  .reading-rail--method { order: 1; }
  .foundation-derivation,
  .foundation-art-column,
  .cr-theater--board { order: 2; }
  .foundation-mode-head,
  .reading-rail--detail { order: 3; }
  .cr-rule,
  .board-depth,
  .cr-body,
  .cr-dock-rule,
  #cr-board > .cr-dock,
  #cr-ai-shell { order: 4; }

  .foundation-derivation,
  .foundation-art-column,
  .cr-theater--board,
  .foundation-mode-head,
  .board-depth,
  .cr-body,
  #cr-ai-shell {
    width: 100%;
    min-width: 0;
  }

  .foundation-mode-head {
    min-height: 0;
    margin: 16px 0 8px;
    padding: 0;
    border-bottom: 0;
  }

  .reading-rail--detail:has(#detail-ai.is-on) {
    display: none;
  }

  .reading-rail {
    padding-top: 0;
  }

  .rail-kicker,
  .rail-note {
    display: none;
  }

  .rail-nav {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 12px;
    scrollbar-width: none;
  }

  .rail-nav::-webkit-scrollbar {
    display: none;
  }

  .rail-link {
    min-width: max-content;
    padding: 7px 10px;
    border: 1px solid rgba(248, 245, 236, 0.1);
    border-radius: 8px;
  }

  .rail-link::before,
  .rail-link small {
    display: none;
  }

  .rail-link.is-on {
    border-color: rgba(196, 163, 90, 0.45);
    background: rgba(196, 163, 90, 0.1);
  }

  .reading-stage {
    padding-top: 12px;
  }

  .reading-rail--detail {
    margin-top: 0;
  }

  .reading-rail--detail .detail-group.is-on {
    display: block;
  }

  .reading-rail--detail .rail-kicker {
    display: block;
    margin-bottom: 8px;
  }

  .reading-rail,
  .reading-rail--detail .detail-group,
  .reading-rail--detail .rail-nav {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .reading-rail--detail .rail-nav {
    gap: 8px;
    padding: 0;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
  }

  .reading-rail--detail .rail-nav::before,
  .reading-rail--detail .rail-nav::after {
    content: "";
    flex: 0 0 calc(20% - 4px);
  }

  .reading-rail--detail .rail-link {
    flex: 0 0 calc(60% - 8px);
    min-width: 0;
    padding: 8px 10px 9px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    white-space: normal;
  }

  .reading-rail--detail .step-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 10px 0 2px;
  }

  .step-dot {
    width: 6px;
    height: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(248, 245, 236, 0.28);
    cursor: pointer;
  }

  .step-dot.is-on {
    background: var(--gold, #c4a35a);
  }

  .reading-rail--detail .rail-link small {
    display: block;
  }

  .foundation-derivation {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .foundation-derivation__visual {
    min-width: 0;
    justify-content: center;
  }

  .foundation-copy > h1 {
    font-size: 27px;
  }

  .trigram-flow,
  .perspective-swap,
  .opposite-uses > div {
    grid-template-columns: 1fr;
  }

  .stage-track {
    grid-template-columns: repeat(3, 1fr);
  }

  .stage-track > button:nth-child(4) {
    border-left: 0;
  }

  .foundation-art figcaption {
    right: 36%;
  }

  /* The chart stays under the bar. Later steps scroll beneath it. */
  body.is-on-stage .cast-hero:has(#panel-stage.is-reading-board) .quiet-canvas {
    overflow: visible;
  }

  #panel-stage.is-reading-board .cr-board-chart {
    position: sticky;
    top: var(--header-h, 60px);
    z-index: 8;
    background: #0c1410;
    padding-bottom: 10px;
  }

  #panel-stage.is-reading-board .cr-board-frame {
    min-height: 0;
    align-items: flex-start;
  }
}
