/* DWH Hub Frontend Beta 0.14 — consolidated frontend styles. */
:root {
  --hub-ink: #080908;
  --hub-deep: #0d1110;
  --hub-green: #17352f;
  --hub-green-soft: #24463f;
  --hub-cream: #eee8d8;
  --hub-paper: #f5f1e7;
  --hub-gold: #c3a061;
  --hub-gold-soft: #e6d7b2;
  --hub-line: rgba(226, 206, 160, 0.26);
  --hub-line-soft: rgba(226, 206, 160, 0.12);
  --hub-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
  --hub-serif: "EB Garamond", Georgia, serif;
  --hub-display: "Cinzel", Georgia, serif;
  --hub-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--hub-ink); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--hub-cream);
  background: var(--hub-ink);
  font-family: var(--hub-serif);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}
body::selection { background: rgba(195,160,97,.28); }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
img, video { max-width: 100%; }

.hub-skip {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--hub-paper);
  color: #13241f;
  text-decoration: none;
}
.hub-skip:focus { top: 12px; }

.hub-header {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 14px clamp(16px, 3vw, 38px);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5,7,6,.62), rgba(5,7,6,0));
}
.hub-header > * { pointer-events: auto; }
.hub-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.hub-brand img { width: 38px; height: 38px; object-fit: contain; }
.hub-brand span {
  font-family: var(--hub-display);
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.hub-spine-mini {
  justify-self: center;
  display: flex;
  gap: 7px;
  align-items: center;
  color: rgba(238,232,216,.62);
  font-size: 12px;
  letter-spacing: .07em;
}
.hub-spine-mini a {
  position: relative;
  color: inherit;
  text-decoration: none;
  font-weight: 400;
  transition: color 180ms ease;
}
.hub-spine-mini a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -7px;
  height: 1px;
  background: var(--hub-gold-soft);
  transition: left 220ms ease, right 220ms ease;
}
.hub-spine-mini a:hover,
.hub-spine-mini a:focus-visible,
.hub-spine-mini a.is-active { color: rgba(255,248,232,.94); }
.hub-spine-mini a.is-active::after { left: 10%; right: 10%; }
.hub-spine-mini i { width: 18px; height: 1px; background: var(--hub-line); }
.hub-header-link {
  justify-self: end;
  border: 1px solid var(--hub-line);
  border-radius: 999px;
  padding: 8px 13px;
  text-decoration: none;
  font-family: var(--hub-display);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  background: rgba(7,11,9,.24);
}

.hub-state {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  overflow: clip;
}
.hub-state + .hub-state { border-top: 1px solid rgba(255,255,255,.025); }
.hub-state::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 900ms ease;
  background:
    radial-gradient(circle at 20% 20%, rgba(197,164,101,.09), transparent 32%),
    radial-gradient(circle at 80% 70%, rgba(91,133,116,.08), transparent 36%);
}
.hub-state.is-present::after { opacity: 1; }

.hub-kicker {
  margin: 0 0 .8rem;
  color: var(--hub-gold-soft);
  font-family: var(--hub-display);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hub-title {
  margin: 0;
  font-family: var(--hub-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: .015em;
}
.hub-body-copy {
  max-width: 43rem;
  margin: 1rem 0 0;
  color: rgba(238,232,216,.82);
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
}
.hub-action {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  margin-top: 1.7rem;
  padding: 10px 18px;
  border: 1px solid rgba(232,213,170,.42);
  border-radius: 999px;
  color: var(--hub-cream);
  background: rgba(9,13,11,.2);
  text-decoration: none;
  cursor: pointer;
  font-family: var(--hub-display);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
.hub-action:hover,
.hub-action:focus-visible {
  border-color: rgba(240,219,172,.85);
  background: rgba(195,160,97,.12);
  transform: translateY(-1px);
}
.hub-action--light {
  color: #23322d;
  border-color: rgba(79,91,78,.24);
  background: rgba(255,255,255,.56);
}

/* Entrancia world threshold: decisive entry control on the pale botanical field. */
.hub-world-root .hub-action--world-entry {
  min-height: 48px;
  padding: 12px 22px;
  color: #fff4dc;
  border-color: rgba(105,82,51,.74);
  background:
    linear-gradient(135deg, rgba(111,84,52,.98), rgba(58,74,64,.98));
  box-shadow:
    0 12px 30px rgba(47,55,48,.18),
    inset 0 1px 0 rgba(255,244,216,.14);
  text-shadow: 0 1px 8px rgba(0,0,0,.28);
  font-size: 10.5px;
  letter-spacing: .135em;
}
.hub-world-root .hub-action--world-entry:hover,
.hub-world-root .hub-action--world-entry:focus-visible {
  color: #fff9ed;
  border-color: rgba(134,102,58,.9);
  background:
    linear-gradient(135deg, rgba(130,95,54,1), rgba(62,86,72,1));
  box-shadow:
    0 14px 34px rgba(47,55,48,.22),
    inset 0 1px 0 rgba(255,244,216,.18);
  outline: none;
}

/* THRESHOLD */
.hub-threshold { display: grid; place-items: end start; background: #0b0c0b; }
.hub-threshold-media { position: absolute; inset: 0; z-index: -2; }
.hub-threshold-media video,
.hub-threshold-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 43%;
}
.hub-threshold-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,7,6,.24), rgba(6,7,6,.05) 40%, rgba(6,7,6,.78) 100%),
    linear-gradient(90deg, rgba(6,7,6,.38), transparent 50%);
}
.hub-threshold-copy {
  width: min(760px, calc(100% - 32px));
  margin: 0 clamp(18px, 7vw, 100px) clamp(34px, 11vh, 110px);
}
.hub-threshold .hub-title { font-size: clamp(3.2rem, 8vw, 7rem); }
.hub-threshold-line {
  margin: 1rem 0 0;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-style: italic;
  color: rgba(255,248,232,.9);
}
.hub-threshold-quiet {
  margin-top: .75rem;
  color: rgba(255,248,232,.66);
  letter-spacing: .04em;
}
.hub-mark-seal {
  width: 64px;
  height: 64px;
  margin-bottom: 1.1rem;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(218,186,116,.18));
}

