:root {
  color-scheme: light;
  --paper: #fffdf8;
  --ivory: #f7f4ed;
  --mist: #e6eee9;
  --mist-deep: #ceded5;
  --forest: #123e35;
  --forest-soft: #315f54;
  --forest-deep: #082c27;
  --ink: #172b27;
  --muted: #687771;
  --orange: #cc6746;
  --gold: #c9a466;
  --line: rgba(20, 61, 52, 0.16);
  --wood-yang: #2f7550;
  --wood-yin: #55946d;
  --fire-yang: #bd4e38;
  --fire-yin: #df705a;
  --earth-yang: #98702f;
  --earth-yin: #b18a4d;
  --metal-yang: #566d7d;
  --metal-yin: #8092a0;
  --water-yang: #276782;
  --water-yin: #4d88a3;
  --sans: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", STSong, Georgia, serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--ivory);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
}

button,
select,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(204, 103, 70, 0.48);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.deepbeing-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.product-sidebar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: 236px;
  height: 100vh;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.97);
}

.brand {
  display: block;
  padding: 4px 6px 24px;
  color: var(--forest);
  text-decoration: none;
}

.brand img {
  display: block;
  width: 180px;
  height: 62px;
  object-fit: contain;
  object-position: left center;
}

.brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.product-navigation {
  display: grid;
  gap: 4px;
}

.product-navigation button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  padding: 9px 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  color: #65736f;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.product-navigation button:hover,
.product-navigation button.active {
  color: var(--forest);
  border-left-color: var(--orange);
  background: #edf2ee;
}

.product-navigation i {
  color: var(--orange);
  font-family: var(--serif);
  font-size: 11px;
  font-style: normal;
}

.product-navigation span,
.product-navigation strong,
.product-navigation small {
  display: block;
  min-width: 0;
}

.product-navigation strong {
  font-size: 14px;
  font-weight: 700;
}

.product-navigation small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-context {
  margin-top: auto;
  padding: 16px 8px;
  border-top: 1px solid var(--line);
}

.active-case,
.case-select-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.active-case {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-case i {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4f8d70;
  box-shadow: 0 0 0 5px rgba(79, 141, 112, 0.12);
}

.case-select-label {
  display: grid;
  gap: 6px;
}

.case-select-label > span {
  color: var(--muted);
  font-size: 10px;
}

.case-select-label select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 30px 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: var(--paper);
}

.sidebar-context > small {
  display: block;
  margin-top: 9px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 8px 2px;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-account span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.sidebar-account a,
.sidebar-account button {
  padding: 0;
  border: 0;
  color: var(--forest);
  background: transparent;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.opening-music-control {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 50%;
  color: var(--forest) !important;
  background: var(--paper) !important;
}

.opening-music-control i {
  font-family: var(--serif);
  font-size: 15px;
  font-style: normal;
  line-height: 1;
  transition: transform 180ms ease;
}

.opening-music-control[data-music-state="armed"]::after,
.opening-music-control[data-music-state="playing"]::after {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  content: "";
}

.opening-music-control[data-music-state="playing"] {
  border-color: rgba(204, 103, 70, 0.48) !important;
  background: #fff1e7 !important;
}

.opening-music-control[data-music-state="playing"] i {
  transform: translateY(-1px) rotate(-6deg);
}

.opening-music-control[data-music-state="blocked"] {
  color: #9b4d3c !important;
  border-color: rgba(155, 77, 60, 0.4) !important;
}

.deepbeing-stage,
.product-main {
  min-width: 0;
}

.mobile-header,
.mobile-product-navigation {
  display: none;
}

.primary-command,
.text-command {
  min-height: 44px;
  border: 0;
  cursor: pointer;
}

.primary-command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 6px;
  color: #fffdf8;
  background: var(--forest);
  box-shadow: 0 10px 24px rgba(8, 44, 39, 0.13);
  font-weight: 700;
  text-decoration: none;
}

.primary-command:hover {
  background: #1b5145;
}

.primary-command:disabled {
  opacity: 0.55;
  cursor: wait;
}

.account-entry {
  display: grid;
  grid-template-columns: minmax(420px, 1.2fr) minmax(380px, 0.8fr);
  min-height: 100vh;
  background: var(--paper);
}

.account-scene {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 34px 46px 52px;
  overflow: hidden;
  color: #fffdf8;
  background: #294b43 url("/assets/valley_sunrise.jpg") center / cover no-repeat;
}

.account-scene::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(8, 44, 39, 0.16), rgba(8, 44, 39, 0.7));
}

.account-scene > * {
  position: relative;
}

.account-scene > img {
  width: 210px;
  height: 72px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
}

.account-scene p,
.account-scene h1,
.account-scene span {
  display: block;
  max-width: 620px;
  margin: 0;
}

.account-scene p {
  margin-bottom: 12px;
  color: #f5bf8c;
  font-size: 12px;
  font-weight: 800;
}

.account-scene h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.18;
  font-weight: 600;
}

.account-scene span {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.8;
}

.account-tool {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 50px;
}

.account-tool-inner {
  width: min(100%, 430px);
}

.account-tool h2 {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.35;
  font-weight: 600;
}

.account-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.account-mode button {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.account-mode button.active {
  color: var(--forest);
  border-bottom-color: var(--orange);
  font-weight: 800;
}

.account-form,
.profile-form {
  display: grid;
  gap: 16px;
}

.account-form label,
.profile-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.account-form input,
.account-form select,
.profile-form input,
.profile-form select {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
}

.account-submit {
  width: 100%;
  margin-top: 3px;
}

.account-error {
  min-height: 20px;
  margin: 0;
  color: #a44432;
  font-size: 12px;
  line-height: 1.55;
}

.profile-manager-shell {
  min-height: 100vh;
  background: var(--ivory);
}

.profile-manager-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 8px 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
}

.profile-manager-header img {
  display: block;
  width: 185px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

.profile-manager-header > div {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.profile-manager-header button,
.profile-row-tools button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  color: var(--forest);
  background: transparent;
  cursor: pointer;
}

.profile-manager {
  display: grid;
  grid-template-columns: minmax(440px, 1.1fr) minmax(380px, 0.9fr);
  min-height: calc(100vh - 76px);
}

.profile-archive {
  padding: 52px max(36px, 6vw) 70px;
  border-right: 1px solid var(--line);
}

.profile-manager-title h1 {
  max-width: 650px;
  margin: 0;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.3;
  font-weight: 600;
}

.profile-manager-title > span {
  display: block;
  max-width: 650px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}

.profile-list {
  display: grid;
  gap: 0;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.profile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.profile-row.active {
  box-shadow: inset 3px 0 0 var(--orange);
}

.profile-row-main {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 20px 18px;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.profile-row-main:hover {
  background: rgba(230, 238, 233, 0.62);
}

.profile-row-main span,
.profile-row-main b,
.profile-row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-row-main span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-row-main strong {
  font-family: var(--serif);
  font-size: 18px;
}

.profile-row-main em {
  padding: 2px 6px;
  color: var(--orange);
  background: rgba(204, 103, 70, 0.09);
  font-size: 9px;
  font-style: normal;
}

.profile-row-main b {
  color: var(--forest);
  font-size: 14px;
  font-weight: 700;
}

.profile-row-main small {
  color: var(--muted);
  font-size: 11px;
}

.profile-row-tools {
  display: flex;
  padding-right: 10px;
}

.profile-row-tools button:last-child {
  color: #9a4b3d;
}

.profile-empty {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 38px 0;
}

.profile-empty span {
  color: var(--muted);
  font-size: 12px;
}

.profile-empty button {
  margin-top: 8px;
}

.profile-editor {
  display: grid;
  align-content: start;
  padding: 52px max(36px, 5vw);
  background: var(--paper);
}

.profile-editor-idle {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 560px;
  text-align: center;
}

.profile-editor-idle img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.profile-editor-idle p {
  margin: 18px 0 8px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
}

.profile-editor-idle h2 {
  max-width: 420px;
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.5;
  font-weight: 600;
}

.profile-form > header p {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
}

.profile-form > header h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.4;
  font-weight: 600;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-form .profile-checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
  align-self: end;
  min-height: 46px;
}

.profile-form .profile-checkbox input {
  width: 18px;
  height: 18px;
}

.profile-form-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.profile-form footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
  margin-top: 4px;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}

.mobile-header-actions > button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--forest);
  background: var(--paper);
  font-family: var(--serif);
  cursor: pointer;
}

.mobile-header-actions > .opening-music-control {
  width: 34px;
  height: 34px;
}

@media (prefers-reduced-motion: reduce) {
  .opening-music-control i {
    transition: none;
  }
}

/* RECOVERY-07 Phase A: the selected tree lands on the accepted director
   master without question nodes or a second presentation layer. */
.dream-tree-world-shell.is-fixed-tree-idle {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #18372e;
}

.dream-fixed-tree-idle-stage {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  isolation: isolate;
}

.dream-fixed-tree-idle-stage::before {
  position: absolute;
  inset: -5%;
  z-index: -2;
  content: "";
  background:
    #18372e
    url("/assets/dream/encounter-01-v1/director-v2/tree-question-map-full-preseal.png")
    center / cover no-repeat;
  filter: blur(24px) saturate(0.82) brightness(0.7);
  transform: scale(1.08);
}

.dream-fixed-tree-idle-stage::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  background: rgba(12, 35, 29, 0.08);
  pointer-events: none;
}

.dream-fixed-tree-idle-master {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
}

