.galilean-dialog{max-width:min(440px,88vw);border:0;border-radius:25px;padding:28px;background:#f7f6ed;color:#1b2b24;font-family:"STK Bureau Sans",Arial,sans-serif;box-shadow:0 24px 70px #091c2840}
.galilean-dialog::backdrop{background:#0e201a7a;backdrop-filter:blur(8px)}
.galilean-dialog h2{margin:0 0 12px;font-family:"STK Bureau Serif",Georgia,serif;font-size:36px;font-weight:400;line-height:1.03}
.galilean-dialog p{line-height:1.5;margin:0 0 20px}
.galilean-dialog>button{background:#1c3026;color:#fffdf5;border:0;border-radius:48px;padding:10px 20px;cursor:pointer;font:inherit}
.galilean-paper{position:fixed;inset:0;width:min(850px,94vw);height:min(760px,88dvh);max-width:none;padding:0;overflow:hidden}
.galilean-paper .cf-layout{inset:48px 16px 64px!important}
.galilean-paper>.galilean-close{position:absolute;bottom:15px;left:50%;transform:translateX(-50%);z-index:8;white-space:nowrap}
.mp-logo [data-company-name]{font:600 14px/1.2 Arial,sans-serif;letter-spacing:-.03em;color:#1b2a25;padding:0 7px}

/* Platform colours edition */
/* These selectors follow the product photograph that the native city card loads. */
.map-panel:has([data-hero-media][src$="/proprealm.webp"]) {
  --platform-ink: #0f3cc9;
  --platform-on-ink: white;
  --platform-logo: url("./platform-logos/proprealm.svg");
  --logo-width: 109px;
  --logo-height: 25px;
}

.map-panel:has([data-hero-media][src$="/ashram.webp"]) {
  --platform-ink: #33461e;
  --platform-on-ink: white;
  --platform-logo: url("./platform-logos/future-ashram-stacked.svg");
  --logo-width: 75px;
  --logo-height: 53px;
}

.map-panel:has([data-hero-media][src$="/ashram.webp"]) .mp-logo {
  height: 61px !important;
  border-radius: 13px !important;
  background-color: white !important;
}

.map-panel:has([data-hero-media][src$="/baby-blink.webp"]) {
  --platform-ink: #26395b;
  --platform-on-ink: #f3f7ff;
  --platform-logo: url("./platform-logos/baby-blink.svg");
  --logo-width: 132px;
  --logo-height: 24px;
}

.eg-menu-item[href$="baby-blink.html"] .eg-menu-roll span::before {
  content: "";
  display: inline-block;
  width: .85em;
  height: .85em;
  margin-right: .28em;
  vertical-align: -.05em;
  background: url("./platform-logos/baby-blink-emblem.svg") center / contain no-repeat;
}

.map-panel:has([data-hero-media][src$="/carbonverse.webp"]) {
  --platform-ink: #155c3e;
  --platform-on-ink: #c8f26a;
  --platform-logo: url("./platform-logos/carbonverse.svg");
  --logo-width: 133px;
  --logo-height: 22px;
}

/* Keep the real text in this span for readers and the native capture controls.
   The actual brand artwork replaces the printed lettering inside the pill. */
.map-panel:has([data-hero-media][src$="/proprealm.webp"], [data-hero-media][src$="/ashram.webp"], [data-hero-media][src$="/carbonverse.webp"], [data-hero-media][src$="/baby-blink.webp"]) [data-company-name] {
  display: block;
  width: var(--logo-width);
  height: var(--logo-height);
  box-sizing: content-box;
  color: transparent;
  background: var(--platform-logo) center / contain no-repeat;
  background-origin: content-box;
}

.map-panel:has([data-hero-media][src$="/proprealm.webp"], [data-hero-media][src$="/ashram.webp"], [data-hero-media][src$="/carbonverse.webp"], [data-hero-media][src$="/baby-blink.webp"]) [data-scenario] {
  color: var(--platform-ink) !important;
}

.map-panel:has([data-hero-media][src$="/proprealm.webp"], [data-hero-media][src$="/ashram.webp"], [data-hero-media][src$="/carbonverse.webp"], [data-hero-media][src$="/baby-blink.webp"]) [data-join] {
  background: var(--platform-ink) !important;
  color: var(--platform-on-ink) !important;
}

/* Leave room for the return item on short landscape phone screens. */
@media (max-height: 530px) {
  .eg-menu-inner:has(a[href="../walkthrough/"]) .eg-menu-item {
    font-size: clamp(16px, 4.5dvh, 24px);
    padding-block: 4px;
  }
}

/* The timeline owns the dock's measurements and motion in every scene. */
body .eg-track,
body.nav-black .eg-track {
  background: rgba(237, 243, 252, .79);
  backdrop-filter: blur(14px) saturate(128%);
  -webkit-backdrop-filter: blur(14px) saturate(128%);
  box-shadow: inset 0 1px 1px #ffffffc9, 0 2px 9px #12204026;
  bottom: max(14px, env(safe-area-inset-bottom));
}
body .eg-track .eg-circle {
  color: #1748f5;
  background: radial-gradient(ellipse at 32% 20%, #ffffff, #e3edff 68%, #c6d8fd);
}
body .eg-track .eg-circle img { width: 65%; height: 65%; }
body .eg-track .eg-circle:hover { background: #fbfdff; }
body .eg-track .eg-pill,
body .eg-track .eg-pill.is-open {
  background: #191d26;
  color: #fff;
}
body .eg-track .eg-pill:hover { background: #262d3c; }
body .eg-track .eg-label {
  color: inherit;
  text-decoration: none;
  font-weight: 540;
  letter-spacing: -.025em;
  border-radius: inherit;
}
body .eg-track .eg-menu,
body .eg-track .eg-back {
  background: #fbfcff;
  color: #161c28;
}
body .eg-track .eg-menu:hover { background: white; }
body .eg-track .eg-menu-item { color: #14203a; flex-shrink: 0; }
body .eg-track .eg-menu-inner {
  max-height: max(100px, calc(100dvh - 150px - env(safe-area-inset-bottom)));
  overflow-y: auto;
  overscroll-behavior: contain;
}
body .eg-track .eg-menu-item:focus-visible,
body .eg-track .eg-btn:focus-visible,
body .eg-track .eg-label:focus-visible {
  outline: 2px solid #1748f5;
  outline-offset: -3px;
}
body .eg-track .eg-label:focus-visible { outline-color: #bbd4ff; }
body .beta-note {
  color: white;
  background: rgba(28, 38, 54, .56);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}
body .beta-note a { color: #11192b; background: #fff; }
body .beta-note a:focus-visible { outline: 2px solid #1748f5; outline-offset: -2px; }
body .galilean-credits { color: #101b34; background: #f1f5fb; }
body .galilean-credits::backdrop { background: #16233b83; }
body .galilean-credits > button { background: #172746; color: white; }
@media (max-height: 760px) {
  body .eg-track .eg-menu-item { font-size: clamp(18px, 3.3dvh, 24px); padding-block: 6px; }
}
@media (max-height: 530px) {
  body .eg-track .eg-menu-item { font-size: 17px; padding-block: 5px; }
}

/* The same two-tier control is usable from the first paint, before the orbit gesture or WebGL. */
#cinematic-entry {
  --entry-size: 48px;
  --entry-pad: 5px;
  position: fixed;
  z-index: 2147483000;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #14203a;
  font: 500 16px/1.15 'Google Sans Flex', Inter, Arial, sans-serif;
}
body:has(#cinematic-entry) > :is(.eg-track, .beta-note) { clip-path: inset(50%); pointer-events: none; }
#cinematic-entry a { text-decoration: none; }
#cinematic-entry .cold-note {
  position: static;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  visibility: visible;
  pointer-events: auto;
  gap: 8px;
  padding: 8px 8px 8px 14px;
  border-radius: 40px;
  font-size: 13px;
}
#cinematic-entry .cold-note a {
  display: grid;
  place-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 20px;
  font: inherit;
}
#cinematic-entry .cold-track {
  display: flex;
  align-items: center;
  gap: var(--entry-pad);
  width: 436px;
  box-sizing: border-box;
  padding: var(--entry-pad);
  background: rgba(237, 243, 252, .79);
  backdrop-filter: blur(14px) saturate(128%);
  -webkit-backdrop-filter: blur(14px) saturate(128%);
  box-shadow: inset 0 1px 1px #ffffffc9, 0 2px 9px #12204026;
  border-radius: 32px;
}
#cinematic-entry :is(.cold-mark, summary) {
  display: grid;
  place-content: center;
  box-sizing: border-box;
  width: var(--entry-size);
  height: var(--entry-size);
  border-radius: 50%;
  background: #fbfcff;
}
#cinematic-entry .cold-mark { background: radial-gradient(ellipse at 32% 20%, white, #e3edff 68%, #c6d8fd); }
#cinematic-entry .cold-mark img { width: calc(var(--entry-size) * .65); height: auto; display: block; }
#cinematic-entry .eg-label {
  position: static;
  display: grid;
  place-items: center;
  flex: 1;
  height: var(--entry-size);
  border-radius: 30px;
  background: #191d26;
  color: white;
  box-shadow: inset 0 1px .5px #ffffff4d, inset 0 -1.5px .5px #0005;
  font-weight: 540;
  letter-spacing: -.025em;
  white-space: nowrap;
}
#cinematic-entry summary { cursor: pointer; list-style: none; gap: 5px; }
#cinematic-entry summary::-webkit-details-marker { display: none; }
#cinematic-entry summary span { display: block; width: 16px; height: 1.6px; background: #161c28; border-radius: 2px; }
#cinematic-entry details[open] summary span:first-child { transform: translateY(3.3px) rotate(45deg); }
#cinematic-entry details[open] summary span:last-child { transform: translateY(-3.3px) rotate(-45deg); }
#cinematic-entry .cold-links {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  max-height: calc(100dvh - var(--entry-size) - 55px - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 8px;
  background: #eef3fbed;
  border-radius: 24px;
}
#cinematic-entry .cold-links a { display: block; padding: 8px; color: inherit; text-align: center; font: 400 23px/1.2 'STK Bureau Serif', Georgia, serif; }
#cinematic-entry:has(details[open]) .cold-note { visibility: hidden; }
#cinematic-entry :is(a, summary):focus-visible { outline: 2px solid #1748f5; outline-offset: -3px; }
#cinematic-entry .eg-label:focus-visible { outline-color: #bbd4ff; }
@media (max-width: 768px) {
  #cinematic-entry { --entry-size: 44px; --entry-pad: 4px; font-size: 15px; }
  #cinematic-entry .cold-track { width: max(172px, calc(100vw - 96px)); }
  #cinematic-entry:has(details[open]) .cold-track { width: calc(100vw - 40px); }
  #cinematic-entry .cold-links a { font-size: 19px; }
}
@media (max-width: 420px) {
  #cinematic-entry .cold-note { font-size: 12px; }
}
@media (max-width: 359px) {
  body .eg-track .eg-label, #cinematic-entry .eg-label { font-size: 12px; }
}

/* Polar Archive palette on the native loading screen and its two dock states. */
body[data-robot-opening] {
  --opening-ice: #f3f7fc;
  --opening-edge: #a4b3cd;
  --opening-ink: #101e43;
  --opening-signal: #1748f5;
}
body[data-robot-opening] #cinematic-entry { color: var(--opening-ink); }
body[data-robot-opening] #cinematic-entry .cold-track,
body[data-robot-opening] .eg-track {
  background: rgb(243 247 252 / 82%);
  box-shadow: inset 0 1px 1px #f3f7fc, 0 3px 10px rgb(16 30 67 / 19%);
}
body[data-robot-opening] #cinematic-entry .eg-label,
body[data-robot-opening] .eg-track .eg-pill {
  background: var(--opening-signal);
  color: var(--opening-ice);
}
body[data-robot-opening] .eg-track .eg-pill.is-open,
body[data-robot-opening] #cinematic-entry .cold-links {
  background: var(--opening-ice);
  color: var(--opening-ink);
}
body[data-robot-opening] .eg-track .eg-menu-item { color: var(--opening-ink); }
body[data-robot-opening] .beta-note { background: rgb(16 30 67 / 80%); color: var(--opening-ice); }
body[data-robot-opening] .beta-note a,
body[data-robot-opening] #cinematic-entry summary {
  background: var(--opening-ice);
  color: var(--opening-ink);
}
body[data-robot-opening] #cinematic-entry summary span { background: var(--opening-ink); }
body[data-robot-opening] .loader-text,
body[data-robot-opening] .hud-status { color: var(--opening-ice); }
body[data-robot-opening] .loader-degree { color: rgb(243 247 252 / 82%); }
/* Keep the tracing cue above the ring so the moving fingertip stays visible. */
body[data-robot-opening].webgl-loader-overlay .hud-status {
  top: calc(50% - 20vh - 1.8rem);
}
body[data-robot-opening].webgl-loader-overlay .hud-status-label {
  background-image: none;
  -webkit-text-fill-color: var(--opening-ice);
  text-shadow: 0 1px 3px var(--opening-ink), 0 0 8px rgb(16 30 67 / 48%);
}
body[data-robot-opening] .loader-circle-ring {
  background: conic-gradient(#f3f7fcdf 0deg, #a4b3cd00 5deg 210deg, #f3f7fcdf 360deg);
}
body[data-robot-opening] .loader-circle-handle {
  background: var(--opening-ice);
  box-shadow: 0 0 0 1px var(--opening-edge), 0 0 8px rgb(23 72 245 / 35%);
}

body[data-robot-opening] .hud-xp-icon[src$="xp.webp"] { content: url("./robot/xp.webp"); }
body[data-encounter-night] .ruler-label,
body[data-encounter-night] .mtl-count,
body[data-encounter-night] .scroll-ruler-nav-btn { color: #d9e4f7; }
body[data-encounter-night] .scroll-ruler-nav-btn:hover,
body[data-encounter-night] .scroll-ruler-nav-btn.is-active { color: #fff; }
body[data-encounter-night] .ruler-line,
body[data-encounter-night] .mtl-bar,
body[data-encounter-night] .scroll-ruler-nav-line { background: #a4b3cd94; }
body[data-encounter-night] .ruler-tick.major .ruler-line,
body[data-encounter-night] .scroll-ruler-indicator,
body[data-encounter-night] .scroll-ruler-nav-btn.is-active .scroll-ruler-nav-line,
body[data-encounter-night] .mtl-fill { background: #f3f7fc; }
body[data-difc-encounter] :is(.ruler-label, .mtl-count, .scroll-ruler-nav-btn) {
  color: #142443;
  text-shadow: 0 1px 2px rgb(248 251 255 / 80%);
}
body[data-difc-encounter] :is(.ruler-line, .mtl-bar, .scroll-ruler-nav-line) {
  background: rgb(25 47 79 / 48%);
}
body[data-difc-encounter] :is(.ruler-tick.major .ruler-line, .scroll-ruler-indicator, .mtl-fill, .scroll-ruler-nav-btn.is-active .scroll-ruler-nav-line) {
  background: #192f4f;
}
@media (max-width: 767px) {
  body[data-blue-encounter-ruler] .mtl-count {
    color: #f3f7fc;
    background: rgb(16 30 67 / 88%);
    border-radius: 1em;
    padding: 0.28em 0.55em;
  }
}
body[data-robot-opening] :is(.hud-xp,.hud-xp-value,.hud-xp-label) { color: var(--opening-ink); }
/* The native scroll cue appears while the completed signature is on screen. */
body[data-robot-opening] .scroll-indicator {
  bottom: calc(139px + env(safe-area-inset-bottom, 0px));
  color: var(--opening-ink);
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 3px 8px;
  gap: 7px;
  font-size: 12px;
}
body[data-robot-opening] .scroll-indicator-dot { background: var(--opening-signal); }
@media (hover: hover) and (pointer: fine) {
  /* A small contact point leaves the mechanical fingertip visible while tracing. */
  body[data-robot-opening]:has(#webgl:hover) [data-custom-cursor] {
    width: 8px !important;
    height: 8px !important;
    margin: -4px;
    box-sizing: border-box;
    border: 1px solid var(--opening-ice);
    border-radius: 50%;
    background: var(--opening-signal) !important;
    box-shadow: 0 0 0 1px var(--opening-ink);
  }
}
body[data-robot-opening] #pre-canvas-99 { color: var(--opening-ink); }
@media (max-width: 767px) {
  body[data-robot-opening] #pre-canvas-99 { bottom: 138px; }
}
