* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --ink: #edf2fb;
  --muted: #8e95a3;
  --paper: #090a0c;
  --panel: rgba(24, 27, 33, 0.94);
  --panel-2: rgba(31, 35, 42, 0.92);
  --line: rgba(102, 212, 255, 0.3);
  --border: rgba(74, 83, 100, 0.46);
  --border-soft: rgba(255, 255, 255, 0.08);
  --green: #8fe2b8;
  --green-deep: #183f5d;
  --gold: #ffd37a;
  --blue: #4fa3ff;
  --rose: #ff8b97;
  --accent: #66d4ff;
  --accent-soft: rgba(102, 212, 255, 0.16);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Space Grotesk", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.55;
  position: relative;
  background:
    radial-gradient(1100px circle at -10% 8%, rgba(28, 46, 76, 0.75) 0%, transparent 82%),
    radial-gradient(900px circle at 115% 90%, rgba(40, 26, 63, 0.6) 0%, transparent 58%),
    linear-gradient(180deg, #090a0c 0%, #0b0d11 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 8, 12, 0.08), rgba(6, 8, 12, 0.5)),
    radial-gradient(circle at top, rgba(120, 188, 255, 0.06), transparent 38%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 88%);
  opacity: 0.28;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.72;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

.app-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 20px;
  position: relative;
  z-index: 2;
}

.home-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  position: relative;
  z-index: 2;
}