.dream-fixed-tree-idle-breath,
.dream-fixed-tree-idle-mist {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.dream-fixed-tree-idle-breath {
  box-shadow: inset 0 0 70px rgba(226, 232, 207, 0.08);
  animation: dream-fixed-tree-idle-breathe 7s ease-in-out infinite alternate;
}

.dream-fixed-tree-idle-mist {
  background: linear-gradient(
    90deg,
    rgba(225, 232, 216, 0.14),
    transparent 22% 78%,
    rgba(225, 232, 216, 0.12)
  );
  opacity: 0.5;
}

@keyframes dream-fixed-tree-idle-breathe {
  from { opacity: 0.42; }
  to { opacity: 0.9; }
}

@media (max-width: 620px) {
  .dream-fixed-tree-idle-stage::before {
    filter: blur(18px) saturate(0.8) brightness(0.64);
  }

  .dream-fixed-tree-idle-master {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dream-fixed-tree-idle-breath {
    animation: none;
    opacity: 0.64;
  }
}

/* DREAM-ENCOUNTER-01: one continuous grove, not a page of choices. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.dream-first-visit {
  --user-x: 50;
  --user-y: 88;
  --abu-x: 47;
  --abu-y: 76;
  --abu-facing: 1;
  --camera-x: 0;
  --camera-y: 0;
  position: relative;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  color: #f6f3e8;
  background: #163c35;
  isolation: isolate;
}

.dream-first-visit,
.dream-first-visit * {
  box-sizing: border-box;
}

.dream-grove-background,
.dream-grove-parallax,
.dream-grove,
.dream-mirror-layer {
  position: absolute;
  inset: 0;
}

.dream-grove-background {
  z-index: -4;
  background-color: #183f36;
  background-image: url("/assets/dream/porch-v5/grove-clean-approved-v5-e97ec6b5.png");
  background-position: center 53%;
  background-size: cover;
  filter: saturate(0.92) contrast(0.98);
  transform: scale(1.035) translate(
    calc(var(--camera-x) * 1px),
    calc(var(--camera-y) * 1px)
  );
  transition: transform 900ms cubic-bezier(0.22, 0.74, 0.2, 1), filter 900ms ease;
}

.dream-grove-background::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(245, 236, 204, 0.08), transparent 36%),
    linear-gradient(0deg, rgba(7, 32, 28, 0.48), transparent 39%),
    radial-gradient(ellipse at 48% 30%, transparent 28%, rgba(10, 39, 34, 0.28) 100%);
}

.dream-first-visit[data-phase="fog_wait"] .dream-grove-background {
  filter: blur(7px) saturate(0.62) brightness(0.72);
  transform: scale(1.16) translate(
    calc(var(--camera-x) * 0.35px),
    calc(var(--camera-y) * 0.35px)
  );
}

.dream-first-visit[data-phase="fog_crossing"] .dream-grove-background {
  filter: blur(2.5px) saturate(0.78) brightness(0.88);
  transform: scale(1.075) translate(
    calc(var(--camera-x) * 0.7px),
    calc(var(--camera-y) * 0.7px)
  );
  transition-duration: 2300ms;
}

.dream-grove-parallax {
  z-index: -3;
  opacity: 0.62;
  pointer-events: none;
  transform: translate(
    calc(var(--camera-x) * -0.6px),
    calc(var(--camera-y) * -0.35px)
  );
  transition: transform 700ms ease;
}

.dream-grove-parallax::before,
.dream-grove-parallax::after {
  position: absolute;
  inset: auto -8% 0;
  height: 34%;
  content: "";
  background:
    linear-gradient(176deg, transparent 0 24%, rgba(23, 73, 58, 0.18) 25% 37%, transparent 38%),
    linear-gradient(184deg, transparent 0 42%, rgba(6, 37, 32, 0.32) 43% 63%, transparent 64%);
}

.dream-grove-parallax::after {
  opacity: 0.5;
  transform: translateY(12%) scaleX(-1);
}

.dream-grove {
  z-index: 1;
  overflow: hidden;
  outline: 0;
  touch-action: none;
  user-select: none;
  cursor: crosshair;
}

.dream-canopy-shadow {
  position: absolute;
  inset: -12% -8% auto;
  height: 43%;
  opacity: 0.5;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(4, 30, 24, 0.72) 0 28%, transparent 59%),
    radial-gradient(ellipse at 84% 0%, rgba(4, 30, 24, 0.72) 0 25%, transparent 58%);
  pointer-events: none;
}

.dream-life-tree {
  position: absolute;
  top: calc(var(--tree-y) * 1%);
  left: calc(var(--tree-x) * 1%);
  z-index: calc(5 + var(--tree-depth));
  width: calc(clamp(248px, 32vw, 520px) * var(--tree-scale));
  margin: 0;
  opacity: 0.015;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.94);
  transform-origin: 50% 82%;
  transition:
    opacity 1500ms ease,
    filter 1500ms ease,
    transform 1500ms cubic-bezier(0.18, 0.72, 0.2, 1);
}

.dream-first-visit[data-phase="fog_wait"] .dream-life-tree {
  filter: blur(5px) brightness(0.42) saturate(0.44);
}

.dream-first-visit[data-phase="fog_crossing"] .dream-life-tree {
  opacity: 0.15;
  filter: blur(2.2px) brightness(0.56) saturate(0.58);
  transform: translate(-50%, -50%) scale(0.965);
  transition-duration: 2100ms;
}

.dream-life-tree > img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.84) brightness(0.83);
  transform-origin: 50% 86%;
  animation: dream-tree-live 8.4s ease-in-out infinite alternate;
  animation-delay: var(--life-delay);
}

.dream-life-tree::before {
  position: absolute;
  right: 18%;
  bottom: 7%;
  left: 18%;
  z-index: 0;
  height: 9%;
  border-radius: 50%;
  content: "";
  background: radial-gradient(ellipse, rgba(10, 42, 31, 0.46), rgba(28, 72, 52, 0.16) 48%, transparent 73%);
  filter: blur(3px);
  pointer-events: none;
  transform: scaleX(1.2);
}

.dream-life-tree.is-ridge > img {
  animation-duration: 10.7s;
}

.dream-life-tree.is-brook > img {
  animation-duration: 7.3s;
}

.dream-first-visit[data-phase="self_recognition"] .dream-life-tree.is-own-tree,
.dream-first-visit[data-phase="free_roam"] .dream-life-tree,
.dream-first-visit[data-phase="tree_contact"] .dream-life-tree,
.dream-first-visit[data-phase="reveal_settling"] .dream-life-tree,
.dream-first-visit[data-phase="mirror_ready"] .dream-life-tree,
.dream-first-visit[data-phase^="mirror_"] .dream-life-tree,
.dream-first-visit[data-phase="local_mist_reentry"] .dream-life-tree,
.dream-first-visit[data-phase="departure_intent"] .dream-life-tree,
.dream-first-visit[data-phase="departure_committing"] .dream-life-tree,
.dream-first-visit[data-phase="visit_suspended"] .dream-life-tree,
.dream-first-visit[data-phase="fail_closed"] .dream-life-tree,
.dream-first-visit[data-phase="authorization_closed"] .dream-life-tree {
  opacity: 0.96;
  filter: none;
  transform: translate(-50%, -50%) scale(1);
}

.dream-first-visit[data-phase="self_recognition"] .dream-life-tree.is-resident-tree {
  opacity: 0.08;
  transform: translate(-50%, -50%) scale(0.97);
}

.dream-first-visit[data-phase="free_roam"] .dream-life-tree.is-resident-tree:nth-of-type(2),
.dream-first-visit[data-phase="tree_contact"] .dream-life-tree.is-resident-tree:nth-of-type(2),
.dream-first-visit[data-phase="reveal_settling"] .dream-life-tree.is-resident-tree:nth-of-type(2),
.dream-first-visit[data-phase="mirror_ready"] .dream-life-tree.is-resident-tree:nth-of-type(2) {
  transition-delay: 180ms;
}

.dream-first-visit[data-phase="free_roam"] .dream-life-tree.is-resident-tree:nth-of-type(3),
.dream-first-visit[data-phase="tree_contact"] .dream-life-tree.is-resident-tree:nth-of-type(3),
.dream-first-visit[data-phase="reveal_settling"] .dream-life-tree.is-resident-tree:nth-of-type(3),
.dream-first-visit[data-phase="mirror_ready"] .dream-life-tree.is-resident-tree:nth-of-type(3) {
  transition-delay: 720ms;
}

.dream-life-tree figcaption {
  position: absolute;
  right: 8%;
  bottom: 5%;
  z-index: 6;
  max-width: 170px;
  padding: 8px 10px 8px 13px;
  border-left: 1px solid rgba(236, 229, 196, 0.58);
  color: rgba(248, 246, 231, 0.92);
  background: rgba(9, 41, 34, 0.44);
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 300ms ease, transform 300ms ease;
  backdrop-filter: blur(6px);
}

.dream-life-tree figcaption strong,
.dream-life-tree figcaption small {
  display: block;
  letter-spacing: 0;
}

.dream-life-tree figcaption strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.dream-life-tree figcaption small {
  margin-top: 3px;
  color: rgba(244, 240, 218, 0.68);
  font-size: 10px;
  line-height: 1.4;
}

.dream-life-tree.is-near figcaption,
.dream-life-tree.is-selected figcaption {
  opacity: 1;
  transform: translateY(0);
}

.dream-tree-breath,
.dream-tree-response,
.dream-tree-response i,
.dream-tree-life-detail {
  position: absolute;
  pointer-events: none;
}

.dream-tree-response {
  inset: 0;
  z-index: 4;
  overflow: hidden;
  mix-blend-mode: screen;
}

.dream-tree-response i {
  display: block;
  opacity: 0;
}

.dream-tree-response-contact {
  bottom: 25%;
  left: 47%;
  width: 32px;
  height: 25px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 238, 216, 0.82), rgba(180, 220, 200, 0.22) 52%, transparent 73%);
  filter: blur(0.6px);
  transform: translate(-50%, 50%) scale(0.2);
}

.dream-tree-response-root {
  bottom: 8%;
  left: 18%;
  width: 64%;
  height: 18%;
  border-radius: 50%;
  background:
    linear-gradient(171deg, transparent 35%, rgba(242, 216, 146, 0.72) 48%, transparent 56%),
    radial-gradient(ellipse, rgba(239, 215, 151, 0.72), rgba(209, 226, 186, 0.24) 50%, transparent 74%);
  filter: blur(2px);
  box-shadow: 0 0 18px rgba(237, 210, 139, 0.28);
  transform: scaleX(0.08);
  transform-origin: center;
}

.dream-tree-response-trunk {
  bottom: 16%;
  left: 44%;
  width: 12%;
  height: 55%;
  border-radius: 48% 52% 44% 56%;
  background:
    linear-gradient(86deg, transparent 8%, rgba(245, 220, 151, 0.34) 36%, rgba(247, 225, 157, 0.82) 51%, rgba(213, 231, 187, 0.3) 72%, transparent 94%);
  filter: blur(1.7px);
  box-shadow: 0 0 16px rgba(239, 212, 143, 0.24);
  transform: scaleY(0.04) rotate(-2deg);
  transform-origin: center bottom;
}

.dream-tree-response-crown {
  top: 12%;
  left: 19%;
  width: 62%;
  height: 43%;
  border-radius: 45% 55% 48% 52%;
  background:
    radial-gradient(circle at 27% 68%, rgba(244, 222, 151, 0.58), transparent 30%),
    radial-gradient(circle at 63% 37%, rgba(224, 239, 191, 0.52), transparent 37%),
    radial-gradient(circle at 47% 51%, rgba(235, 227, 169, 0.3), transparent 52%);
  filter: blur(2.5px);
  transform: translateY(7px) rotate(-1deg);
}

.dream-tree-breath {
  right: 21%;
  bottom: 15%;
  left: 21%;
  height: 13%;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 28px rgba(224, 218, 164, 0.56);
}

.dream-first-visit[data-phase="self_recognition"] .is-own-tree .dream-tree-breath {
  opacity: 0.58;
  animation: dream-root-recognition 2.4s ease-out 1;
}

.dream-first-visit[data-phase="self_recognition"] .is-own-tree .dream-tree-response-root {
  animation: dream-own-root-catch 2.7s ease-out both;
}

.dream-first-visit[data-phase="self_recognition"] .is-own-tree .dream-tree-response-trunk {
  animation: dream-own-trunk-rise 2.4s ease-out 240ms both;
}

.dream-first-visit[data-phase="self_recognition"] .is-own-tree .dream-tree-response-crown {
  animation: dream-own-crown-answer 1.9s ease-out 720ms both;
}

.dream-first-visit[data-phase="self_recognition"] .is-own-tree > img {
  animation: dream-own-tree-acknowledge 2.7s ease-out both;
}

.dream-tree-life-detail {
  top: 22%;
  right: 19%;
  width: 8px;
  height: 12px;
  border: 1px solid rgba(220, 239, 232, 0.76);
  border-radius: 58% 42% 60% 40%;
  opacity: 0;
  background: rgba(214, 237, 229, 0.36);
  animation: dream-dew-fall 9.4s ease-in infinite;
  animation-delay: var(--life-delay);
}

.dream-first-visit[data-phase="free_roam"] .dream-life-tree.is-brook .dream-tree-life-detail,
.dream-first-visit[data-phase="tree_contact"] .dream-life-tree.is-brook .dream-tree-life-detail,
.dream-first-visit[data-phase="reveal_settling"] .dream-life-tree.is-brook .dream-tree-life-detail,
.dream-first-visit[data-phase="mirror_ready"] .dream-life-tree.is-brook .dream-tree-life-detail,
.dream-first-visit[data-phase^="mirror_"] .dream-life-tree.is-brook .dream-tree-life-detail {
  opacity: 0.9;
}

.dream-user-presence {
  position: absolute;
  top: calc(var(--user-y) * 1%);
  left: calc(var(--user-x) * 1%);
  z-index: 18;
  width: 34px;
  height: 12px;
  border: 1px solid rgba(237, 226, 181, 0.32);
  border-radius: 50%;
  background: rgba(236, 224, 178, 0.08);
  box-shadow: 0 0 18px rgba(241, 226, 166, 0.24);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: top 150ms linear, left 150ms linear, opacity 500ms ease;
}

.dream-first-visit[data-phase="fog_wait"] .dream-user-presence {
  opacity: 0;
}

.dream-abu {
  position: absolute;
  top: calc(var(--abu-y) * 1%);
  left: calc(var(--abu-x) * 1%);
  z-index: 20;
  width: clamp(96px, 11vw, 168px);
  height: clamp(116px, 14vw, 196px);
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  transform: translate(-50%, -86%) scaleX(var(--abu-facing));
  transform-origin: center bottom;
  transition: top 520ms ease-out, left 520ms ease-out, opacity 600ms ease;
}

.dream-first-visit[data-phase="fog_wait"] .dream-abu {
  opacity: 0.48;
  filter: blur(1px) brightness(0.48) saturate(0.5);
  transform: translate(-50%, -84%) scaleX(var(--abu-facing)) scale(0.92);
}

.dream-first-visit[data-phase="fog_crossing"] .dream-abu {
  opacity: 0.86;
  filter: blur(0.35px) brightness(0.76) saturate(0.78);
  transform: translate(-50%, -86%) scaleX(var(--abu-facing)) scale(0.97);
  transition-duration: 1750ms;
}

.dream-abu-shadow {
  position: absolute;
  top: calc((var(--abu-y) * 1%) + clamp(18px, 1.7vw, 27px));
  left: calc(var(--abu-x) * 1%);
  z-index: 19;
  width: clamp(54px, 6.4vw, 84px);
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(4, 27, 21, 0.5), rgba(6, 34, 27, 0.14) 58%, transparent 74%);
  filter: blur(2px);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: top 520ms ease-out, left 520ms ease-out, opacity 600ms ease;
}

.dream-first-visit.is-user-moving .dream-grove-background,
.dream-first-visit.is-user-moving .dream-grove-parallax {
  transition-duration: 120ms;
}

.dream-first-visit.is-abu-following .dream-abu,
.dream-first-visit.is-abu-following .dream-abu-shadow {
  transition: none;
}

.dream-first-visit.is-abu-following .dream-abu {
  animation: dream-abu-follow-step 430ms ease-in-out infinite alternate;
}

.dream-first-visit.is-abu-following .dream-abu-shadow {
  animation: dream-abu-shadow-step 430ms ease-in-out infinite alternate;
}

.dream-paw-hint {
  position: absolute;
  bottom: 10%;
  left: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  color: rgba(248, 243, 219, 0.78);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.dream-paw-hint i {
  position: relative;
  width: 17px;
  height: 14px;
  border: 1px solid rgba(238, 225, 177, 0.62);
  border-radius: 52% 48% 58% 42%;
}

.dream-paw-hint i::before,
.dream-paw-hint i::after {
  position: absolute;
  top: -6px;
  width: 5px;
  height: 6px;
  border: 1px solid rgba(238, 225, 177, 0.62);
  border-radius: 50%;
  content: "";
}

.dream-paw-hint i::before { left: 1px; }
.dream-paw-hint i::after { right: 1px; }

.dream-first-visit.show-paw-hint .dream-paw-hint {
  opacity: 1;
  transform: translate(-50%, 0);
}

.dream-abu-line {
  position: absolute;
  top: 66%;
  left: 50%;
  z-index: 30;
  margin: 0;
  color: rgba(248, 243, 219, 0.94);
  font-family: var(--serif);
  font-size: clamp(14px, 1.5vw, 19px);
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 2px 14px rgba(0, 22, 18, 0.7);
  transform: translate(-50%, 8px);
}

.dream-first-visit[data-phase="fog_crossing"] .dream-abu-line {
  animation: dream-line-once 2.8s ease 500ms both;
}

.dream-fog {
  position: absolute;
  right: -22%;
  left: -22%;
  z-index: 24;
  pointer-events: none;
  filter: blur(10px);
  transition: opacity 1800ms ease, transform 2400ms ease;
}

.dream-fog::before,
.dream-fog::after {
  position: absolute;
  inset: -16% -5%;
  border-radius: 50%;
  content: "";
  background: radial-gradient(ellipse, rgba(226, 232, 218, 0.72), rgba(205, 220, 209, 0.28) 48%, transparent 74%);
}

.dream-fog::after {
  inset: 12% -12% -24%;
  opacity: 0.72;
  transform: translateX(22%);
}

.dream-fog-back {
  top: 16%;
  height: 34%;
  opacity: 0.72;
  background: linear-gradient(180deg, transparent, rgba(210, 223, 207, 0.36), transparent);
  animation: dream-fog-drift 13s ease-in-out infinite alternate;
}

.dream-fog-front {
  bottom: -8%;
  height: 60%;
  opacity: 0.92;
  background:
    radial-gradient(ellipse at 25% 65%, rgba(225, 229, 213, 0.72), transparent 50%),
    radial-gradient(ellipse at 72% 74%, rgba(215, 226, 215, 0.62), transparent 52%);
  animation: dream-fog-drift 10s ease-in-out infinite alternate-reverse;
}

.dream-first-visit[data-phase="fog_wait"] .dream-fog-back {
  opacity: 0.9;
  transform: scale(1.12) translateY(8%);
}

.dream-first-visit[data-phase="fog_wait"] .dream-fog-front {
  opacity: 1;
  filter: blur(15px);
  transform: scale(1.14) translateY(-4%);
}

.dream-first-visit[data-phase="fog_crossing"] .dream-fog-front {
  opacity: 0.44;
  filter: blur(11px);
  transform: scale(1.03) translateX(12%) translateY(18%);
  transition-duration: 2100ms, 2300ms;
}

.dream-first-visit[data-phase="fog_crossing"] .dream-fog-back {
  opacity: 0.52;
  transform: translateX(-7%) translateY(4%);
  transition-duration: 2100ms, 2300ms;
}

.dream-first-visit[data-phase="self_recognition"] .dream-fog-front,
.dream-first-visit[data-phase="free_roam"] .dream-fog-front,
.dream-first-visit[data-phase="tree_contact"] .dream-fog-front,
.dream-first-visit[data-phase="reveal_settling"] .dream-fog-front,
.dream-first-visit[data-phase="mirror_ready"] .dream-fog-front,
.dream-first-visit[data-phase="departure_intent"] .dream-fog-front,
.dream-first-visit[data-phase^="mirror_"] .dream-fog-front {
  z-index: 4;
  opacity: 0.24;
  transform: translateX(15%) translateY(20%);
}

.dream-life-tree.is-selected .dream-root-mirror {
  position: absolute;
  bottom: 5%;
  left: 43%;
  z-index: 8;
  display: block;
  width: clamp(112px, 9.5vw, 148px);
  min-width: 112px;
  height: clamp(68px, 6vw, 86px);
  min-height: 68px;
  border: 1px solid rgba(218, 231, 218, 0.68);
  border-radius: 54% 46% 58% 42% / 48% 56% 44% 52%;
  clip-path: polygon(4% 48%, 9% 27%, 24% 12%, 48% 7%, 70% 12%, 91% 31%, 97% 53%, 89% 76%, 65% 91%, 39% 94%, 16% 81%);
  opacity: 0;
  background:
    linear-gradient(164deg, rgba(239, 242, 220, 0.58), transparent 38%),
    radial-gradient(ellipse at 55% 25%, rgba(231, 240, 220, 0.46), transparent 48%),
    linear-gradient(178deg, rgba(104, 145, 128, 0.72), rgba(34, 82, 75, 0.78));
  box-shadow:
    inset 0 8px 18px rgba(233, 240, 221, 0.3),
    inset 0 -11px 18px rgba(18, 61, 57, 0.42),
    0 6px 13px rgba(4, 29, 24, 0.28);
  pointer-events: none;
  transform: perspective(180px) rotateX(31deg) scale(0.82);
  transition: opacity 700ms ease, transform 700ms ease;
}

.dream-first-visit[data-phase="mirror_ready"] .dream-life-tree.is-selected .dream-root-mirror {
  opacity: 1;
  pointer-events: auto;
  transform: perspective(180px) rotateX(31deg) scale(1);
  cursor: pointer;
}

.dream-life-tree.is-selected figcaption {
  right: 2%;
  bottom: 21%;
}

.dream-root-mirror-reflection {
  position: absolute;
  inset: 10% 8% 35%;
  border-radius: inherit;
  opacity: 0.92;
  background:
    linear-gradient(112deg, transparent 12%, rgba(247, 245, 221, 0.36) 37%, transparent 61%),
    repeating-linear-gradient(174deg, rgba(230, 239, 219, 0.17) 0 1px, transparent 1px 5px);
  filter: blur(0.4px);
  pointer-events: none;
}

.dream-root-mirror-ripple {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 8px;
  height: 5px;
  border: 1px solid rgba(238, 239, 219, 0.76);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: dream-mirror-ripple 7.2s ease-out 900ms infinite;
}

.dream-first-visit[data-phase="reveal_settling"] .dream-life-tree.is-selected .dream-tree-breath {
  opacity: 0.66;
  animation: dream-local-whisper 3.2s ease-out 1;
}

.dream-first-visit[data-phase="reveal_settling"] .dream-life-tree.is-selected .dream-tree-response-contact {
  animation: dream-touch-contact 1.1s ease-out both;
}

.dream-first-visit[data-phase="reveal_settling"] .dream-life-tree.is-selected .dream-tree-response-root {
  animation: dream-touch-root-spread 2.5s ease-out 240ms both;
}

.dream-first-visit[data-phase="reveal_settling"] .dream-life-tree.is-selected .dream-tree-response-trunk {
  animation: dream-touch-trunk-carry 2.2s ease-out 520ms both;
}

.dream-first-visit[data-phase="reveal_settling"] .dream-life-tree.is-selected .dream-tree-response-crown {
  animation: dream-touch-crown-settle 1.7s ease-out 1040ms both;
}

.dream-first-visit[data-phase="reveal_settling"] .dream-life-tree.is-selected > img {
  animation: dream-resident-tree-answer 3s ease-out both;
}

.dream-first-visit[data-reveal-mode="relation_directional"] .dream-life-tree.is-selected .dream-tree-breath {
  transform-origin: left center;
}

.dream-first-visit[data-reveal-mode="relation_sync"] .dream-life-tree.is-selected .dream-tree-breath {
  box-shadow: -24px 0 23px rgba(226, 218, 165, 0.42), 24px 0 23px rgba(226, 218, 165, 0.42);
}

.dream-mirror-layer {
  z-index: 60;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.7) translateY(28%);
  transform-origin: 50% 84%;
  transition:
    opacity 720ms ease,
    transform 950ms cubic-bezier(0.18, 0.74, 0.2, 1),
    filter 180ms ease;
}

.dream-first-visit[data-phase="mirror_opening"] .dream-mirror-layer,
.dream-first-visit[data-phase="mirror_open"] .dream-mirror-layer,
.dream-first-visit[data-phase="authorization_closed"] .dream-mirror-layer {
  opacity: 1;
  pointer-events: auto;
  touch-action: none;
  transform: scale(1) translateY(calc(var(--mirror-pull, 0) * 12%));
}

.dream-first-visit[data-phase="mirror_closing"] .dream-mirror-layer {
  opacity: 0;
  transform: scale(0.76) translateY(27%);
}

.dream-mirror-layer.is-masked {
  filter: brightness(0);
}

.dream-mirror-optics {
  position: absolute;
  inset: 3% 3% 8%;
  border: 1px solid rgba(222, 230, 207, 0.22);
  border-radius: 49% 51% 46% 54% / 6% 7% 8% 7%;
  background:
    linear-gradient(180deg, rgba(8, 44, 43, 0.88), rgba(18, 55, 53, 0.82) 76%, rgba(53, 79, 67, 0.58)),
    rgba(10, 43, 40, 0.88);
  box-shadow: inset 0 0 74px rgba(203, 220, 201, 0.12), 0 0 36px rgba(4, 27, 24, 0.5);
  backdrop-filter: blur(5px) saturate(0.72);
  cursor: ns-resize;
  transform: translateY(calc(var(--mirror-pull, 0) * 6px));
  transform-origin: 50% 100%;
  transition: transform 260ms ease-out, box-shadow 260ms ease;
}

.dream-mirror-optics::after {
  position: absolute;
  right: 8%;
  bottom: 5%;
  left: 8%;
  height: 16%;
  border-radius: 50%;
  content: "";
  background: linear-gradient(180deg, rgba(225, 235, 217, 0.08), rgba(102, 137, 119, 0.24));
  opacity: 0.52;
  transform: translateY(calc(var(--mirror-pull, 0) * 12px));
  transition: opacity 240ms ease, transform 240ms ease;
}

.dream-mirror-layer.is-pulling-mirror .dream-mirror-optics {
  box-shadow: inset 0 -18px 54px rgba(197, 219, 202, 0.14), 0 8px 38px rgba(4, 27, 24, 0.46);
}

.dream-mirror-layer.is-pulling-mirror .dream-mirror-optics::after {
  opacity: 0.86;
}

.dream-mirror-canvas-shell {
  position: absolute;
  inset: 6% 5% 17%;
  z-index: 2;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #e8eee6;
}

.dream-mirror-canvas-shell,
.dream-verification-canvas,
.dream-verification-geometry {
  min-width: 0;
  max-width: 100%;
}

.dream-verification-canvas {
  width: 100%;
  max-height: 100%;
}

.dream-verification-geometry {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior: contain;
  touch-action: pan-x;
}

.dream-verification-geometry::-webkit-scrollbar {
  display: none;
}

.dream-verification-geometry .canonical-canvas-scene {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
  max-height: min(62svh, 620px);
  background: transparent;
}

.dream-verification-geometry .canvas-scene-tracks line,
.dream-verification-geometry .canvas-column-guide {
  stroke: rgba(224, 233, 217, 0.16);
}

.dream-verification-geometry .canvas-scene-tracks text,
.dream-verification-geometry .canvas-slot-label text,
.dream-verification-geometry .canvas-node-role,
.dream-verification-geometry .canvas-hidden-label,
.dream-verification-geometry .canvas-scene-empty text {
  fill: rgba(225, 233, 219, 0.58);
}

.dream-verification-geometry .canvas-scene-node rect {
  fill: rgba(239, 241, 227, 0.07);
  stroke: rgba(231, 234, 214, 0.18);
}

.dream-verification-geometry .canvas-node-character,
.dream-verification-geometry .canvas-hidden-node text {
  fill: #f3efe0;
}

.dream-verification-geometry .canvas-scene-node.is-selected rect,
.dream-verification-geometry .canvas-slot-label.is-selected + .canvas-column-guide {
  stroke: rgba(239, 195, 132, 0.82);
  filter: drop-shadow(0 0 7px rgba(239, 195, 132, 0.42));
}

.dream-verification-geometry .canvas-relation path,
.dream-verification-geometry .canvas-work-path path {
  stroke: #e8b36e;
  filter: drop-shadow(0 0 5px rgba(232, 179, 110, 0.44));
}

.dream-verification-geometry .canvas-relation text,
.dream-verification-geometry .canvas-work-path text {
  fill: #f1d3a8;
}

.dream-verification-geometry .canvas-scene-empty {
  display: none;
}

.dream-verification-copy {
  width: min(620px, calc(100% - 28px));
  margin: -14px auto 0;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 25, 21, 0.74);
}

.dream-verification-copy span,
.dream-verification-copy strong {
  display: block;
  letter-spacing: 0;
}

.dream-verification-copy span {
  color: rgba(230, 235, 218, 0.68);
  font-size: 12px;
}

.dream-verification-copy strong {
  margin-top: 7px;
  color: #f5edda;
  font-family: var(--serif);
  font-size: clamp(15px, 1.7vw, 22px);
  font-weight: 500;
  line-height: 1.55;
}

.dream-mirror-water {
  position: absolute;
  right: 3%;
  bottom: 0;
  left: 3%;
  z-index: 4;
  height: 20%;
  min-height: 88px;
  cursor: ns-resize;
  pointer-events: none;
}

.dream-mirror-water::before {
  position: absolute;
  inset: 0 0 38%;
  border-top: 1px solid rgba(220, 231, 213, 0.48);
  border-radius: 50%;
  content: "";
  background: linear-gradient(180deg, rgba(123, 153, 132, 0.18), rgba(31, 75, 61, 0.3));
  box-shadow: inset 0 8px 24px rgba(5, 39, 35, 0.42), 0 -5px 18px rgba(211, 226, 207, 0.06);
}

.dream-mirror-root-boundary {
  position: absolute;
  right: 6%;
  bottom: 34%;
  left: 6%;
  height: 13px;
  border-top: 3px solid rgba(126, 96, 61, 0.88);
  border-radius: 50%;
  background:
    linear-gradient(173deg, transparent 0 42%, rgba(116, 88, 57, 0.42) 43% 49%, transparent 50%),
    linear-gradient(187deg, transparent 0 48%, rgba(95, 75, 49, 0.36) 49% 55%, transparent 56%);
  box-shadow: 0 4px 9px rgba(6, 35, 27, 0.28);
  transform: rotate(-0.5deg);
}

.dream-mirror-forest-edge {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, rgba(13, 53, 42, 0.72));
}

.dream-preflight .dream-grove-background {
  opacity: 0.7;
}

/* DREAM-RETURN-AND-DEPARTURE-01: canonical return, outer mist, and fail-closed control. */
.dream-departure-path {
  position: absolute;
  right: -1%;
  bottom: -2%;
  z-index: 15;
  width: clamp(170px, 24vw, 360px);
  height: clamp(150px, 25vh, 290px);
  overflow: hidden;
  border-radius: 78% 0 0;
  pointer-events: none;
}

.dream-departure-ground,
.dream-departure-mist {
  position: absolute;
  inset: 0;
}

.dream-departure-ground {
  top: 45%;
  background:
    radial-gradient(ellipse at 82% 88%, rgba(211, 218, 198, 0.14), transparent 58%),
    linear-gradient(145deg, transparent 26%, rgba(93, 119, 91, 0.2) 54%, rgba(25, 65, 50, 0.34));
  clip-path: polygon(36% 100%, 49% 64%, 67% 42%, 100% 22%, 100% 100%);
}

.dream-departure-mist {
  opacity: 0.46;
  background:
    radial-gradient(ellipse at 92% 70%, rgba(229, 233, 217, 0.62), transparent 54%),
    radial-gradient(ellipse at 86% 42%, rgba(206, 220, 208, 0.36), transparent 50%);
  filter: blur(9px);
  transform: translateX(9%);
  transition: opacity 600ms ease, transform 900ms ease;
}

.dream-first-visit.is-departure-intent .dream-departure-mist,
.dream-first-visit[data-phase="departure_committing"] .dream-departure-mist,
.dream-first-visit[data-phase="departed"] .dream-departure-mist {
  opacity: 0.9;
  transform: translateX(-2%) scale(1.12);
}

.dream-first-visit[data-phase="local_mist_reentry"] .dream-fog-front {
  z-index: 32;
  opacity: 0.84;
  filter: blur(13px);
  transform: translateX(7%) translateY(10%) scale(1.08);
  animation: dream-return-mist 1.5s ease-out both;
}

.dream-first-visit[data-phase="departure_committing"] .dream-fog-front,
.dream-first-visit[data-phase="departed"] .dream-fog-front {
  z-index: 42;
  opacity: 0.96;
  filter: blur(14px);
  transform: translateX(-4%) translateY(2%) scale(1.17);
}

.dream-first-visit[data-phase="departure_committing"] .dream-grove,
.dream-first-visit[data-phase="departed"] .dream-grove,
.dream-first-visit[data-phase="visit_suspended"] .dream-grove,
.dream-first-visit[data-phase="fail_closed"] .dream-grove {
  pointer-events: none;
}

.dream-runtime-veil {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: grid;
  place-content: center;
  gap: 18px;
  padding: 28px;
  color: rgba(246, 243, 231, 0.9);
  text-align: center;
  opacity: 0;
  background: rgba(9, 35, 30, 0.78);
  backdrop-filter: blur(14px);
  pointer-events: none;
  transition: opacity 240ms ease;
}

.dream-runtime-veil[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.dream-runtime-veil span {
  max-width: 360px;
  font-family: var(--serif);
  font-size: clamp(16px, 1.8vw, 22px);
  line-height: 1.7;
}

.dream-runtime-veil button {
  justify-self: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(236, 229, 201, 0.48);
  color: inherit;
  background: rgba(244, 239, 216, 0.08);
}

.dream-control-choice {
  min-height: 100svh;
  padding: 10vh 24px 36px;
  color: #f3f0e3;
  background:
    linear-gradient(rgba(10, 43, 37, 0.52), rgba(8, 34, 29, 0.88)),
    url("/assets/dream/porch-v5/grove-clean-approved-v5-e97ec6b5.png") center / cover;
}

.dream-control-choice img {
  width: min(180px, 42vw);
}

.dream-control-choice p {
  color: rgba(240, 236, 218, 0.68);
}

.dream-control-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.dream-control-actions .is-quiet {
  border-color: transparent;
  background: transparent;
}

.dream-abu-preflight {
  position: absolute;
  bottom: 12%;
  left: 48%;
  z-index: 2;
  width: clamp(108px, 13vw, 170px);
  transform: translateX(-50%);
}

@keyframes dream-tree-live {
  0% { transform: rotate(-0.45deg) scaleY(0.995); }
  55% { transform: rotate(0.32deg) scaleY(1.004); }
  100% { transform: rotate(-0.12deg) scaleY(1); }
}

@keyframes dream-root-recognition {
  0% { opacity: 0; transform: scaleX(0.1); }
  38% { opacity: 0.66; transform: scaleX(0.72); }
  100% { opacity: 0; transform: scaleX(1.18); }
}

@keyframes dream-local-whisper {
  0% { opacity: 0; transform: scale(0.72); }
  35% { opacity: 0.74; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.16); }
}

@keyframes dream-own-root-catch {
  0% { opacity: 0; transform: scaleX(0.06); }
  22% { opacity: 0.92; transform: scaleX(0.34); }
  58% { opacity: 0.78; transform: scaleX(0.94); }
  100% { opacity: 0; transform: scaleX(1.14); }
}

@keyframes dream-own-trunk-rise {
  0% { opacity: 0; transform: scaleY(0.04) rotate(-2deg); }
  30% { opacity: 0.82; }
  72% { opacity: 0.66; transform: scaleY(0.92) rotate(-1deg); }
  100% { opacity: 0; transform: scaleY(1) rotate(0); }
}

@keyframes dream-own-crown-answer {
  0% { opacity: 0; transform: translateY(7px) rotate(-1deg); }
  42% { opacity: 0.74; transform: translateY(0) rotate(0.6deg); }
  100% { opacity: 0; transform: translateY(-2px) rotate(0); }
}

@keyframes dream-own-tree-acknowledge {
  0% { filter: saturate(0.84) brightness(0.83); transform: rotate(0) scaleY(1); }
  48% { filter: saturate(0.96) brightness(0.93); transform: rotate(0.18deg) scaleY(1.007); }
  100% { filter: saturate(0.88) brightness(0.86); transform: rotate(-0.08deg) scaleY(1); }
}

@keyframes dream-touch-contact {
  0% { opacity: 0; transform: translate(-50%, 50%) scale(0.18); }
  28% { opacity: 1; transform: translate(-50%, 50%) scale(0.82); }
  100% { opacity: 0; transform: translate(-50%, 50%) scale(1.5); }
}

@keyframes dream-touch-root-spread {
  0% { opacity: 0; transform: scaleX(0.08); }
  34% { opacity: 0.9; transform: scaleX(0.52); }
  74% { opacity: 0.68; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1.12); }
}

@keyframes dream-touch-trunk-carry {
  0% { opacity: 0; transform: scaleY(0.05) rotate(-2deg); }
  36% { opacity: 0.86; }
  78% { opacity: 0.62; transform: scaleY(0.94) rotate(0); }
  100% { opacity: 0; transform: scaleY(1); }
}

@keyframes dream-touch-crown-settle {
  0% { opacity: 0; transform: translateY(8px) scale(0.94); }
  48% { opacity: 0.68; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-2px) scale(1.02); }
}

@keyframes dream-resident-tree-answer {
  0% { filter: saturate(0.84) brightness(0.83); transform: rotate(0) scaleY(1); }
  46% { filter: saturate(0.94) brightness(0.91); transform: rotate(-0.2deg) scaleY(1.005); }
  72% { transform: rotate(0.14deg) scaleY(1.003); }
  100% { filter: saturate(0.86) brightness(0.85); transform: rotate(0) scaleY(1); }
}

@keyframes dream-abu-follow-step {
  from { transform: translate(-50%, -86%) translateY(0) scaleX(var(--abu-facing)) rotate(-0.5deg); }
  to { transform: translate(-50%, -86%) translateY(-3px) scaleX(var(--abu-facing)) rotate(0.7deg); }
}

@keyframes dream-abu-shadow-step {
  from { opacity: 0.82; transform: translate(-50%, -50%) scaleX(1); }
  to { opacity: 0.58; transform: translate(-50%, -50%) scaleX(0.88); }
}

@keyframes dream-dew-fall {
  0%, 68% { opacity: 0; transform: translateY(-8px); }
  72% { opacity: 0.86; }
  82% { opacity: 0.72; transform: translateY(38px); }
  83%, 100% { opacity: 0; transform: translateY(42px); }
}

@keyframes dream-mirror-ripple {
  0%, 72% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  77% { opacity: 0.8; }
  90%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(9); }
}

@keyframes dream-line-once {
  0%, 100% { opacity: 0; transform: translate(-50%, 8px); }
  18%, 70% { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes dream-fog-drift {
  from { transform: translateX(-4%); }
  to { transform: translateX(5%); }
}

.dream-consent-dialog {
  width: min(420px, calc(100vw - 36px));
  padding: 0;
  border: 1px solid rgba(23, 66, 57, 0.26);
  border-radius: 6px;
  color: #173b34;
  background: rgba(248, 250, 246, 0.98);
  box-shadow: 0 24px 70px rgba(9, 31, 27, 0.24);
}

.dream-consent-dialog::backdrop {
  background: rgba(7, 24, 22, 0.48);
  backdrop-filter: blur(5px);
}

.dream-consent-dialog form {
  display: grid;
  gap: 22px;
  padding: 24px;
}

.dream-consent-dialog p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
}

.dream-consent-dialog form > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dream-consent-dialog button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(23, 66, 57, 0.28);
  border-radius: 4px;
  color: #173b34;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.dream-consent-dialog button.is-primary {
  border-color: #174b40;
  color: #f8faf6;
  background: #174b40;
}

.dream-consent-dialog button:focus-visible {
  outline: 2px solid #e18358;
  outline-offset: 2px;
}

@keyframes dream-return-mist {
  0% { opacity: 0.96; transform: translateX(-3%) translateY(2%) scale(1.16); }
  100% { opacity: 0.24; transform: translateX(15%) translateY(20%) scale(1); }
}

@media (max-width: 720px) {
  .dream-grove-background {
    background-position: 48% center;
    transform: scale(1.12) translate(
      calc(var(--camera-x) * 0.45px),
      calc(var(--camera-y) * 0.45px)
    );
  }

  .dream-life-tree {
    width: calc(clamp(190px, 69vw, 286px) * var(--tree-scale));
  }

  .dream-life-tree.is-own-tree {
    top: 53%;
    left: 27%;
  }

  .dream-life-tree.is-resident-tree:nth-of-type(2) {
    top: 47%;
    left: 72%;
  }

  .dream-life-tree.is-resident-tree:nth-of-type(3) {
    top: 28%;
    left: 77%;
  }

  .dream-life-tree figcaption {
    right: 3%;
    bottom: 2%;
    max-width: 128px;
    padding: 6px 7px 6px 9px;
  }

  .dream-life-tree.is-resident-tree figcaption {
    right: 12%;
    bottom: 18%;
    left: auto;
    max-width: 90px;
  }

  .dream-life-tree figcaption strong {
    font-size: 12px;
  }

  .dream-life-tree figcaption small {
    font-size: 9px;
  }

  .dream-abu {
    width: 102px;
    height: 126px;
    transform: translate(-50%, -84%) scaleX(var(--abu-facing));
  }

  .dream-abu-line {
    top: 69%;
    width: calc(100% - 48px);
    text-align: center;
  }

  .dream-paw-hint {
    bottom: 11%;
  }

  .dream-life-tree.is-selected .dream-root-mirror {
    bottom: 4%;
    left: 35%;
    width: 112px;
    min-width: 112px;
    height: 72px;
    min-height: 72px;
    transform: perspective(160px) rotateX(28deg) scale(0.82);
  }

  .dream-first-visit[data-phase="mirror_ready"] .dream-life-tree.is-selected .dream-root-mirror {
    transform: perspective(160px) rotateX(28deg) scale(1);
  }

  .dream-life-tree.is-selected figcaption {
    right: 7%;
    bottom: 25%;
  }

  .dream-mirror-optics {
    inset: 1.5% 1.5% 7%;
    border-radius: 47% 53% 45% 55% / 4% 5% 7% 6%;
  }

  .dream-mirror-canvas-shell {
    inset: 6% 2% 20%;
    align-items: start;
    box-sizing: border-box;
    padding-top: 4svh;
  }

  .dream-verification-geometry .canonical-canvas-scene {
    min-width: 720px;
    max-height: 58svh;
  }

  .dream-verification-copy {
    width: calc(100% - 28px);
    margin-top: -4px;
  }

  .dream-verification-copy span {
    font-size: 10px;
  }

  .dream-verification-copy strong {
    font-size: 14px;
  }

  .dream-mirror-water {
    right: 1.5%;
    left: 1.5%;
    height: 22%;
    min-height: 104px;
  }

  .dream-departure-path {
    right: -10%;
    bottom: -1%;
    width: 58vw;
    min-width: 210px;
    height: 29vh;
    min-height: 190px;
  }
}

@media (max-width: 420px) and (orientation: portrait) {
  .dream-first-visit {
    min-height: 100dvh;
  }

  .dream-life-tree.is-own-tree {
    top: 64%;
    left: -4%;
  }

  .dream-life-tree.is-resident-tree:nth-of-type(2) {
    top: 58%;
    left: 78%;
  }

  .dream-life-tree.is-resident-tree:nth-of-type(3) {
    top: 22%;
    left: 52%;
    width: calc(clamp(142px, 48vw, 200px) * var(--tree-scale));
  }

  .dream-life-tree.is-resident-tree:nth-of-type(3) > img {
    filter: saturate(0.86) brightness(0.88) contrast(1.02) opacity(0.78);
  }

}

@media (prefers-reduced-motion: reduce) {
  .dream-life-tree > img,
  .dream-tree-life-detail,
  .dream-root-mirror-ripple,
  .dream-tree-response i,
  .dream-first-visit.is-abu-following .dream-abu,
  .dream-first-visit.is-abu-following .dream-abu-shadow,
  .dream-fog,
  .dream-departure-mist,
  .dream-first-visit[data-phase="fog_crossing"] .dream-abu-line {
    animation: none !important;
  }

  .dream-first-visit[data-phase="local_mist_reentry"] .dream-fog-front,
  .dream-first-visit[data-phase="departure_committing"] .dream-fog-front,
  .dream-first-visit[data-phase="departed"] .dream-fog-front {
    opacity: 0.66;
    transform: none;
    transition-property: opacity, filter !important;
    transition-duration: 900ms !important;
  }

  .dream-first-visit[data-phase="self_recognition"] .is-own-tree .dream-tree-breath,
  .dream-first-visit[data-phase="reveal_settling"] .dream-life-tree.is-selected .dream-tree-breath {
    opacity: 0.52;
  }

  .dream-first-visit[data-phase="self_recognition"] .is-own-tree .dream-tree-response-root,
  .dream-first-visit[data-phase="reveal_settling"] .dream-life-tree.is-selected .dream-tree-response-root {
    opacity: 0.46;
    transform: scaleX(1);
  }

  .dream-first-visit[data-phase="self_recognition"] .is-own-tree .dream-tree-response-trunk,
  .dream-first-visit[data-phase="reveal_settling"] .dream-life-tree.is-selected .dream-tree-response-trunk {
    opacity: 0.3;
    transform: scaleY(1);
  }

  .dream-first-visit[data-phase="self_recognition"] .is-own-tree .dream-tree-response-crown,
  .dream-first-visit[data-phase="reveal_settling"] .dream-life-tree.is-selected .dream-tree-response-crown {
    opacity: 0.24;
    transform: none;
  }
}

