/* V8.3 responsive architecture overrides.
   Keeps the V8 material system while preserving six different spatial stories. */

:root {
  --v83-map-line: rgba(38, 185, 214, .72);
  --v83-map-glow: 0 0 16px rgba(53, 207, 229, .62);
}

/* STANDARD DESKTOP SPATIAL MAPS */
@media (min-width: 1180px) {
  .layout-host {
    inset: calc(var(--topbar-height) + 102px) 0 calc(var(--control-height) + 26px);
  }

  .holo-surface { transform: none; }
  .holo-surface:hover,
  .holo-surface:focus-visible { transform: translateY(-4px) scale(1.012); }

  .convergence-core { top: 51%; width: clamp(164px, 13vw, 176px); }
  .driver-node { width: clamp(154px, 13vw, 174px); }
  .driver-node-1 { left: 7%; top: 42%; }
  .driver-node-2 { left: 42.5%; top: -7%; }
  .driver-node-3 { right: 6%; top: 31%; }
  .pain-node { right: 18%; bottom: -20px; width: min(250px, 22vw); min-height: 110px; }
  .beam { top: 51%; }

  .community-core { top: 43%; width: 170px; }
  .orbit-line { top: 43%; width: min(600px, 49vw); height: min(300px, 45vh); }
  .orbit-node { width: clamp(146px, 12.5vw, 162px); height: clamp(146px, 12.5vw, 162px); min-height: 0; padding: 16px 14px; }
  .orbit-node .module-summary { -webkit-line-clamp: 1; }
  .orbit-node .module-tags i:nth-child(n+2) { display: none; }
  .orbit-node-1 { left: 7%; top: 13%; }
  .orbit-node-2 { right: 7%; top: 10%; }
  .orbit-node-3 { right: 10%; top: auto; bottom: 18%; }
  .orbit-node-4 { left: 10%; top: auto; bottom: 18%; }
  .data-strip { bottom: -5px; width: min(900px, 72vw); }

  .satellite-labels { top: 13%; }

  .steps-node { top: 10%; }
  .step-rail { top: 11%; height: 58%; }
  .role-entry { top: 10%; }
  .route-node { bottom: 12%; }
  .contact-terminal { bottom: 0; }
}