.home-card {
  width: min(560px, 100%);
  border-radius: 24px;
  border: 1px solid var(--border);
  padding: clamp(24px, 5vw, 42px);
  background:
    radial-gradient(circle at top right, rgba(79, 163, 255, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(21, 24, 30, 0.94), rgba(14, 17, 22, 0.94));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-card h1 {
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 7vw, 4.8rem);
}

.home-card p:not(.eyebrow) {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.home-launch {
  display: flex;
  width: fit-content;
  margin-inline: auto;
}

.map-page,
.detail-page {
  min-width: 0;
  border-radius: 24px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(79, 163, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(21, 24, 30, 0.92), rgba(14, 17, 22, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.map-page {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 18px;
  height: calc(100vh - 40px);
  min-height: 0;
  padding: clamp(18px, 3vw, 34px);
}

.map-page[hidden] {
  display: none;
}

.map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.map-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.map-intro {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(74, 83, 100, 0.58);
  border-radius: 999px;
  padding: 0 14px;
  color: #d7deea;
  background: linear-gradient(180deg, rgba(43, 49, 59, 0.92), rgba(35, 40, 49, 0.92));
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: rgba(102, 212, 255, 0.34);
  color: #edf2fb;
  background: linear-gradient(180deg, rgba(49, 57, 68, 0.98), rgba(38, 45, 55, 0.98));
  transform: translateY(-1px);
}

.map-actions .ghost-button {
  position: relative;
  overflow: hidden;
  border: 0;
  color: #f5fbff;
  background:
    linear-gradient(180deg, rgba(34, 89, 129, 0.96), rgba(20, 42, 65, 0.96));
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  isolation: isolate;
}

.map-actions .ghost-button::before {
  content: "";
  position: absolute;
  inset: -80%;
  z-index: -2;
  background: conic-gradient(
    from 0deg,
    rgba(102, 212, 255, 0.95),
    rgba(79, 163, 255, 0.18),
    rgba(143, 226, 184, 0.58),
    rgba(24, 63, 93, 0.24),
    rgba(102, 212, 255, 0.95)
  );
  animation: launchSpin 3s linear infinite;
}

.map-actions .ghost-button::after {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(23, 31, 43, 0.98), rgba(12, 16, 23, 0.98));
}

.map-actions .ghost-button:hover,
.map-actions .ghost-button:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.36),
    0 0 28px rgba(102, 212, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.home-card .home-launch {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin-top: 8px;
  margin-inline: auto;
  border: 0;
  border-radius: 999px;
  padding: 16px;
  color: #f5fbff;
  text-align: center;
  font-weight: 800;
  line-height: 1.15;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(34, 89, 129, 0.98), rgba(20, 42, 65, 0.98));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  isolation: isolate;
}

.home-card .home-launch::before {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    rgba(102, 212, 255, 0.95),
    rgba(79, 163, 255, 0.22),
    rgba(143, 226, 184, 0.66),
    rgba(24, 63, 93, 0.28),
    rgba(102, 212, 255, 0.95)
  );
  animation: launchSpin 2.6s linear infinite;
}

.home-card .home-launch::after {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(18, 25, 35, 0.96), rgba(8, 11, 16, 0.98));
}

.home-card .home-launch:hover,
.home-card .home-launch:focus-visible {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.48),
    0 0 38px rgba(102, 212, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

@keyframes launchSpin {
  to {
    transform: rotate(360deg);
  }
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb-item {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.breadcrumb-item:hover,
.breadcrumb-item:focus-visible {
  color: var(--accent);
}

.breadcrumb-item:not(:last-child)::after {
  content: "/";
  display: inline-flex;
  margin-left: 8px;
  color: rgba(102, 212, 255, 0.3);
}

.branch-stage {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: scroll;
  border-radius: 20px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(79, 163, 255, 0.08), transparent 26%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    rgba(12, 14, 18, 0.76);
  background-size: auto, 42px 42px, 42px 42px, auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  scrollbar-width: none;
}

.branch-stage::-webkit-scrollbar {
  display: none;
}

.branch-stage.is-panning {
  cursor: grabbing;
}

.canvas-sizer {
  position: relative;
  min-width: 100%;
  min-height: 100%;
  pointer-events: none;
}

.canvas-surface {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}

.map-widget {
  position: absolute;
  right: clamp(28px, 3vw, 48px);
  bottom: clamp(28px, 3vw, 48px);
  z-index: 8;
  display: grid;
  grid-template-columns: auto 140px;
  gap: 8px;
  width: max-content;
  pointer-events: none;
}

.zoom-controls {
  display: grid;
  align-self: end;
  gap: 6px;
  pointer-events: auto;
}

.zoom-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(102, 212, 255, 0.28);
  border-radius: 10px;
  color: #edf2fb;
  background:
    linear-gradient(180deg, rgba(43, 49, 59, 0.96), rgba(23, 27, 33, 0.96)),
    rgba(102, 212, 255, 0.08);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

.zoom-button:hover,
.zoom-button:focus-visible {
  border-color: rgba(102, 212, 255, 0.56);
  background:
    linear-gradient(180deg, rgba(49, 57, 68, 0.98), rgba(28, 34, 42, 0.98)),
    rgba(102, 212, 255, 0.14);
}

.minimap {
  width: 140px;
  height: 104px;
  border: 1px solid rgba(102, 212, 255, 0.28);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(102, 212, 255, 0.12), transparent 48%),
    rgba(12, 14, 18, 0.86);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
  cursor: pointer;
  pointer-events: auto;
}

.minimap-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.minimap-node {
  fill: rgba(237, 242, 251, 0.72);
}

.minimap-viewport {
  fill: rgba(102, 212, 255, 0.12);
  stroke: rgba(102, 212, 255, 0.8);
  stroke-width: 1.5;
}

.branch-lines {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
}

.branch-layer {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.branch-line {
  stroke: rgba(102, 212, 255, 0.3);
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 8 12;
  animation: drawLine 520ms ease both;
}

.branch-line.is-settled {
  animation: none;
}

.branch-line.is-selected {
  stroke: rgba(102, 212, 255, 0.78);
  stroke-width: 3;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 8px rgba(102, 212, 255, 0.28));
}

.center-node,
.branch-node,
.timeline-node {
  position: absolute;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
  transition: left 420ms ease, top 420ms ease, transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  pointer-events: auto;
  touch-action: manipulation;
}

.timeline-node {
  width: clamp(260px, 18vw, 340px);
  min-height: 96px;
  padding: 18px 20px;
  border-radius: 20px;
  --node-scale: 1;
  --text-scale: 1;
  --float-y: 0px;
  overflow: hidden;
  transform: translate(-50%, calc(-50% + var(--float-y))) scale(var(--node-scale));
  animation: nodeFloat 6s ease-in-out infinite;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.15;
  justify-items: start;
  align-content: center;
  gap: 6px;
  text-align: left;
  z-index: 2;
}

.timeline-node.is-entering {
  opacity: 0;
  animation: none;
  transform: translate(-42%, calc(-50% + var(--float-y))) scale(var(--node-scale));
}

.timeline-node.is-exiting {
  opacity: 0;
  animation: none;
  transform: translate(-58%, calc(-50% + var(--float-y))) scale(var(--node-scale));
  pointer-events: none;
}

.timeline-node:not(.is-selected):not([data-column="0"]) {
  opacity: 0.78;
}

.timeline-node:not(.is-selected):not([data-column="0"]):hover,
.timeline-node:not(.is-selected):not([data-column="0"]):focus-visible {
  opacity: 1;
}

.timeline-node[data-column="0"] {
  width: 168px;
  min-height: 168px;
  justify-items: center;
  border-radius: 999px;
  text-align: center;
  overflow: visible;
  border: 0;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(34, 89, 129, 0.98), rgba(20, 42, 65, 0.98));
  isolation: isolate;
}

.timeline-node[data-column="0"]::before {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -2;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    rgba(102, 212, 255, 0.95),
    rgba(79, 163, 255, 0.22),
    rgba(143, 226, 184, 0.66),
    rgba(24, 63, 93, 0.28),
    rgba(102, 212, 255, 0.95)
  );
  animation: launchSpin 3.4s linear infinite;
}

.timeline-node[data-column="0"]::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(23, 31, 43, 0.98), rgba(12, 16, 23, 0.98));
}