@media (update: slow), (prefers-reduced-data: reduce) {
  .dream-grove-parallax,
  .dream-tree-life-detail,
  .dream-canopy-shadow {
    display: none;
  }

  .dream-fog {
    filter: none;
  }

  .dream-grove-background,
  .dream-mirror-optics,
  .dream-life-tree figcaption {
    backdrop-filter: none;
  }
}

/* DREAM-PROBLEM-FLOWER-AND-FRUIT-01: simulated blind-judgment vertical slice. */
.dream-game-banner {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  z-index: 46;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 8px 14px;
  color: #fff8e8;
  border: 1px solid rgba(244, 197, 128, 0.48);
  border-radius: 4px;
  background: rgba(43, 65, 55, 0.88);
  box-shadow: 0 7px 24px rgba(6, 34, 28, 0.24);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.dream-problem-flower {
  position: absolute;
  right: 15%;
  bottom: 6%;
  z-index: 13;
  display: grid;
  grid-template-rows: 50px auto;
  place-items: center;
  min-width: 54px;
  min-height: 66px;
  padding: 0;
  color: rgba(250, 239, 217, 0.9);
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.dream-problem-flower > i,
.dream-game-flower-action > i,
.dream-game-question-flower > i {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50% 44% 52% 42%;
  background:
    radial-gradient(circle at 48% 52%, #e9bd62 0 13%, transparent 14%),
    radial-gradient(ellipse at 50% 13%, #cb6f59 0 25%, transparent 27%),
    radial-gradient(ellipse at 87% 48%, #e08d66 0 24%, transparent 26%),
    radial-gradient(ellipse at 49% 86%, #c85e52 0 25%, transparent 27%),
    radial-gradient(ellipse at 12% 48%, #de8266 0 24%, transparent 26%);
  box-shadow: 0 0 18px rgba(229, 160, 93, 0.22);
  transform: rotate(-8deg);
  transition: filter 220ms ease, transform 260ms ease;
}

.dream-problem-flower > i::after,
.dream-game-flower-action > i::after {
  position: absolute;
  top: 29px;
  left: 16px;
  width: 2px;
  height: 19px;
  content: "";
  background: #769278;
  transform: rotate(5deg);
  transform-origin: top;
}

.dream-problem-flower > span {
  padding: 3px 6px;
  border-radius: 3px;
  background: rgba(12, 48, 39, 0.62);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.dream-problem-flower:hover > i,
.dream-problem-flower:focus-visible > i {
  filter: saturate(1.12) brightness(1.12);
  transform: rotate(-3deg) translateY(-2px);
}

.dream-game-layer {
  position: absolute;
  inset: 0;
  z-index: 64;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 46px);
  color: var(--ink);
  background: rgba(8, 37, 31, 0.32);
  pointer-events: auto;
  backdrop-filter: blur(7px);
}

.dream-game-layer[aria-hidden="true"] {
  visibility: hidden;
  pointer-events: none;
}

.dream-game-shell {
  width: min(1180px, 100%);
  max-height: calc(100svh - clamp(36px, 6vw, 92px));
  overflow: auto;
  border: 1px solid rgba(232, 222, 198, 0.72);
  border-radius: 6px;
  background: rgba(255, 253, 247, 0.96);
  box-shadow: 0 28px 80px rgba(4, 30, 25, 0.42);
  overscroll-behavior: contain;
}

.dream-game-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.95);
  backdrop-filter: blur(12px);
}

.dream-game-header div,
.dream-game-header small,
.dream-game-header strong {
  display: block;
}

.dream-game-header small,
.dream-game-reveal small,
.dream-game-sealed-fruit small,
.dream-game-seal-confirmation > small,
.dream-game-knowledge-seed small {
  color: var(--muted);
  font-size: 11px;
}

.dream-game-header strong {
  margin-top: 3px;
  color: var(--forest);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
}

.dream-game-shell button {
  min-height: 42px;
  padding: 8px 15px;
  color: #fff;
  border: 1px solid var(--forest);
  border-radius: 4px;
  background: var(--forest);
  font-weight: 700;
  cursor: pointer;
}

.dream-game-shell button.secondary,
.dream-game-header button,
.dream-game-inline-confirm button:last-child {
  color: var(--forest);
  border-color: rgba(18, 62, 53, 0.34);
  background: transparent;
}

.dream-game-shell button:disabled {
  cursor: wait;
  opacity: 0.56;
}

.dream-game-banner.is-inside {
  position: static;
  width: 100%;
  max-width: none;
  padding: 8px 22px;
  color: #724227;
  border: 0;
  border-bottom: 1px solid rgba(204, 103, 70, 0.2);
  border-radius: 0;
  background: #fff1df;
  box-shadow: none;
  transform: none;
  backdrop-filter: none;
}

.dream-game-preoutcome,
.dream-game-reveal {
  padding: 0 22px 28px;
}

.dream-game-lenses {
  position: sticky;
  top: 68px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(6, minmax(80px, 1fr));
  gap: 0;
  margin: 0 -22px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 237, 0.96);
  backdrop-filter: blur(10px);
}

.dream-game-lenses button {
  min-height: 48px;
  color: var(--muted);
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.dream-game-lenses button.active {
  color: var(--forest);
  box-shadow: inset 0 -3px var(--orange);
}

.dream-game-onecanvas {
  padding: 12px 0 18px;
}

.dream-game-onecanvas .canvas-scene-shell {
  min-width: 760px;
}

.dream-game-onecanvas > .canvas-scene-shell,
.dream-game-onecanvas > .canvas-scene-empty {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fffefb;
}

.dream-game-canvas-caption,
.dream-game-candidate-key {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dream-game-canvas-caption strong {
  margin-right: 8px;
  color: var(--forest);
}

.dream-game-candidate-key {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9c4d3b;
}

.dream-game-candidate-key i {
  width: 34px;
  border-top: 2px dashed #cc6746;
}

.canvas-candidate-relation path {
  fill: none;
  stroke: #cc6746;
  stroke-width: 2;
  stroke-dasharray: 7 6;
}

#canvas-candidate-arrow path {
  fill: #cc6746;
}

.canvas-candidate-relation text {
  fill: #8b493a;
  font-size: 10px;
}

.dream-game-flower-stage,
.dream-game-question-stage,
.dream-game-judgment,
.dream-game-seal-confirmation,
.dream-game-sealed-fruit {
  margin-top: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.dream-game-flower-stage {
  display: grid;
  justify-items: center;
  text-align: center;
}

.dream-game-flower-stage p,
.dream-game-sealed-fruit p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.75;
}

.dream-game-flower-action {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 180px;
  padding: 18px 24px !important;
  color: var(--forest) !important;
  border-color: rgba(204, 103, 70, 0.38) !important;
  background: transparent !important;
}

.dream-game-flower-action > i {
  width: 52px;
  height: 52px;
}

.dream-game-question-stage {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 18px 24px;
}

.dream-game-question-flower {
  display: grid;
  place-items: start center;
  min-height: 82px;
  padding-top: 8px;
}

.dream-game-question-flower > i {
  width: 62px;
  height: 62px;
  filter: saturate(1.08);
}

.dream-game-question-copy h2,
.dream-game-judgment h2,
.dream-game-seal-confirmation h2,
.dream-game-sealed-fruit h2,
.dream-game-reveal h2 {
  margin: 6px 0 14px;
  color: var(--forest);
  font-family: var(--serif);
  font-size: clamp(21px, 2.7vw, 32px);
  font-weight: 600;
  line-height: 1.35;
}

.dream-game-question-copy > small {
  color: var(--muted);
}

.dream-game-question-copy ul,
.dream-game-reveal-columns ul {
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.dream-game-question-stage > .dream-game-actions,
.dream-game-divination {
  grid-column: 2;
}

.dream-game-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.dream-game-inline-confirm {
  display: flex;
  flex: 1 1 100%;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--ink);
  border-left: 3px solid var(--orange);
  background: #fff5e9;
  font-size: 13px;
}

.dream-game-divination {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(180px, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dream-game-divination header strong,
.dream-game-divination header small {
  display: block;
}

.dream-game-divination header small {
  margin-top: 5px;
  color: var(--muted);
}

.dream-game-divination ol {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dream-game-divination li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--forest);
}

.dream-game-divination li.is-moving {
  color: var(--orange);
}

.dream-game-divination li small {
  color: currentColor;
}

.dream-game-judgment {
  display: grid;
  gap: 18px;
}

.dream-game-judgment header,
.dream-game-judgment > button,
.dream-game-judgment > p {
  justify-self: stretch;
}

.dream-game-judgment fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px 0 2px;
  border: 0;
  border-top: 1px solid var(--line);
}

.dream-game-judgment legend {
  padding: 0 10px 0 0;
  color: var(--forest);
  font-weight: 700;
}

.dream-game-judgment fieldset > label,
.dream-game-evidence-options > label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin: 7px 8px 0 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.dream-game-judgment input[type="radio"],
.dream-game-judgment input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  accent-color: var(--forest);
}

.dream-game-evidence-options.is-candidate > label i {
  width: 24px;
  margin-right: 7px;
  border-top: 2px dashed var(--orange);
}

.dream-game-confidence,
.dream-game-judgment > label {
  display: grid;
  gap: 8px;
}

.dream-game-confidence input[type="range"] {
  width: 100%;
  accent-color: var(--orange);
}

.dream-game-judgment textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  padding: 11px 12px;
  color: var(--ink);
  border: 1px solid rgba(18, 62, 53, 0.26);
  border-radius: 4px;
  background: #fff;
  font: inherit;
  line-height: 1.6;
}

.dream-game-judgment > p {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dream-game-seal-confirmation dl {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 20px 0 0;
}

.dream-game-seal-confirmation dt {
  color: var(--muted);
}

.dream-game-seal-confirmation dd {
  margin: 0;
  line-height: 1.65;
}

.dream-game-hypothesis-summary {
  display: grid;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dream-game-hypothesis-summary strong,
.dream-game-hypothesis-summary i {
  color: var(--orange);
}

.dream-game-hypothesis-summary i {
  font-size: 12px;
  font-style: normal;
}

.dream-game-sealed-fruit {
  display: grid;
  justify-items: center;
  min-height: 300px;
  align-content: center;
  text-align: center;
}

.dream-game-fruit {
  width: 86px;
  height: 82px;
  margin-bottom: 18px;
  border-radius: 47% 53% 52% 48%;
  background:
    radial-gradient(circle at 35% 27%, rgba(255, 245, 212, 0.65) 0 6%, transparent 7%),
    radial-gradient(circle at 44% 44%, #d39257, #a85142 72%);
  box-shadow: inset -12px -10px 20px rgba(92, 42, 35, 0.28), 0 8px 34px rgba(164, 85, 63, 0.2);
}

.dream-game-reveal > header {
  padding: 28px 0 12px;
}

.dream-game-reveal-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dream-game-reveal-columns article {
  min-width: 0;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.dream-game-reveal-columns article:last-child {
  border-right: 0;
}

.dream-game-reveal-columns strong,
.dream-game-reveal-columns span {
  display: block;
}

.dream-game-reveal-columns strong {
  margin: 7px 0;
  color: var(--forest);
  font-size: 20px;
}

.dream-game-reveal-columns span,
.dream-game-reveal-columns p {
  color: var(--muted);
  line-height: 1.65;
}

.dream-game-knowledge-seed {
  padding: 24px 0;
}

.dream-game-knowledge-seed h3 {
  margin: 6px 0 10px;
  color: var(--forest);
  font-family: var(--serif);
  font-size: 22px;
}

.dream-game-knowledge-seed p {
  color: var(--muted);
  line-height: 1.7;
}

.dream-game-status,
.dream-game-fail-closed {
  margin: 0;
  padding: 12px 22px;
  color: #713d30;
  border-top: 1px solid rgba(204, 103, 70, 0.22);
  background: #fff0e6;
  font-size: 13px;
}

.dream-game-fail-closed {
  width: min(640px, calc(100% - 30px));
  text-align: center;
}

@media (max-width: 720px) {
  .dream-game-banner:not(.is-inside) {
    top: max(7px, env(safe-area-inset-top));
    max-width: calc(100% - 18px);
    padding: 6px 9px;
    font-size: 10px;
  }

  .dream-problem-flower {
    right: 5%;
    bottom: 3%;
    grid-template-rows: 46px auto;
    min-width: 52px;
    min-height: 62px;
  }

  .dream-game-layer {
    align-items: stretch;
    padding: 0;
    background: rgba(8, 37, 31, 0.24);
    backdrop-filter: blur(4px);
  }

  .dream-game-shell {
    width: 100%;
    max-height: 100svh;
    border: 0;
    border-radius: 0;
  }

  .dream-game-header {
    min-height: 62px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  }

  .dream-game-header strong {
    font-size: 18px;
  }

  .dream-game-header button,
  .dream-game-shell button {
    min-height: 48px;
  }

  .dream-game-banner.is-inside {
    padding: 7px 10px;
    font-size: 10px;
  }

  .dream-game-preoutcome,
  .dream-game-reveal {
    padding-right: 12px;
    padding-left: 12px;
  }

  .dream-game-lenses {
    top: 62px;
    display: flex;
    overflow-x: auto;
    margin-right: -12px;
    margin-left: -12px;
    scrollbar-width: thin;
  }

  .dream-game-lenses button {
    flex: 0 0 74px;
    min-height: 48px;
    padding: 8px 6px;
  }

  .dream-game-onecanvas {
    overflow-x: auto;
  }

  .dream-game-onecanvas .canvas-scene-shell {
    min-width: 720px;
  }

  .dream-game-question-stage {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
  }

  .dream-game-question-flower > i {
    width: 48px;
    height: 48px;
  }

  .dream-game-question-copy h2,
  .dream-game-judgment h2,
  .dream-game-seal-confirmation h2,
  .dream-game-sealed-fruit h2,
  .dream-game-reveal h2 {
    font-size: 22px;
  }

  .dream-game-question-stage > .dream-game-actions,
  .dream-game-divination {
    grid-column: 1 / -1;
  }

  .dream-game-inline-confirm {
    align-items: stretch;
    flex-direction: column;
  }

  .dream-game-divination {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dream-game-judgment fieldset > label,
  .dream-game-evidence-options > label {
    width: 100%;
    margin-right: 0;
  }

  .dream-game-seal-confirmation dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .dream-game-seal-confirmation dd {
    margin-bottom: 11px;
  }

  .dream-game-reveal-columns {
    grid-template-columns: 1fr;
  }

  .dream-game-reveal-columns article {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dream-game-reveal-columns article:last-child {
    border-bottom: 0;
  }

  .dream-game-actions > button {
    flex: 1 1 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dream-problem-flower > i,
  .dream-game-flower-action > i,
  .dream-game-fruit {
    animation: none !important;
    transition: none !important;
  }
}

/* DREAM-TREE-WORLD-UX-RECONSTRUCTION: one grove, one focused tree, one directed journey. */
.dream-game-layer.is-tree-world {
  display: block;
  padding: 0;
  color: #f7f2df;
  background: #153c34;
  backdrop-filter: none;
}

.dream-tree-world-shell {
  position: absolute;
  inset: 0;
  min-width: 0;
  overflow: hidden;
  color: #f8f3e3;
  background-color: #173f36;
  background-image: url("/assets/dream/porch-v5/grove-clean-approved-v5-e97ec6b5.png");
  background-position: center 54%;
  background-size: cover;
  isolation: isolate;
}

.dream-tree-world-shell::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, rgba(228, 236, 215, 0.1), transparent 34%),
    linear-gradient(0deg, rgba(7, 31, 27, 0.74), transparent 48%),
    radial-gradient(ellipse at 50% 42%, transparent 20%, rgba(12, 51, 43, 0.3) 92%);
  pointer-events: none;
}

.dream-tree-world-banner {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  z-index: 24;
  width: max-content;
  max-width: calc(100% - 116px);
  margin: 0;
  padding: 6px 10px;
  color: rgba(255, 244, 218, 0.9);
  border: 1px solid rgba(237, 199, 126, 0.34);
  background: rgba(24, 65, 55, 0.78);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.dream-first-visit.is-tree-world-active .dream-grove {
  z-index: 67;
  overflow: visible;
  pointer-events: none;
  cursor: default;
}

.dream-first-visit.is-tree-world-active {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: clip;
  overscroll-behavior: none;
}

.dream-first-visit.is-tree-world-active .dream-grove > :not(.dream-abu):not(.dream-abu-shadow) {
  display: none !important;
}

.dream-first-visit.is-tree-world-active .dream-abu {
  top: auto !important;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px));
  left: clamp(56px, 9vw, 92px) !important;
  z-index: 80;
  width: clamp(76px, 8.5vw, 112px);
  height: clamp(92px, 10vw, 132px);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 8px 12px rgba(4, 30, 24, 0.34));
  transform: translate(-50%, 0) scaleX(var(--abu-facing)) !important;
  transition: opacity 500ms ease, filter 500ms ease;
}

.dream-first-visit.is-tree-world-active .dream-abu-shadow {
  top: auto !important;
  bottom: max(19px, calc(env(safe-area-inset-bottom) + 7px));
  left: clamp(56px, 9vw, 92px) !important;
  z-index: 79;
  width: clamp(52px, 6vw, 76px);
  transform: translate(-50%, 0);
}

.dream-tree-porch-camera {
  position: absolute;
  inset: 0;
  overflow: hidden;
  outline: 0;
  touch-action: pan-y;
  user-select: none;
}

.dream-tree-porch-sky,
.dream-tree-porch-far-grove,
.dream-tree-porch-ground {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: transform 820ms cubic-bezier(0.22, 0.74, 0.2, 1);
}

.dream-tree-porch-sky {
  background:
    radial-gradient(ellipse at 50% 26%, rgba(248, 236, 185, 0.38), transparent 30%),
    linear-gradient(180deg, rgba(198, 218, 200, 0.06), transparent 58%);
  transform: translateX(var(--porch-drag-sky));
}

.dream-tree-porch-far-grove {
  opacity: 0.48;
  background:
    linear-gradient(90deg, rgba(7, 44, 35, 0.46), transparent 24% 76%, rgba(7, 44, 35, 0.46)),
    radial-gradient(ellipse at 18% 45%, rgba(21, 79, 60, 0.5), transparent 29%),
    radial-gradient(ellipse at 82% 42%, rgba(33, 88, 67, 0.42), transparent 31%);
  transform: translateX(var(--porch-drag-far));
}

.dream-tree-porch-ground {
  top: auto;
  height: 34%;
  opacity: 0.9;
  background:
    linear-gradient(176deg, transparent 0 22%, rgba(46, 91, 65, 0.34) 23% 40%, transparent 41%),
    linear-gradient(0deg, rgba(6, 31, 26, 0.7), rgba(23, 68, 52, 0.14));
  transform: translateX(var(--porch-drag-ground));
}

.dream-tree-porch-trees {
  position: absolute;
  inset: 40px 0 92px;
  transform: translateX(var(--porch-drag-x));
  transition: transform 760ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.dream-tree-porch-tree {
  position: absolute;
  top: 49%;
  z-index: 3;
  display: block;
  width: clamp(300px, 43vw, 620px);
  height: min(72svh, 720px);
  padding: 0;
  overflow: visible;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0.38;
  filter: saturate(0.58) brightness(0.68) blur(0.8px);
  transform: translate(-50%, -50%) scale(0.7);
  transform-origin: center 88%;
  transition:
    left 820ms cubic-bezier(0.2, 0.72, 0.2, 1),
    opacity 650ms ease,
    filter 650ms ease,
    transform 820ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.dream-tree-porch-tree[data-porch-slot="0"] {
  left: 50%;
  z-index: 6;
  opacity: 1;
  filter: saturate(0.88) brightness(0.92);
  transform: translate(-50%, -50%) scale(1);
}

.dream-tree-porch-tree[data-porch-slot="-1"] {
  left: 8%;
}

.dream-tree-porch-tree[data-porch-slot="1"] {
  left: 92%;
}

.dream-tree-porch-tree > img {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  transform-origin: 50% 90%;
  animation: dream-tree-world-breathe 8.8s ease-in-out infinite alternate;
}

.dream-tree-porch-tree[data-porch-slot="-1"] > img {
  animation-delay: -2.7s;
}

.dream-tree-porch-tree[data-porch-slot="1"] > img {
  animation-delay: -5.2s;
}

.dream-tree-porch-tree-shadow {
  position: absolute;
  right: 19%;
  bottom: 4%;
  left: 19%;
  height: 8%;
  border-radius: 50%;
  background: rgba(5, 31, 24, 0.33);
  filter: blur(8px);
}

.dream-tree-porch-life {
  position: absolute;
  top: 30%;
  left: 59%;
  width: 9px;
  height: 14px;
  border: 1px solid rgba(226, 237, 217, 0.62);
  border-radius: 50%;
  opacity: 0;
  animation: dream-tree-world-dew 7.6s ease-in-out infinite;
}

.dream-tree-porch-tree[data-porch-slot="0"] .dream-tree-porch-life {
  opacity: 0.74;
}

.dream-tree-porch-identity {
  position: absolute;
  top: max(68px, calc(env(safe-area-inset-top) + 54px));
  left: 50%;
  z-index: 12;
  display: grid;
  gap: 3px;
  min-width: 180px;
  color: rgba(250, 244, 226, 0.95);
  text-align: center;
  transform: translateX(-50%);
}

.dream-tree-porch-identity strong {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 500;
}

.dream-tree-porch-identity span,
.dream-tree-porch-identity small {
  color: rgba(231, 234, 215, 0.72);
  font-size: 12px;
}

.dream-tree-porch-command {
  position: absolute;
  right: max(28px, 7vw);
  bottom: max(32px, calc(env(safe-area-inset-bottom) + 18px));
  z-index: 14;
}

.dream-tree-porch-command button {
  min-width: 164px;
  min-height: 48px;
  padding: 10px 20px;
  color: #173f36;
  border: 1px solid rgba(248, 236, 202, 0.84);
  border-radius: 4px;
  background: rgba(247, 239, 215, 0.92);
  box-shadow: 0 12px 28px rgba(7, 34, 28, 0.25);
  font-weight: 800;
  cursor: pointer;
}

.dream-tree-porch-departure {
  position: absolute;
  top: max(58px, calc(env(safe-area-inset-top) + 42px));
  right: max(18px, 3vw);
  z-index: 16;
  display: grid;
  justify-items: end;
  min-width: 74px;
  min-height: 48px;
  padding: 4px 0;
  color: rgba(241, 239, 220, 0.72);
  border: 0;
  background: transparent;
  cursor: pointer;
}

.dream-tree-porch-departure span {
  width: 58px;
  height: 13px;
  border-top: 1px solid rgba(234, 235, 210, 0.4);
  border-radius: 50%;
  filter: blur(0.2px);
}

.dream-tree-porch-departure b {
  font-size: 11px;
  font-weight: 500;
}

.dream-tree-world-shell.is-entering .dream-tree-porch-sky,
.dream-tree-world-shell.is-entering .dream-tree-porch-far-grove,
.dream-tree-world-shell.is-entering .dream-tree-porch-ground,
.dream-tree-world-shell.is-entering .dream-tree-porch-trees {
  animation: dream-tree-world-enter 2.2s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.dream-tree-world-shell.is-entering::after {
  position: absolute;
  inset: -10%;
  z-index: 20;
  content: "";
  background: rgba(222, 232, 213, 0.72);
  filter: blur(18px);
  pointer-events: none;
  animation: dream-tree-world-fog-gate 2.25s ease-out both;
}

.dream-tree-world-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 31;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: max(5px, env(safe-area-inset-top)) 16px 5px;
  border-bottom: 1px solid rgba(240, 231, 205, 0.16);
  background: rgba(15, 52, 44, 0.78);
  backdrop-filter: blur(14px);
}

.dream-tree-world-header button {
  width: 44px;
  height: 44px;
  padding: 0;
  color: rgba(249, 240, 216, 0.9);
  border: 0;
  background: transparent;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.dream-tree-world-header div {
  min-width: 0;
}

.dream-tree-world-header small,
.dream-tree-world-header strong {
  display: block;
}

.dream-tree-world-header small {
  color: rgba(225, 229, 210, 0.64);
  font-size: 10px;
}

.dream-tree-world-header strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dream-tree-world-header > span {
  color: rgba(235, 229, 207, 0.68);
  font-size: 11px;
}

.dream-tree-world-shell.is-journey > .dream-tree-world-banner {
  top: max(64px, calc(env(safe-area-inset-top) + 58px));
}

.dream-tree-world-scroll {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.dream-tree-world-scroll::-webkit-scrollbar {
  display: none;
}

.dream-tree-journey-section {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 100svh;
  padding: max(118px, calc(env(safe-area-inset-top) + 104px)) clamp(28px, 7vw, 112px) max(96px, calc(env(safe-area-inset-bottom) + 78px));
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  isolation: isolate;
}

.dream-tree-journey-section::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(9, 43, 36, 0.2), transparent 48%),
    linear-gradient(0deg, rgba(8, 35, 29, 0.62), transparent 48%);
  pointer-events: none;
}

.dream-tree-world-composition {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.dream-tree-world-composition > img {
  position: absolute;
  width: min(80vw, 820px);
  max-width: none;
  height: auto;
  object-fit: contain;
  filter: saturate(0.82) brightness(0.8);
  transform-origin: 50% 88%;
}

.dream-tree-world-composition.is-whole-tree > img {
  right: 4%;
  bottom: -6%;
  width: min(70vw, 790px);
}

.dream-tree-world-composition.is-roots > img {
  right: -8%;
  bottom: -39%;
  width: min(98vw, 980px);
  transform: scale(1.2);
}

.dream-tree-world-composition.is-branches > img {
  top: -18%;
  right: -6%;
  width: min(92vw, 940px);
  transform: scale(1.08);
}

.dream-tree-world-composition.is-canopy > img {
  top: -42%;
  right: -12%;
  width: min(105vw, 1080px);
  transform: scale(1.16);
}

.dream-tree-world-composition.is-flower > img {
  right: -10%;
  bottom: -24%;
  width: min(92vw, 960px);
  transform: scale(1.08);
}

.dream-tree-world-light {
  position: absolute;
  top: 22%;
  right: 16%;
  width: min(38vw, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(231, 224, 170, 0.08);
  filter: blur(34px);
  animation: dream-tree-world-light 7s ease-in-out infinite alternate;
}

.dream-tree-journey-copy {
  position: relative;
  z-index: 3;
  width: min(420px, 48vw);
  margin-top: 4vh;
  text-shadow: 0 2px 18px rgba(5, 29, 24, 0.5);
}

.dream-tree-journey-copy small {
  color: rgba(228, 209, 153, 0.88);
  font-size: 11px;
  letter-spacing: 0;
}

.dream-tree-journey-copy h2 {
  margin: 8px 0;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.2;
}

.dream-tree-journey-copy p {
  max-width: 360px;
  margin: 0;
  color: rgba(234, 235, 216, 0.74);
  line-height: 1.7;
}

.dream-tree-spatial-lenses {
  position: absolute;
  right: clamp(28px, 8vw, 128px);
  bottom: clamp(104px, 16vh, 170px);
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  max-width: min(440px, 54vw);
}

.dream-tree-spatial-lens {
  display: grid;
  grid-template-columns: 42px auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0;
  color: rgba(247, 239, 216, 0.9);
  border: 0;
  background: transparent;
  cursor: pointer;
  text-shadow: 0 2px 12px rgba(4, 27, 22, 0.64);
}

.dream-tree-spatial-lens i {
  display: block;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(234, 216, 164, 0.52);
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 38%, rgba(243, 231, 194, 0.3), transparent 22%),
    rgba(20, 67, 55, 0.44);
  box-shadow: inset 0 0 14px rgba(233, 217, 166, 0.12), 0 4px 16px rgba(4, 28, 23, 0.25);
}

.dream-tree-spatial-lens:hover i,
.dream-tree-spatial-lens:focus-visible i {
  border-color: rgba(246, 228, 173, 0.88);
  background-color: rgba(33, 84, 65, 0.62);
}

.dream-tree-spatial-lens span {
  font-weight: 700;
}

.dream-tree-journey-continue {
  position: absolute;
  bottom: max(26px, calc(env(safe-area-inset-bottom) + 12px));
  left: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  padding: 0;
  color: rgba(247, 236, 205, 0.72);
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translateX(-50%);
}

.dream-tree-journey-continue span {
  font-size: 28px;
  animation: dream-tree-world-down 2.4s ease-in-out infinite;
}

.dream-tree-journey-index {
  position: fixed;
  top: 50%;
  right: 12px;
  z-index: 20;
  display: grid;
  gap: 7px;
  transform: translateY(-50%);
}

.dream-tree-journey-index button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.dream-tree-journey-index span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(241, 234, 211, 0.36);
  transition: height 220ms ease, background 220ms ease;
}

.dream-tree-journey-index button[aria-current="step"] span {
  height: 18px;
  border-radius: 3px;
  background: rgba(243, 220, 157, 0.9);
}

.dream-tree-world-stage {
  position: relative;
  z-index: 5;
  width: min(760px, 68vw);
  margin: auto 0 0 auto;
  color: #1e4037;
}

.dream-tree-world-stage .dream-game-flower-stage,
.dream-tree-world-stage .dream-game-question-stage,
.dream-tree-world-stage .dream-game-judgment,
.dream-tree-world-stage .dream-game-seal-confirmation,
.dream-tree-world-stage .dream-game-sealed-fruit {
  margin: 0;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(233, 224, 198, 0.6);
  border-radius: 4px;
  background: rgba(255, 253, 245, 0.92);
  box-shadow: 0 24px 54px rgba(5, 32, 26, 0.28);
  backdrop-filter: blur(14px);
}

.dream-tree-world-stage .dream-game-fruit,
.dream-tree-reveal-fruit i {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 250, 0.9) 0 7%, transparent 8%),
    radial-gradient(circle at 48% 44%, #f2f0e8, #d9ded8 72%);
  box-shadow:
    inset -12px -10px 20px rgba(91, 112, 102, 0.18),
    0 0 34px rgba(236, 239, 224, 0.26);
}

.dream-tree-lens-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  color: #153f35;
  background:
    linear-gradient(180deg, rgba(225, 235, 222, 0.82), rgba(226, 231, 215, 0.94)),
    url("/assets/dream/porch-v5/grove-clean-approved-v5-e97ec6b5.png") center / cover;
  overflow: hidden;
}

.dream-tree-lens-overlay::after {
  position: absolute;
  right: -4%;
  bottom: -13%;
  left: -4%;
  z-index: 3;
  height: 22%;
  border-radius: 50% 50% 0 0;
  content: "";
  background: rgba(24, 66, 54, 0.68);
  filter: blur(1px);
  pointer-events: none;
}

.dream-tree-lens-forest-edge {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: clamp(12px, 3vw, 38px) solid rgba(19, 64, 51, 0.24);
  pointer-events: none;
  box-shadow: inset 0 0 90px rgba(12, 48, 39, 0.22);
}

.dream-tree-lens-overlay > header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: max(10px, env(safe-area-inset-top)) clamp(18px, 4vw, 54px) 10px;
  border-bottom: 1px solid rgba(22, 65, 54, 0.16);
  background: rgba(245, 245, 232, 0.58);
  backdrop-filter: blur(14px);
}

.dream-tree-lens-overlay > header small,
.dream-tree-lens-overlay > header strong {
  display: block;
}

.dream-tree-lens-overlay > header small {
  color: #60796f;
  font-size: 11px;
}

.dream-tree-lens-overlay > header strong {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
}

.dream-tree-lens-overlay > header button {
  min-height: 44px;
  padding: 7px 14px;
  color: #17483c;
  border: 1px solid rgba(20, 67, 56, 0.32);
  border-radius: 4px;
  background: rgba(248, 247, 237, 0.56);
  cursor: pointer;
}

.dream-tree-lens-canvas {
  position: relative;
  z-index: 2;
  min-height: 0;
  padding: clamp(12px, 3vw, 34px) clamp(14px, 4vw, 56px) max(88px, calc(env(safe-area-inset-bottom) + 64px));
  overflow: auto;
}

.dream-tree-lens-canvas .dream-game-onecanvas {
  width: min(1160px, 100%);
  margin: 0 auto;
  color: #173f36;
}

.dream-tree-lens-canvas .dream-game-onecanvas .canvas-scene-shell {
  min-width: 760px;
}

.dream-tree-reveal {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: max(100px, calc(env(safe-area-inset-top) + 88px)) clamp(24px, 8vw, 120px) max(38px, calc(env(safe-area-inset-bottom) + 22px));
  overflow: hidden;
  color: #f7f2df;
  background:
    radial-gradient(ellipse at 50% 25%, rgba(240, 232, 188, 0.13), transparent 36%),
    rgba(10, 48, 40, 0.76);
  backdrop-filter: blur(12px);
}

.dream-tree-reveal > header {
  flex: 0 0 auto;
  width: min(760px, 100%);
  margin: 0 auto;
  text-align: center;
}

.dream-tree-reveal > header small {
  color: rgba(232, 211, 154, 0.82);
}

.dream-tree-reveal > header h2 {
  margin: 7px 0 0;
  font-family: var(--serif);
  font-size: clamp(22px, 3.3vw, 38px);
  font-weight: 500;
}

.dream-tree-reveal-fruit {
  position: absolute;
  top: max(76px, calc(env(safe-area-inset-top) + 66px));
  left: 50%;
  z-index: -1;
  width: 94px;
  height: 88px;
  opacity: 0.34;
  transform: translateX(-50%);
}

.dream-tree-reveal-fruit i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 47% 53% 52% 48%;
}

.dream-tree-reveal-stage {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
}

.dream-tree-reveal-act {
  width: min(720px, 100%);
  height: 100%;
  max-height: 100%;
  overflow: auto;
  padding: clamp(22px, 4vw, 42px) 0;
  border-top: 1px solid rgba(235, 226, 198, 0.26);
  border-bottom: 1px solid rgba(235, 226, 198, 0.26);
  animation: dream-tree-reveal-act 520ms ease-out both;
}

.dream-tree-reveal-act small,
.dream-tree-reveal-act strong,
.dream-tree-reveal-act span {
  display: block;
}

.dream-tree-reveal-act small {
  color: rgba(232, 211, 154, 0.82);
  font-size: 11px;
}

.dream-tree-reveal-act strong {
  margin: 10px 0;
  font-family: var(--serif);
  font-size: clamp(26px, 4.2vw, 46px);
  font-weight: 500;
}

.dream-tree-reveal-act > span,
.dream-tree-reveal-act p,
.dream-tree-reveal-act li,
.dream-tree-reveal-act dd {
  color: rgba(237, 237, 219, 0.76);
  line-height: 1.7;
}

.dream-tree-reveal-act dl {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 20px 0 0;
}

.dream-tree-reveal-act dt {
  color: rgba(231, 211, 158, 0.72);
}

.dream-tree-reveal-act dd {
  margin: 0;
}

.dream-tree-reveal-act > div {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.dream-tree-reveal-act > div b {
  color: rgba(234, 212, 155, 0.8);
}

.dream-tree-reveal-progress {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.dream-tree-reveal-progress span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: rgba(239, 234, 214, 0.46);
  border: 1px solid rgba(239, 234, 214, 0.28);
  border-radius: 50%;
  font-size: 10px;
}

.dream-tree-reveal-progress span[aria-current="step"] {
  color: #183f35;
  border-color: rgba(242, 224, 169, 0.82);
  background: rgba(242, 224, 169, 0.88);
}

.dream-tree-reveal > .dream-game-actions {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  justify-content: center;
  width: min(720px, 100%);
  margin: 0 auto;
}

.dream-tree-reveal > .dream-game-actions button {
  min-height: 46px;
  padding: 9px 18px;
  color: #153e34;
  border: 1px solid rgba(244, 226, 172, 0.78);
  border-radius: 4px;
  background: rgba(244, 233, 199, 0.94);
  font-weight: 800;
  cursor: pointer;
}

.dream-tree-reveal > .dream-game-actions button.secondary {
  color: rgba(248, 240, 218, 0.88);
  border-color: rgba(240, 226, 190, 0.4);
  background: transparent;
}

@keyframes dream-tree-world-breathe {
  from { transform: rotate(-0.25deg) scale(0.997); }
  to { transform: rotate(0.32deg) scale(1.004); }
}

@keyframes dream-tree-world-dew {
  0%, 20% { opacity: 0; transform: translateY(-4px); }
  38% { opacity: 0.72; }
  70%, 100% { opacity: 0; transform: translateY(56px); }
}

@keyframes dream-tree-world-enter {
  0% { filter: blur(10px) brightness(0.58); transform: scale(1.12) translateY(2%); }
  58% { filter: blur(2.5px) brightness(0.82); }
  100% { filter: none; transform: scale(1) translateY(0); }
}

@keyframes dream-tree-world-fog-gate {
  0% { opacity: 0.96; transform: scale(1.08); }
  62% { opacity: 0.58; }
  100% { opacity: 0; transform: scale(0.98); visibility: hidden; }
}

@keyframes dream-tree-world-light {
  from { opacity: 0.52; transform: scale(0.96); }
  to { opacity: 0.86; transform: scale(1.06); }
}

@keyframes dream-tree-world-down {
  0%, 100% { opacity: 0.46; transform: translateY(-2px); }
  50% { opacity: 0.9; transform: translateY(4px); }
}

@keyframes dream-tree-reveal-act {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .dream-tree-world-banner {
    top: max(7px, env(safe-area-inset-top));
    max-width: calc(100% - 112px);
    padding: 5px 7px;
    font-size: 9px;
  }

  .dream-first-visit.is-tree-world-active .dream-abu {
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 10px));
    left: 68px !important;
    width: 78px;
    height: 96px;
  }

  .dream-first-visit.is-tree-world-active .dream-abu-shadow {
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 6px));
    left: 68px !important;
  }

  .dream-tree-porch-trees {
    inset: 50px 0 104px;
  }

  .dream-tree-porch-tree {
    top: 50%;
    width: min(78vw, 330px);
    height: min(69svh, 570px);
  }

  .dream-tree-porch-tree[data-porch-slot="-1"] {
    left: 0;
    opacity: 0.4;
    filter: saturate(0.62) brightness(0.72) blur(0.2px);
  }

  .dream-tree-porch-tree[data-porch-slot="1"] {
    left: 100%;
    opacity: 0.4;
    filter: saturate(0.62) brightness(0.72) blur(0.2px);
  }

  .dream-tree-porch-identity {
    top: max(54px, calc(env(safe-area-inset-top) + 43px));
  }

  .dream-tree-porch-identity strong {
    font-size: 24px;
  }

  .dream-tree-porch-identity {
    text-shadow: 0 2px 10px rgba(8, 36, 29, 0.72);
  }

  .dream-tree-porch-command {
    right: 18px;
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px));
  }

  .dream-tree-porch-command button {
    min-width: 154px;
    min-height: 48px;
    padding: 9px 14px;
  }

  .dream-tree-porch-departure {
    top: max(48px, calc(env(safe-area-inset-top) + 38px));
    right: 10px;
  }

  .dream-tree-world-header {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    min-height: 54px;
    padding-right: 10px;
    padding-left: 6px;
  }

  .dream-tree-world-header > span {
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dream-tree-world-shell.is-journey > .dream-tree-world-banner {
    top: max(56px, calc(env(safe-area-inset-top) + 50px));
  }

  .dream-tree-journey-section {
    min-height: 100svh;
    padding: max(104px, calc(env(safe-area-inset-top) + 92px)) 18px max(112px, calc(env(safe-area-inset-bottom) + 96px));
  }

  .dream-tree-world-composition > img {
    max-width: none;
  }

  .dream-tree-world-composition.is-whole-tree > img {
    right: -36%;
    bottom: 5%;
    width: 116vw;
  }

  .dream-tree-world-composition.is-roots > img {
    right: -54%;
    bottom: -15%;
    width: 148vw;
    transform: scale(1.18);
  }

  .dream-tree-world-composition.is-branches > img {
    top: 2%;
    right: -72%;
    width: 164vw;
  }

  .dream-tree-world-composition.is-canopy > img {
    top: -12%;
    right: -82%;
    width: 180vw;
  }

  .dream-tree-world-composition.is-flower > img {
    right: -74%;
    bottom: -12%;
    width: 164vw;
  }

  .dream-tree-journey-copy {
    width: min(310px, 86vw);
    margin-top: 2vh;
  }

  .dream-tree-journey-copy h2 {
    font-size: 29px;
  }

  .dream-tree-journey-copy p {
    max-width: 280px;
    font-size: 13px;
  }

  .dream-tree-spatial-lenses {
    right: 18px;
    bottom: 122px;
    gap: 10px 16px;
    max-width: 250px;
  }

  .dream-tree-spatial-lens {
    grid-template-columns: 42px auto;
    min-height: 48px;
  }

  .dream-tree-journey-index {
    right: 3px;
  }

  .dream-tree-world-stage {
    width: 100%;
    margin-top: auto;
  }

  .dream-tree-world-stage .dream-game-flower-stage,
  .dream-tree-world-stage .dream-game-question-stage,
  .dream-tree-world-stage .dream-game-judgment,
  .dream-tree-world-stage .dream-game-seal-confirmation,
  .dream-tree-world-stage .dream-game-sealed-fruit {
    max-height: 58svh;
    padding: 16px;
    overflow: auto;
  }

  .dream-tree-world-stage .dream-game-question-stage {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .dream-tree-lens-overlay > header {
    min-height: 58px;
    padding-right: 10px;
    padding-left: 12px;
  }

  .dream-tree-lens-overlay > header strong {
    font-size: 19px;
  }

  .dream-tree-lens-overlay > header button {
    min-height: 48px;
  }

  .dream-tree-lens-canvas {
    padding: 10px 8px max(76px, calc(env(safe-area-inset-bottom) + 58px));
  }

  .dream-tree-lens-canvas .dream-game-onecanvas {
    overflow-x: auto;
  }

  .dream-tree-lens-canvas .dream-game-onecanvas .canvas-scene-shell {
    min-width: 720px;
  }

  .dream-tree-reveal {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: max(92px, calc(env(safe-area-inset-top) + 80px)) 16px max(24px, calc(env(safe-area-inset-bottom) + 14px));
    overflow: hidden;
  }

  .dream-tree-reveal > header {
    flex: 0 0 auto;
  }

  .dream-tree-reveal > header h2 {
    font-size: 20px;
    line-height: 1.35;
  }

  .dream-tree-reveal-stage {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .dream-tree-reveal-act {
    height: 100%;
    max-height: none;
    padding: 20px 0;
  }

  .dream-tree-reveal-act strong {
    font-size: 27px;
    line-height: 1.35;
  }

  .dream-tree-reveal-act dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .dream-tree-reveal-act dd {
    margin-bottom: 10px;
  }

  .dream-tree-reveal > .dream-game-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 6px;
    padding-left: 56px;
  }

  .dream-tree-reveal > .dream-game-actions button {
    min-width: 0;
    min-height: 48px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
    line-height: 1.25;
  }

  .dream-first-visit.is-tree-world-active:has(.dream-tree-reveal) .dream-abu {
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 8px));
    left: 36px !important;
    width: 52px;
    height: 66px;
  }

  .dream-first-visit.is-tree-world-active:has(.dream-tree-reveal) .dream-abu-shadow {
    bottom: max(15px, calc(env(safe-area-inset-bottom) + 5px));
    left: 36px !important;
    width: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dream-tree-world-shell.is-entering .dream-tree-porch-sky,
  .dream-tree-world-shell.is-entering .dream-tree-porch-far-grove,
  .dream-tree-world-shell.is-entering .dream-tree-porch-ground,
  .dream-tree-world-shell.is-entering .dream-tree-porch-trees,
  .dream-tree-world-shell.is-entering::after,
  .dream-tree-porch-tree > img,
  .dream-tree-porch-life,
  .dream-tree-world-light,
  .dream-tree-journey-continue span,
  .dream-tree-reveal-act {
    animation: none !important;
  }

  .dream-tree-world-shell.is-entering::after {
    opacity: 0;
  }

  .dream-tree-porch-tree,
  .dream-tree-porch-trees,
  .dream-tree-porch-sky,
  .dream-tree-porch-far-grove,
  .dream-tree-porch-ground {
    transition-property: opacity, filter !important;
    transition-duration: 240ms !important;
  }

  .dream-tree-world-scroll {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }
}