/* HOUSE */
.hub-house {
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 55% 42%, rgba(81,113,100,.16), transparent 36%),
    linear-gradient(145deg, #0c1512, #07100d 58%, #090b0a);
}
.hub-house-inner {
  width: min(var(--hub-max), calc(100% - 36px));
  margin: 0 auto;
  padding: 120px 0 80px;
}
.hub-house-head { max-width: 780px; }
.hub-house-whisper { max-width: 40rem; margin: 1rem 0 0; color: rgba(238,232,216,.67); font-size: clamp(1.02rem,1.5vw,1.22rem); font-style: italic; }
.hub-house .hub-title { font-size: clamp(2.6rem, 6vw, 5.5rem); }
.hub-world-field {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 50px;
}
.hub-world-entry {
  position: relative;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  border: 1px solid var(--hub-line-soft);
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  background: rgba(255,255,255,.018);
  transition: transform 240ms ease, border-color 240ms ease, background 240ms ease;
}
.hub-world-entry::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at 70% 20%, rgba(211,183,119,.18), transparent 38%);
  transition: opacity 320ms ease;
}
.hub-world-entry:hover,
.hub-world-entry:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(226,206,160,.36);
  background: rgba(255,255,255,.03);
}
.hub-world-entry:hover::before,
.hub-world-entry:focus-visible::before { opacity: 1; }
.hub-world-entry--entrancia {
  min-height: 250px;
  grid-column: span 2;
  background:
    linear-gradient(90deg, rgba(4,10,8,.8), rgba(4,10,8,.28)),
    url('/assets/entrancia/img/botanical/kantkaw.webp') 80% 45% / cover no-repeat;
}
.hub-world-entry h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--hub-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.1vw, 1.8rem);
}
.hub-world-entry p {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  margin: 8px 0 0;
  color: rgba(238,232,216,.68);
}
.hub-world-entry small {
  position: absolute;
  z-index: 1;
  top: 18px;
  right: 18px;
  color: var(--hub-gold-soft);
  font-family: var(--hub-display);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

/* WORLD ROOT */
.hub-world-root {
  min-height: 82svh;
  display: grid;
  align-items: center;
  color: #24332e;
  background: var(--hub-paper);
}
.hub-world-root-inner {
  width: min(var(--hub-max), calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr);
  gap: clamp(28px, 6vw, 90px);
  align-items: center;
  padding: 110px 0 90px;
}
.hub-world-root .hub-kicker { color: #826a3f; }
.hub-world-root .hub-title { font-size: clamp(2.6rem, 5.8vw, 5rem); }
.hub-world-root .hub-body-copy { color: rgba(36,51,46,.78); }
.hub-world-root-media {
  min-height: 480px;
  border-radius: 36px 8px 36px 8px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(40,48,42,.16);
  background: #d8d4c6;
}
.hub-world-root-media img { width: 100%; height: 100%; object-fit: cover; }
.hub-entrancia-mark { width: min(430px, 90%); margin: 0 0 24px; }

/* ENTRANCIA CHAMBERS
   0.14 media-scale v05: contained 9:16 living photographs with stronger portrait presence. */
.hub-entrancia-chamber {
  min-height: auto;
  display: grid;
  align-items: center;
  background: #0c100f;
  scroll-margin-top: 72px;
}
.hub-chamber-grid {
  width: min(var(--hub-max), calc(100% - 30px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr);
  gap: clamp(28px, 4vw, 62px);
  align-items: center;
  padding: 56px 0 52px;
}
.hub-chamber-copy { position: relative; z-index: 2; }
.hub-chamber-index {
  display: block;
  margin-bottom: 14px;
  color: rgba(230,215,178,.5);
  font-family: var(--hub-display);
  font-size: 11px;
  letter-spacing: .2em;
}
.hub-entrancia-chamber .hub-title { font-size: clamp(2.8rem, 6vw, 5.8rem); }
.hub-chamber-law {
  margin: 1.1rem 0 0;
  color: rgba(238,232,216,.88);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-style: italic;
}
.hub-chamber-note {
  max-width: 36rem;
  margin: 1rem 0 0;
  color: rgba(238,232,216,.6);
}
.hub-chamber-media {
  position: relative;
  width: min(45dvh, 470px, 100%);
  min-width: 0;
  min-height: 0;
  aspect-ratio: 9 / 16;
  justify-self: center;
  border-radius: 34px 8px 34px 8px;
  overflow: hidden;
  box-shadow: var(--hub-shadow);
  background: #101210;
}
.hub-chamber-media video,
.hub-chamber-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  object-position: center center;
  cursor: pointer;
  background: #101210;
}
.hub-chamber-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(8,10,9,.23));
}
.hub-residue {
  position: absolute;
  width: min(38vw, 480px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  opacity: .24;
  filter: blur(1px);
  background: url('/assets/entrancia/img/brand/Entrancia_Flower_Left.webp') center / contain no-repeat;
  animation: hubResidueDrift 18s linear infinite;
}
.hub-residue--left { left: -14vw; bottom: -10vw; }
.hub-residue--right { right: -16vw; top: 8vh; background-image: url('/assets/entrancia/img/brand/Entrancia_Flower_Right.webp'); }
@keyframes hubResidueDrift { to { transform: rotate(360deg); } }

.hub-entrancia-chamber[data-dwh-chamber-id="chamber.entrancia.craft"] { background: linear-gradient(145deg, #151412, #211f19 58%, #111210); }
.hub-entrancia-chamber[data-dwh-chamber-id="chamber.entrancia.touch"] { background: linear-gradient(145deg, #17110d, #2a1b13 58%, #12110f); }
.hub-entrancia-chamber[data-dwh-chamber-id="chamber.entrancia.radiance"] { background: radial-gradient(circle at 70% 40%, rgba(207,169,81,.18), transparent 35%), linear-gradient(145deg, #18120b, #2d2112 58%, #11100e); }
.hub-entrancia-chamber[data-dwh-chamber-id="chamber.entrancia.offering"] { background: linear-gradient(145deg, #1a120c, #2b2014 58%, #0d0d0c); }
.hub-entrancia-chamber[data-dwh-chamber-id="chamber.entrancia.world"] { background: radial-gradient(circle at 65% 20%, rgba(72,120,100,.14), transparent 38%), linear-gradient(145deg, #0c1915, #14251f 58%, #090d0c); }
.hub-entrancia-chamber[data-dwh-chamber-id="chamber.entrancia.return"] { background: linear-gradient(145deg, #162018, #233128 58%, #101411); }

/* HOUSE READING */
.hub-reading {
  min-height: 100svh;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(7,9,8,.96) 0%, rgba(10,13,11,.92) 42%, rgba(10,12,10,.72) 100%),
    url('/assets/hub/media/entrancia-offering-v05.webp') 82% 46% / cover no-repeat;
}
.hub-reading::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 34%, rgba(216,176,92,.18), transparent 25%),
    linear-gradient(180deg, rgba(218,186,116,.035), transparent 35%, rgba(0,0,0,.18));
}
.hub-reading-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background: url('/assets/entrancia/img/brand/Entrancia_Flower_Left.webp') -11vw 72% / min(42vw,520px) auto no-repeat;
}
.hub-reading-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 120px 0 92px;
}
.hub-reading-head { max-width: 850px; }
.hub-reading .hub-title { font-size: clamp(3rem, 7vw, 6.4rem); }
.hub-reading-opening {
  max-width: 48rem;
  margin: 1.25rem 0 0;
  color: rgba(247,240,222,.82);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-style: italic;
}
.hub-reading-divider {
  width: min(340px, 70vw);
  height: 56px;
  margin: 34px 0 12px;
  opacity: .68;
  background: url('/assets/entrancia/img/brand/Entrancia_Flower_Divider.webp') left center / contain no-repeat;
}
.hub-reading-triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-top: 26px;
}
.hub-reading-card {
  position: relative;
  min-height: 340px;
  padding: 28px 26px 30px;
  border: 1px solid rgba(226,206,160,.16);
  border-radius: 26px 7px 26px 7px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(30,34,29,.78), rgba(12,16,14,.9));
  box-shadow: 0 24px 65px rgba(0,0,0,.23);
  backdrop-filter: blur(14px);
}
.hub-reading-card::after {
  content: "";
  position: absolute;
  right: -66px;
  bottom: -76px;
  width: 190px;
  aspect-ratio: 1;
  opacity: .08;
  background: url('/assets/entrancia/img/brand/Entrancia_Flower_Right.webp') center / contain no-repeat;
}
.hub-reading-number {
  display: block;
  margin-bottom: 26px;
  color: rgba(230,215,178,.42);
  font-family: var(--hub-display);
  font-size: 12px;
  letter-spacing: .2em;
}
.hub-reading-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--hub-display);
  font-weight: 500;
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
  line-height: 1.12;
}
.hub-reading-card > p:last-child {
  position: relative;
  z-index: 1;
  margin: 1rem 0 0;
  color: rgba(238,232,216,.72);
  font-size: 1.05rem;
}
.hub-reading-invocation {
  max-width: 44rem;
  margin: 34px auto 0;
  text-align: center;
}
.hub-reading-invocation > p {
  margin: 0;
  color: rgba(247,240,222,.76);
  font-style: italic;
  font-size: 1.15rem;
}
.hub-reading-invocation .hub-action { margin-inline: 4px; }

/* SPINE / RETURN */
.hub-return {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(195,160,97,.1), transparent 38%),
    linear-gradient(180deg, #101613, #080a09);
}
.hub-return-inner { width: min(980px, calc(100% - 36px)); padding: 110px 0 80px; }
.hub-return .hub-title { font-size: clamp(2.8rem, 7vw, 6.2rem); }
.hub-return-line {
  margin: 42px auto 0;
  max-width: 42rem;
  font-size: clamp(1.28rem, 2.4vw, 1.8rem);
  font-style: italic;
  color: rgba(247,240,222,.9);
}
.hub-return-whisper { max-width: 36rem; margin: 18px auto 0; color: rgba(238,232,216,.56); }
.hub-return-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Reading threshold dialog */
.hub-reading-dialog {
  width: min(660px, calc(100% - 28px));
  border: 1px solid rgba(219,193,133,.34);
  border-radius: 24px;
  padding: 0;
  color: var(--hub-cream);
  background: #111714;
  box-shadow: 0 30px 100px rgba(0,0,0,.55);
}
.hub-reading-dialog::backdrop { background: rgba(2,4,3,.74); backdrop-filter: blur(6px); }
.hub-reading-dialog-inner { padding: 34px; }
.hub-reading-dialog h3 { margin: 6px 0 0; font-family: var(--hub-display); font-weight: 500; font-size: 2rem; }
.hub-reading-dialog p { color: rgba(238,232,216,.7); }
.hub-dialog-actions { display:flex; gap:10px; flex-wrap:wrap; }

/* Debug only ?debug=1 */
.hub-debug {
  position: fixed;
  z-index: 999;
  right: 12px;
  bottom: 12px;
  width: min(460px, calc(100vw - 24px));
  max-height: 42vh;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  color: #d7f6e8;
  background: rgba(0,0,0,.88);
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hub-debug pre { margin: 0; white-space: pre-wrap; }

@media (max-width: 900px) {
  .hub-header { grid-template-columns: 1fr auto; }
  .hub-spine-mini { display: none; }
  .hub-world-field { grid-template-columns: 1fr; }
  .hub-world-entry--entrancia { grid-column: auto; }
  .hub-world-root-inner,
  .hub-chamber-grid { grid-template-columns: 1fr; }
  .hub-reading-triptych { grid-template-columns: 1fr; }
  .hub-world-root-media { min-height: 50svh; order: -1; }
  .hub-chamber-grid { gap: 30px; padding: 46px 0 44px; }
  .hub-chamber-media {
    width: min(74vw, 44dvh, 430px);
    min-height: 0;
    order: -1;
  }
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  .hub-header { padding: 10px 12px; }
  .hub-brand span { display: none; }
  .hub-header-link { font-size: 9px; }
  .hub-threshold-copy { margin-inline: 18px; }
  .hub-threshold .hub-title { font-size: clamp(2.8rem, 15vw, 4.6rem); }
  .hub-threshold-media video { object-position: 50% 46%; }
  .hub-house-inner,
  .hub-world-root-inner,
  .hub-chamber-grid,
  .hub-reading-inner,
  .hub-return-inner { width: min(100% - 22px, 100%); }
  .hub-world-entry { min-height: 130px; padding: 18px; }
  .hub-world-entry--entrancia { min-height: 220px; }
  .hub-chamber-grid { gap: 26px; padding: 34px 0 38px; }
  .hub-chamber-media {
    width: min(88vw, 44dvh, 390px);
    min-height: 0;
    border-radius: 22px 6px 22px 6px;
  }
  .hub-reading-dialog-inner { padding: 26px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  video { display: none; }
  .hub-media-fallback { display: block !important; }
}

/* Legacy Seven Witness reading shell retained as adjacent MR architecture; current public Reading is Single Rite. */
.hub-reading {
  min-height: 100svh;
  align-items: start;
  background:
    linear-gradient(90deg, rgba(5,7,6,.975) 0%, rgba(8,11,9,.94) 38%, rgba(8,10,9,.80) 100%),
    url('/assets/hub/media/entrancia-offering-v05.webp') 82% 42% / cover no-repeat;
}
.hub-reading-inner { width: min(1460px, calc(100% - 34px)); padding: 118px 0 88px; }
.hub-reading-head { max-width: 930px; }
.hub-reading .hub-title { font-size: clamp(3rem, 6.4vw, 6.1rem); max-width: 980px; }
.hub-reading-opening { max-width: 62rem; }
.hub-action--rite.is-open { border-color: rgba(231,203,142,.76); background: rgba(195,160,97,.14); }

.hub-mr-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px,.72fr) minmax(440px,1.25fr) minmax(310px,.9fr);
  gap: clamp(14px, 2vw, 28px);
  align-items: stretch;
  min-height: 650px;
  margin-top: 26px;
}
.hub-mr-shell::before {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: -1;
  border: 1px solid rgba(226,206,160,.08);
  border-radius: 34px 10px 34px 10px;
  background: linear-gradient(145deg, rgba(24,27,23,.42), rgba(4,6,5,.16));
  box-shadow: 0 38px 110px rgba(0,0,0,.33);
}
.hub-mr-shrine,
.hub-mr-spread,
.hub-mr-prose {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226,206,160,.16);
  border-radius: 28px 8px 28px 8px;
  background:
    radial-gradient(circle at 50% 20%, rgba(204,165,90,.08), transparent 34%),
    linear-gradient(155deg, rgba(27,31,26,.86), rgba(9,12,10,.94));
  box-shadow: 0 24px 72px rgba(0,0,0,.24);
  backdrop-filter: blur(16px);
}
.hub-mr-shrine::after,
.hub-mr-prose::after {
  content: "";
  position: absolute;
  width: 240px;
  aspect-ratio: 1;
  right: -110px;
  bottom: -120px;
  opacity: .045;
  pointer-events: none;
  background: url('/assets/entrancia/img/brand/Entrancia_Flower_Right.webp') center / contain no-repeat;
}

.hub-mr-shrine {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 22px;
  text-align: center;
}
.hub-mr-shrine > .hub-kicker { align-self: flex-start; }
.hub-mr-shrine-frame {
  position: relative;
  width: min(82%, 250px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: auto 0 24px;
  border: 1px solid rgba(231,204,145,.28);
  border-radius: 50% 50% 44% 44% / 38% 38% 28% 28%;
  background:
    radial-gradient(circle, rgba(215,175,89,.11), transparent 54%),
    rgba(0,0,0,.18);
}
.hub-mr-shrine-frame::before {
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(231,204,145,.18);
  border-radius: inherit;
}
.hub-mr-shrine-frame img { width: 68%; height: 68%; object-fit: contain; opacity: .88; filter: saturate(.78) sepia(.12) drop-shadow(0 0 22px rgba(214,174,92,.16)); }
.hub-mr-shrine-halo { position: absolute; inset: 18%; border-radius: 50%; box-shadow: 0 0 60px 14px rgba(195,160,97,.09); }
.hub-mr-shrine-line { max-width: 15rem; margin: 0 auto; color: rgba(238,232,216,.62); font-style: italic; }
.hub-mr-active-chip {
  margin-top: 24px;
  padding: 7px 12px;
  border: 1px solid rgba(226,206,160,.17);
  border-radius: 999px;
  color: var(--hub-gold-soft);
  font-family: var(--hub-display);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hub-mr-spread { padding: 26px 24px 24px; }
.hub-mr-spread-head { max-width: 36rem; }
.hub-mr-spread-head p:last-child { margin: .2rem 0 0; color: rgba(238,232,216,.61); font-style: italic; }
.hub-mr-witness-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(76px, 1fr));
  grid-template-rows: repeat(7, minmax(44px, 1fr));
  gap: 8px;
  min-height: 470px;
  margin-top: 22px;
  padding: 8px;
}
.hub-mr-witness-grid::before {
  content: "";
  position: absolute;
  inset: 12% 19%;
  border: 1px solid rgba(226,206,160,.08);
  border-radius: 48%;
  background:
    radial-gradient(circle, rgba(197,160,97,.06), transparent 58%),
    repeating-radial-gradient(circle, transparent 0 46px, rgba(226,206,160,.035) 47px 48px);
  pointer-events: none;
}
.hub-mr-witness {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 92px;
  padding: 10px 9px;
  border: 1px solid rgba(226,206,160,.16);
  border-radius: 42% 39% 18% 22% / 18% 16% 12% 14%;
  color: rgba(238,232,216,.75);
  background: linear-gradient(155deg, rgba(47,39,27,.34), rgba(10,13,11,.62));
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}
.hub-mr-witness:nth-child(even) { border-radius: 39% 44% 22% 16% / 15% 18% 14% 11%; }
.hub-mr-witness:hover,
.hub-mr-witness:focus-visible,
.hub-mr-witness.is-active {
  transform: translateY(-2px);
  color: rgba(255,248,232,.96);
  border-color: rgba(232,205,146,.60);
  background: linear-gradient(155deg, rgba(96,70,31,.30), rgba(18,22,18,.82));
  outline: none;
}
.hub-mr-witness span { color: rgba(230,215,178,.5); font-family: var(--hub-display); font-size: 9px; letter-spacing: .16em; }
.hub-mr-witness strong { font-family: var(--hub-display); font-size: clamp(.78rem, 1vw, 1rem); font-weight: 500; line-height: 1.05; }
.hub-mr-witness small { color: rgba(238,232,216,.45); font-size: .72rem; line-height: 1.1; }
.hub-mr-witness--1 { grid-column: 3; grid-row: 1 / span 2; }
.hub-mr-witness--3 { grid-column: 2; grid-row: 2 / span 2; }
.hub-mr-witness--4 { grid-column: 4; grid-row: 2 / span 2; }
.hub-mr-witness--2 { grid-column: 3; grid-row: 3 / span 2; }
.hub-mr-witness--5 { grid-column: 2; grid-row: 5 / span 2; }
.hub-mr-witness--6 { grid-column: 4; grid-row: 5 / span 2; }
.hub-mr-witness--7 { grid-column: 3; grid-row: 6 / span 2; }

.hub-mr-shell[data-state="threshold"] .hub-mr-witness,
.hub-mr-shell[data-state="threshold"] .hub-mr-act-actions { opacity: .42; }
.hub-mr-shell[data-state="open"] .hub-mr-witness,
.hub-mr-shell[data-state="open"] .hub-mr-act-actions { opacity: 1; }

.hub-mr-act-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; transition: opacity 220ms ease; }
.hub-mr-act-actions button {
  appearance: none;
  padding: 9px 14px;
  border: 1px solid rgba(226,206,160,.18);
  border-radius: 999px;
  color: rgba(238,232,216,.72);
  background: rgba(0,0,0,.14);
  cursor: pointer;
  font-family: var(--hub-display);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hub-mr-act-actions button:hover,
.hub-mr-act-actions button:focus-visible,
.hub-mr-act-actions button.is-active { color: var(--hub-gold-soft); border-color: rgba(232,205,146,.55); background: rgba(195,160,97,.1); }

.hub-mr-prose { min-height: 650px; }
.hub-mr-prose-scroll { position: absolute; inset: 0; overflow: auto; padding: 34px 30px 38px; scrollbar-width: thin; scrollbar-color: rgba(195,160,97,.34) transparent; }
.hub-mr-role { margin: 0; color: var(--hub-gold-soft); font-family: var(--hub-display); font-size: 10px; letter-spacing: .17em; text-transform: uppercase; }
.hub-mr-prose h3 { margin: 14px 0 0; font-family: var(--hub-display); font-weight: 500; font-size: clamp(1.8rem, 2.6vw, 2.8rem); line-height: 1.08; }
.hub-mr-seed { margin: 20px 0 0; color: rgba(247,240,222,.83); font-size: 1.18rem; font-style: italic; }
.hub-mr-long { margin-top: 26px; color: rgba(238,232,216,.69); font-size: 1.03rem; line-height: 1.62; }
.hub-mr-long p { margin: 0 0 1rem; }
.hub-mr-reflection { margin-top: 32px; padding-top: 22px; border-top: 1px solid rgba(226,206,160,.14); }
.hub-mr-reflection span { color: rgba(230,215,178,.58); font-family: var(--hub-display); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.hub-mr-reflection p { margin: 9px 0 0; color: rgba(247,240,222,.84); font-style: italic; }

.hub-mr-reading-footer { max-width: 850px; margin: 34px auto 0; text-align: center; }
.hub-mr-reading-footer > p { margin: 0 auto; color: rgba(238,232,216,.62); font-style: italic; }
.hub-mr-reading-footer > div { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }

@media (max-width: 1180px) {
  .hub-mr-shell { grid-template-columns: minmax(210px,.72fr) minmax(420px,1.25fr); }
  .hub-mr-prose { grid-column: 1 / -1; min-height: 430px; }
}

@media (max-width: 820px) {
  .hub-mr-shell { grid-template-columns: 1fr; }
  .hub-mr-shrine { min-height: 350px; }
  .hub-mr-shrine-frame { width: min(50vw, 220px); }
  .hub-mr-witness-grid { min-height: 430px; }
  .hub-mr-prose { min-height: 520px; }
}

@media (max-width: 560px) {
  .hub-reading-inner { width: min(100% - 18px, 100%); }
  .hub-mr-spread { padding: 22px 12px 18px; }
  .hub-mr-witness-grid { grid-template-columns: repeat(5, minmax(54px, 1fr)); min-height: 390px; gap: 5px; padding: 0; }
  .hub-mr-witness { min-height: 80px; padding: 7px 5px; }
  .hub-mr-witness small { display: none; }
  .hub-mr-witness strong { font-size: .7rem; }
  .hub-mr-prose-scroll { padding: 26px 22px 30px; }
}
/* Coko/Dreamscape Single-Rite encounter in Hub satin register. */
.hub-single-rite {
  width: min(1180px, 100%); margin: 30px auto 0; overflow: hidden;
  border: 1px solid rgba(226,206,160,.18); border-radius: 30px 8px 30px 8px;
  background:
    radial-gradient(circle at 82% 12%, rgba(182,145,77,.08), transparent 25rem),
    linear-gradient(138deg, rgba(11,18,15,.98), rgba(4,8,7,.995));
  box-shadow: inset 0 0 90px rgba(195,160,97,.025), 0 28px 70px rgba(0,0,0,.24);
}
.hub-single-rite-threshold,
.hub-single-rite-loading,
.hub-single-rite-error {
  min-height: 260px; padding: clamp(34px,6vw,72px); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.hub-single-rite-threshold > p:last-child,
.hub-single-rite-loading p,
.hub-single-rite-error > p { max-width: 680px; color: rgba(238,232,216,.68); font-size: 1.08rem; }
.hub-single-rite-flower { color: var(--hub-gold-soft); font-size: 1.35rem; margin-bottom: 18px; opacity: .72; }
.hub-single-rite-loader {
  width: 54px; height: 54px; margin-bottom: 20px; border: 1px solid rgba(226,206,160,.25);
  border-top-color: rgba(240,213,153,.9); border-radius: 50%; animation: hubRiteSpin 1.2s linear infinite;
}
@keyframes hubRiteSpin { to { transform: rotate(360deg); } }
.hub-single-rite-result { display: grid; grid-template-columns: minmax(340px,.9fr) minmax(0,1.1fr); min-height: 590px; }
.hub-single-rite-media { min-height: 590px; background: linear-gradient(160deg,#141914,#080c0b); overflow: hidden; }
.hub-single-rite-media img,
.hub-single-rite-media video { width: 100%; height: 100%; min-height: 590px; object-fit: cover; display: block; }
.hub-single-rite-copy { align-self: center; padding: clamp(34px,5vw,70px); }
.hub-single-rite-copy h3 { margin: 10px 0 22px; color: rgba(248,239,216,.95); font-family: var(--hub-display); font-weight: 500; font-size: clamp(2.3rem,4.4vw,4.5rem); line-height: 1.02; }
.hub-single-rite-seed { margin: 0; padding: 0; border: 0; color: rgba(247,240,222,.88); font-family: var(--hub-body); font-size: clamp(1.28rem,2vw,1.72rem); font-style: italic; line-height: 1.55; }
.hub-single-rite-deeper { margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(226,206,160,.14); color: rgba(238,232,216,.68); font-size: 1.02rem; line-height: 1.65; }
.hub-single-rite-reflection { color: rgba(238,213,160,.86); font-style: italic; }
.hub-single-rite-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 30px; }
.hub-soft-button { appearance: none; border: 0; padding: 8px 0; color: rgba(232,205,146,.74); background: none; font: inherit; font-family: var(--hub-display); letter-spacing: .07em; cursor: pointer; border-bottom: 1px solid rgba(232,205,146,.22); }
.hub-soft-button:hover,.hub-soft-button:focus-visible { color: rgba(255,244,216,.96); border-bottom-color: rgba(232,205,146,.66); outline: none; }
.hub-single-rite-fallback { display: grid; place-items: center; min-height: 590px; color: var(--hub-gold-soft); font-size: 3rem; }
.hub-single-rite-footer { margin-top: 26px; }
@media (max-width: 820px) {
  .hub-single-rite-result { grid-template-columns: 1fr; min-height: 0; }
  .hub-single-rite-media,
  .hub-single-rite-media img,
  .hub-single-rite-media video { min-height: 430px; max-height: 58vh; }
  .hub-single-rite-copy { padding: 34px 24px 42px; }
}


/* Compact Mystery Rites Single-Rite card.
   The Rite manifestation is a contained encounter, not a hero image. */
.hub-single-rite {
  width: min(980px, calc(100% - 28px));
}
.hub-single-rite-result {
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  min-height: 0;
  align-items: stretch;
}
.hub-single-rite-media {
  width: min(100%, 360px);
  min-height: 0;
  aspect-ratio: 2 / 3;
  justify-self: center;
  align-self: center;
  background: linear-gradient(160deg,#141914,#080c0b);
  overflow: hidden;
}
.hub-single-rite-media img,
.hub-single-rite-media video {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}
.hub-single-rite-copy {
  padding: clamp(30px, 4vw, 54px);
}
.hub-single-rite-fallback {
  min-height: 0;
  aspect-ratio: 2 / 3;
}
@media (max-width: 820px) {
  .hub-single-rite {
    width: min(720px, calc(100% - 20px));
  }
  .hub-single-rite-result {
    grid-template-columns: 1fr;
  }
  .hub-single-rite-media {
    width: min(76vw, 340px);
    aspect-ratio: 2 / 3;
    margin: 26px auto 0;
  }
  .hub-single-rite-media img,
  .hub-single-rite-media video {
    min-height: 0;
    max-height: none;
    aspect-ratio: 2 / 3;
  }
}
@media (max-width: 480px) {
  .hub-single-rite-media {
    width: min(82vw, 310px);
  }
}


/* State visibility hardening.
   Author display rules must never override the semantic `hidden` state. */
.hub-single-rite [hidden] { display: none !important; }

/* Coko-proportioned Rite portal.
   The in-page object is a framed threshold. The live request exists only in the dialog
   opened by an explicit Receive a Rite press. */
.hub-reading-inner--contained {
  width: min(1180px, calc(100% - 34px));
  padding-top: 116px;
  padding-bottom: 96px;
}
.hub-reading-head--portal {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}
.hub-reading-head--portal .hub-title {
  max-width: none;
  font-size: clamp(3rem, 5.2vw, 5.2rem);
}
.hub-reading-head--portal .hub-reading-opening {
  max-width: 44rem;
  margin-inline: auto;
}
.hub-rite-portal-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, .78fr) minmax(420px, 1.22fr);
  width: min(1040px, 100%);
  min-height: 390px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(225, 190, 119, .34);
  border-radius: 30px 8px 30px 8px;
  background:
    radial-gradient(circle at 88% 16%, rgba(191,150,81,.11), transparent 24rem),
    linear-gradient(138deg, rgba(10,15,13,.99), rgba(4,7,7,.995));
  box-shadow: 0 30px 90px rgba(0,0,0,.42), inset 0 0 90px rgba(195,160,97,.03);
}
.hub-rite-portal-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 1px solid rgba(225,190,119,.14);
  border-radius: 22px 5px 22px 5px;
}
.hub-rite-portal-art {
  min-height: 390px;
  background:
    linear-gradient(90deg, rgba(3,5,6,.05), rgba(3,5,6,.24)),
    url('/assets/hub/reading/receive-one-rite-frame.webp') left center / auto 100% no-repeat;
  border-right: 1px solid rgba(225,190,119,.14);
}
.hub-rite-portal-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: clamp(34px, 5vw, 66px);
}
.hub-rite-portal-copy h3 {
  margin: 10px 0 18px;
  color: rgba(247,238,215,.96);
  font-family: var(--hub-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.7vw, 3.8rem);
  line-height: 1.04;
}
.hub-rite-portal-copy > p:not(.hub-kicker) {
  max-width: 34rem;
  margin: 0 0 28px;
  color: rgba(238,232,216,.72);
  font-size: 1.08rem;
  line-height: 1.62;
}
.hub-rite-portal-divider {
  display: block;
  width: min(230px, 62%);
  height: auto;
  margin: 0 0 22px;
  opacity: .72;
}
.hub-reading-after {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

/* The live Rite is a contained modal response, following the proven Coko/Dreamscape proportion. */
.hub-rite-dialog {
  width: min(900px, 92vw);
  max-height: 88vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(225,190,119,.38);
  border-radius: 26px 7px 26px 7px;
  color: rgba(244,237,219,.94);
  background: #070b09;
  box-shadow: 0 38px 120px rgba(0,0,0,.76);
}
.hub-rite-dialog::backdrop {
  background: rgba(2,4,3,.82);
  backdrop-filter: blur(10px);
}
.hub-rite-dialog-shell {
  position: relative;
  max-height: 88vh;
  overflow: auto;
  background:
    radial-gradient(circle at 82% 10%, rgba(177,139,70,.10), transparent 22rem),
    linear-gradient(145deg, #0b120e, #050807 68%);
}
.hub-rite-dialog-close {
  position: absolute;
  z-index: 8;
  top: 14px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(232,205,146,.26);
  border-radius: 50%;
  background: rgba(5,8,7,.72);
  color: rgba(244,235,211,.78);
  font: 300 1.65rem/1 var(--hub-display);
  cursor: pointer;
}
.hub-rite-dialog-close:hover,
.hub-rite-dialog-close:focus-visible {
  color: #fff3d6;
  border-color: rgba(232,205,146,.62);
  outline: none;
}
.hub-rite-dialog .hub-single-rite-loading,
.hub-rite-dialog .hub-single-rite-error {
  min-height: 340px;
  padding: 62px 48px;
}
.hub-rite-dialog .hub-single-rite-loading h3,
.hub-rite-dialog .hub-single-rite-error h3 {
  margin: 10px 0 0;
  color: rgba(247,238,215,.94);
  font-family: var(--hub-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}
.hub-rite-dialog .hub-single-rite-result {
  grid-template-columns: minmax(250px, 320px) minmax(0,1fr);
  min-height: 500px;
}
.hub-rite-dialog .hub-single-rite-media {
  width: 100%;
  min-height: 0;
  aspect-ratio: 2 / 3;
  align-self: center;
  justify-self: center;
}
.hub-rite-dialog .hub-single-rite-media img,
.hub-rite-dialog .hub-single-rite-media video {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}
.hub-rite-dialog .hub-single-rite-copy {
  align-self: center;
  padding: 54px 48px 48px;
}
.hub-single-rite-actions--center { justify-content: center; }
.hub-rite-dialog [hidden] { display: none !important; }

@media (max-width: 820px) {
  .hub-reading-inner--contained { width: min(100% - 20px, 100%); padding-top: 96px; }
  .hub-rite-portal-card { grid-template-columns: 1fr; min-height: 0; }
  .hub-rite-portal-art {
    min-height: 250px;
    border-right: 0;
    border-bottom: 1px solid rgba(225,190,119,.14);
    background-position: 10% center;
    background-size: auto 112%;
  }
  .hub-rite-portal-copy { padding: 34px 28px 42px; }
  .hub-rite-dialog { width: 94vw; }
  .hub-rite-dialog .hub-single-rite-result { grid-template-columns: 1fr; min-height: 0; }
  .hub-rite-dialog .hub-single-rite-media {
    width: min(68vw, 310px);
    margin: 34px auto 0;
  }
  .hub-rite-dialog .hub-single-rite-copy { padding: 30px 26px 38px; }
}
@media (max-width: 520px) {
  .hub-reading-head--portal { text-align: left; }
  .hub-reading-head--portal .hub-reading-opening { margin-inline: 0; }
  .hub-rite-portal-art { min-height: 210px; }
  .hub-rite-portal-divider { width: min(210px, 72%); }
  .hub-rite-dialog .hub-single-rite-loading,
  .hub-rite-dialog .hub-single-rite-error { padding: 56px 24px 42px; }
}

/* Interaction hierarchy + robust Rite modal.
   Destinations and in-world continuation are deliberately different controls. */
.hub-action-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  margin-top: 1.55rem;
}
.hub-action-stack--center { align-items: center; }
.hub-action-stack > .hub-action,
.hub-action-stack > .hub-destination-pill { margin-top: 0; }

.hub-destination-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid rgba(213,183,123,.28);
  border-radius: 999px;
  color: rgba(245,231,198,.86);
  background:
    linear-gradient(180deg, rgba(115,91,52,.22), rgba(72,59,38,.14)),
    rgba(14,18,15,.42);
  box-shadow: inset 0 1px 0 rgba(255,245,219,.04);
  text-decoration: none;
  font-family: var(--hub-display);
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}
.hub-destination-pill:hover,
.hub-destination-pill:focus-visible {
  color: #fff2d2;
  border-color: rgba(232,205,146,.58);
  background:
    linear-gradient(180deg, rgba(137,107,57,.29), rgba(76,62,39,.19)),
    rgba(14,18,15,.52);
  transform: translateY(-1px);
  outline: none;
}

.hub-action--continue {
  color: rgba(238,232,216,.76);
  border-color: rgba(232,213,170,.25);
  background: rgba(8,12,10,.13);
}
.hub-action--continue:hover,
.hub-action--continue:focus-visible {
  color: rgba(255,247,227,.94);
  border-color: rgba(232,213,170,.54);
  background: rgba(195,160,97,.075);
}

/* Retire the older unfinished inline-link treatment wherever legacy markup remains. */
.hub-soft-link {
  border-bottom: 0 !important;
  text-decoration: none !important;
}

.hub-reading-after { margin-top: 28px; }
.hub-return-actions { margin-top: 28px; }

/* Fixed, browser-agnostic modal vessel for the Single Rite. */
.hub-rite-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 54px);
  overflow: auto;
  background: rgba(2,4,3,.84);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 130ms ease, visibility 130ms ease;
}
.hub-rite-modal[hidden] { display: none !important; }
.hub-rite-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.hub-rite-modal .hub-rite-dialog-shell {
  width: min(900px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  border: 1px solid rgba(225,190,119,.38);
  border-radius: 26px 7px 26px 7px;
  color: rgba(244,237,219,.94);
  background:
    radial-gradient(circle at 82% 10%, rgba(177,139,70,.10), transparent 22rem),
    linear-gradient(145deg, #0b120e, #050807 68%);
  box-shadow: 0 38px 120px rgba(0,0,0,.76);
}
.hub-rite-modal .hub-single-rite-loading,
.hub-rite-modal .hub-single-rite-error {
  min-height: 340px;
  padding: 62px 48px;
}
.hub-rite-modal .hub-single-rite-result {
  grid-template-columns: minmax(250px, 320px) minmax(0,1fr);
  min-height: 500px;
}
.hub-rite-modal .hub-single-rite-media {
  width: 100%;
  aspect-ratio: 2 / 3;
  align-self: center;
  justify-self: center;
}
.hub-rite-modal .hub-single-rite-copy {
  align-self: center;
  padding: 54px 48px 48px;
}
.hub-rite-modal [hidden] { display: none !important; }

@media (max-width: 820px) {
  .hub-action-stack { align-items: stretch; width: min(100%, 360px); }
  .hub-action-stack--center { align-items: stretch; margin-inline: auto; }
  .hub-action-stack > .hub-action,
  .hub-action-stack > .hub-destination-pill { width: 100%; }
  .hub-rite-modal { padding: 14px; }
  .hub-rite-modal .hub-single-rite-result { grid-template-columns: 1fr; min-height: 0; }
  .hub-rite-modal .hub-single-rite-media {
    width: min(68vw, 310px);
    margin: 34px auto 0;
  }
  .hub-rite-modal .hub-single-rite-copy { padding: 30px 26px 38px; }
}

/* =============================================================
   Coko/Dreamscape Single-Rite portal, faithfully contained
   ============================================================= */
.hub-reading-inner--contained {
  width: min(1280px, calc(100% - 40px));
  padding-top: 108px;
  padding-bottom: 92px;
}
.hub-reading-head--portal {
  max-width: 900px;
  margin-bottom: 24px;
}
.hub-reading-head--portal .hub-title--quiet {
  margin-top: 8px;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: 1.02;
}
.hub-reading-head--portal .hub-reading-opening {
  max-width: 52rem;
  margin-top: 18px;
}

/* The Coko artwork is the threshold. Keep it whole, proportioned and framed. */
.hub-mr-image-portal {
  position: relative;
  width: min(1220px, 100%);
  margin: 24px auto 0;
  border: 1px solid rgba(218,169,91,.32);
  border-radius: 22px 6px 22px 6px;
  background: #0a0b14;
  box-shadow: 0 30px 90px rgba(0,0,0,.52), 0 0 72px rgba(82,58,130,.10);
  overflow: hidden;
}
.hub-mr-image-portal > img {
  display: block;
  width: 100%;
  height: auto;
}
/* Exact hotspot over the painted RECEIVE A RITE control in the source artwork. */
.hub-mr-image-button {
  position: absolute;
  left: 73.54%;
  top: 46.65%;
  width: 20.88%;
  height: 16.20%;
  appearance: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: transparent;
  cursor: pointer;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease, transform .25s ease;
}
.hub-mr-image-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.hub-mr-image-button:hover,
.hub-mr-image-button:focus-visible {
  outline: none;
  border-color: rgba(240,197,116,.60);
  background: rgba(236,188,104,.035);
  box-shadow: 0 0 0 1px rgba(240,197,116,.16), 0 0 30px rgba(236,188,104,.24), 0 0 58px rgba(133,88,173,.18), inset 0 0 26px rgba(236,188,104,.04);
  transform: scale(1.012);
}

/* Native-dialog vessel: the exact proven Coko interaction, dressed in Hub satin. */
.hub-rite-dialog {
  width: min(820px, 92vw);
  max-height: 88vh;
  padding: 0;
  border: 1px solid rgba(218,169,91,.40);
  border-radius: 24px 7px 24px 7px;
  color: rgba(244,237,219,.94);
  background: #0a0f0c;
  box-shadow: 0 38px 120px rgba(0,0,0,.72);
  overflow: hidden;
}
.hub-rite-dialog::backdrop {
  background: rgba(4,6,5,.86);
  backdrop-filter: blur(10px);
}
.hub-rite-shell {
  position: relative;
  min-height: 0;
  max-height: 88vh;
  overflow: auto;
  background:
    radial-gradient(circle at 84% 12%, rgba(176,140,72,.12), transparent 22rem),
    linear-gradient(150deg,#0c130f,#060908 64%,#09080b);
}
.hub-rite-close {
  position: absolute;
  z-index: 5;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(218,169,91,.30);
  border-radius: 50%;
  color: #dec59e;
  background: rgba(0,0,0,.26);
  font-size: 1.45rem;
  cursor: pointer;
}
.hub-rite-threshold,
.hub-rite-loading,
.hub-rite-error {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 54px 48px;
}
.hub-rite-threshold h2,
.hub-rite-error h2 {
  max-width: 660px;
  margin: 8px 0 14px;
  color: rgba(243,228,193,.96);
  font-family: var(--hub-display);
  font-weight: 500;
  font-size: clamp(2rem,4.4vw,3.8rem);
}
.hub-rite-threshold > p:not(.hub-kicker),
.hub-rite-error > p {
  max-width: 610px;
  color: rgba(238,232,216,.70);
}
.hub-rite-threshold small {
  display: block;
  margin-top: 20px;
  color: rgba(238,232,216,.48);
  font-size: .72rem;
}
.hub-rite-sigil {
  position: relative;
  width: 132px;
  aspect-ratio: 1;
  margin-bottom: 22px;
  border-radius: 50%;
  border: 1px solid rgba(218,169,91,.30);
  box-shadow: 0 0 70px rgba(93,62,143,.16), inset 0 0 50px rgba(93,62,143,.10);
}
.hub-rite-sigil span,
.hub-rite-sigil i,
.hub-rite-sigil b {
  position: absolute;
  inset: 13%;
  border: 1px solid rgba(218,169,91,.24);
  border-radius: 50%;
}
.hub-rite-sigil i { inset: 29%; border-radius: 0; transform: rotate(45deg); }
.hub-rite-sigil b { inset: 44%; background: #deb269; box-shadow: 0 0 28px #a77ac7; }
.hub-rite-sigil-dim { opacity: .55; }
.hub-rite-loader {
  width: 78px;
  aspect-ratio: 1;
  margin-bottom: 20px;
  border-radius: 50%;
  border: 1px solid rgba(218,169,91,.18);
  border-top-color: #ddb06b;
  animation: hub-rite-spin 2.4s linear infinite;
  box-shadow: 0 0 44px rgba(93,62,143,.16);
}
@keyframes hub-rite-spin { to { transform: rotate(360deg); } }
.hub-rite-loading p { color: rgba(240,225,197,.82); font-style: italic; }

.hub-rite-result {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0,1fr);
  min-height: 450px;
}
.hub-rite-media {
  width: 100%;
  aspect-ratio: 2 / 3;
  align-self: center;
  background: linear-gradient(160deg,#141914,#080c0b);
  overflow: hidden;
}
.hub-rite-media img,
.hub-rite-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hub-rite-copy {
  align-self: center;
  padding: 44px 40px 40px;
}
.hub-rite-copy h2 {
  margin: 8px 0 18px;
  color: rgba(248,239,216,.96);
  font-family: var(--hub-display);
  font-weight: 500;
  font-size: clamp(2.2rem,4vw,3.8rem);
  line-height: 1.02;
}
.hub-rite-seed {
  color: rgba(247,240,222,.90);
  font-size: clamp(1.12rem,1.8vw,1.45rem);
  font-style: italic;
  line-height: 1.55;
}
.hub-rite-deeper {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(226,206,160,.14);
  color: rgba(238,232,216,.68);
  font-size: .98rem;
  line-height: 1.62;
}
.hub-rite-reflection { color: rgba(238,213,160,.86); font-style: italic; }
.hub-rite-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 26px; }
.hub-rite-actions--center { justify-content: center; }
.hub-rite-dialog [hidden] { display: none !important; }

@media (max-width: 820px) {
  .hub-reading-inner--contained { width: min(100% - 18px,100%); padding-top: 92px; }
  .hub-mr-image-portal { margin-top: 18px; border-radius: 14px 4px 14px 4px; }
  .hub-mr-image-button { border-radius: 8px; }
  .hub-rite-dialog { width: 94vw; }
  .hub-rite-result { grid-template-columns: 1fr; min-height: 0; }
  .hub-rite-media { width: min(64vw, 280px); margin: 30px auto 0; }
  .hub-rite-copy { padding: 28px 24px 34px; }
}
@media (max-width: 560px) {
  .hub-reading-head--portal .hub-title--quiet { font-size: clamp(1.9rem, 10vw, 3rem); }
  .hub-reading-head--portal .hub-reading-opening { font-size: 1rem; }
  .hub-rite-threshold,
  .hub-rite-loading,
  .hub-rite-error { min-height: 350px; padding: 44px 22px; }
}


/* 0.14 Patch 1 — deployment-proof Entrancia threshold control.
   Kept at end of canonical CSS so no earlier generic pill rule can wash it out. */
#entrancia .hub-action.hub-action--world-entry {
  color: #fff8e9 !important;
  background: linear-gradient(135deg, #745433 0%, #3f584b 100%) !important;
  border-color: rgba(116,82,44,.92) !important;
  box-shadow: 0 12px 30px rgba(47,55,48,.22), inset 0 1px 0 rgba(255,246,222,.18) !important;
  text-shadow: 0 1px 8px rgba(0,0,0,.34) !important;
}
#entrancia .hub-action.hub-action--world-entry:hover,
#entrancia .hub-action.hub-action--world-entry:focus-visible {
  color: #fffdf5 !important;
  background: linear-gradient(135deg, #875f36 0%, #496957 100%) !important;
  border-color: rgba(151,108,56,.98) !important;
}

/* ============================================================
   0.14-p6 — HOUSE OF WORLDS: LUSH PORTAL FAMILY
   Six lower world cards now read as adjacent inhabited chambers,
   using the approved Magical Wisdom Phantasy image series.
   ============================================================ */
.hub-world-entry.hub-world-entry--visual {
  min-height: 214px;
  border-color: rgba(226,206,160,.18);
  background-color: #07110e;
  background-size: cover;
  background-repeat: no-repeat;
  color: rgba(249,242,225,.98);
  box-shadow: inset 0 -70px 90px rgba(2,7,6,.34);
}
.hub-world-entry--visual::before {
  opacity: 1;
  background:
    linear-gradient(90deg, rgba(3,9,8,.88) 0%, rgba(3,9,8,.66) 33%, rgba(3,9,8,.24) 67%, rgba(3,9,8,.10) 100%),
    linear-gradient(0deg, rgba(2,7,6,.72) 0%, rgba(2,7,6,.12) 66%);
  transition: opacity 320ms ease;
}
.hub-world-entry--visual:hover::before,
.hub-world-entry--visual:focus-visible::before { opacity: .76; }
.hub-world-entry--visual:hover,
.hub-world-entry--visual:focus-visible {
  border-color: rgba(236,206,141,.56);
  box-shadow:
    inset 0 -70px 90px rgba(2,7,6,.26),
    0 18px 46px rgba(0,0,0,.24),
    0 0 34px rgba(201,151,70,.08);
}
.hub-world-entry--visual h3 {
  color: #fff4d9;
  text-shadow: 0 2px 18px rgba(0,0,0,.72);
}
.hub-world-entry--visual p {
  max-width: 28rem;
  color: rgba(246,238,217,.82);
  text-shadow: 0 2px 14px rgba(0,0,0,.76);
}
.hub-world-entry.hub-world-entry--talismani {
  background-image: url('/assets/hub/worlds/hub-talismani.webp');
  background-position: 58% 50%;
}
.hub-world-entry.hub-world-entry--timescape {
  background-image: url('/assets/hub/worlds/hub-timescape.webp');
  background-position: 62% 50%;
}
.hub-world-entry.hub-world-entry--mystery-rites {
  background-image: url('/assets/hub/worlds/hub-mystery-rites.webp');
  background-position: 54% 50%;
}
.hub-world-entry.hub-world-entry--living-adornment {
  background-image: url('/assets/hub/worlds/hub-living-adornment.webp');
  background-position: 59% 50%;
}
.hub-world-entry.hub-world-entry--great-cycle {
  background-image: url('/assets/hub/worlds/hub-great-cycle.webp');
  background-position: 55% 50%;
}
.hub-world-entry.hub-world-entry--omnie {
  background-image: url('/assets/hub/worlds/hub-omnie.webp');
  background-position: 62% 50%;
}

/* Hub Mystery Rites threshold: the image is now the House artwork,
   so Receive a Rite becomes an explicit visible control rather than
   an invisible hotspot tied to the old Coko illustration. */
.hub-mr-image-portal::after {
  content: "";
  z-index: 1;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 45%, rgba(2,6,5,.08) 70%, rgba(2,6,5,.30) 100%);
}
.hub-mr-image-button {
  z-index: 2;
  left: auto;
  right: clamp(22px, 6vw, 88px);
  top: auto;
  bottom: clamp(22px, 7%, 64px);
  width: auto;
  height: auto;
  min-width: 170px;
  padding: 13px 22px;
  border: 1px solid rgba(240,197,116,.62);
  border-radius: 999px;
  background: rgba(8,14,11,.76);
  color: #f3d99f;
  font-family: var(--hub-display);
  font-size: .72rem;
  line-height: 1.1;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 12px 34px rgba(0,0,0,.34), inset 0 0 24px rgba(218,169,91,.05);
  backdrop-filter: blur(8px);
}
.hub-mr-image-button span {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  border: 0;
}
.hub-mr-image-button:hover,
.hub-mr-image-button:focus-visible {
  color: #fff0c9;
  border-color: rgba(247,210,142,.88);
  background: rgba(20,25,17,.86);
  box-shadow: 0 0 0 1px rgba(240,197,116,.12), 0 0 30px rgba(236,188,104,.22), 0 14px 38px rgba(0,0,0,.32);
  transform: translateY(-2px);
}

@media (max-width: 820px) {
  .hub-world-entry--visual { min-height: 190px; }
  .hub-mr-image-button {
    right: 18px;
    bottom: 18px;
    min-width: 0;
    padding: 11px 16px;
    font-size: .64rem;
  }
}


/* 0.14-p7 — Entrancia House portal hover parity.
   Preserve the botanical image on rollover and use the same lifted,
   illuminated House behaviour as the six lower visual portals. */
.hub-world-entry--entrancia:hover,
.hub-world-entry--entrancia:focus-visible {
  background:
    linear-gradient(90deg, rgba(4,10,8,.72), rgba(4,10,8,.20)),
    url('/assets/entrancia/img/botanical/kantkaw.webp') 80% 45% / cover no-repeat;
  border-color: rgba(236,206,141,.56);
  box-shadow:
    inset 0 -70px 90px rgba(2,7,6,.20),
    0 18px 46px rgba(0,0,0,.24),
    0 0 34px rgba(201,151,70,.08);
}
.hub-world-entry--entrancia:hover::before,
.hub-world-entry--entrancia:focus-visible::before {
  opacity: .72;
}