/* COMPACT TABLET + LAPTOP SPATIAL MAPS */
@media (min-width: 768px) and (max-width: 1179px) {
  :root { --topbar-height: 62px; }

  .topbar { grid-template-columns: 190px 1fr; padding: 7px 16px; }
  .system-state { display: none; }
  .chapter-nav { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .chapter-nav::-webkit-scrollbar { display: none; }

  .screen-heading { top: calc(var(--topbar-height) + 14px); }
  .layout-host {
    position: absolute;
    inset: calc(var(--topbar-height) + 104px) 0 calc(var(--control-height) + 24px);
    min-height: 0;
    padding: 0 clamp(18px, 3vw, 34px);
  }

  .chain-path,
  .convergence-field,
  .community-orbit,
  .network-map,
  .value-routes,
  .participation-path {
    position: relative;
    display: block;
    width: min(940px, 100%);
    height: 100%;
    min-height: 560px;
    margin: 0 auto;
  }

  .holo-surface {
    position: absolute;
    inset: auto;
    width: auto;
    min-height: 112px;
    padding: 17px 42px 15px 17px;
    border-radius: 36px 20px 36px 20px;
    transform: none;
  }
  .holo-surface:hover,
  .holo-surface:focus-visible { transform: translateY(-3px) scale(1.01); }
  .module-title { font-size: clamp(14px, 1.7vw, 18px); }
  .module-summary { font-size: 10px; }
  .module-tags i:nth-child(n+3) { display: none; }

  .chain-rail {
    left: 8%; right: 8%; top: 49%; width: auto; height: 3px;
    border: 0; border-radius: 0; transform: rotate(-8deg);
    background: linear-gradient(90deg, transparent, var(--v83-map-line) 12%, #fff 50%, var(--v83-map-line) 88%, transparent);
    box-shadow: var(--v83-map-glow);
  }
  .chain-node { width: clamp(150px, 22vw, 190px); aspect-ratio: 1; border-radius: 50%; text-align: center; }
  .chain-node .node-icon { margin: auto; }
  .chain-node .module-tags { justify-content: center; }
  .chain-node-1 { left: 1%; top: 48%; }
  .chain-node-2 { left: 26%; top: 9%; }
  .chain-node-3 { left: 51%; top: 47%; }
  .chain-node-4 { right: 1%; top: 10%; }

  .convergence-core,
  .community-core,
  .value-origin {
    position: absolute; display: grid; place-items: center; text-align: center;
    width: clamp(148px, 20vw, 174px); min-height: 0; aspect-ratio: 1;
    border: 1px solid rgba(196,244,250,.94); border-radius: 50%;
    background: radial-gradient(circle, #fff, rgba(129,225,239,.68), rgba(45,171,202,.18) 72%, transparent 73%);
    box-shadow: inset 0 0 28px #fff, 0 0 42px rgba(53,207,229,.38);
  }
  .convergence-core strong,
  .community-core strong,
  .value-origin strong { display: block; font-size: 21px; }
  .convergence-core span, .convergence-core small,
  .community-core span, .community-core small,
  .value-origin span { display: block; color: #247b96; font-size: 8px; }

  .convergence-core { left: 50%; top: 46%; transform: translate(-50%, -50%); }
  .beam { left: 50%; top: 46%; width: 34%; height: 2px; border: 0; background: linear-gradient(90deg, #fff, var(--v83-map-line), transparent); box-shadow: var(--v83-map-glow); }
  .beam-a { transform: rotate(205deg); }
  .beam-b { transform: rotate(270deg); }
  .beam-c { transform: rotate(337deg); }
  .driver-node { width: clamp(142px, 20vw, 168px); aspect-ratio: 1; border-radius: 50%; text-align: center; }
  .driver-node .node-icon { margin: auto; }
  .driver-node .module-tags { justify-content: center; }
  .driver-node-1 { left: 2%; top: 40%; }
  .driver-node-2 { left: 40%; top: -2%; }
  .driver-node-3 { right: 2%; top: 31%; }
  .pain-node { right: 20%; bottom: 0; width: min(300px, 38vw); min-height: 112px; border-radius: 68px; }

  .orbit-line {
    left: 50%; top: 43%; width: min(530px, 67vw); height: min(290px, 37vh);
    transform: translate(-50%, -50%) rotate(-4deg); border: 2px solid rgba(72,201,223,.55); border-radius: 50%; background: none;
  }
  .community-core { left: 50%; top: 42%; transform: translate(-50%, -50%); }
  .orbit-node { width: clamp(142px, 20vw, 164px); min-height: 140px; border-radius: 46% 54% 48% 52%; }
  .orbit-node-1 { left: 1%; top: 10%; }
  .orbit-node-2 { right: 1%; top: 8%; }
  .orbit-node-3 { right: 5%; top: auto; bottom: 18%; }
  .orbit-node-4 { left: 5%; top: auto; bottom: 18%; }
  .data-strip {
    position: absolute; left: 50%; bottom: 0; width: min(760px, 86vw); transform: translateX(-50%);
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 7px;
    border: 1px solid rgba(151,227,238,.78); border-radius: 999px; background: rgba(245,255,255,.79);
  }
  .data-point { padding: 6px; border-right: 1px solid rgba(66,171,198,.24); text-align: center; }
  .data-point:last-child { border-right: 0; }
  .data-point strong { display: block; font-size: 16px; }
  .data-point span { color: #2b6b82; font-size: 8px; }

  .network-lines { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: none; fill: none; stroke: rgba(64,190,217,.58); stroke-width: 2; }
  .hub-node { left: 36%; top: 24%; width: clamp(190px, 26vw, 225px); aspect-ratio: 1; border-radius: 50%; text-align: center; }
  .hub-node .node-icon { margin: auto; }
  .hub-node .module-tags { justify-content: center; }
  .satellite-node { right: 1%; top: 6%; width: 32%; min-height: 128px; }
  .access-node { left: 1%; bottom: 12%; width: 31%; min-height: 128px; }
  .expansion-node { right: 2%; bottom: 9%; width: 31%; min-height: 128px; }
  .satellite-labels { position: absolute; left: 1%; top: 5%; width: 30%; display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; }
  .satellite-labels span { padding: 7px; border: 1px solid rgba(91,198,219,.48); border-radius: 999px; background: rgba(248,255,255,.75); font-size: 8px; text-align: center; }

  .value-origin { left: 3%; top: 48%; transform: translateY(-50%); }
  .route-stack { position: absolute; left: 24%; right: 1%; top: 0; bottom: 0; display: grid; grid-template-rows: repeat(4,1fr); gap: 6px; }
  .value-route { position: relative; }
  .route-line { position: absolute; left: 0; right: 20%; top: 50%; width: auto; height: 2px; border: 0; background: linear-gradient(90deg, var(--v83-map-line), #fff, var(--v83-map-line)); box-shadow: var(--v83-map-glow); }
  .value-node { right: 0; top: 50%; width: min(470px, 68%); min-height: 104px; transform: translateY(-50%); display: grid; grid-template-columns: 40px 1fr; column-gap: 10px; padding: 13px 44px 13px 16px; }
  .value-node { height: 112px; grid-template-rows: auto auto auto; align-content: center; overflow: hidden; }
  .value-node .module-tags { display: none; }
  .value-node .module-summary { -webkit-line-clamp: 1; }
  .value-node:hover, .value-node:focus-visible { transform: translateY(calc(-50% - 3px)) scale(1.01); }

  .step-rail { left: 1%; top: 13%; width: 48%; height: 57%; display: flex; align-items: flex-end; gap: 6px; border: 0; background: none; }
  .step-rail span { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 90px; padding: 12px; border: 1px solid rgba(136,220,234,.72); border-radius: 22px 22px 6px 6px; background: linear-gradient(180deg, rgba(250,255,255,.8), rgba(151,229,240,.48)); text-align: center; }
  .step-rail span:nth-child(2) { min-height: 132px; }
  .step-rail span:nth-child(3) { min-height: 174px; }
  .steps-node { left: 2%; top: 3%; width: 34%; min-height: 132px; }
  .role-entry { position: absolute; right: 1%; top: 5%; width: 46%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .entry-node, .roles-node { position: relative; width: 100%; min-height: 160px; border-radius: 46% 54% 44% 56%; }
  .route-node { right: 1%; bottom: 12%; width: 46%; min-height: 126px; }
  .contact-terminal { position: absolute; left: 1%; bottom: 0; width: 46%; min-height: 60px; display: flex; align-items: center; gap: 10px; padding: 9px 11px 9px 15px; border: 1px solid rgba(123,211,227,.72); border-radius: 999px; background: rgba(249,255,255,.82); }
  .contact-terminal strong { margin-right: auto; }
  .contact-terminal a { margin-left: auto; }
  .logic-caption { bottom: 0; }
}

/* MOBILE SPATIAL MAPS */
@media (max-width: 767px) {
  :root { --topbar-height: 104px; --control-height: 62px; }

  .chapter-nav {
    mask-image: linear-gradient(90deg, #000 0%, #000 89%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 89%, transparent 100%);
  }

  .scene-shade,
  .home-shade {
    background:
      linear-gradient(180deg, rgba(229,251,255,.08) 0%, rgba(228,250,254,.22) 27%, rgba(230,250,254,.54) 66%, rgba(235,252,255,.76) 100%);
  }

  .screen-heading { padding-top: calc(var(--topbar-height) + 12px); }
  .layout-host { position: relative; inset: auto; padding: 8px 8px 78px; }

  .chain-path,
  .convergence-field,
  .community-orbit,
  .network-map,
  .value-routes,
  .participation-path {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    perspective: 900px;
    transform-style: preserve-3d;
  }
  .chain-path { min-height: 650px; }
  .convergence-field { min-height: 650px; }
  .community-orbit { min-height: 760px; }
  .network-map { min-height: 735px; }
  .value-routes { min-height: 700px; }
  .participation-path { min-height: 770px; }

  .holo-surface {
    position: absolute;
    inset: auto;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 13px 34px 12px 13px;
    border-radius: 34px 18px 34px 18px;
    background: radial-gradient(circle at 28% 18%, rgba(255,255,255,.97), rgba(223,250,253,.82) 42%, rgba(118,220,236,.55) 75%, rgba(48,164,198,.20));
    box-shadow: inset 0 0 24px #fff, 0 14px 34px rgba(3,83,137,.17), 0 0 24px rgba(53,207,229,.25);
    transform: translateZ(0);
  }
  .holo-surface:nth-of-type(even) { border-radius: 18px 38px 18px 38px; }
  .holo-surface:hover,
  .holo-surface:focus-visible { transform: translateZ(8px) scale(1.015); }
  .node-ring { inset: -5px; }
  .node-icon { width: 31px; height: 31px; float: none; margin: 0 0 5px; }
  .node-icon svg { width: 18px; height: 18px; }
  .module-index { margin-top: 0; font-size: 7px; }
  .module-title { margin-top: 3px; font-size: 13.5px; line-height: 1.16; }
  .module-summary { margin-top: 4px; font-size: 9.5px; line-height: 1.32; -webkit-line-clamp: 2; }
  .module-tags { margin-top: 6px; gap: 3px; }
  .module-tags i { padding: 2px 5px; font-size: 7px; }
  .module-tags i:nth-child(n+3) { display: none; }
  .module-action { top: 10px; right: 10px; width: 23px; height: 23px; font-size: 11px; }
  .logic-caption { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); max-width: 92%; padding: 7px 12px; white-space: normal; text-align: center; }

  /* 01 · diagonal industrial chain */
  .chain-rail {
    position: absolute; left: 8%; top: 48%; width: 84%; height: 3px; bottom: auto;
    transform: rotate(-52deg); transform-origin: center;
    border: 0; background: linear-gradient(90deg, transparent, var(--v83-map-line), #fff, var(--v83-map-line), transparent);
    box-shadow: var(--v83-map-glow);
  }
  .chain-path .chain-node {
    width: 42%; aspect-ratio: 1; border-radius: 50%; padding: 15px 13px; text-align: center;
    margin-left: 0;
  }
  .chain-node .node-icon { margin: 0 auto 5px; }
  .chain-node .module-tags { justify-content: center; }
  .chain-node .module-summary { -webkit-line-clamp: 1; }
  .chain-node-1 { left: 1%; top: 2%; transform: translateZ(10px); }
  .chain-node-2 { right: 1%; top: 18%; transform: translateZ(26px); }
  .chain-node-3 { left: 3%; top: 44%; transform: translateZ(18px); }
  .chain-node-4 { right: 1%; top: 61%; transform: translateZ(34px); }

  /* 02 · three drivers converge to one landing window */
  .convergence-core,
  .community-core,
  .value-origin {
    position: absolute; display: grid; place-items: center; text-align: center;
    width: 142px; min-height: 0; aspect-ratio: 1; padding: 14px;
    border: 1px solid rgba(196,244,250,.94); border-radius: 50%;
    background: radial-gradient(circle, #fff, rgba(129,225,239,.68), rgba(45,171,202,.18) 72%, transparent 73%);
    box-shadow: inset 0 0 28px #fff, 0 0 42px rgba(53,207,229,.42);
  }
  .convergence-core strong,
  .community-core strong,
  .value-origin strong { display: block; margin: 4px 0; font-size: 19px; }
  .convergence-core span, .convergence-core small,
  .community-core span, .community-core small,
  .value-origin span { display: block; color: #247b96; font-size: 7.5px; }
  .convergence-core { left: 50%; top: 188px; width: 138px; transform: translateX(-50%) translateZ(36px); }
  .convergence-field .driver-node { width: 31%; aspect-ratio: 1; border-radius: 50%; text-align: center; padding: 13px 9px; margin-left: 0; }
  .driver-node .node-icon { margin: 0 auto 4px; }
  .driver-node .module-tags { justify-content: center; }
  .driver-node .module-summary { -webkit-line-clamp: 1; }
  .driver-node-1 { left: 0; top: 220px; transform: translateZ(12px); }
  .driver-node-2 { left: 31%; top: 0; transform: translateZ(22px); }
  .driver-node-3 { right: 0; top: 220px; transform: translateZ(16px); }
  .beam { position: absolute; left: 50%; top: 255px; width: 42%; height: 2px; bottom: auto; border: 0; background: linear-gradient(90deg, #fff, var(--v83-map-line), transparent); box-shadow: var(--v83-map-glow); transform-origin: left center; }
  .beam-a { transform: rotate(194deg); }
  .beam-b { transform: rotate(270deg); }
  .beam-c { transform: rotate(346deg); }
  .convergence-field .pain-node { left: 7%; right: 7%; bottom: 26px; width: auto; min-height: 112px; margin-left: 0; border-radius: 62px 24px 62px 24px; transform: translateZ(20px); }

  /* 03 · community operating orbit */
  .orbit-line {
    position: absolute; left: 50%; top: 235px; width: 83%; height: 385px; bottom: auto;
    transform: translateX(-50%) rotate(-5deg); border: 2px solid rgba(72,201,223,.58); border-radius: 50%;
    background: transparent; box-shadow: inset 0 0 22px rgba(53,207,229,.20), 0 0 18px rgba(53,207,229,.24);
  }
  .community-core { left: 50%; top: 230px; transform: translateX(-50%) translateZ(34px); }
  .community-orbit .orbit-node { width: 39%; min-height: 142px; margin-left: 0; border-radius: 48% 52% 46% 54%; padding: 12px 11px; }
  .orbit-node .module-summary { -webkit-line-clamp: 1; }
  .orbit-node-1 { left: 0; top: 30px; transform: translateZ(14px); }
  .orbit-node-2 { right: 0; top: 30px; transform: translateZ(20px); }
  .orbit-node-3 { right: 0; top: 395px; transform: translateZ(24px); }
  .orbit-node-4 { left: 0; top: 395px; transform: translateZ(17px); }
  .data-strip {
    position: absolute; left: 0; right: 0; bottom: 8px;
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 7px;
    border: 1px solid rgba(151,227,238,.78); border-radius: 26px; background: rgba(245,255,255,.78);
    box-shadow: inset 0 0 18px #fff, 0 12px 32px rgba(3,83,137,.12);
  }
  .data-point { padding: 8px 6px; border: 1px solid rgba(86,191,213,.30); border-radius: 16px; text-align: center; background: rgba(250,255,255,.52); }
  .data-point strong { display: block; font-size: 15px; }
  .data-point span { color: #2b6b82; font-size: 7.5px; }

  /* 04 · regional network */
  .network-lines { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: none; fill: none; stroke: rgba(64,190,217,.60); stroke-width: 2; filter: drop-shadow(0 0 8px rgba(53,207,229,.45)); }
  .hub-node { left: 25%; top: 160px; width: 50%; aspect-ratio: 1; border-radius: 50%; text-align: center; padding: 17px; transform: translateZ(32px); }
  .hub-node .node-icon { margin: 0 auto 5px; }
  .hub-node .module-tags { justify-content: center; }
  .satellite-node { right: 0; top: 8px; width: 48%; min-height: 126px; transform: translateZ(16px); }
  .access-node { left: 0; top: 410px; width: 47%; min-height: 126px; transform: translateZ(12px); }
  .expansion-node { right: 0; top: 438px; width: 47%; min-height: 126px; transform: translateZ(22px); }
  .satellite-labels { position: absolute; left: 0; right: 0; bottom: 8px; display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
  .satellite-labels span { padding: 7px 4px; border: 1px solid rgba(86,191,213,.40); border-radius: 999px; background: rgba(250,255,255,.76); color: #17647d; font-size: 7px; text-align: center; box-shadow: 0 7px 18px rgba(3,83,137,.10); }

  /* 05 · four value streams from one source */
  .value-origin { left: 0; top: 248px; width: 38%; transform: translateZ(28px); }
  .route-stack { position: absolute; inset: 0; display: block; }
  .value-route { position: static; display: block; }
  .route-line { position: absolute; left: 31%; width: 32%; height: 2px; right: auto; bottom: auto; transform-origin: left center; background: linear-gradient(90deg, #fff, var(--v83-map-line), transparent); box-shadow: var(--v83-map-glow); }
  .route-1 .route-line { top: 300px; transform: rotate(-49deg); }
  .route-2 .route-line { top: 315px; transform: rotate(-17deg); }
  .route-3 .route-line { top: 333px; transform: rotate(18deg); }
  .route-4 .route-line { top: 348px; transform: rotate(48deg); }
  .value-node { right: 0; width: 57%; min-height: 118px; display: block; transform: translateZ(14px); }
  .route-1 .value-node { top: 0; }
  .route-2 .value-node { top: 145px; right: 4%; }
  .route-3 .value-node { top: 382px; right: 4%; }
  .route-4 .value-node { top: 527px; }
  .value-node:hover, .value-node:focus-visible { transform: translateZ(22px) scale(1.012); }

  /* 06 · participation stairs and entry portals */
  .steps-node { left: 0; top: 0; width: 52%; min-height: 122px; transform: translateZ(20px); }
  .step-rail { position: absolute; left: 0; top: 142px; width: 49%; height: 360px; display: flex; align-items: flex-end; gap: 4px; border: 0; background: none; box-shadow: none; }
  .step-rail span { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 100px; padding: 8px 4px; border: 1px solid rgba(136,220,234,.72); border-radius: 18px 18px 5px 5px; color: #155c77; background: linear-gradient(180deg, rgba(250,255,255,.82), rgba(151,229,240,.50)); text-align: center; font-size: 8px; box-shadow: inset 0 0 15px #fff, 0 10px 24px rgba(3,83,137,.12); }
  .step-rail span:nth-child(2) { min-height: 150px; }
  .step-rail span:nth-child(3) { min-height: 205px; }
  .step-rail b { margin-bottom: 4px; color: #1185a6; }
  .role-entry { position: absolute; right: 0; top: 72px; width: 46%; height: 330px; display: block; }
  .entry-node, .roles-node { position: absolute; left: 0; width: 100%; min-height: 138px; border-radius: 44% 56% 42% 58%; }
  .entry-node { top: 0; transform: translateZ(14px); }
  .roles-node { top: 166px; transform: translateZ(24px); }
  .route-node { right: 0; top: 430px; width: 57%; min-height: 126px; transform: translateZ(18px); }
  .contact-terminal { position: absolute; left: 0; right: 0; bottom: 12px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 9px; padding: 11px 13px; border: 1px solid rgba(86,191,213,.48); border-radius: 24px; background: rgba(250,255,255,.84); box-shadow: inset 0 0 15px #fff, 0 10px 28px rgba(3,83,137,.13); }
  .contact-terminal span { color: #247b96; font-size: 8px; }
  .contact-terminal strong { font-size: 12px; }
  .contact-terminal a { grid-row: 1/3; grid-column: 2; }
}

@media (max-width: 390px) {
  .chain-path { min-height: 610px; }
  .convergence-field { min-height: 620px; }
  .community-orbit { min-height: 720px; }
  .network-map { min-height: 700px; }
  .value-routes { min-height: 670px; }
  .participation-path { min-height: 735px; }
  .module-title { font-size: 12.5px; }
  .module-summary { font-size: 9px; }
  .module-tags i:nth-child(n+2) { display: none; }
  .orbit-node-3, .orbit-node-4 { top: 370px; }
  .route-4 .value-node { top: 508px; }
}

@media (max-height: 700px) and (min-width: 768px) {
  .layout-host { inset: calc(var(--topbar-height) + 88px) 0 calc(var(--control-height) + 20px); }
  .screen-heading { top: calc(var(--topbar-height) + 7px); }
  .module-summary { -webkit-line-clamp: 1; }
  .module-tags i:nth-child(n+2) { display: none; }
  .data-strip { bottom: -3px; }
}