@media (max-width: 420px) and (max-height: 720px) {
  .dream-tree-porch-tree {
    height: 62svh;
  }

  .dream-tree-porch-identity {
    top: max(48px, calc(env(safe-area-inset-top) + 38px));
  }

  .dream-tree-world-stage .dream-game-flower-stage,
  .dream-tree-world-stage .dream-game-question-stage,
  .dream-tree-world-stage .dream-game-judgment,
  .dream-tree-world-stage .dream-game-seal-confirmation,
  .dream-tree-world-stage .dream-game-sealed-fruit {
    max-height: 54svh;
  }
}

.primary-command.compact {
  min-height: 38px;
  padding: 0 16px;
}

.text-command {
  padding: 0 3px;
  color: var(--forest);
  border-bottom: 1px solid currentColor;
  background: transparent;
  font-weight: 700;
}

.section-kicker {
  margin: 0 0 16px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
}

/* Life world */
.life-world {
  min-height: 100vh;
  background: var(--ivory);
}

.world-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  align-items: center;
  gap: 40px;
  min-height: 690px;
  padding: 64px 64px 52px;
  overflow: hidden;
  background-color: var(--ivory);
  background-image: url("/assets/valley_sunrise.jpg");
  background-position: center;
  background-size: cover;
}

.world-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250, 248, 242, 0.78);
}

.world-hero > * {
  position: relative;
}

.world-copy {
  max-width: 700px;
}

.world-copy h1 {
  margin: 0;
  color: #11382f;
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1.48;
  font-weight: 580;
}

.world-copy > p:not(.section-kicker) {
  max-width: 580px;
  margin: 24px 0 0;
  color: #52655f;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.8;
}

.world-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}

.dream-consent-control {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 680px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(24, 70, 60, 0.16);
}

.dream-consent-control div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dream-consent-control strong {
  color: var(--ink);
  font-size: 13px;
}

.dream-consent-control span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.dream-consent-control button {
  flex: 0 0 auto;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--forest);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.dream-consent-control.is-active strong::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #4f8c6d;
  content: "";
}

.life-tree {
  position: relative;
  width: 520px;
  height: 520px;
  justify-self: end;
}

.life-tree::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 70px;
  width: 1px;
  height: 360px;
  background: linear-gradient(180deg, rgba(204, 103, 70, 0.68), rgba(18, 62, 53, 0.62));
}

.tree-line {
  position: absolute;
  top: 178px;
  width: 150px;
  height: 92px;
  border-top: 1px solid rgba(18, 62, 53, 0.42);
}

.tree-line-left {
  left: 108px;
  border-left: 1px solid rgba(18, 62, 53, 0.42);
  border-radius: 56px 0 0;
  transform: rotate(-18deg);
}

.tree-line-right {
  right: 108px;
  border-right: 1px solid rgba(18, 62, 53, 0.42);
  border-radius: 0 56px 0 0;
  transform: rotate(18deg);
}

.tree-node {
  position: absolute;
  z-index: 2;
  display: grid;
  align-content: center;
  width: 154px;
  min-height: 112px;
  padding: 14px 16px;
  border: 1px solid rgba(18, 62, 53, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 18px 40px rgba(18, 62, 53, 0.08);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.tree-node:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
}

.tree-node small,
.tree-node strong,
.tree-node span {
  display: block;
}

.tree-node small {
  color: var(--orange);
  font-family: var(--serif);
  font-size: 20px;
}

.tree-node strong {
  margin-top: 7px;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tree-node span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.tree-nature {
  top: 38px;
  left: 183px;
}

.tree-events {
  top: 212px;
  left: 12px;
}

.tree-growth {
  top: 212px;
  right: 12px;
}

.tree-trunk {
  position: absolute;
  left: 223px;
  top: 285px;
  width: 74px;
  height: 148px;
  opacity: 0.58;
}

.tree-trunk i {
  position: absolute;
  left: 36px;
  width: 1px;
  height: 126px;
  background: var(--forest);
  transform-origin: bottom;
}

.tree-trunk i:first-child { transform: rotate(-12deg); }
.tree-trunk i:nth-child(2) { transform: rotate(8deg); }
.tree-trunk i:last-child { transform: rotate(0); }

.life-tree img {
  position: absolute;
  z-index: 3;
  left: 202px;
  bottom: 2px;
  width: 118px;
  height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(18, 62, 53, 0.18));
}

.world-ledger {
  padding: 66px 64px 110px;
  color: #f7f2e7;
  background: var(--forest-deep);
}

.world-ledger > header,
.world-ledger-flow {
  width: min(1120px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.world-ledger header p {
  margin: 0 0 10px;
  color: #efb38b;
  font-size: 11px;
  font-weight: 800;
}

.world-ledger h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 550;
}

.world-ledger-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 44px;
  border-top: 1px solid rgba(255, 250, 240, 0.2);
  border-bottom: 1px solid rgba(255, 250, 240, 0.2);
}

.world-ledger-flow button {
  min-width: 0;
  min-height: 190px;
  padding: 26px 24px;
  border: 0;
  border-right: 1px solid rgba(255, 250, 240, 0.18);
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.world-ledger-flow button:last-child {
  border-right: 0;
}

.world-ledger-flow button:hover {
  background: rgba(255, 250, 240, 0.06);
}

.world-ledger-flow span,
.world-ledger-flow strong,
.world-ledger-flow small {
  display: block;
}

.world-ledger-flow span {
  color: #efb38b;
  font-size: 11px;
  font-weight: 800;
}

.world-ledger-flow strong {
  margin-top: 36px;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 520;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.world-ledger-flow small {
  margin-top: 14px;
  color: rgba(255, 250, 240, 0.56);
}

/* Workbench */
.workbench-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  min-height: 112px;
  padding: 20px 48px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.95);
  backdrop-filter: blur(16px);
}

.workbench-header > div:first-child {
  padding-bottom: 18px;
}

.workbench-header p,
.lab-header p {
  margin: 0 0 5px;
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
}

.workbench-header h1,
.lab-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.3;
  font-weight: 600;
}

.workbench-header > div > span,
.lab-header > div > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.workspace-navigation {
  align-self: stretch;
  display: flex;
  align-items: end;
}

.workspace-tabs {
  display: flex;
  align-self: stretch;
  gap: 28px;
}

.workspace-tabs button {
  position: relative;
  min-width: 64px;
  padding: 0 0 1px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}

.workspace-tabs button:hover,
.workspace-tabs button.active {
  color: var(--forest);
  font-weight: 750;
}

.workspace-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--orange);
}

.opening-band {
  position: relative;
  min-height: 530px;
  padding: 48px 56px 52px;
  overflow: hidden;
  background-color: var(--ivory);
  background-image: url("/assets/valley_sunrise.jpg");
  background-position: center;
  background-size: cover;
}

.opening-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250, 248, 242, 0.75);
}

.opening-band > * {
  position: relative;
}

.opening-copy,
.scan-strip {
  width: min(1080px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.opening-copy {
  padding-top: 38px;
}

.opening-copy h1 {
  max-width: 860px;
  margin: 0;
  color: #12352f;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.5;
  font-weight: 580;
}

.opening-lede {
  max-width: 600px;
  margin: 20px 0 0;
  color: #566660;
  font-size: 14px;
  line-height: 1.8;
}

.opening-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 26px;
}

.scan-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 56px;
  border-top: 1px solid rgba(20, 61, 52, 0.2);
  border-bottom: 1px solid rgba(20, 61, 52, 0.2);
  background: rgba(255, 253, 248, 0.52);
  backdrop-filter: blur(8px);
}