.center-node {
  left: 50%;
  top: 50%;
  width: 168px;
  height: 168px;
  transform: translate(-50%, -50%);
  gap: 6px;
  background:
    radial-gradient(circle at top, rgba(102, 212, 255, 0.22), transparent 58%),
    linear-gradient(180deg, #225981, #183f5d);
  border: 1px solid rgba(102, 212, 255, 0.38);
  font-weight: 800;
  z-index: 3;
}

.branch-stage.is-exploring .center-node {
  left: 26%;
}

.center-arabic {
  font-family: "Traditional Arabic", "Amiri", Georgia, serif;
  font-size: calc(3.3rem * var(--text-scale, 1));
  font-weight: 800;
  line-height: 1;
}

.center-english {
  font-size: calc(1rem * var(--text-scale, 1));
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.center-title {
  max-width: 100%;
  font-size: calc(1.25rem * var(--text-scale, 1));
  line-height: 1.12;
}

.branch-node {
  width: min(260px, 34vw);
  min-height: 84px;
  padding: 16px 18px;
  border-radius: 20px;
  transform: translate(-50%, -50%) scale(0.92);
  animation: branchIn 360ms ease forwards, nodeFloat 6s ease-in-out infinite;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.15;
  justify-items: start;
  gap: 6px;
  text-align: left;
  z-index: 2;
}

.node-title {
  font-size: calc(1.08em * var(--text-scale, 1));
  line-height: 1.16;
  overflow-wrap: normal;
  word-break: normal;
}

.node-title,
.node-description,
.node-arabic,
.center-title,
.center-arabic,
.center-english {
  max-width: 100%;
}

.node-description {
  color: rgba(237, 242, 251, 0.68);
  max-width: 100%;
  font-size: calc(0.86em * var(--text-scale, 1));
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: normal;
  word-break: normal;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.timeline-node[data-detail-level="compact"] .node-title,
.timeline-node[data-detail-level="compact"] .center-title {
  font-size: calc(0.95rem * var(--text-scale, 1));
}

.timeline-node[data-detail-level="abbr"] .node-title,
.timeline-node[data-detail-level="abbr"] .center-title {
  font-size: calc(0.8rem * var(--text-scale, 1));
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-node[data-detail-level="icon"] .node-title,
.timeline-node[data-detail-level="icon"] .center-title,
.timeline-node[data-detail-level="icon"] .node-description,
.timeline-node[data-detail-level="icon"] .node-arabic,
.timeline-node[data-detail-level="icon"] .center-arabic,
.timeline-node[data-detail-level="icon"] .center-english {
  display: none;
}

.node-icon {
  display: block;
  font-size: calc(1.2rem * var(--text-scale, 1));
  line-height: 1;
}

.node-arabic {
  font-family: "Traditional Arabic", "Amiri", Georgia, serif;
  font-size: calc(1.4rem * var(--text-scale, 1));
  line-height: 1;
}

.branch-node[data-tone="green"],
.timeline-node[data-tone="green"] {
  color: #06110c;
  background: linear-gradient(180deg, #8fe2b8, #4da87b);
}

.branch-node[data-tone="gold"],
.timeline-node[data-tone="gold"] {
  color: #171007;
  background: linear-gradient(180deg, #ffd37a, #b8862c);
}

.branch-node[data-tone="blue"],
.timeline-node[data-tone="blue"] {
  background: linear-gradient(180deg, #4fa3ff, #225981);
}

.branch-node[data-tone="rose"],
.timeline-node[data-tone="rose"] {
  background: linear-gradient(180deg, #ff8b97, #8e3d58);
}

.timeline-node[data-column="0"] {
  color: #fff;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(34, 89, 129, 0.98), rgba(20, 42, 65, 0.98));
}

.branch-node.is-leaf::after,
.timeline-node.is-leaf::after {
  content: "Open";
  position: absolute;
  right: 14px;
  bottom: -10px;
  min-width: 56px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #edf2fb;
  background: linear-gradient(180deg, rgba(31, 35, 42, 0.94), rgba(23, 27, 33, 0.96));
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.timeline-node.is-selected {
  opacity: 1;
  z-index: 4;
  outline: 2px solid rgba(102, 212, 255, 0.72);
  outline-offset: 4px;
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.4),
    0 0 32px rgba(102, 212, 255, 0.18);
}

.center-node:hover,
.center-node:focus-visible,
.branch-node:hover,
.branch-node:focus-visible,
.timeline-node:hover,
.timeline-node:focus-visible {
  filter: saturate(1.08);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.38);
}

.center-node:hover,
.center-node:focus-visible {
  transform: translate(-50%, -50%) scale(1.03);
}

.branch-node:hover,
.branch-node:focus-visible {
  --node-scale: 1.03;
}

.timeline-node:hover,
.timeline-node:focus-visible {
  --node-scale: 1.03;
}

.detail-page {
  min-height: calc(100vh - 40px);
  padding: clamp(18px, 5vw, 72px);
}

#detailSummary,
#detailExplanation {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.detail-page {
  display: grid;
  align-content: start;
  gap: clamp(28px, 5vw, 54px);
}

.detail-page[hidden] {
  display: none;
}

.close-detail {
  align-self: flex-start;
  width: fit-content;
}

.detail-hero {
  max-width: 920px;
}

.detail-hero h2 {
  margin-top: 22px;
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 0.9;
}

.detail-hero #detailSummary {
  max-width: 760px;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  gap: 18px;
}

.route-card,
.explanation-card {
  border: 1px solid rgba(74, 83, 100, 0.38);
  border-radius: 20px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(31, 35, 42, 0.94), rgba(23, 27, 33, 0.96)),
    radial-gradient(circle at top right, rgba(79, 163, 255, 0.08), transparent 36%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
}

.route-card ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.45;
}

@keyframes branchIn {
  from {
    opacity: 0;
    transform: translate(-42%, -50%) scale(0.82);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes nodeFloat {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(var(--node-scale, 1));
  }

  50% {
    transform: translate(-50%, calc(-50% - 8px)) scale(var(--node-scale, 1));
  }
}

@keyframes drawLine {
  from {
    opacity: 0;
    stroke-dashoffset: 80;
  }

  to {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@media (max-width: 980px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    height: 100vh;
    padding: 10px;
  }

  .map-page,
  .detail-page {
    min-height: 0;
  }

  .map-page {
    height: calc(100vh - 20px);
  }

  .map-header {
    align-items: stretch;
    flex-direction: column;
  }

  .map-actions {
    justify-content: stretch;
  }

  .ghost-button {
    width: 100%;
  }

  .close-detail {
    width: 100%;
  }

  .center-node {
    width: 132px;
    height: 132px;
  }

  .center-arabic {
    font-size: 2.45rem;
  }

  .branch-node {
    width: min(260px, 58vw);
    min-height: 86px;
    font-size: 0.82rem;
  }
}