.scan-item {
  min-width: 0;
  padding: 18px 20px;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.scan-item:last-child {
  border-right: 0;
}

.scan-item:hover,
.scan-item.narration-active {
  background: rgba(222, 233, 226, 0.72);
}

.scan-item span,
.scan-item strong {
  display: block;
}

.scan-item span {
  margin-bottom: 6px;
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
}

.scan-item strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.experience-section {
  position: relative;
  padding: 0 56px;
  scroll-margin-top: 112px;
}

.tone-facts { color: var(--ink); background: #edf2ed; }
.tone-canvas { color: #173a33; background: #dce8e1; }
.tone-cognition { color: #f8f4ea; background: var(--forest-soft); }
.tone-boundaries { color: #fffaf0; background: var(--forest-deep); }

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
  width: min(1080px, 100%);
  min-height: 138px;
  margin: 0 auto;
  padding: 26px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.section-heading small,
.section-heading strong,
.section-heading em {
  display: block;
}

.section-heading small {
  margin-bottom: 8px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
}

.tone-cognition .section-heading small,
.tone-boundaries .section-heading small {
  color: #f1b48c;
}

.section-heading strong {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.35;
  font-weight: 600;
}

.section-heading em {
  max-width: 760px;
  margin-top: 8px;
  overflow: hidden;
  opacity: 0.72;
  font-size: 12px;
  font-style: normal;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-heading > b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  justify-self: end;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 400;
  opacity: 0.65;
}

.section-body {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 42px 0 76px;
}

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

.pillar {
  display: grid;
  grid-template-rows: auto auto auto auto auto 1fr;
  min-width: 0;
  min-height: 340px;
  padding: 18px 14px;
  border: 1px solid rgba(20, 61, 52, 0.18);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.64);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.pillar:hover,
.pillar.is-selected,
.pillar.narration-active {
  transform: translateY(-3px);
  border-color: var(--orange);
  background: var(--paper);
}

.pillar-label,
.ten-god,
.nature {
  text-align: center;
}

.pillar-label {
  font-size: 13px;
  font-weight: 750;
}

.ten-god {
  min-height: 18px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.pillar .stem,
.pillar .branch {
  display: block;
  font-family: var(--serif);
  font-size: 52px;
  line-height: 1.12;
  text-align: center;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.pillar .stem { margin-top: 14px; }
.pillar .branch { margin-bottom: 10px; }

.nature {
  color: var(--muted);
  font-size: 10px;
}

.hidden-stems {
  align-self: end;
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.hidden-stems i {
  display: grid;
  gap: 2px;
  font-style: normal;
}

.hidden-stems b {
  font-family: var(--serif);
  font-size: 16px;
}

.hidden-stems em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.element-wood { color: var(--wood-yang); }
.element-fire { color: var(--fire-yang); }
.element-earth { color: var(--earth-yang); }
.element-metal { color: var(--metal-yang); }
.element-water { color: var(--water-yang); }
.element-wood[data-polarity="yin"] { color: var(--wood-yin); }
.element-fire[data-polarity="yin"] { color: var(--fire-yin); }
.element-earth[data-polarity="yin"] { color: var(--earth-yin); }
.element-metal[data-polarity="yin"] { color: var(--metal-yin); }
.element-water[data-polarity="yin"] { color: var(--water-yin); }

.baseline-thesis {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  margin: 0 0 28px;
  padding: 0 0 28px;
  border: 0;
  border-bottom: 1px solid rgba(255, 250, 240, 0.24);
  color: #fffaf0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.baseline-thesis span {
  color: #f1b48c;
  font-size: 11px;
  font-weight: 750;
}

.baseline-thesis strong {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
  font-weight: 540;
}

.path-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr) 30px minmax(0, 1fr);
  align-items: stretch;
}

.path-step {
  min-width: 0;
  min-height: 220px;
  padding: 22px;
  border: 1px solid rgba(255, 250, 240, 0.24);
  border-radius: 7px;
  color: #fffaf0;
  background: rgba(8, 44, 39, 0.14);
  text-align: left;
  cursor: pointer;
}

.path-step:hover,
.path-step.is-selected,
.path-step.narration-active {
  border-color: #f1b48c;
  background: rgba(8, 44, 39, 0.34);
}

.path-step span,
.path-step small,
.path-step strong {
  display: block;
}

.path-step span {
  color: #f1b48c;
  font-family: var(--serif);
  font-size: 12px;
}

.path-step small {
  margin-top: 36px;
  color: rgba(255, 250, 240, 0.7);
  font-size: 11px;
  line-height: 1.6;
}

.path-step strong {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 600;
}

.path-arrow {
  display: grid;
  place-items: center;
  color: #f1b48c;
  font-size: 20px;
}

.path-stage:has(.path-step:nth-of-type(4)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.path-stage:has(.path-step:nth-of-type(4)) .path-arrow {
  display: none;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 250, 240, 0.23);
  border-bottom: 1px solid rgba(255, 250, 240, 0.23);
}

.boundary-item {
  min-width: 0;
  min-height: 220px;
  padding: 25px;
  border: 0;
  border-right: 1px solid rgba(255, 250, 240, 0.18);
  color: #fffaf0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.boundary-item:last-child { border-right: 0; }
.boundary-item:hover { background: rgba(255, 250, 240, 0.07); }
.boundary-item span,
.boundary-item strong { display: block; }
.boundary-item span { color: #f1b48c; font-size: 11px; font-weight: 800; }
.boundary-item strong { margin-top: 42px; font-family: var(--serif); font-size: 17px; line-height: 1.7; font-weight: 520; }

/* Six-pillar canvas */
.temporal-viewer {
  display: grid;
  gap: 24px;
}

.temporal-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(230px, 0.8fr);
  gap: 28px;
  align-items: end;
}

.stage-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(18, 62, 53, 0.22);
  border-bottom: 1px solid rgba(18, 62, 53, 0.22);
}

.stage-switch button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 11px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  color: #53645f;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.stage-switch button:last-child { border-right: 0; }
.stage-switch button:hover,
.stage-switch button.active { color: var(--forest); background: rgba(255, 253, 248, 0.5); box-shadow: inset 0 -3px 0 var(--orange); }
.stage-switch small { color: var(--orange); font-family: var(--serif); font-size: 10px; }
.stage-switch span { overflow: hidden; font-family: var(--serif); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

.temporal-status span,
.temporal-status strong { display: block; }
.temporal-status span { margin-bottom: 6px; color: var(--orange); font-size: 10px; font-weight: 800; }
.temporal-status strong { color: #3d514b; font-family: var(--serif); font-size: 14px; line-height: 1.65; font-weight: 560; }

.layer-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.layer-switch button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #475d57;
  background: rgba(255, 253, 248, 0.34);
  cursor: pointer;
}

.layer-switch button:hover,
.layer-switch button.active { color: #fffdf8; border-color: var(--forest); background: var(--forest); }
.layer-switch button:disabled { cursor: not-allowed; opacity: 0.38; }
.layer-switch small { display: grid; place-items: center; min-width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); font-size: 9px; }

.canvas-lens-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.visibility-switch {
  display: inline-flex;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 253, 248, 0.34);
}

.visibility-switch button {
  min-width: 52px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid var(--line);
  color: #60716b;
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.visibility-switch button:last-child { border-right: 0; }
.visibility-switch button:hover,
.visibility-switch button.active { color: #fffdf8; background: var(--forest); }

.canvas-board {
  overflow: hidden;
  border-top: 1px solid rgba(18, 62, 53, 0.22);
  border-bottom: 1px solid rgba(18, 62, 53, 0.22);
  background: rgba(255, 253, 248, 0.42);
}

.six-pillar-scroll {
  overflow-x: auto;
  padding: 8px 0 0;
  scrollbar-color: rgba(18, 62, 53, 0.28) transparent;
}

.canonical-canvas-scene {
  display: block;
  width: 100%;
  min-width: 900px;
  height: auto;
  overflow: visible;
  background: rgba(248, 249, 245, 0.42);
}

.canonical-canvas-scene defs path { fill: var(--forest); }
.canvas-scene-tracks line { stroke: rgba(18, 62, 53, 0.12); stroke-width: 1; stroke-dasharray: 2 8; vector-effect: non-scaling-stroke; }
.canvas-scene-tracks text { fill: #8a9792; font-family: var(--sans); font-size: 10px; letter-spacing: 0; }
.canvas-column-guide { stroke: rgba(18, 62, 53, 0.15); stroke-width: 1; vector-effect: non-scaling-stroke; }
.canvas-scene-slot.is-temporal .canvas-column-guide { stroke: rgba(204, 103, 70, 0.28); stroke-dasharray: 4 6; }
.canvas-slot-label { fill: var(--forest); cursor: pointer; }
.canvas-slot-label > text:first-child { font-family: var(--serif); font-size: 16px; font-weight: 650; }
.canvas-slot-label .canvas-slot-state { fill: #83908c; font-family: var(--sans); font-size: 9px; }
.canvas-slot-label:hover > text:first-child,
.canvas-slot-label.is-selected > text:first-child { fill: var(--orange); }
.canvas-scene-slot.state-inactive,
.canvas-scene-slot.state-not_loaded { opacity: 0.36; }
.canvas-scene-node { cursor: pointer; outline: none; }
.canvas-scene-node rect { fill: rgba(255, 253, 248, 0.84); stroke: rgba(18, 62, 53, 0.2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.canvas-scene-slot.is-temporal .canvas-scene-node rect { fill: rgba(252, 242, 230, 0.76); stroke: rgba(204, 103, 70, 0.38); }
.canvas-scene-node:hover rect,
.canvas-scene-node:focus-visible rect,
.canvas-scene-node.is-selected rect { fill: rgba(255, 249, 239, 0.98); stroke: var(--orange); stroke-width: 2; }
.canvas-node-role { fill: #788681; font-family: var(--sans); font-size: 9px; }
.canvas-node-character { fill: currentColor; font-family: var(--serif); font-size: 50px; font-weight: 580; }
.canvas-scene-node.is-inactive { color: #87938f; }
.canvas-scene-node.is-inactive .canvas-node-character { font-size: 38px; }
.canvas-hidden-label { fill: #84918d; font-family: var(--sans); font-size: 8px; }
.canvas-hidden-node { color: var(--forest); cursor: pointer; outline: none; }
.canvas-hidden-node circle { fill: rgba(255, 253, 248, 0.94); stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.canvas-hidden-node text { fill: currentColor; font-family: var(--serif); font-size: 16px; font-weight: 620; }
.canvas-hidden-node:hover circle,
.canvas-hidden-node:focus-visible circle,
.canvas-hidden-node.is-selected circle { fill: #fff7eb; stroke: var(--orange); stroke-width: 2; }
.canvas-relation > path { fill: none; stroke: rgba(18, 62, 53, 0.5); stroke-width: 2; cursor: pointer; vector-effect: non-scaling-stroke; }
.canvas-relation text { fill: #50635d; stroke: rgba(237, 244, 239, 0.94); stroke-width: 4px; stroke-linejoin: round; paint-order: stroke fill; font-family: var(--sans); font-size: 11px; cursor: pointer; }
.canvas-relation text:focus-visible { outline: none; fill: var(--orange); }
.canvas-relation:hover > path,
.canvas-relation.is-selected > path,
.canvas-relation.is-work-path > path { stroke: var(--orange); stroke-width: 3.4; }
.canvas-relation.state-latent > path { stroke-dasharray: 7 7; opacity: 0.58; }
.canvas-relation.state-blocked > path { stroke: #a95b63; stroke-dasharray: 3 7; }
.canvas-board[data-visibility="lab_audit"] .canvas-relation text { opacity: 0; pointer-events: none; }
.canvas-board[data-visibility="lab_audit"] .canvas-relation:hover text,
.canvas-board[data-visibility="lab_audit"] .canvas-relation.is-selected text { opacity: 1; pointer-events: auto; }
.canvas-work-path { cursor: pointer; outline: none; }
.canvas-work-path path { fill: none; stroke: var(--orange); stroke-width: 5; stroke-linecap: round; opacity: 0.86; vector-effect: non-scaling-stroke; }
.canvas-work-path text { fill: var(--orange); stroke: rgba(248, 249, 245, 0.96); stroke-width: 5px; paint-order: stroke fill; font-family: var(--sans); font-size: 11px; font-weight: 750; }
.canvas-work-path.is-candidate path { stroke: #9a7f4e; stroke-width: 3; stroke-dasharray: 8 7; opacity: 0.65; }
.canvas-work-path:hover path,
.canvas-work-path:focus-visible path,
.canvas-work-path.is-selected path { stroke-width: 7; opacity: 1; }
.canvas-scene-empty text:first-child { fill: #64756f; font-family: var(--serif); font-size: 16px; }
.canvas-scene-empty text:last-child { fill: #87938f; font-family: var(--sans); font-size: 10px; }
.layer-caption { display: flex; gap: 12px; margin: 0; padding: 12px 18px; border-top: 1px solid var(--line); color: #60716b; font-size: 10px; line-height: 1.6; }
.layer-caption strong { flex: 0 0 auto; color: var(--forest); }

.canvas-reading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
}

.canvas-diff-panel,
.canvas-inspector { min-width: 0; border-top: 2px solid var(--forest); background: rgba(255, 253, 248, 0.54); }
.canvas-diff-panel > header,
.canvas-inspector > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.canvas-diff-panel > header span,
.canvas-inspector > header span { color: var(--orange); font-size: 9px; font-weight: 800; }
.canvas-diff-panel > header strong { color: #5f706a; font-size: 10px; font-weight: 560; }
.change-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.change-group { min-width: 0; padding: 15px 17px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.change-group:nth-child(even) { border-right: 0; }
.change-group > span { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.change-group b { font-family: var(--serif); font-size: 14px; }
.change-group em { color: var(--orange); font-size: 9px; font-style: normal; }
.change-group button { display: block; width: 100%; margin-top: 3px; padding: 6px 0; overflow: hidden; border: 0; color: #546660; background: transparent; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.change-group button:hover,
.change-group button.is-selected { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.baseline-diff { min-height: 150px; padding: 26px 17px; }
.baseline-diff b { color: var(--forest); font-family: var(--serif); font-size: 20px; }
.baseline-diff p { max-width: 440px; color: #5d7069; font-size: 12px; line-height: 1.7; }

.canvas-diff-panel > details,
.canvas-inspector > details { padding: 12px 17px 15px; border-top: 1px solid var(--line); color: #5f706a; font-size: 9px; }
.canvas-diff-panel summary,
.canvas-inspector summary { color: var(--forest); cursor: pointer; font-weight: 700; }
.canvas-inspector > header b { padding: 4px 7px; border: 1px solid currentColor; border-radius: 4px; color: #507067; font-size: 8px; }
.canvas-inspector > header b.epistemic-committed { color: var(--orange); }
.canvas-inspector > header b.epistemic-blocked { color: #a95b63; }
.canvas-inspector h3,
.canvas-inspector > p,
.canvas-inspector dl,
.inspector-caution { margin-right: 17px; margin-left: 17px; }
.canvas-inspector h3 { margin-top: 20px; margin-bottom: 8px; font-family: var(--serif); font-size: 21px; font-weight: 600; }
.canvas-inspector > p { min-height: 44px; color: #52645e; font-family: var(--serif); font-size: 13px; line-height: 1.7; }
.canvas-inspector dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; margin-bottom: 17px; border-top: 1px solid var(--line); }
.canvas-inspector dl div { min-width: 0; padding: 10px 7px 0 0; }
.canvas-inspector dt { color: #82908b; font-size: 8px; }
.canvas-inspector dd { margin: 4px 0 0; overflow: hidden; color: var(--forest); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.inspector-caution { margin-top: 14px; margin-bottom: 17px; padding: 10px 11px; border-left: 3px solid var(--orange); background: rgba(204, 103, 70, 0.08); }
.inspector-caution span { color: var(--orange); font-size: 8px; font-weight: 800; }
.inspector-caution p { margin: 5px 0 0; color: #5b6e67; font-size: 10px; line-height: 1.55; }
.canvas-inspector details ul { max-height: 120px; overflow: auto; padding-left: 15px; word-break: break-all; }

.canvas-boundary { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(150px, auto) auto; align-items: center; gap: 15px; padding: 13px 15px; border: 1px solid var(--line); background: rgba(255, 253, 248, 0.38); }
.canvas-boundary > span { color: var(--forest); font-size: 9px; font-weight: 800; }
.canvas-boundary.is-limited > span { color: var(--orange); }
.canvas-boundary p { margin: 0; color: #475c55; font-size: 10px; line-height: 1.55; }
.canvas-boundary small { color: #74827d; font-size: 8px; white-space: nowrap; }
.canvas-boundary code { color: #7a8782; font-size: 8px; }

/* Abu narration */
.narration-workspace {
  min-height: calc(100vh - 112px);
  padding: 62px 56px 100px;
  background: linear-gradient(180deg, #f7f4ed 0%, #e5ece8 64%, #cbdcd2 100%);
}

.narration-workspace > * {
  width: min(900px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.narration-workspace header p { margin: 0 0 12px; color: var(--orange); font-size: 11px; font-weight: 800; }
.narration-workspace h1 { margin: 0; color: var(--forest); font-family: var(--serif); font-size: 30px; line-height: 1.55; font-weight: 580; }
.narration-workspace header > span { display: block; max-width: 700px; margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.narration-workspace-actions { display: flex; align-items: center; gap: 18px; margin-top: 24px; margin-bottom: 36px; }
.narration-workspace ol { margin: 0; padding: 0; border-top: 1px solid rgba(18, 62, 53, 0.22); list-style: none; }
.narration-workspace li { border-bottom: 1px solid rgba(18, 62, 53, 0.16); }
.narration-workspace li button { display: grid; grid-template-columns: 38px minmax(0, 1fr) 24px; align-items: center; gap: 14px; width: 100%; min-height: 92px; padding: 14px 6px; border: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.narration-workspace li button:hover,
.narration-workspace li button.active { background: rgba(255, 253, 248, 0.5); }
.narration-workspace li small { color: var(--orange); font-family: var(--serif); font-size: 11px; }
.narration-workspace li span,
.narration-workspace li strong,
.narration-workspace li em { display: block; min-width: 0; }
.narration-workspace li strong { margin-bottom: 6px; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.narration-workspace li em { overflow: hidden; color: var(--muted); font-size: 11px; font-style: normal; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; }
.narration-workspace li b { color: var(--forest); font-size: 11px; font-weight: 400; }

.closing-band {
  min-height: 170px;
  padding: 48px 24px 86px;
  color: #e8d8b8;
  background: #061f1c;
  text-align: center;
}
.closing-band p { margin: 0; font-family: var(--serif); font-size: 22px; }
.closing-band span { display: block; margin-top: 9px; color: rgba(255, 250, 240, 0.56); font-size: 10px; }
.empty-note { padding: 28px 0; font-family: var(--serif); font-size: 17px; }

/* Lab */
.mingli-lab {
  min-height: 100vh;
  padding-bottom: 100px;
  background: #e8efeb;
}

.lab-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  min-height: 150px;
  padding: 36px 50px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.82);
}

.lab-header code {
  max-width: 240px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lab-evidence-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 50px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.55);
}

.lab-evidence-rail > span {
  min-width: 0;
  padding: 17px 14px;
  border-right: 1px solid var(--line);
}

.lab-evidence-rail > span:last-child { border-right: 0; }
.lab-evidence-rail small,
.lab-evidence-rail strong { display: block; }
.lab-evidence-rail small { color: var(--muted); font-size: 9px; }
.lab-evidence-rail strong { margin-top: 5px; color: var(--forest); font-family: var(--serif); font-size: 18px; }
.lab-canvas { padding: 34px 50px 0; }
.lab-lens-label { margin: 0 0 16px; color: var(--orange); font-size: 10px; font-weight: 800; }
.lab-empty { min-height: 100vh; padding: 100px 50px; background: var(--mist); }
.lab-empty p { color: var(--orange); font-size: 11px; font-weight: 800; }
.lab-empty h1 { max-width: 700px; font-family: var(--serif); font-size: 32px; font-weight: 580; }
.lab-empty span { display: block; max-width: 620px; margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.8; }

.cognition-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(760px, 100%);
  margin: 54px auto 0;
  padding: 18px 0;
  border-top: 1px solid rgba(20, 61, 52, 0.2);
  border-bottom: 1px solid rgba(20, 61, 52, 0.2);
}

.cognition-progress > i,
.narration-pending > i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 7px rgba(204, 103, 70, 0.12);
}

.cognition-progress span,
.cognition-progress strong,
.cognition-progress small { display: block; }
.cognition-progress strong { color: var(--forest); font-size: 13px; }
.cognition-progress small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.6; }

.deterministic-canvas-skeleton {
  padding: 6px 0 18px;
}

.deterministic-canvas-skeleton > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.deterministic-canvas-skeleton > header span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
}

.deterministic-canvas-skeleton > header strong {
  color: var(--forest);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 580;
}

.skeleton-pillar-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.skeleton-pillar-rail article {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 260px;
  padding: 22px 10px;
  border-right: 1px solid var(--line);
}

.skeleton-pillar-rail article:last-child { border-right: 0; }
.skeleton-pillar-rail small { color: var(--muted); font-size: 11px; }
.skeleton-pillar-rail b { font-family: var(--serif); font-size: 48px; font-weight: 560; }
.skeleton-pillar-rail article > i { width: 1px; height: 20px; background: var(--line); }
.skeleton-pillar-rail em { color: var(--muted); font-size: 10px; font-style: normal; }
.deterministic-canvas-skeleton > p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.deterministic-canvas-skeleton > p > i { width: 22px; height: 1px; background: var(--orange); }

.narration-pending {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 760px;
  margin-top: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.narration-pending p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

/* Abu companion */
.abu-dock {
  position: fixed;
  z-index: 90;
  left: 252px;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 76px minmax(0, 330px);
  align-items: end;
  gap: 9px;
  pointer-events: none;
}

.abu-avatar,
.abu-bubble,
.abu-panel { pointer-events: auto; }
.abu-avatar { grid-column: 1; grid-row: 2; width: 76px; height: 76px; padding: 0; overflow: hidden; border: 0; border-radius: 50%; background: transparent; cursor: pointer; filter: drop-shadow(0 9px 13px rgba(6, 31, 28, 0.25)); }
.abu-avatar img { width: 100%; height: 100%; object-fit: contain; }
.abu-avatar img.abu-avatar-standard { transform: scale(1.48); transform-origin: center 68%; }
.abu-bubble { grid-column: 2; grid-row: 2; position: relative; min-width: 170px; max-width: 330px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: rgba(255, 253, 248, 0.97); box-shadow: 0 13px 30px rgba(6, 31, 28, 0.14); }
.abu-bubble::before { content: ""; position: absolute; left: -7px; bottom: 18px; width: 12px; height: 12px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fffdf8; transform: rotate(45deg); }
.abu-bubble span { color: var(--orange); font-size: 9px; font-weight: 800; }
.abu-bubble p { margin: 4px 0 0; overflow: hidden; font-size: 11px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.deepbeing-shell[data-product-area-current="workbench"] .abu-dock:not(.is-open),
.deepbeing-shell[data-product-area-current="lab"] .abu-dock:not(.is-open) {
  grid-template-columns: 76px;
}

.deepbeing-shell[data-product-area-current="workbench"] .abu-dock:not(.is-open) .abu-bubble,
.deepbeing-shell[data-product-area-current="lab"] .abu-dock:not(.is-open) .abu-bubble {
  display: none;
}

.abu-panel { grid-column: 1 / 3; grid-row: 1; width: min(420px, calc(100vw - 270px)); max-height: min(560px, 70vh); margin-bottom: 3px; overflow: auto; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 8px; color: #fffaf0; background: rgba(6, 31, 28, 0.97); box-shadow: 0 22px 56px rgba(3, 19, 17, 0.34); }
.abu-panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid rgba(255, 250, 240, 0.14); font-family: var(--serif); font-size: 16px; }
.abu-panel-heading button { width: 32px; height: 32px; border: 0; color: #fffaf0; background: transparent; font-size: 21px; cursor: pointer; }
.abu-panel > p { margin: 0; padding: 17px 18px; color: rgba(255, 250, 240, 0.8); font-family: var(--serif); font-size: 15px; line-height: 1.75; }
.narration-controls { display: flex; gap: 14px; padding: 0 18px 17px; }
.abu-panel .primary-command { color: var(--forest-deep); background: #f0c38f; }
.abu-panel .text-command { color: #fffaf0; }
.chapter-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255, 250, 240, 0.14); }
.chapter-list button { display: block; width: 100%; padding: 12px 18px; border: 0; border-bottom: 1px solid rgba(255, 250, 240, 0.09); color: #fffaf0; background: transparent; text-align: left; cursor: pointer; }
.chapter-list button:hover,
.chapter-list button.active { background: rgba(255, 250, 240, 0.08); }
.chapter-list span,
.chapter-list small { display: block; }
.chapter-list span { color: #f1b48c; font-size: 10px; font-weight: 800; }
.chapter-list small { margin-top: 4px; overflow: hidden; color: rgba(255, 250, 240, 0.66); font-size: 10px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.abu-dock.is-thinking .abu-avatar { animation: abu-thinking 1.7s ease-in-out infinite; }
.narration-active { outline: 2px solid rgba(241, 180, 140, 0.82); outline-offset: 3px; }

/* Loading and failure */
.system-state {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 100vh;
  padding: 32px;
  overflow: hidden;
  text-align: center;
  background: var(--ivory) url("/assets/valley_sunrise.jpg") center / cover;
}
.system-state::before { content: ""; position: absolute; inset: 0; background: rgba(250, 248, 242, 0.8); }
.system-state > * { position: relative; }
.state-mark { width: 40px; height: 40px; border: 3px solid rgba(18, 62, 53, 0.18); border-top-color: var(--orange); border-radius: 50%; animation: spin 900ms linear infinite; }
.system-state p { margin: 21px 0 7px; color: var(--orange); font-size: 11px; font-weight: 800; }
.system-state h1 { max-width: 650px; margin: 0; font-family: var(--serif); font-size: 30px; line-height: 1.45; font-weight: 600; }
.system-state span { max-width: 540px; margin: 14px 0 25px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.system-state img { width: 145px; height: 145px; object-fit: contain; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes abu-thinking { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

@media (max-width: 1120px) {
  .world-hero {
    grid-template-columns: minmax(0, 1fr) 430px;
    padding-right: 36px;
    padding-left: 36px;
  }
  .life-tree {
    width: 430px;
    transform: scale(0.84);
    transform-origin: center;
  }
  .canvas-reading-grid,
  .temporal-toolbar {
    grid-template-columns: 1fr;
  }
  .canvas-boundary {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .canvas-boundary small {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .account-entry {
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  }

  .account-scene {
    padding: 28px 30px 40px;
  }

  .account-tool {
    padding: 38px;
  }

  .profile-manager {
    grid-template-columns: 1fr;
  }

  .profile-archive {
    border-right: 0;
  }

  .profile-editor {
    border-top: 1px solid var(--line);
  }

  .deepbeing-shell {
    display: block;
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .product-sidebar {
    display: none;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 64px;
    padding: 8px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.95);
    backdrop-filter: blur(16px);
  }

  .mobile-header > a,
  .mobile-header img {
    display: block;
    width: 34px;
    height: 34px;
  }

  .mobile-header img {
    object-fit: contain;
  }

  .mobile-header > strong {
    overflow: hidden;
    font-family: var(--serif);
    font-size: 16px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-header .case-select-label > span,
  .mobile-header .active-case i {
    display: none;
  }

  .mobile-header .active-case {
    max-width: 100px;
    font-size: 11px;
  }

  .mobile-header .case-select-label select {
    width: 104px;
    height: 34px;
    font-size: 11px;
  }

  .mobile-product-navigation {
    position: fixed;
    z-index: 85;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 4px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.97);
    backdrop-filter: blur(18px);
  }

  .product-navigation.is-mobile {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }

  .product-navigation.is-mobile button {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 56px;
    padding: 6px 4px;
    border: 0;
    border-top: 2px solid transparent;
    border-radius: 0;
    text-align: center;
  }

  .product-navigation.is-mobile button.active {
    border-top-color: var(--orange);
    background: transparent;
  }

  .product-navigation.is-mobile i {
    font-size: 9px;
  }

  .product-navigation.is-mobile strong {
    font-size: 11px;
  }

  .product-navigation.is-mobile small {
    display: none;
  }

  .world-hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding: 56px 36px 34px;
  }

  .world-copy {
    width: 100%;
    min-width: 0;
    max-width: 680px;
  }

  .world-copy h1 {
    font-size: 36px;
  }

  .life-tree {
    justify-self: center;
    margin-top: -24px;
    margin-bottom: -28px;
    transform: scale(0.8);
  }

  .world-ledger {
    padding-right: 36px;
    padding-left: 36px;
  }

  .workbench-header {
    top: 64px;
    padding-right: 28px;
    padding-left: 28px;
  }

  .experience-section,
  .opening-band,
  .narration-workspace {
    padding-right: 32px;
    padding-left: 32px;
  }

  .path-stage,
  .path-stage:has(.path-step:nth-of-type(4)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .path-arrow {
    display: none;
  }

  .boundary-grid {
    grid-template-columns: 1fr;
  }

  .boundary-item {
    min-height: 150px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 250, 240, 0.18);
  }

  .boundary-item strong {
    margin-top: 22px;
  }

  .lab-header,
  .lab-evidence-rail,
  .lab-canvas {
    padding-right: 32px;
    padding-left: 32px;
  }

  .abu-dock {
    left: max(10px, env(safe-area-inset-left));
    bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .abu-panel {
    width: min(420px, calc(100vw - 20px));
  }
}

@media (max-width: 620px) {
  .mobile-header {
    padding-right: 12px;
    padding-left: 12px;
  }

  .world-hero {
    padding: 38px 20px 8px;
    background-position: 62% center;
  }

  .world-copy {
    max-width: 100%;
  }

  .world-copy h1 {
    font-size: 28px;
    line-height: 1.5;
  }

  .world-copy > p:not(.section-kicker) {
    margin-top: 16px;
    font-size: 14px;
  }

  .world-actions {
    flex-wrap: wrap;
    margin-top: 22px;
  }

  .life-tree {
    width: 100%;
    max-width: 430px;
    height: 340px;
    margin-top: -12px;
    margin-bottom: -24px;
    transform: none;
  }

  .life-tree::before {
    top: 44px;
    height: 244px;
  }

  .tree-line {
    top: 118px;
    width: 32%;
    height: 60px;
  }

  .tree-line-left {
    left: 21%;
    transform: rotate(-12deg);
  }

  .tree-line-right {
    right: 21%;
    transform: rotate(12deg);
  }

  .tree-node {
    width: 38%;
    min-height: 96px;
    padding: 10px 12px;
  }

  .tree-node small {
    font-size: 17px;
  }

  .tree-node strong {
    font-size: 11px;
  }

  .tree-nature {
    top: 12px;
    left: 31%;
  }

  .tree-events {
    top: 140px;
    left: 0;
  }

  .tree-growth {
    top: 140px;
    right: 0;
  }

  .tree-trunk {
    top: 210px;
    left: calc(50% - 33px);
    width: 66px;
    height: 92px;
  }

  .tree-trunk i {
    left: 32px;
    height: 76px;
  }

  .life-tree img {
    left: calc(50% - 47px);
    width: 94px;
    height: 94px;
  }

  .world-ledger {
    padding: 44px 20px 82px;
  }

  .world-ledger h2 {
    font-size: 23px;
  }

  .world-ledger-flow {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .world-ledger-flow button {
    min-height: 130px;
    padding: 19px 8px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 250, 240, 0.18);
  }

  .world-ledger-flow button:last-child {
    border-bottom: 0;
  }

  .world-ledger-flow strong {
    margin-top: 18px;
    font-size: 16px;
    -webkit-line-clamp: 2;
  }

  .workbench-header {
    position: relative;
    top: auto;
    display: block;
    min-height: 124px;
    padding: 22px 18px 0;
  }

  .workbench-header > div:first-child {
    padding-bottom: 15px;
  }

  .workbench-header h1 {
    font-size: 22px;
  }

  .workbench-header > div > span {
    font-size: 10px;
  }

  .workspace-navigation {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .workspace-tabs {
    width: 100%;
    gap: 0;
  }

  .workspace-tabs button {
    flex: 1 0 84px;
    min-height: 46px;
    font-size: 12px;
  }

  .opening-band {
    min-height: 500px;
    padding: 30px 18px 38px;
  }

  .opening-copy {
    padding-top: 20px;
  }

  .opening-copy h1 {
    font-size: 27px;
    line-height: 1.5;
  }

  .opening-lede {
    margin-top: 14px;
    font-size: 12px;
  }

  .opening-actions {
    margin-top: 20px;
  }

  .scan-strip {
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .scan-item {
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .scan-item:last-child {
    border-bottom: 0;
  }

  .scan-item strong {
    font-size: 12px;
    -webkit-line-clamp: 1;
  }

  .experience-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .section-heading {
    grid-template-columns: minmax(0, 1fr) 38px;
    min-height: 118px;
    padding: 21px 0;
  }

  .section-heading strong {
    font-size: 21px;
  }

  .section-heading em {
    max-width: 88%;
    font-size: 10px;
  }

  .section-heading > b {
    width: 34px;
    height: 34px;
  }

  .section-body {
    padding: 30px 0 58px;
  }

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

  .pillar {
    min-height: 250px;
    padding: 12px 5px;
  }

  .pillar-label {
    font-size: 10px;
  }

  .pillar .stem,
  .pillar .branch {
    font-size: 35px;
  }

  .nature {
    font-size: 8px;
  }

  .hidden-stems {
    flex-wrap: wrap;
    gap: 4px;
    min-height: 44px;
    margin-top: 12px;
    padding-top: 9px;
  }

  .hidden-stems b { font-size: 13px; }
  .hidden-stems em { display: none; }

  .baseline-thesis {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .baseline-thesis strong {
    font-size: 17px;
  }

  .path-stage,
  .path-stage:has(.path-step:nth-of-type(4)) {
    grid-template-columns: 1fr;
  }

  .path-step {
    min-height: 170px;
  }

  .path-step small {
    margin-top: 22px;
  }

  .temporal-viewer {
    gap: 18px;
  }

  .temporal-toolbar {
    gap: 13px;
  }

  .stage-switch button {
    min-height: 58px;
    padding: 9px 7px;
  }

  .stage-switch span {
    font-size: 11px;
  }

  .six-pillar-scroll {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
    scroll-snap-type: x proximity;
  }

  .canonical-canvas-scene { min-width: 760px; scroll-snap-align: start; }

  .layer-caption { padding-left: 76px; }

  .canvas-lens-controls { align-items: stretch; flex-direction: column; gap: 9px; }
  .visibility-switch { align-self: flex-start; }

  .change-list {
    grid-template-columns: 1fr;
  }

  .change-group,
  .change-group:nth-child(even) {
    border-right: 0;
  }

  .canvas-inspector dl {
    grid-template-columns: 1fr;
  }

  .canvas-boundary {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .canvas-boundary small {
    grid-column: auto;
    white-space: normal;
  }

  .narration-workspace {
    min-height: auto;
    padding: 44px 18px 82px;
  }

  .narration-workspace h1 {
    font-size: 25px;
  }

  .narration-workspace li button {
    grid-template-columns: 30px minmax(0, 1fr) 16px;
    gap: 8px;
    min-height: 86px;
  }

  .narration-workspace li em {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .lab-header {
    display: block;
    min-height: 132px;
    padding: 28px 18px 20px;
  }

  .lab-header h1 {
    font-size: 24px;
  }

  .lab-header code {
    display: block;
    margin-top: 14px;
  }

  .lab-evidence-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 18px;
  }

  .lab-evidence-rail > span:nth-child(2) {
    border-right: 0;
  }

  .lab-evidence-rail > span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .lab-canvas {
    padding: 26px 16px 0;
  }

  .abu-dock {
    grid-template-columns: 62px minmax(0, calc(100vw - 92px));
  }

  .deepbeing-shell[data-product-area-current="workbench"] .abu-dock:not(.is-open),
  .deepbeing-shell[data-product-area-current="lab"] .abu-dock:not(.is-open) {
    grid-template-columns: 52px;
  }

  .abu-avatar {
    width: 62px;
    height: 62px;
  }

  .deepbeing-shell[data-product-area-current="workbench"] .abu-dock:not(.is-open) .abu-avatar,
  .deepbeing-shell[data-product-area-current="lab"] .abu-dock:not(.is-open) .abu-avatar {
    width: 52px;
    height: 52px;
  }

  .abu-bubble {
    max-width: calc(100vw - 92px);
    padding: 9px 11px;
  }

  .abu-panel {
    width: calc(100vw - 20px);
    max-height: 62vh;
  }
}

@media (max-width: 620px) {
  .account-entry {
    display: block;
  }

  .account-scene {
    min-height: 30vh;
    padding: 20px 22px 28px;
  }

  .account-scene > img {
    width: 150px;
    height: 50px;
  }

  .account-scene h1 {
    font-size: 30px;
  }

  .account-scene span {
    margin-top: 8px;
    font-size: 12px;
  }

  .account-tool {
    padding: 34px 22px 54px;
  }

  .account-tool h2 {
    font-size: 25px;
  }

  .profile-manager-header {
    min-height: 64px;
    padding: 6px 16px;
  }

  .profile-manager-header img {
    width: 132px;
    height: 44px;
  }

  .profile-manager-header > div span {
    display: none;
  }

  .profile-manager {
    display: block;
  }

  .profile-archive {
    padding: 34px 18px 44px;
    border-right: 0;
  }

  .profile-manager-title h1 {
    font-size: 28px;
  }

  .profile-actions {
    justify-content: space-between;
  }

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

  .profile-row-tools {
    display: grid;
    padding-right: 0;
  }

  .profile-row-tools button {
    min-height: 40px;
    padding: 0 6px;
    font-size: 10px;
  }

  .profile-editor {
    padding: 36px 18px 70px;
    border-top: 1px solid var(--line);
  }

  .profile-editor-idle {
    display: none;
  }

  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .profile-form footer {
    position: sticky;
    bottom: 0;
    padding: 12px 0;
    background: var(--paper);
  }

  .mobile-header-actions .active-case {
    display: none;
  }

  .cognition-progress {
    align-items: flex-start;
    margin-top: 34px;
  }

  .deterministic-canvas-skeleton > header {
    display: block;
  }

  .deterministic-canvas-skeleton > header strong {
    display: block;
    margin-top: 6px;
    font-size: 16px;
  }

  .skeleton-pillar-rail {
    margin-top: 20px;
  }

  .skeleton-pillar-rail article {
    min-height: 210px;
    padding: 16px 4px;
  }

  .skeleton-pillar-rail b {
    font-size: 36px;
  }

  .skeleton-pillar-rail em {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.dream-entry-command {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 253, 248, 0.56);
  border-radius: 4px;
  color: #fffdf8;
  background: rgba(18, 62, 53, 0.72);
  font-weight: 700;
  cursor: pointer;
}

.dream-entry-command:hover {
  background: var(--forest);
}

.dream-world,
.dream-state {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: #f9fbf7;
  background-color: #183c35;
  background-image: url("/assets/valley_sunrise.jpg");
  background-position: center;
  background-size: cover;
}

.dream-world::before,
.dream-state::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(7, 36, 32, 0.44);
  pointer-events: none;
}

.dream-world > *,
.dream-state > * {
  position: relative;
  z-index: 1;
}

.dream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 10px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(7, 36, 32, 0.44);
}

.dream-header img {
  width: 176px;
  height: 52px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.dream-header span {
  font-size: 11px;
  font-weight: 800;
}

.dream-copy {
  width: min(760px, calc(100% - 40px));
  margin: clamp(34px, 7vh, 78px) auto 0;
  text-align: center;
}

.dream-copy.compact {
  margin-top: 30px;
}

.dream-copy p,
.dream-mirror-heading p,
.dream-state > p {
  margin: 0 0 10px;
  color: #f0c38f;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.dream-copy h1,
.dream-state h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4.8vw, 62px);
  font-weight: 600;
}

.dream-copy > span,
.dream-state > span {
  display: block;
  max-width: 680px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.8;
}

.dream-tree-grove {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 250px));
  justify-content: center;
  gap: clamp(18px, 4vw, 54px);
  width: min(940px, calc(100% - 40px));
  margin: clamp(28px, 5vh, 54px) auto 0;
}

.dream-tree-card {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 330px;
  padding: 0 10px 18px;
  border: 0;
  color: #fffdf8;
  background: transparent;
  cursor: pointer;
  isolation: isolate;
}

.dream-source-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  max-width: calc(100% - 54px);
  padding: 5px 7px;
  border: 1px solid rgba(242, 248, 237, 0.22);
  background: rgba(8, 35, 31, 0.42);
  color: rgba(245, 250, 241, 0.86);
  font-size: 10px;
  font-style: normal;
  line-height: 1.25;
}

.dream-tree-card::after {
  position: absolute;
  right: 12%;
  bottom: 10px;
  left: 12%;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  content: "";
  filter: blur(10px);
  z-index: -1;
}

.dream-tree-card .dream-tree-crown,
.dream-single-tree .dream-tree-crown {
  position: relative;
  display: block;
  width: 176px;
  height: 172px;
}

.dream-tree-crown i {
  position: absolute;
  display: block;
  width: 94px;
  height: 105px;
  border: 1px solid rgba(236, 250, 230, 0.38);
  border-radius: 46% 54% 45% 55%;
  background: rgba(56, 111, 75, 0.84);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.12);
}

.dream-tree-crown i:nth-child(1) { left: 9px; top: 52px; transform: rotate(-18deg); }
.dream-tree-crown i:nth-child(2) { left: 42px; top: 8px; transform: rotate(4deg); }
.dream-tree-crown i:nth-child(3) { right: 8px; top: 54px; transform: rotate(17deg); }
.dream-tree-crown i:nth-child(4) { left: 47px; top: 70px; transform: rotate(-3deg); }
.dream-tree-crown i:nth-child(5) { left: 66px; top: 35px; width: 74px; height: 84px; }

.dream-tree-card.element-fire .dream-tree-crown i,
.dream-tree-observation.element-fire .dream-tree-crown i { background: rgba(156, 88, 60, 0.86); }
.dream-tree-card.element-earth .dream-tree-crown i,
.dream-tree-observation.element-earth .dream-tree-crown i { background: rgba(130, 104, 62, 0.88); }
.dream-tree-card.element-metal .dream-tree-crown i,
.dream-tree-observation.element-metal .dream-tree-crown i { background: rgba(85, 111, 113, 0.88); }
.dream-tree-card.element-water .dream-tree-crown i,
.dream-tree-observation.element-water .dream-tree-crown i { background: rgba(44, 95, 117, 0.88); }

.dream-tree-card .dream-tree-trunk,
.dream-single-tree .dream-tree-trunk {
  position: relative;
  display: block;
  width: 36px;
  height: 100px;
  margin-top: -36px;
  border-radius: 16px 8px 3px 3px;
  background: #695440;
  box-shadow: inset -9px 0 rgba(37, 31, 26, 0.2);
}

.dream-tree-card .dream-tree-trunk i {
  position: absolute;
  top: 6px;
  left: 17px;
  width: 72px;
  height: 12px;
  background: #695440;
  transform: rotate(-47deg);
  transform-origin: left center;
}

.dream-tree-card strong {
  position: absolute;
  top: 12px;
  left: 12px;
  color: rgba(255, 255, 255, 0.64);
  font-family: var(--serif);
  font-size: 12px;
}

.dream-tree-card small {
  display: block;
  min-height: 38px;
  margin-top: 12px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.36);
  font-size: 12px;
  font-weight: 700;
}

.dream-tree-card:hover .dream-tree-crown,
.dream-tree-card:focus-visible .dream-tree-crown {
  transform: translateY(-8px);
}

.dream-tree-card .dream-tree-crown {
  transition: transform 220ms ease;
}

.dream-abu-guide,
.dream-abu-observer {
  position: absolute;
  z-index: 3;
  object-fit: contain;
  object-position: center bottom;
}

.dream-abu-guide {
  right: clamp(14px, 4vw, 64px);
  bottom: 16px;
  width: clamp(120px, 14vw, 220px);
  max-height: 220px;
}

.dream-single-tree {
  position: relative;
  width: min(620px, calc(100% - 36px));
  min-height: 420px;
  margin: 10px auto 0;
  display: grid;
  justify-items: center;
  align-content: center;
}

.dream-single-tree .dream-tree-crown {
  width: 280px;
  height: 240px;
  transform: scale(1.35);
  transform-origin: center bottom;
}

.dream-single-tree .dream-tree-trunk {
  width: 54px;
  height: 150px;
  margin-top: -54px;
}

.dream-tree-roots {
  position: relative;
  width: 250px;
  height: 38px;
  margin-top: -12px;
}

.dream-tree-roots i {
  position: absolute;
  top: 0;
  left: 50%;
  width: 128px;
  height: 2px;
  background: rgba(236, 214, 173, 0.72);
  transform-origin: left center;
}

.dream-tree-roots i:nth-child(1) { transform: rotate(12deg); }
.dream-tree-roots i:nth-child(2) { transform: rotate(168deg); }
.dream-tree-roots i:nth-child(3) { transform: rotate(192deg); }

.dream-single-tree p {
  margin: 20px 0 0;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(7, 36, 32, 0.46);
  font-size: 13px;
}

.dream-tree-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 20px 36px;
}

.dream-command,
.dream-tree-actions a {
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 4px;
  color: #fffdf8;
  background: rgba(18, 62, 53, 0.82);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.dream-tree-actions a {
  border-color: transparent;
  background: transparent;
}

.dream-abu-observer {
  right: 20px;
  bottom: 0;
  width: clamp(150px, 18vw, 250px);
  max-height: 260px;
}

.dream-mirror-world {
  min-height: 100svh;
  overflow: visible;
  padding-bottom: 40px;
}

.dream-mirror-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  width: min(1440px, calc(100% - 48px));
  margin: 30px auto 18px;
}

.dream-mirror-heading h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 42px);
}

.dream-mirror-heading button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 4px;
  color: #fff;
  background: rgba(7, 36, 32, 0.58);
  cursor: pointer;
}

.dream-mirror-surface {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 18px 46px rgba(0, 20, 17, 0.3);
}

.dream-state {
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 32px;
  text-align: center;
}

.dream-state img {
  width: 190px;
  max-height: 220px;
  margin-bottom: 24px;
  object-fit: contain;
}

.dream-mist-mark {
  width: 70px;
  height: 28px;
  margin-bottom: 28px;
  border-top: 2px solid rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  animation: dream-mist 1.8s ease-in-out infinite alternate;
}

.dream-state .dream-command {
  margin-top: 26px;
}

@keyframes dream-mist {
  from { transform: translateX(-10px); opacity: 0.5; }
  to { transform: translateX(10px); opacity: 1; }
}

@media (max-width: 720px) {
  .dream-consent-control {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .dream-header {
    min-height: 62px;
    padding: 8px 14px;
  }

  .dream-header img {
    width: 132px;
    height: 42px;
  }

  .dream-header span {
    max-width: 118px;
    text-align: right;
  }

  .dream-copy {
    width: calc(100% - 28px);
    margin-top: 28px;
  }

  .dream-copy h1 {
    font-size: 27px;
    line-height: 1.25;
  }

  .dream-copy > span {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.65;
  }

  .dream-tree-grove {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    width: calc(100% - 14px);
    margin-top: 14px;
  }

  .dream-tree-card {
    min-height: 290px;
    padding-inline: 0;
  }

  .dream-tree-card .dream-tree-crown {
    width: 104px;
    height: 142px;
    transform: scale(0.72);
    transform-origin: center bottom;
  }

  .dream-tree-card:hover .dream-tree-crown,
  .dream-tree-card:focus-visible .dream-tree-crown {
    transform: scale(0.72) translateY(-5px);
  }

  .dream-tree-card .dream-tree-trunk {
    width: 25px;
    height: 84px;
    margin-top: -46px;
  }

  .dream-tree-card small {
    width: 100%;
    padding: 8px 2px;
    font-size: 10px;
  }

  .dream-source-badge {
    top: 7px;
    right: 5px;
    left: 5px;
    max-width: none;
    padding: 4px 2px;
    font-size: 8px;
    text-align: center;
  }

  .dream-abu-guide {
    right: 4px;
    bottom: 0;
    width: 108px;
    max-height: 130px;
  }

  .dream-single-tree {
    min-height: 350px;
  }

  .dream-single-tree .dream-tree-crown {
    transform: scale(1.05);
  }

  .dream-abu-observer {
    right: -14px;
    width: 150px;
    max-height: 180px;
  }

  .dream-tree-actions {
    justify-content: flex-start;
    padding-right: 120px;
  }

  .dream-mirror-heading,
  .dream-mirror-surface {
    width: calc(100% - 20px);
  }

  .dream-mirror-heading {
    align-items: flex-start;
    margin-top: 20px;
  }

  .dream-mirror-heading h1 {
    font-size: 25px;
  }

  .dream-mirror-surface .temporal-viewer {
    padding: 12px 10px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .dream-fog,
  .dream-first-visit[data-phase="fog_wait"] .dream-fog,
  .dream-first-visit[data-phase="fog_crossing"] .dream-fog,
  .dream-first-visit[data-phase="self_recognition"] .dream-fog {
    transform: none !important;
    transition-property: opacity, filter !important;
    transition-duration: 900ms !important;
  }
}

/* DREAM-ENCOUNTER-VISUAL-QA-REBUILD-02
   Director-reference video transitions + one fixed diegetic question tree. */
html:has(.dream-game-layer.is-tree-world),
body:has(.dream-game-layer.is-tree-world) {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.dream-game-layer.is-tree-world {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: block;
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #102f28;
  backdrop-filter: none;
}

.dream-game-layer.is-tree-world .dream-tree-world-shell {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #153c32;
}

.dream-first-visit.is-tree-world-active .dream-abu,
.dream-first-visit.is-tree-world-active .dream-abu-shadow {
  display: none !important;
}

.dream-director-transition {
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow: hidden;
  background: #163a31;
  pointer-events: none;
}

.dream-director-transition video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.dream-director-transition.is-flower-open img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.dream-director-transition.is-flower-open picture {
  position: absolute;
  inset: 0;
}

.dream-director-flower-before {
  animation: dream-director-flower-before 1.45s ease-in both;
}

.dream-director-flower-after {
  animation: dream-director-flower-after 1.45s ease-out both;
}

.dream-director-transition.is-fog-intro::after,
.dream-director-transition.is-tree-enter::after,
.dream-director-transition.is-flower-open::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(242, 242, 218, 0.06), transparent 40%),
    linear-gradient(0deg, rgba(7, 31, 25, 0.28), transparent 38%);
  pointer-events: none;
}

.dream-director-transition.is-fruit-forming video {
  opacity: 0.28;
  filter: grayscale(1) saturate(0) brightness(1.34) blur(1.2px);
}

.dream-director-transition:is(.is-flower-open, .is-fruit-forming) {
  background: transparent;
}

.dream-director-local-bloom {
  position: absolute;
  top: 26%;
  left: 78%;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 237, 177, 0.66), rgba(241, 210, 151, 0.18) 44%, transparent 70%);
  filter: blur(0.6px);
  animation: dream-director-local-bloom 1.45s ease-out both;
}

.dream-director-fruit-mask {
  position: absolute;
  top: 32%;
  left: 78%;
  width: 90px;
  height: 96px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(244, 246, 232, 0.78), rgba(227, 234, 221, 0.44) 27%, transparent 68%);
  filter: blur(1px);
  animation: dream-director-local-bloom 1.45s ease-out both;
}

.dream-tree-porch-camera {
  position: absolute;
  inset: 0;
  overflow: hidden;
  outline: 0;
  touch-action: pan-y;
  user-select: none;
}

.dream-tree-porch-panorama,
.dream-tree-porch-targets {
  position: absolute;
  inset: -4%;
  transform: translateX(calc((1 - var(--porch-active-index)) * 7% + var(--porch-drag-x, 0px)));
  transition: transform 760ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.dream-tree-porch-panorama img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
  transform: scale(1.08);
}

.dream-tree-porch-abu {
  position: absolute;
  bottom: -10px;
  left: -72px;
  z-index: 12;
  width: clamp(300px, 27vw, 390px);
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(0 10px 16px rgba(9, 35, 28, 0.2));
}

.dream-tree-porch-abu video,
.dream-tree-porch-abu img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dream-tree-porch-abu img {
  display: none;
}

.dream-tree-porch-mist {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(222, 229, 213, 0.27), transparent 25% 75%, rgba(218, 226, 210, 0.26)),
    radial-gradient(ellipse at 50% 50%, transparent 28%, rgba(14, 48, 40, 0.22) 88%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.dream-tree-porch-tree {
  position: absolute;
  top: 12%;
  left: var(--tree-source-x);
  width: clamp(180px, 25vw, 370px);
  height: 74%;
  padding: 0;
  opacity: 1;
  border: 0;
  background: transparent;
  filter: none;
  transform: translateX(-50%);
  cursor: pointer;
}

.dream-tree-porch-tree > span {
  position: absolute;
  right: 15%;
  bottom: 4%;
  left: 15%;
  height: 17%;
  border-bottom: 2px solid transparent;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 280ms ease, border-color 280ms ease, filter 280ms ease;
}

.dream-tree-porch-tree:is(:hover, :focus-visible, .is-active) > span {
  opacity: 0.72;
  border-color: rgba(234, 226, 191, 0.66);
  filter: drop-shadow(0 0 10px rgba(223, 222, 176, 0.44));
}

.dream-tree-porch-tree:focus-visible {
  outline: 2px solid rgba(250, 241, 209, 0.82);
  outline-offset: -2px;
}

.dream-tree-porch-turn {
  position: absolute;
  top: 50%;
  z-index: 14;
  display: grid;
  place-items: center;
  width: 48px;
  height: 64px;
  padding: 0;
  color: rgba(248, 242, 218, 0.82);
  border: 0;
  background: rgba(10, 42, 34, 0.12);
  font: 300 44px/1 var(--serif);
  transform: translateY(-50%);
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.dream-tree-porch-turn.is-previous {
  left: max(8px, env(safe-area-inset-left));
}

.dream-tree-porch-turn.is-next {
  right: max(8px, env(safe-area-inset-right));
}

.dream-tree-porch-identity {
  top: max(66px, calc(env(safe-area-inset-top) + 50px));
  padding: 0;
  text-shadow: 0 2px 12px rgba(4, 29, 24, 0.58);
}

.dream-tree-porch-command {
  right: max(22px, 7vw);
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 14px));
}

.dream-tree-porch-command button {
  min-width: 152px;
  min-height: 50px;
  border-radius: 3px;
}

.dream-tree-porch-departure {
  top: max(56px, calc(env(safe-area-inset-top) + 40px));
}

.dream-tree-world-shell.is-question-map {
  background: #163d33;
}

.dream-tree-world-shell.is-question-map > .dream-tree-world-banner {
  top: max(64px, calc(env(safe-area-inset-top) + 58px));
}

.dream-tree-world-header {
  min-height: 58px;
  background: linear-gradient(180deg, rgba(8, 38, 31, 0.76), rgba(8, 38, 31, 0.16));
  border-bottom-color: rgba(243, 235, 206, 0.1);
}

.dream-question-tree-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #173e34;
  isolation: isolate;
}

.dream-question-tree-stage > picture {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #173e34;
}

.dream-question-tree-master {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  filter: saturate(0.9) brightness(0.82);
  transform: none;
}

.dream-question-tree-breath,
.dream-question-tree-mist {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.dream-question-tree-breath {
  background:
    radial-gradient(ellipse at 52% 35%, rgba(240, 231, 177, 0.15), transparent 33%),
    linear-gradient(0deg, rgba(6, 29, 24, 0.54), transparent 43%);
  animation: dream-question-tree-breathe 8s ease-in-out infinite alternate;
}

.dream-question-tree-mist {
  opacity: 0.34;
  background:
    linear-gradient(90deg, rgba(210, 223, 207, 0.19), transparent 29% 73%, rgba(213, 223, 210, 0.12)),
    radial-gradient(ellipse at 50% 87%, rgba(222, 229, 214, 0.12), transparent 49%);
  animation: dream-question-tree-mist 12s ease-in-out infinite alternate;
}

.dream-question-tree-nodes {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.dream-question-tree-node {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  color: transparent;
  border: 0;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
}

.dream-question-tree-node i {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.72;
  filter: drop-shadow(0 0 6px rgba(236, 214, 153, 0.18));
  transition: opacity 260ms ease, filter 260ms ease, transform 260ms ease;
}

.dream-question-tree-node.is-leaf-structure {
  top: 25%;
  left: 33%;
  width: 76px;
  height: 58px;
  transform: rotate(-17deg);
}

.dream-question-tree-node.is-leaf-support {
  top: 20%;
  left: 69%;
  width: 76px;
  height: 58px;
  transform: rotate(14deg);
}

.dream-question-tree-node:is(.is-leaf-structure, .is-leaf-support) i {
  border: 1px solid rgba(231, 222, 166, 0.68);
  border-radius: 74% 10% 72% 14%;
  background:
    linear-gradient(34deg, transparent 47%, rgba(246, 232, 178, 0.54) 48% 50%, transparent 51%),
    radial-gradient(circle at 72% 26%, rgba(250, 241, 193, 0.62) 0 4px, transparent 5px),
    linear-gradient(140deg, rgba(226, 217, 165, 0.34), rgba(105, 143, 102, 0.28));
  box-shadow: inset 0 0 14px rgba(218, 224, 163, 0.12);
}

.dream-question-tree-node:is(.is-leaf-structure, .is-leaf-support) {
  z-index: 3;
}

.dream-question-tree-node.is-branch-path {
  z-index: 1;
  top: 37%;
  left: 39%;
  width: min(35vw, 440px);
  height: 82px;
  transform: rotate(-5deg);
}

.dream-question-tree-node.is-branch-path i {
  height: 38px;
  border-top: 3px solid rgba(225, 197, 139, 0.7);
  border-radius: 50%;
  box-shadow: 0 -4px 14px rgba(225, 197, 132, 0.28);
}

.dream-question-tree-node.is-problem-flower {
  z-index: 4;
  top: 26%;
  left: 78%;
  width: 72px;
  height: 72px;
}

.dream-question-tree-node.is-problem-flower i {
  border: 1px solid rgba(236, 221, 183, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 17%, rgba(245, 210, 190, 0.7) 0 17%, transparent 18%),
    radial-gradient(ellipse at 82% 43%, rgba(239, 196, 178, 0.64) 0 17%, transparent 18%),
    radial-gradient(ellipse at 69% 77%, rgba(241, 206, 180, 0.62) 0 17%, transparent 18%),
    radial-gradient(ellipse at 30% 77%, rgba(241, 206, 180, 0.62) 0 17%, transparent 18%),
    radial-gradient(ellipse at 18% 43%, rgba(239, 196, 178, 0.64) 0 17%, transparent 18%),
    radial-gradient(circle at 50% 50%, rgba(241, 218, 158, 0.8) 0 14%, rgba(213, 178, 119, 0.38) 15% 22%, transparent 23%);
}

.dream-question-tree-node.is-problem-flower.is-locked i {
  border-color: rgba(225, 213, 166, 0.18);
  border-radius: 62% 38% 58% 42%;
  background:
    radial-gradient(ellipse at 50% 39%, rgba(222, 171, 154, 0.8) 0 17%, transparent 19%),
    radial-gradient(ellipse at 38% 59%, rgba(173, 193, 132, 0.7) 0 25%, transparent 27%),
    radial-gradient(ellipse at 65% 62%, rgba(127, 163, 112, 0.66) 0 25%, transparent 27%),
    radial-gradient(circle at 50% 50%, rgba(232, 218, 174, 0.24), transparent 62%);
}

.dream-question-tree-node:is(:hover, :focus-visible, .is-active) i {
  opacity: 1;
  filter: drop-shadow(0 0 11px rgba(246, 221, 155, 0.64));
  transform: scale(1.05);
}

.dream-question-tree-node.is-passed i {
  opacity: 0.86;
  filter: drop-shadow(0 0 5px rgba(221, 209, 155, 0.42));
}

.dream-question-tree-node.is-locked i {
  opacity: 0.27;
  filter: grayscale(0.7);
}

.dream-question-tree-node.is-branch-path.is-locked i {
  opacity: 0.42;
}

.dream-question-tree-node.is-problem-flower.is-locked i {
  opacity: 0.76;
  filter: saturate(0.9) drop-shadow(0 0 6px rgba(225, 205, 151, 0.26));
}

.dream-question-tree-node.is-active i {
  animation: dream-question-node-pulse 2.8s ease-in-out infinite;
}

.dream-question-tree-fruit {
  position: absolute;
  top: 33%;
  left: 79%;
  z-index: 9;
  width: 54px;
  height: 62px;
  pointer-events: none;
  animation: dream-fog-fruit-form 1.5s ease-out both;
}

.dream-question-tree-fruit i {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(248, 246, 229, 0.7);
  border-radius: 48% 52% 54% 46%;
  background:
    radial-gradient(circle at 34% 25%, rgba(255, 255, 249, 0.92) 0 8%, transparent 9%),
    radial-gradient(ellipse at 48% 52%, rgba(235, 239, 227, 0.94), rgba(199, 211, 199, 0.84) 68%, rgba(164, 183, 172, 0.72));
  box-shadow: 0 0 22px rgba(228, 237, 222, 0.46), inset -7px -8px 13px rgba(96, 127, 112, 0.18);
}

.dream-question-tree-fruit i::before {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 3px;
  height: 14px;
  content: "";
  border-radius: 3px;
  background: rgba(164, 153, 116, 0.82);
  transform: rotate(12deg);
  transform-origin: bottom center;
}

.dream-question-band {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px));
  left: clamp(118px, 18vw, 260px);
  z-index: 30;
  max-width: 720px;
  min-height: 148px;
  max-height: 29%;
  margin-inline: auto;
  overflow: hidden;
  color: rgba(251, 246, 229, 0.96);
  border: 1px solid rgba(232, 219, 178, 0.24);
  border-radius: 5px;
  background: rgba(11, 49, 40, 0.82);
  box-shadow: 0 18px 48px rgba(3, 25, 20, 0.34);
  backdrop-filter: blur(16px) saturate(0.9);
}

.dream-question-band > section,
.dream-question-band > form {
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 7px 14px;
  overflow: hidden;
  border: 0;
}

.dream-question-close {
  position: absolute;
  top: 7px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: rgba(244, 235, 210, 0.74);
  border: 0;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.dream-tree-node-question,
.dream-game-question-stage,
.dream-game-judgment,
.dream-game-seal-confirmation,
.dream-game-sealed-fruit {
  position: relative;
  display: grid;
  align-content: center;
  gap: 3px;
}

.dream-tree-node-question > small,
.dream-game-question-copy > small,
.dream-game-judgment header > small,
.dream-game-seal-confirmation > small,
.dream-game-sealed-fruit > small {
  color: rgba(231, 220, 185, 0.66);
  font-size: 11px;
}

.dream-tree-node-question h2,
.dream-game-question-copy h2,
.dream-game-judgment h2,
.dream-game-seal-confirmation h2,
.dream-game-sealed-fruit h2 {
  max-width: 92%;
  margin: 0;
  color: rgba(255, 249, 230, 0.98);
  font-family: var(--serif);
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 500;
  line-height: 1.32;
}

.dream-tree-node-question p,
.dream-game-question-copy p,
.dream-game-sealed-fruit p {
  margin: 0;
  color: rgba(233, 230, 210, 0.72);
  font-size: 12px;
  line-height: 1.45;
}

.dream-tree-question-options,
.dream-game-judgment fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
}

.dream-tree-question-options button,
.dream-game-judgment fieldset > label {
  min-width: 0;
  min-height: 30px;
  margin: 0;
  padding: 7px 10px;
  color: rgba(249, 244, 226, 0.9);
  border: 1px solid rgba(224, 215, 181, 0.22);
  border-radius: 3px;
  background: rgba(232, 229, 205, 0.07);
  font-size: 12px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.dream-tree-question-options button:is(:hover, :focus-visible, .is-selected),
.dream-game-judgment fieldset > label:has(input:checked) {
  border-color: rgba(239, 221, 164, 0.6);
  background: rgba(231, 218, 176, 0.16);
}

.dream-tree-question-feedback {
  color: rgba(246, 220, 167, 0.9) !important;
}

.dream-tree-observe-lens {
  justify-self: start;
  min-height: 22px;
  padding: 0;
  color: rgba(237, 227, 196, 0.76);
  border: 0;
  border-bottom: 1px solid rgba(237, 227, 196, 0.32);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.dream-question-band .dream-game-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 2px 0 0;
}

.dream-question-band .dream-game-actions button,
.dream-game-review-petals button {
  min-height: 38px;
  padding: 7px 13px;
  color: #173e34;
  border: 1px solid rgba(246, 234, 199, 0.72);
  border-radius: 3px;
  background: rgba(243, 235, 209, 0.92);
  font-weight: 700;
  cursor: pointer;
}

.dream-question-band .dream-game-actions button.secondary,
.dream-game-review-petals button {
  color: rgba(247, 239, 217, 0.86);
  background: rgba(234, 226, 199, 0.08);
}

.dream-game-question-stage {
  grid-template-columns: minmax(0, 1fr);
}

.dream-game-question-stage:has(.dream-game-divination) {
  grid-template-areas:
    "copy divination"
    "actions divination";
  grid-template-columns: minmax(0, 1fr) 184px;
  grid-template-rows: minmax(0, 1fr) auto;
  column-gap: 14px;
}

.dream-game-question-stage:has(.dream-game-divination) > .dream-game-question-copy {
  grid-area: copy;
}

.dream-game-question-stage:has(.dream-game-divination) > .dream-game-actions {
  grid-area: actions;
}

.dream-game-question-stage > .dream-game-actions,
.dream-game-divination {
  grid-column: auto;
}

.dream-game-inline-confirm {
  padding: 7px 9px;
  color: rgba(250, 242, 219, 0.88);
  border-left-color: rgba(232, 200, 132, 0.72);
  background: rgba(225, 211, 172, 0.1);
  font-size: 11px;
}

.dream-game-divination {
  position: static;
  grid-area: divination;
  align-self: stretch;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 0;
  background: rgba(6, 32, 27, 0.68);
}

.dream-game-divination ol {
  gap: 1px;
}

.dream-game-divination li {
  font-size: 9px;
}

.dream-game-judgment {
  gap: 8px;
}

.dream-game-judgment header {
  padding-right: 20px;
}

.dream-game-judgment legend {
  color: rgba(239, 230, 202, 0.72);
  font-size: 11px;
}

.dream-game-judgment input[type="radio"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0 7px 0 0;
  accent-color: #d3bd7d;
}

.dream-game-judgment > label {
  display: grid;
  gap: 5px;
  color: rgba(241, 234, 211, 0.82);
  font-size: 11px;
}

.dream-game-judgment textarea {
  min-height: 56px;
  max-height: 74px;
  resize: none;
  padding: 7px 9px;
  color: rgba(253, 248, 232, 0.95);
  border-color: rgba(230, 218, 180, 0.22);
  background: rgba(239, 235, 216, 0.08);
  font-size: 12px;
  line-height: 1.38;
}

.dream-game-confidence {
  display: grid;
  gap: 3px;
}

.dream-game-hypothesis-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 5px 0;
  border: 0;
}

.dream-game-hypothesis-summary strong {
  flex: 1 1 100%;
  color: rgba(238, 224, 185, 0.76);
  font-size: 11px;
}

.dream-game-hypothesis-summary i,
.dream-game-hypothesis-summary span {
  padding: 3px 6px;
  color: rgba(243, 234, 205, 0.8);
  border: 1px dashed rgba(229, 207, 151, 0.34);
  font-size: 10px;
  font-style: normal;
}

.dream-game-seal-confirmation dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 3px 8px;
  margin: 0;
  color: rgba(239, 233, 213, 0.74);
  font-size: 11px;
}

.dream-game-seal-confirmation {
  grid-template-areas:
    "eyebrow confidence"
    "choice choice"
    "hypothesis counter"
    "petals actions";
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-content: stretch;
}

.dream-game-seal-confirmation > small {
  grid-area: eyebrow;
}

.dream-game-seal-confirmation > h2 {
  grid-area: choice;
  max-width: 100%;
  font-size: 20px;
}

.dream-game-seal-confirmation > p {
  grid-area: confidence;
  justify-self: end;
  margin: 0;
  color: rgba(244, 231, 193, 0.82);
  font-size: 11px;
}

.dream-game-seal-confirmation > .dream-game-hypothesis-summary {
  grid-area: hypothesis;
  align-content: start;
  min-height: 0;
  padding: 0;
}

.dream-game-seal-confirmation > dl {
  grid-area: counter;
  align-content: start;
  min-height: 0;
}

.dream-game-seal-confirmation dd {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dream-game-seal-confirmation .dream-game-hypothesis-summary span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dream-game-review-petals {
  grid-area: petals;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dream-game-seal-confirmation > .dream-game-actions {
  grid-area: actions;
  align-self: end;
}

.dream-game-review-petals button {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 10px;
}

.dream-game-sealed-fruit {
  min-height: 0;
  text-align: left;
  justify-items: start;
}

.dream-tree-lens-overlay {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  color: #173e34;
  background: rgba(235, 239, 225, 0.96);
  backdrop-filter: blur(14px);
}

.dream-tree-lens-overlay > header {
  z-index: 2;
}

.dream-tree-lens-canvas {
  min-height: 0;
  overflow: auto;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.dream-tree-reveal {
  position: absolute;
  top: auto;
  right: clamp(18px, 5vw, 72px);
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px));
  left: clamp(118px, 18vw, 260px);
  z-index: 32;
  display: flex;
  flex-direction: column;
  width: auto;
  max-width: 760px;
  max-height: 58%;
  margin-inline: auto;
  padding: 16px;
  overflow: hidden;
  color: rgba(249, 245, 229, 0.94);
  border: 1px solid rgba(230, 218, 179, 0.24);
  border-radius: 5px;
  background: rgba(10, 46, 38, 0.88);
  backdrop-filter: blur(16px);
}

.dream-tree-reveal > header {
  padding: 0 0 8px;
}

.dream-tree-reveal > header h2 {
  display: -webkit-box;
  margin: 2px 0;
  overflow: hidden;
  color: rgba(250, 246, 231, 0.96);
  font-size: 17px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dream-tree-reveal-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.dream-tree-reveal-act {
  display: grid;
  align-content: center;
  gap: 5px;
  height: auto;
  padding: 4px 0;
  overflow: hidden;
  border-top: 1px solid rgba(235, 226, 198, 0.26);
  border-bottom: 1px solid rgba(235, 226, 198, 0.26);
  color: rgba(241, 235, 215, 0.82);
  font-size: 12px;
}

.dream-tree-reveal-act strong {
  margin: 2px 0;
  color: rgba(251, 245, 224, 0.98);
  font-size: 22px;
}

.dream-tree-reveal-act p {
  display: -webkit-box;
  margin: 3px 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.dream-tree-reveal-act dl {
  margin: 5px 0 0;
}

.dream-tree-reveal-act dd {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dream-tree-reveal-act ul {
  display: grid;
  gap: 3px;
  margin: 4px 0 0;
  padding-left: 18px;
}

.dream-tree-reveal-act li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dream-tree-reveal-progress {
  display: flex;
  gap: 5px;
  margin-top: 7px;
}

.dream-tree-reveal-progress span {
  width: 18px;
  height: 3px;
  overflow: hidden;
  color: transparent;
  background: rgba(235, 224, 189, 0.2);
}

.dream-tree-reveal-progress span[aria-current="step"] {
  background: rgba(236, 216, 157, 0.72);
}

.dream-tree-reveal > .dream-game-actions {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

.dream-game-status {
  position: fixed;
  right: 16px;
  bottom: 8px;
  z-index: 95;
  max-width: min(520px, calc(100% - 32px));
  padding: 7px 10px;
  color: rgba(250, 238, 207, 0.9);
  border: 0;
  border-radius: 3px;
  background: rgba(83, 54, 37, 0.82);
  font-size: 11px;
}

@keyframes dream-question-tree-breathe {
  from { opacity: 0.72; }
  to { opacity: 1; }
}

@keyframes dream-question-tree-mist {
  from { transform: translateX(-1.2%); opacity: 0.25; }
  to { transform: translateX(1.2%); opacity: 0.42; }
}

@keyframes dream-question-node-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes dream-fog-fruit-form {
  from { opacity: 0; transform: translateY(8px) scale(0.78); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes dream-director-flower-before {
  0%, 34% { opacity: 1; transform: scale(1.01); }
  100% { opacity: 0; transform: scale(1.018); }
}

@keyframes dream-director-flower-after {
  0%, 24% { opacity: 0; filter: blur(3px); transform: scale(1.018); }
  100% { opacity: 1; filter: blur(0); transform: scale(1.01); }
}

@keyframes dream-director-local-bloom {
  0% { opacity: 0; transform: scale(0.68); }
  42% { opacity: 0.92; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.2); }
}

@media (max-width: 720px) {
  .dream-tree-world-banner {
    top: max(6px, env(safe-area-inset-top));
    max-width: calc(100% - 94px);
    padding: 4px 7px;
    font-size: 9px;
  }

  .dream-tree-porch-panorama,
  .dream-tree-porch-targets {
    inset: -2% -54%;
    transform: translateX(calc((1 - var(--porch-active-index)) * 12% + var(--porch-drag-x, 0px)));
  }

  .dream-tree-porch-panorama img {
    object-position: center 53%;
    transform: scale(1.04);
  }

  .dream-tree-porch-abu {
    bottom: 4px;
    left: -64px;
    width: 250px;
  }

  .dream-tree-porch-tree {
    top: 8%;
    width: 30%;
    height: 78%;
  }

  .dream-tree-porch-turn {
    width: 42px;
    height: 58px;
    font-size: 38px;
  }

  .dream-tree-porch-identity {
    top: max(58px, calc(env(safe-area-inset-top) + 44px));
  }

  .dream-tree-porch-identity strong {
    font-size: 24px;
  }

  .dream-tree-porch-command {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(14px, calc(env(safe-area-inset-bottom) + 8px));
  }

  .dream-tree-porch-command button {
    min-width: 136px;
    min-height: 48px;
  }

  .dream-tree-porch-departure {
    top: auto;
    right: auto;
    bottom: max(12px, calc(env(safe-area-inset-bottom) + 6px));
    left: max(10px, env(safe-area-inset-left));
    justify-items: start;
  }

  .dream-tree-world-header {
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 52px;
    padding: max(4px, env(safe-area-inset-top)) 9px 4px;
  }

  .dream-tree-world-header > span {
    display: none;
  }

  .dream-tree-world-shell.is-question-map > .dream-tree-world-banner {
    top: max(53px, calc(env(safe-area-inset-top) + 49px));
  }

  .dream-question-tree-master {
    object-position: 50% 50%;
    transform: none;
  }

  .dream-question-tree-node.is-leaf-structure {
    top: 17%;
    left: 18%;
  }

  .dream-question-tree-node.is-leaf-support {
    top: 14%;
    right: 11%;
    left: auto;
  }

  .dream-question-tree-node.is-branch-path {
    top: 31%;
    left: 4%;
    width: 58%;
    transform: rotate(8deg);
  }

  .dream-question-tree-node.is-problem-flower {
    top: 25%;
    left: 10%;
  }

  .dream-question-tree-fruit {
    top: 31%;
    left: 15%;
  }

  .dream-director-local-bloom {
    top: 25%;
    left: 10%;
  }

  .dream-director-fruit-mask {
    top: 31%;
    left: 14%;
  }

  .dream-question-band,
  .dream-tree-reveal {
    right: 8px;
    bottom: max(8px, calc(env(safe-area-inset-bottom) + 4px));
    left: max(104px, 27%);
    width: auto;
    max-width: none;
    min-height: 0;
    max-height: 29%;
    margin: 0;
  }

  .dream-question-band:has(.dream-game-seal-confirmation) {
    left: 8px;
  }

  .dream-question-band > section,
  .dream-question-band > form {
    padding: 10px 12px;
  }

  .dream-tree-node-question {
    gap: 6px;
  }

  .dream-tree-question-options button,
  .dream-game-judgment fieldset > label {
    min-height: 44px;
  }

  .dream-tree-node-question h2,
  .dream-game-question-copy h2,
  .dream-game-judgment h2,
  .dream-game-seal-confirmation h2,
  .dream-game-sealed-fruit h2 {
    font-size: 16px;
  }

  .dream-game-question-stage:has(.dream-game-divination) {
    grid-template-columns: minmax(0, 1fr) 98px;
    column-gap: 6px;
  }

  .dream-game-divination {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 3px;
    padding: 4px;
  }

  .dream-game-divination header small {
    display: none;
  }

  .dream-tree-question-options,
  .dream-game-judgment fieldset {
    gap: 5px;
  }

  .dream-tree-question-options button,
  .dream-game-judgment fieldset > label {
    min-height: 38px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .dream-tree-observe-lens {
    min-height: 28px;
  }

  .dream-game-seal-confirmation {
    gap: 2px 8px;
  }

  .dream-game-seal-confirmation > h2 {
    font-size: 15px;
  }

  .dream-game-seal-confirmation dl {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 2px 5px;
    font-size: 9px;
  }

  .dream-game-seal-confirmation .dream-game-hypothesis-summary strong,
  .dream-game-seal-confirmation .dream-game-hypothesis-summary span {
    font-size: 9px;
  }

  .dream-game-seal-confirmation .dream-game-actions button,
  .dream-game-review-petals button {
    min-height: 30px;
    padding: 4px 7px;
    font-size: 9px;
  }

  .dream-game-judgment textarea {
    min-height: 46px;
    max-height: 55px;
  }

  .dream-game-divination {
    display: none;
  }

  .dream-tree-reveal {
    max-height: 58%;
  }

  .dream-tree-lens-overlay .canvas-scene-shell {
    min-width: 680px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dream-tree-porch-abu video {
    display: none;
  }

  .dream-tree-porch-abu img {
    display: block;
  }

  .dream-director-transition video {
    display: none;
  }

  .dream-director-transition.is-flower-open img {
    animation: none !important;
  }

  .dream-director-transition.is-flower-open .dream-director-flower-before {
    display: none;
  }

  .dream-director-transition {
    opacity: 0;
    background: rgba(219, 226, 209, 0.32);
  }

  .dream-director-local-bloom,
  .dream-director-fruit-mask,
  .dream-question-tree-master,
  .dream-question-tree-breath,
  .dream-question-tree-mist,
  .dream-question-tree-node.is-active i,
  .dream-question-tree-fruit {
    animation: none !important;
    transform: none;
  }
}

/* ABU-DREAM-RUNTIME-FOUNDATION-05
   The home portal and ghost orbit are one continuous story surface. */
.dream-home-life-tree {
  width: min(520px, 42vw);
  height: auto;
  aspect-ratio: 1 / 1;
  overflow: visible;
  isolation: isolate;
}

.dream-home-life-tree::before {
  display: none;
}

.dream-home-life-tree::after {
  position: absolute;
  z-index: 1;
  inset: 2%;
  content: "";
  background:
    radial-gradient(circle at 50% 77%, rgba(230, 221, 177, 0.26), transparent 21%),
    radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(248, 246, 236, 0.42) 82%, transparent);
  pointer-events: none;
}

.dream-home-life-tree .dream-home-tree-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  left: 0;
  bottom: auto;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.88) contrast(0.94);
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 51%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 72% at 50% 51%, #000 58%, transparent 100%);
}

.dream-home-canopy-light {
  position: absolute;
  z-index: 2;
  top: 16%;
  left: 50%;
  width: 44%;
  height: 38%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 225, 157, 0.22), transparent 68%);
  transform: translateX(-50%);
  pointer-events: none;
  animation: dream-home-canopy-breathe 6.8s ease-in-out infinite alternate;
}

.dream-home-tree-mark {
  position: absolute;
  z-index: 4;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  max-width: 156px;
  padding: 6px 8px;
  color: #173d34;
  border: 0;
  background: rgba(247, 244, 228, 0.62);
  box-shadow: 0 8px 22px rgba(15, 51, 42, 0.1);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(7px);
}

.dream-home-tree-mark small {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #f5edcf;
  background: rgba(24, 65, 54, 0.84);
  font-family: var(--serif);
  font-size: 12px;
}

.dream-home-tree-mark strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 10px;
  line-height: 1.4;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dream-home-tree-mark:is(:hover, :focus-visible) {
  outline: 2px solid rgba(190, 112, 73, 0.72);
  outline-offset: 2px;
}

.dream-home-tree-mark.is-chart {
  top: 23%;
  left: 24%;
}

.dream-home-tree-mark.is-path {
  top: 42%;
  right: 12%;
}

.dream-home-tree-mark.is-person {
  top: 57%;
  left: 12%;
}

.dream-home-abu-portal,
.dream-home-abu-resting {
  position: absolute;
  z-index: 6;
  right: 26%;
  bottom: 6%;
  width: 29%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 10px 12px rgba(15, 45, 37, 0.2));
}

.dream-home-abu-portal {
  cursor: pointer;
}

.dream-home-abu-portal > img,
.dream-home-abu-portal > video,
.dream-home-abu-resting > img {
  position: absolute;
  z-index: 1;
  inset: 0;
  left: 0;
  bottom: auto;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
}

.dream-home-root-call {
  position: absolute;
  z-index: 0;
  right: 3%;
  bottom: 7%;
  left: 3%;
  height: 28%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(231, 211, 143, 0.48), transparent 70%);
  opacity: 0.48;
  animation: dream-home-root-call 2.8s ease-in-out infinite;
}

.dream-home-abu-portal:is(:hover, :focus-visible) {
  outline: 2px solid rgba(190, 112, 73, 0.74);
  outline-offset: 4px;
}

.dream-home-seed-landing {
  position: absolute;
  z-index: 7;
  right: 43%;
  bottom: 19%;
  width: 12px;
  height: 18px;
  border-radius: 64% 36% 58% 42%;
  background: #d9c47e;
  box-shadow: 0 0 18px rgba(232, 213, 146, 0.88);
  transform: rotate(24deg);
  animation: dream-home-seed-land 1.4s cubic-bezier(0.2, 0.76, 0.22, 1) both;
}

.dream-tree-porch-panorama,
.dream-tree-porch-targets {
  transform: translateX(calc(var(--porch-shift, 0%) + var(--porch-drag-x, 0px)));
  transition-duration: 920ms;
}

.dream-tree-porch-panorama::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(ellipse at 50% 70%, transparent 18%, rgba(12, 43, 35, 0.08) 54%, rgba(8, 32, 27, 0.38) 100%),
    linear-gradient(180deg, rgba(236, 235, 207, 0.05), transparent 42%, rgba(8, 37, 30, 0.2));
  pointer-events: none;
}

.dream-ghost-orbit-veil {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 31%;
  background: linear-gradient(90deg, rgba(15, 49, 40, 0.62), rgba(210, 221, 207, 0.18), transparent);
  filter: blur(0.4px);
  pointer-events: none;
}

.dream-ghost-orbit-veil.is-left {
  left: 0;
}

.dream-ghost-orbit-veil.is-right {
  right: 0;
  transform: scaleX(-1);
}

.dream-tree-porch-tree {
  transition: opacity 520ms ease, filter 520ms ease;
}

.dream-tree-porch-tree.is-ghost {
  opacity: 0.72;
  filter: saturate(0.62) brightness(0.85) blur(0.25px);
}

.dream-tree-porch-tree.is-dream-heart {
  opacity: 1;
  filter: none;
}

.dream-tree-porch-tree > span {
  right: 11%;
  bottom: 3%;
  left: 11%;
  height: 20%;
  border: 0;
  background: radial-gradient(ellipse, rgba(230, 220, 174, 0.5), transparent 70%);
}

.dream-tree-porch-tree:is(:hover, :focus-visible, .is-active) > span {
  opacity: 0.52;
  border-color: transparent;
}

.dream-ghost-orbit-whisper {
  position: absolute;
  z-index: 16;
  right: 22%;
  bottom: 12%;
  left: 22%;
  min-height: 24px;
  margin: 0;
  color: rgba(249, 242, 216, 0.9);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  text-shadow: 0 2px 12px rgba(5, 29, 24, 0.76);
  pointer-events: none;
}

.dream-tree-porch-departure {
  overflow: visible;
  width: 88px;
  height: 58px;
  padding: 0;
  border: 0;
  background: transparent;
}

.dream-tree-porch-departure span {
  display: block;
  width: 88px;
  height: 58px;
  border: 0;
  background:
    radial-gradient(ellipse at 58% 58%, rgba(221, 230, 215, 0.4), transparent 58%),
    linear-gradient(138deg, transparent 22%, rgba(221, 229, 213, 0.26), transparent 76%);
  filter: blur(1px);
}

.dream-tree-porch-departure b {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes dream-home-canopy-breathe {
  from { opacity: 0.44; transform: translateX(-50%) scale(0.98); }
  to { opacity: 0.76; transform: translateX(-50%) scale(1.04); }
}

@keyframes dream-home-root-call {
  0%, 100% { opacity: 0.24; transform: scale(0.92); }
  50% { opacity: 0.58; transform: scale(1.06); }
}

@keyframes dream-home-seed-land {
  0% { opacity: 0; transform: translateY(-62px) rotate(4deg); }
  68% { opacity: 1; transform: translateY(2px) rotate(27deg); }
  100% { opacity: 1; transform: translateY(0) rotate(24deg); }
}

@media (max-width: 900px) {
  .dream-home-life-tree {
    width: min(520px, 88vw);
  }
}

@media (max-width: 620px) {
  .dream-home-life-tree {
    width: 100%;
    max-width: 430px;
    height: auto;
    margin: 4px auto -8px;
  }

  .dream-home-tree-mark {
    grid-template-columns: 20px minmax(0, 1fr);
    max-width: 132px;
    padding: 5px 6px;
  }

  .dream-home-tree-mark strong {
    font-size: 9px;
  }

  .dream-home-tree-mark.is-chart {
    top: 20%;
    left: 17%;
  }

  .dream-home-tree-mark.is-path {
    top: 40%;
    right: 5%;
  }

  .dream-home-tree-mark.is-person {
    top: 57%;
    left: 5%;
  }

  .dream-home-abu-portal,
  .dream-home-abu-resting {
    right: 22%;
    bottom: 4%;
    width: 34%;
  }

  .dream-tree-porch-abu {
    left: -70px;
    width: 250px;
  }

  .dream-ghost-orbit-whisper {
    right: 13%;
    bottom: 14%;
    left: 34%;
    font-size: 13px;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dream-home-canopy-light,
  .dream-home-root-call,
  .dream-home-seed-landing {
    animation: none;
  }

  .dream-tree-porch-panorama,
  .dream-tree-porch-targets {
    transition-duration: 180ms;
  }
}

/* Ghost Orbit V2: the grove is stable; three tree actors orbit the dream-heart. */
.dream-tree-porch-panorama,
.dream-tree-porch-targets {
  inset: 0;
  transform: none;
}

.dream-tree-porch-panorama {
  z-index: 0;
}

.dream-tree-porch-panorama img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--grove-focus, 50%) 54%;
  transform: none;
  transition: object-position 900ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.dream-tree-porch-targets {
  z-index: 5;
  pointer-events: none;
}

.dream-tree-porch-tree {
  top: 2%;
  left: var(--tree-stage-x);
  width: clamp(280px, 34vw, 500px);
  height: 88%;
  opacity: 1;
  filter: none;
  transform: translateX(-50%) translateY(0) scale(1);
  transform-origin: 50% 92%;
  transition:
    left 900ms cubic-bezier(0.2, 0.72, 0.2, 1),
    opacity 720ms ease,
    filter 720ms ease,
    transform 900ms cubic-bezier(0.2, 0.72, 0.2, 1);
  pointer-events: auto;
}

.dream-tree-porch-tree > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 22px rgba(7, 34, 27, 0.2));
  pointer-events: none;
}

.dream-tree-porch-tree.is-ghost {
  z-index: 1;
  opacity: 0.38;
  filter: saturate(0.5) brightness(0.82) blur(0.45px);
  transform: translateX(-50%) translateY(7%) scale(0.72);
}

.dream-tree-porch-tree.is-dream-heart {
  z-index: 3;
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.dream-tree-porch-tree > span {
  right: 14%;
  bottom: 0;
  left: 14%;
  height: 15%;
}

.dream-ghost-orbit-veil {
  z-index: 4;
  width: 25%;
  opacity: 0.72;
}

.dream-tree-porch-abu {
  bottom: -18px;
  left: -38px;
  z-index: 14;
  width: clamp(210px, 18vw, 278px);
}

@media (max-width: 620px) {
  .dream-tree-porch-tree {
    top: 5%;
    width: 72vw;
    height: 80%;
  }

  .dream-tree-porch-tree.is-ghost {
    opacity: 0.28;
    transform: translateX(-50%) translateY(9%) scale(0.68);
  }

  .dream-tree-porch-abu {
    bottom: -8px;
    left: -54px;
    width: 218px;
  }

  .dream-ghost-orbit-whisper {
    right: 8%;
    bottom: 10%;
    left: 36%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dream-tree-porch-panorama img,
  .dream-tree-porch-tree {
    transition-duration: 180ms;
  }
}

/* ABU_03 dream entry: the film hands off to the same full-scene tree porch. */
html.is-dream-entry-active,
html.is-dream-entry-active body {
  overflow: hidden;
}

.dream-entry-cinematic {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  background: #d9ddc4;
  pointer-events: none;
  opacity: 1;
  transition: opacity 680ms ease;
}

.dream-entry-cinematic > video,
.dream-entry-cinematic > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.dream-entry-cinematic-mist,
.dream-entry-cinematic-local-fog {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dream-entry-cinematic-mist {
  opacity: 0;
  background:
    radial-gradient(ellipse at 50% 72%, rgba(239, 243, 224, 0.24), transparent 50%),
    linear-gradient(90deg, rgba(226, 236, 219, 0.2), transparent 32% 68%, rgba(225, 234, 216, 0.18));
  transition: opacity 620ms ease;
}

.dream-entry-cinematic-local-fog {
  inset: auto auto -10% -12%;
  width: min(58vw, 760px);
  height: min(52vh, 520px);
  opacity: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 30% 66%, rgba(238, 243, 226, 0.94), rgba(224, 233, 218, 0.68) 33%, transparent 72%);
  filter: blur(16px);
  transform: translate3d(-8%, 5%, 0) scale(0.86);
  transition: opacity 240ms ease, transform 720ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.dream-entry-cinematic.is-handing-off {
  opacity: 0;
}

.dream-entry-cinematic.is-masking-abu .dream-entry-cinematic-mist,
.dream-entry-cinematic.is-masking-abu .dream-entry-cinematic-local-fog,
.dream-entry-cinematic.is-handing-off .dream-entry-cinematic-mist,
.dream-entry-cinematic.is-handing-off .dream-entry-cinematic-local-fog {
  opacity: 1;
}

.dream-entry-cinematic.is-masking-abu .dream-entry-cinematic-local-fog,
.dream-entry-cinematic.is-handing-off .dream-entry-cinematic-local-fog {
  transform: translate3d(5%, -2%, 0) scale(1.15);
}

.dream-tree-porch-abu,
.dream-tree-world-banner,
.dream-ghost-orbit-whisper,
.dream-tree-porch-departure {
  transition: opacity 360ms ease;
}

html.is-dream-entry-active .dream-tree-porch-abu,
html.is-dream-entry-active .dream-tree-world-banner,
html.is-dream-entry-active .dream-ghost-orbit-whisper,
html.is-dream-entry-active .dream-tree-porch-departure {
  opacity: 0 !important;
}

.dream-tree-porch-targets {
  inset: 0;
  overflow: hidden;
}

.dream-tree-porch-camera.is-orbiting-next .dream-tree-porch-mist {
  animation: dream-porch-mist-next 940ms ease both;
}

.dream-tree-porch-camera.is-orbiting-previous .dream-tree-porch-mist {
  animation: dream-porch-mist-previous 940ms ease both;
}

.dream-tree-porch-camera:is(.is-orbiting-next, .is-orbiting-previous) .dream-tree-porch-abu {
  transform: translateY(-2px) scale(1.01);
}

.dream-tree-porch-camera::after {
  position: absolute;
  inset: 0;
  z-index: 8;
  content: "";
  background:
    linear-gradient(90deg, rgba(225, 233, 218, 0.52), transparent 19% 81%, rgba(225, 233, 218, 0.52)),
    radial-gradient(ellipse at 50% 62%, transparent 42%, rgba(12, 43, 35, 0.18) 100%);
  pointer-events: none;
}

.dream-tree-porch-abu,
.dream-tree-porch-identity,
.dream-tree-porch-command,
.dream-tree-porch-departure,
.dream-ghost-orbit-whisper,
.dream-ghost-orbit-a11y {
  z-index: 14;
}

@media (max-width: 620px) {
  .dream-entry-cinematic > video,
  .dream-entry-cinematic > img {
    object-position: 63% center;
  }

  .dream-entry-cinematic-local-fog {
    width: 80vw;
    height: 38vh;
  }

}

@keyframes dream-porch-mist-next {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 1; }
  45% { transform: translate3d(-4%, 0, 0); opacity: 0.72; }
}

@keyframes dream-porch-mist-previous {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 1; }
  45% { transform: translate3d(4%, 0, 0); opacity: 0.72; }
}

@media (prefers-reduced-motion: reduce) {
  .dream-entry-cinematic {
    transition-duration: 220ms;
  }

  .dream-entry-cinematic-local-fog {
    transition-duration: 180ms;
    transform: none;
  }
}

/* Canonical porch V5: one immutable clean grove plus three independent alpha
   tree actors. Background plates and radial scene masks are forbidden here. */
.dream-tree-world-shell.is-layered-porch-v5 {
  background: #173f36;
}

.is-layered-porch-v5 .dream-tree-porch-panorama {
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.is-layered-porch-v5 .dream-tree-porch-backdrop {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
}

.is-layered-porch-v5 .dream-tree-porch-targets {
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
}

.is-layered-porch-v5 .dream-tree-porch-tree.is-porch-actor {
  --porch-actor-opacity: 0;
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  clip-path: none;
  opacity: 0;
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
  transform-origin: 50% 78%;
  transform: none;
  cursor: pointer;
  pointer-events: auto;
  transition:
    opacity 700ms ease,
    filter 700ms ease,
    transform 900ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.is-layered-porch-v5 .dream-tree-porch-tree.is-porch-actor > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter:
    drop-shadow(0 10px 8px rgba(11, 38, 29, 0.2))
    drop-shadow(0 18px 22px rgba(7, 34, 27, 0.12));
  transform: none;
  animation: none;
  transition: transform 900ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.is-layered-porch-v5 .dream-tree-porch-tree.is-porch-actor > span {
  position: absolute;
  right: 34%;
  bottom: 7.2%;
  left: 34%;
  display: block;
  height: 4.8%;
  border-radius: 50%;
  opacity: 0.62;
  background:
    radial-gradient(
      ellipse at center,
      rgba(20, 49, 35, 0.36) 0 18%,
      rgba(38, 66, 46, 0.22) 44%,
      transparent 74%
    );
  filter: blur(5px);
  mix-blend-mode: multiply;
  transform: scaleX(1.18);
  pointer-events: none;
}

.is-layered-porch-v5
  .dream-tree-porch-tree.is-porch-actor[data-orbit-slot="0"] {
  --porch-actor-opacity: 1;
  z-index: 4;
  opacity: 1;
  transform: translate3d(0, -4%, 0) scale(1);
}

.is-layered-porch-v5
  .dream-tree-porch-tree.is-porch-actor[data-orbit-slot="-1"] {
  --porch-actor-opacity: 0.76;
  z-index: 2;
  opacity: 0.76;
  filter: saturate(0.84) brightness(0.9) blur(0.35px);
  transform: translate3d(-30%, -8%, 0) scale(0.5);
}

.is-layered-porch-v5
  .dream-tree-porch-tree.is-porch-actor[data-orbit-slot="1"] {
  --porch-actor-opacity: 0.76;
  z-index: 2;
  opacity: 0.76;
  filter: saturate(0.84) brightness(0.9) blur(0.35px);
  transform: translate3d(34%, -6%, 0) scale(0.5);
}

.is-layered-porch-v5.is-entering
  .dream-tree-porch-tree.is-porch-actor,
.is-layered-porch-v5
  .dream-tree-porch-camera:is(.is-orbiting-next, .is-orbiting-previous)
  .dream-tree-porch-tree.is-porch-actor {
  animation: dream-porch-v5-actors-fade-in 900ms ease both !important;
}

.is-layered-porch-v5
  .dream-tree-porch-camera:is(.is-orbiting-next, .is-orbiting-previous)
  .dream-tree-porch-tree.is-porch-actor[data-orbit-from-slot] {
  transition:
    filter 700ms ease !important,
    transform 900ms cubic-bezier(0.2, 0.72, 0.2, 1) !important;
}

.is-layered-porch-v5
  .dream-tree-porch-camera:is(.is-orbiting-next, .is-orbiting-previous)
  .dream-tree-porch-tree.is-porch-actor[data-orbit-from-slot] > img {
  animation: none !important;
  transition: none !important;
}

@keyframes dream-porch-v5-actors-fade-in {
  0% {
    opacity: 0.04;
  }
  36% {
    opacity: 0.18;
  }
  100% {
    opacity: var(--porch-actor-opacity);
  }
}

@media (max-width: 620px) {
  .is-layered-porch-v5 .dream-tree-porch-backdrop {
    object-position: 63% center;
  }

  .is-layered-porch-v5
    .dream-tree-porch-tree.is-porch-actor[data-orbit-slot="0"] {
    transform: translate3d(0, -3%, 0) scale(0.92);
  }

  .is-layered-porch-v5
    .dream-tree-porch-tree.is-porch-actor[data-orbit-slot="-1"] {
    transform: translate3d(-43%, -5%, 0) scale(0.44);
  }

  .is-layered-porch-v5
    .dream-tree-porch-tree.is-porch-actor[data-orbit-slot="1"] {
    transform: translate3d(43%, -4%, 0) scale(0.44);
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-layered-porch-v5 .dream-tree-porch-tree.is-porch-actor {
    animation: none !important;
    transition-duration: 180ms !important;
  }
}

.dream-tree-world-shell.is-question-map {
  background: #183f34;
}

.dream-question-tree-master {
  object-position: center center;
  filter: saturate(1.02) brightness(0.92);
  transform: scale(1.015);
}

.dream-question-tree-breath {
  background:
    radial-gradient(ellipse at 59% 38%, rgba(248, 229, 158, 0.12), transparent 30%),
    linear-gradient(0deg, rgba(6, 29, 24, 0.34), transparent 39%);
}

.dream-question-tree-mist {
  opacity: 0.24;
  background:
    linear-gradient(90deg, rgba(218, 229, 213, 0.18), transparent 24% 78%, rgba(218, 228, 211, 0.12)),
    radial-gradient(ellipse at 54% 84%, rgba(232, 234, 211, 0.12), transparent 43%);
}

.dream-question-tree-root-life,
.dream-question-tree-canopy-life {
  position: absolute;
  z-index: 2;
  display: block;
  pointer-events: none;
}

.dream-question-tree-root-life {
  top: 70%;
  left: 51%;
  width: min(19vw, 260px);
  height: 16%;
  opacity: 0.32;
  transform: rotate(-2deg);
}

.dream-question-tree-root-life::before,
.dream-question-tree-root-life::after,
.dream-question-tree-root-life i,
.dream-question-tree-root-life b {
  position: absolute;
  content: "";
  border-radius: 50%;
  transform-origin: 14% 50%;
}

.dream-question-tree-root-life::before {
  inset: 18% 5% 42% 4%;
  border-bottom: 2px solid rgba(230, 202, 128, 0.38);
  transform: rotate(7deg);
}

.dream-question-tree-root-life::after {
  inset: 26% 8% 30% 9%;
  border-bottom: 2px solid rgba(219, 194, 121, 0.3);
  transform: rotate(-12deg);
}

.dream-question-tree-root-life i {
  inset: 8% 18% 49% 0;
  border-bottom: 1px solid rgba(235, 211, 146, 0.32);
  transform: rotate(17deg);
}

.dream-question-tree-root-life b {
  inset: 36% 0 12% 14%;
  border-bottom: 1px solid rgba(235, 211, 146, 0.26);
  transform: rotate(-4deg);
}

.dream-question-tree-canopy-life {
  top: 13%;
  left: 40%;
  width: 42%;
  height: 45%;
  opacity: 0.16;
  background: radial-gradient(ellipse, rgba(239, 222, 161, 0.32), transparent 66%);
  mix-blend-mode: screen;
  animation: dream-tree-canopy-breath 7s ease-in-out infinite alternate;
}

.dream-question-tree-abu {
  position: absolute;
  bottom: max(7px, env(safe-area-inset-bottom));
  left: clamp(10px, 2.4vw, 32px);
  z-index: 18;
  width: clamp(96px, 10vw, 144px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  pointer-events: none;
  filter: drop-shadow(0 10px 12px rgba(7, 28, 23, 0.28));
}

.dream-question-tree-abu video,
.dream-question-tree-abu img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dream-question-tree-node {
  border-radius: 50%;
  touch-action: manipulation;
}

.dream-question-tree-node i {
  position: relative;
  opacity: 0.88;
  border: 0;
  box-shadow: none;
}

.dream-question-tree-node.is-leaf-structure {
  top: 28%;
  left: 44%;
  width: 84px;
  height: 66px;
  transform: rotate(-13deg);
}

.dream-question-tree-node.is-leaf-structure i {
  width: 56px;
  height: 34px;
  border: 1px solid rgba(237, 224, 166, 0.46);
  border-radius: 86% 12% 82% 14%;
  background:
    linear-gradient(33deg, transparent 47%, rgba(246, 235, 186, 0.62) 48% 50%, transparent 51%),
    linear-gradient(140deg, rgba(220, 227, 153, 0.92), rgba(67, 131, 91, 0.88));
  box-shadow:
    -19px 13px 0 -7px rgba(126, 171, 105, 0.8),
    18px 9px 0 -8px rgba(182, 199, 118, 0.74);
}

.dream-question-tree-node.is-leaf-structure i::before {
  position: absolute;
  top: -8px;
  left: 35px;
  width: 31px;
  height: 20px;
  content: "";
  border-radius: 82% 12% 76% 14%;
  background: linear-gradient(145deg, rgba(205, 218, 135, 0.9), rgba(73, 132, 88, 0.78));
  transform: rotate(24deg);
}

.dream-question-tree-node.is-leaf-structure i::after {
  position: absolute;
  top: 5px;
  right: 9px;
  width: 6px;
  height: 8px;
  content: "";
  border-radius: 50% 50% 58% 58%;
  background: rgba(247, 246, 216, 0.84);
  box-shadow: 0 0 9px rgba(244, 234, 176, 0.68);
  transform: rotate(18deg);
}

.dream-question-tree-node.is-leaf-support {
  top: 52%;
  left: 67%;
  width: 82px;
  height: 64px;
  transform: rotate(17deg);
}

.dream-question-tree-node.is-leaf-support i {
  width: 54px;
  height: 33px;
  border: 1px solid rgba(207, 224, 170, 0.44);
  border-radius: 14% 84% 16% 82%;
  background:
    linear-gradient(146deg, transparent 47%, rgba(235, 237, 187, 0.58) 48% 50%, transparent 51%),
    linear-gradient(32deg, rgba(87, 142, 104, 0.88), rgba(190, 205, 129, 0.9));
  box-shadow:
    -16px 10px 0 -7px rgba(95, 151, 99, 0.74),
    16px 11px 0 -8px rgba(174, 195, 118, 0.7);
}

.dream-question-tree-node.is-leaf-support i::before,
.dream-question-tree-node.is-leaf-support i::after {
  position: absolute;
  content: "";
}

.dream-question-tree-node.is-leaf-support i::before {
  top: -9px;
  left: 28px;
  width: 30px;
  height: 19px;
  border-radius: 14% 82% 16% 78%;
  background: linear-gradient(34deg, rgba(83, 140, 97, 0.82), rgba(201, 212, 136, 0.9));
  transform: rotate(-22deg);
}

.dream-question-tree-node.is-leaf-support i::after {
  top: 5px;
  left: 10px;
  width: 6px;
  height: 8px;
  border-radius: 50% 50% 58% 58%;
  background: rgba(243, 246, 215, 0.8);
  box-shadow: 0 0 9px rgba(225, 231, 168, 0.62);
  transform: rotate(-15deg);
}

.dream-question-tree-node.is-branch-path {
  top: 38%;
  left: 54%;
  width: min(25vw, 360px);
  height: 118px;
  transform: rotate(-7deg);
}

.dream-question-tree-node.is-branch-path i {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(163deg, transparent 43%, rgba(245, 216, 144, 0.22) 44% 48%, rgba(188, 137, 79, 0.12) 49% 52%, transparent 53%);
  clip-path: polygon(0 62%, 20% 48%, 48% 37%, 77% 18%, 100% 8%, 100% 20%, 79% 30%, 50% 48%, 22% 58%, 0 73%);
  filter: drop-shadow(0 0 8px rgba(239, 210, 136, 0.32));
}

.dream-question-tree-node.is-branch-path i::after {
  position: absolute;
  top: 44%;
  left: 15%;
  width: 74%;
  height: 7px;
  content: "";
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(247, 225, 166, 0.62), transparent);
  transform: rotate(-16deg);
}

.dream-question-tree-node.is-problem-flower {
  top: 29%;
  left: 72%;
  width: 82px;
  height: 92px;
}

.dream-question-tree-node.is-problem-flower i {
  width: 64px;
  height: 82px;
  border: 0;
  border-radius: 0;
  background: none;
}

.dream-question-tree-node.is-problem-flower i::before {
  position: absolute;
  top: 37px;
  left: 31px;
  width: 3px;
  height: 42px;
  content: "";
  border-radius: 4px;
  background: linear-gradient(rgba(120, 159, 93, 0.78), rgba(68, 119, 72, 0.4));
  box-shadow: -7px 13px 0 -1px rgba(93, 140, 80, 0.5);
  transform: rotate(8deg);
  transform-origin: top center;
}

.dream-question-tree-node.is-problem-flower i::after {
  position: absolute;
  top: 14px;
  left: 18px;
  width: 34px;
  height: 38px;
  content: "";
  border: 1px solid rgba(242, 219, 181, 0.44);
  border-radius: 64% 38% 58% 42%;
  background:
    radial-gradient(ellipse at 50% 32%, rgba(226, 176, 161, 0.92) 0 35%, transparent 37%),
    radial-gradient(ellipse at 31% 66%, rgba(153, 183, 117, 0.88) 0 38%, transparent 40%),
    radial-gradient(ellipse at 70% 67%, rgba(112, 158, 102, 0.82) 0 38%, transparent 40%);
  filter: drop-shadow(0 0 7px rgba(236, 205, 158, 0.34));
  transform: rotate(-4deg);
  transition: width 500ms ease, height 500ms ease, transform 500ms ease, filter 500ms ease;
}

.dream-question-tree-node.is-problem-flower:not(.is-locked) i::after,
.dream-question-tree-node.is-problem-flower.is-passed i::after {
  top: 4px;
  left: 8px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 14%, rgba(248, 209, 193, 0.95) 0 18%, transparent 19%),
    radial-gradient(ellipse at 84% 42%, rgba(239, 186, 172, 0.9) 0 18%, transparent 19%),
    radial-gradient(ellipse at 70% 79%, rgba(242, 199, 174, 0.9) 0 18%, transparent 19%),
    radial-gradient(ellipse at 28% 79%, rgba(242, 199, 174, 0.9) 0 18%, transparent 19%),
    radial-gradient(ellipse at 16% 42%, rgba(239, 186, 172, 0.9) 0 18%, transparent 19%),
    radial-gradient(circle at 50% 50%, rgba(246, 221, 149, 0.98) 0 13%, rgba(196, 152, 92, 0.42) 14% 23%, transparent 24%);
  filter: drop-shadow(0 0 13px rgba(242, 210, 169, 0.58));
  transform: rotate(0);
}

.dream-question-tree-node:is(:hover, :focus-visible, .is-active) i {
  opacity: 1;
  filter: drop-shadow(0 0 12px rgba(247, 223, 159, 0.74));
}

.dream-question-tree-node.is-passed i {
  opacity: 0.82;
}

.dream-question-tree-node.is-locked {
  cursor: default;
}

.dream-question-tree-node.is-locked i {
  opacity: 0.32;
  filter: saturate(0.62);
}

.dream-question-tree-node.is-branch-path.is-locked i {
  opacity: 0.18;
}

.dream-question-tree-node.is-problem-flower.is-locked i {
  opacity: 0.66;
  border: 0;
  border-radius: 0;
  background: none;
  filter: saturate(0.78);
}

.dream-question-tree-stage.is-first-growth .dream-question-tree-node.is-leaf-structure {
  animation: dream-tree-leaf-unfurl 720ms 220ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.dream-question-tree-stage.is-first-growth .dream-question-tree-node.is-leaf-support {
  animation: dream-tree-leaf-support-unfurl 780ms 520ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.dream-question-tree-node.is-branch-path:not(.is-locked) i {
  animation: dream-tree-branch-awaken 850ms ease-out both;
}

.dream-question-tree-node.is-problem-flower:not(.is-locked) i::after {
  animation: dream-tree-flower-open 720ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.dream-question-tree-fruit,
.dream-director-fruit-mask {
  top: 37%;
  left: 74%;
}

.dream-director-local-bloom {
  top: 29%;
  left: 72%;
}

@keyframes dream-tree-canopy-breath {
  from { opacity: 0.1; transform: scale(0.98); }
  to { opacity: 0.2; transform: scale(1.025); }
}

@keyframes dream-tree-leaf-unfurl {
  from { opacity: 0; transform: rotate(-13deg) scale(0.38); filter: blur(3px); }
  to { opacity: 1; transform: rotate(-13deg) scale(1); filter: blur(0); }
}

@keyframes dream-tree-root-awaken {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0); }
}

@keyframes dream-tree-leaf-support-unfurl {
  from { opacity: 0; transform: rotate(17deg) scale(0.38); filter: blur(3px); }
  to { opacity: 1; transform: rotate(17deg) scale(1); filter: blur(0); }
}

@keyframes dream-tree-branch-awaken {
  from { opacity: 0.18; clip-path: inset(0 100% 0 0); }
  to { opacity: 0.88; clip-path: inset(0); }
}

@keyframes dream-tree-flower-open {
  from { opacity: 0.42; transform: rotate(-4deg) scale(0.64); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

@media (max-width: 720px) {
  .dream-question-tree-master {
    object-position: 57% center;
    transform: scale(1.02);
  }

  .dream-question-tree-canopy-life {
    top: 14%;
    left: 28%;
    width: 66%;
  }

  .dream-question-tree-root-life {
    top: 70%;
    left: 39%;
    width: 48%;
  }

  .dream-question-tree-abu {
    bottom: max(4px, env(safe-area-inset-bottom));
    left: 4px;
    width: 92px;
  }

  .dream-question-tree-node.is-leaf-structure {
    top: 25%;
    left: 39%;
    width: 76px;
    height: 62px;
  }

  .dream-question-tree-node.is-leaf-support {
    top: 53%;
    left: 65%;
    width: 74px;
    height: 60px;
  }

  .dream-question-tree-node.is-branch-path {
    top: 39%;
    left: 47%;
    width: 48%;
    height: 112px;
  }

  .dream-question-tree-node.is-problem-flower {
    top: 30%;
    left: 68%;
    width: 76px;
    height: 86px;
  }

  .dream-question-tree-fruit,
  .dream-director-fruit-mask {
    top: 38%;
    left: 72%;
  }

  .dream-director-local-bloom {
    top: 30%;
    left: 68%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dream-tree-porch-camera:is(.is-orbiting-next, .is-orbiting-previous)
    .dream-tree-porch-tree[data-orbit-from-slot],
  .dream-tree-porch-camera:is(.is-orbiting-next, .is-orbiting-previous)
    .dream-tree-porch-tree[data-orbit-from-slot] > img,
  .dream-question-tree-stage.is-first-growth .dream-question-tree-node,
  .dream-question-tree-node.is-branch-path:not(.is-locked) i,
  .dream-question-tree-node.is-problem-flower:not(.is-locked) i::after,
  .dream-question-tree-canopy-life {
    animation: none !important;
  }
}
