/* ----- Base ----- */
:root {
  --bg: #0e1018;
  --bg-2: #181c2c;
  --fg: #f8f2e8;
  --muted: #a8b0c4;
  --accent: #ff9f43;
  --accent-2: #ff6b9d;
  --accent-3: #7c6bff;
  --heart: #ff4f70;
  --border: #2e3548;
  --maxw: 1100px;
  --nav-h: 52px;
}
* { box-sizing: border-box; }
html {
  scroll-padding-top: calc(var(--nav-h) + 0.5rem);
  scroll-behavior: smooth;
}
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(ellipse 120% 80% at 10% -10%, rgba(124, 107, 255, 0.18), transparent 50%),
    radial-gradient(ellipse 90% 60% at 90% 0%, rgba(255, 107, 157, 0.12), transparent 45%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(255, 159, 67, 0.08), transparent 40%),
    var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
}
a { color: var(--accent); }
h1, h2 { font-family: ui-serif, Georgia, "Times New Roman", serif; letter-spacing: .5px; }
h2 { font-size: 2rem; margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.section { max-width: var(--maxw); margin: 0 auto; padding: 4rem 1rem; border-top: 1px solid var(--border); }
.cta {
  display: inline-block;
  padding: .8rem 1.4rem;
  background: linear-gradient(135deg, var(--accent), #ffc857);
  color: #1a1208;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 159, 67, 0.35);
  transition: transform .15s, box-shadow .15s;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(255, 159, 67, 0.45); }
.cta:active { transform: translateY(0); }
.cta-doom { background: #c43a4a; color: #fff; }

/* ----- Hero / mosaïque ----- */
.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
  background:
    radial-gradient(ellipse at top, rgba(124, 107, 255, 0.25) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 107, 157, 0.15) 0%, transparent 40%),
    linear-gradient(180deg, #1a1f35 0%, var(--bg) 85%);
}
.hero-title {
  font-size: clamp(2rem, 6vw, 4.2rem);
  margin: 0 auto;
  line-height: 1.2;
  max-width: min(95vw, 900px);
  background: linear-gradient(120deg, var(--fg) 0%, var(--accent) 45%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-adj {
  display: block;
  margin: .2em auto 0;
  padding: 0 .15em;
  color: var(--accent);
  font-style: italic;
  font-weight: 700;
  font-size: 1.12em;
  min-height: 1.2em;
  min-width: 6ch;
  opacity: 1;
  text-shadow: 0 0 24px rgba(255, 179, 71, 0.35);
  transition: opacity .38s ease, transform .38s ease;
}
.hero-adj.is-out {
  opacity: 0;
  transform: translateY(-12px);
}
.hero-adj.is-in {
  opacity: 0;
  transform: translateY(12px);
}
@media (min-width: 640px) {
  .hero-title { max-width: none; }
  .hero-adj {
    display: inline-block;
    margin: 0 0 0 .2em;
    vertical-align: baseline;
    font-size: 1.08em;
  }
}
.hero-sub { color: var(--muted); margin: .3rem 0 2rem; }
.hero-hint { color: var(--muted); margin-top: 1rem; font-size: .9rem; }
#mosaic {
  display: block;
  margin: 1rem auto;
  max-width: min(95vw, 1100px);
  width: 100%;
  height: auto;
  cursor: pointer;
  border-radius: 8px;
}

/* ----- Galerie vivante ----- */
.gallery-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 70vh;
  background: var(--bg-2);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.gallery-fade { position: absolute; inset: 0; }
.gallery-fade img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.2s ease;
  background: #000;
}
.gallery-fade img.active { opacity: 1; }
.gallery-ticker {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: .65rem .75rem;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  pointer-events: none;
}
.ticker-quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  opacity: 0;
  transition: opacity .45s ease;
}
.ticker-quotes.show { opacity: 1; }
.tick-quote {
  margin: 0;
  font-size: .82rem;
  line-height: 1.35;
  font-style: italic;
  color: var(--fg);
  padding: .35rem .5rem;
  border-left: 2px solid var(--accent);
  background: rgba(255, 179, 71, 0.08);
  border-radius: 0 4px 4px 0;
}
.tick-quote--solo { grid-column: 1 / -1; text-align: center; border: none; background: transparent; }
@media (max-width: 720px) {
  .ticker-quotes { grid-template-columns: 1fr; }
  .tick-quote:nth-child(n+2) { display: none; }
}

.gallery-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  margin-top: 1.5rem;
}
.gallery-wall img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform .15s;
}
.gallery-wall img:hover { transform: scale(1.04); }

/* ----- Livre d'or ----- */
.guestbook-intro { color: var(--muted); }
.guestbook-form, .lightbox-form {
  display: grid;
  gap: .8rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-2);
  border-radius: 8px;
}
.guestbook-form label { display: grid; gap: .3rem; font-size: .9rem; color: var(--muted); }
.guestbook-form input, .guestbook-form textarea,
.lightbox-form input, .lightbox-form textarea {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .6rem;
  font: inherit;
}
.guestbook-form button, .lightbox-form button[type=submit] {
  justify-self: start;
  background: var(--accent);
  color: #111;
  border: none;
  padding: .7rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}
.hp { position: absolute; left: -9999px; }
.status { min-height: 1.4em; color: var(--muted); }
.status.ok { color: #6fdc8c; }
.status.err { color: #ff8a8a; }

.guestbook-list { list-style: none; padding: 0; display: grid; gap: .8rem; }
.guestbook-list li {
  padding: 1rem;
  background: var(--bg-2);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}
.guestbook-list .meta { color: var(--muted); font-size: .85rem; margin-top: .4rem; }

/* ----- Lightbox ----- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  display: grid;
  grid-template-columns: 1fr 380px;
  z-index: 100;
}
.lightbox[hidden] { display: none; }
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(0,0,0,.6); color: #fff; border: none;
  width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; cursor: pointer;
  z-index: 2;
}
#lightbox-img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.lightbox-side {
  background: var(--bg-2);
  padding: 1rem;
  overflow-y: auto;
  border-left: 1px solid var(--border);
}
.heart-btn {
  background: transparent;
  color: var(--heart);
  border: 1px solid var(--heart);
  border-radius: 999px;
  padding: .5rem 1.2rem;
  font-size: 1.1rem;
  cursor: pointer;
}
.heart-btn.active {
  background: var(--heart);
  color: #fff;
}
.lightbox-comments { list-style: none; padding: 0; display: grid; gap: .5rem; max-height: 30vh; overflow-y: auto; }
.lightbox-comments li {
  padding: .6rem; background: var(--bg); border-radius: 4px; font-size: .92rem;
}
.lightbox-comments .meta { color: var(--muted); font-size: .75rem; }

/* ----- Mot qui relie ----- */
.link-word {
  display: inline-block;
  margin-top: .3rem;
  padding: .15rem .55rem;
  background: rgba(255, 179, 71, 0.15);
  color: var(--accent);
  border-radius: 999px;
  font-size: .85rem;
  font-style: italic;
}

/* ----- CTA row (doom + graph) ----- */
.cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.cta-graph { background: #6b7adb; color: #fff; }

/* ----- Graphe en haut de page ----- */
.section-graph-top {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.graph-inline-hint { margin: 0 0 .75rem; }
.graph-inline-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #08090d;
  box-shadow: 0 0 40px rgba(255, 79, 112, 0.12), 0 0 60px rgba(107, 122, 219, 0.1);
}
.graph-inline-wrap::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
}
@media (prefers-reduced-motion: no-preference) {
  .graph-inline-wrap::after {
    animation: graph-scan 8s linear infinite;
  }
  @keyframes graph-scan {
    from { transform: translateY(0); }
    to { transform: translateY(4px); }
  }
}
#graph-inline-canvas {
  display: block;
  width: 100%;
  height: 340px;
  cursor: grab;
}
#graph-inline-canvas:active { cursor: grabbing; }
.cta-graph-expand {
  margin: 1rem 0 1.5rem;
  background: linear-gradient(135deg, #6b7adb, #ff4f70);
  color: #fff;
}
.word-cloud--top {
  margin-top: 0;
}

/* ----- Labyrinthe (inline + plein écran) ----- */
.section-doom { text-align: center; }
.section-doom-top {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.doom-hint { margin: 0 0 .75rem; }
.doom-viewport {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  height: min(72vh, 560px);
  min-height: 380px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(255, 79, 112, 0.45);
  background: #050508;
  box-shadow: 0 0 50px rgba(255, 79, 112, 0.15), 0 0 70px rgba(107, 122, 219, 0.12);
  outline: none;
}
.doom-viewport:focus-visible {
  border-color: #ffb347;
  box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.35);
}
.doom-viewport::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 1;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12),
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}
.doom-viewport--fullscreen {
  position: fixed;
  inset: 0;
  max-width: none;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  border-radius: 0;
  z-index: 200;
}
#doom-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.doom-hud {
  position: absolute; left: 1rem; bottom: 1rem;
  z-index: 2;
  color: #fff; font-family: monospace; font-size: .9rem;
  background: rgba(0,0,0,.75);
  border: 1px solid rgba(255, 79, 112, 0.5);
  padding: .5rem .8rem; border-radius: 4px;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(255, 179, 71, 0.6);
}
.doom-fullscreen {
  position: absolute; top: .75rem; right: .75rem;
  z-index: 2;
  background: rgba(80, 20, 60, 0.85); color: #fff;
  border: 1px solid #ff4f70;
  padding: .45rem .9rem; border-radius: 6px; cursor: pointer;
  font-size: .85rem;
}
.doom-exit {
  position: absolute; top: .75rem; right: .75rem;
  z-index: 2;
  background: rgba(80, 20, 60, 0.85); color: #fff;
  border: 1px solid #ff4f70;
  padding: .5rem 1rem; border-radius: 6px; cursor: pointer;
}
.doom-controls-hint { margin-top: .75rem; }
.doom-mobile-msg {
  margin: 0;
  padding: 3rem 1.5rem;
  color: var(--muted, #aaa);
  font-size: .95rem;
}

/* ----- Graphe réseau ----- */
.graph-host {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, #1a1d27 0%, #08090d 80%);
  z-index: 200;
}
#graph-canvas {
  width: 100%; height: 100%;
  display: block;
  cursor: grab;
}
#graph-canvas.dragging { cursor: grabbing; }
.graph-hud {
  position: absolute; left: 1rem; bottom: 1rem;
  color: #fff; font-family: monospace; font-size: .9rem;
  background: rgba(0,0,0,.6); padding: .5rem .8rem; border-radius: 4px;
  pointer-events: none;
  max-width: 60ch;
}
.graph-exit, .graph-refresh {
  position: absolute; top: 1rem;
  background: rgba(0,0,0,.7); color: #fff; border: 1px solid #444;
  padding: .5rem .9rem; border-radius: 6px; cursor: pointer;
  font-size: 1rem;
}
.graph-exit { right: 1rem; }
.graph-refresh { right: 7rem; }
.graph-side {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 380px;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  padding: 1rem;
  overflow-y: auto;
  box-shadow: -8px 0 24px rgba(0,0,0,.5);
}
.graph-side[hidden] { display: none; }
.graph-side-close {
  position: absolute; top: .5rem; right: .5rem;
  background: transparent; color: var(--muted); border: none;
  font-size: 1.2rem; cursor: pointer;
}
.graph-side h3 { margin: 0 0 .3rem; font-family: ui-serif, Georgia, serif; }

/* ----- Formulaire de partage tout-en-un ----- */
.section-intro { margin: 0 0 1.5rem; }
.share-form {
  display: grid;
  gap: 1.2rem;
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem;
  background: linear-gradient(145deg, var(--bg-2), rgba(124, 107, 255, 0.08));
  border-radius: 12px;
  border: 1px solid rgba(124, 107, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.share-label {
  display: grid;
  gap: .35rem;
  font-size: .95rem;
}
.share-label-text { font-weight: 600; color: var(--fg); }
.share-hint { font-size: .82rem; color: var(--muted); }
.required { color: var(--accent); }
.share-form input:not([type=file]),
.share-form textarea {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .65rem .8rem;
  font: inherit;
  width: 100%;
  transition: border-color .15s;
}
.share-form input:focus,
.share-form textarea:focus { outline: none; border-color: var(--accent); }
.share-file {
  font: inherit;
  color: var(--muted);
  cursor: pointer;
}
.photo-preview { margin-top: .4rem; }
.photo-preview-img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 6px;
  object-fit: contain;
}
.magic-label { border-top: 1px solid var(--border); padding-top: 1rem; }
.share-submit { justify-self: start; font-size: 1rem; padding: .8rem 1.8rem; }

/* ----- Nuage de mots + mur de messages ----- */
.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1rem;
  align-items: baseline;
  padding: 1.5rem;
  background: var(--bg-2);
  border-radius: 12px;
  margin-bottom: 2.5rem;
  min-height: 80px;
}
.cloud-word {
  color: var(--accent);
  cursor: default;
  line-height: 1.2;
  transition: opacity .2s, color .2s;
  font-family: ui-serif, Georgia, serif;
}
.cloud-word:nth-child(3n) { color: var(--accent-2); }
.cloud-word:nth-child(3n+1) { color: var(--accent-3); }
.cloud-word:nth-child(3n+2) { color: var(--accent); }
.cloud-word:hover { opacity: 1 !important; }
.cloud-empty { margin: 0; }

.messages-wall {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.message-card {
  background: linear-gradient(135deg, var(--bg-2), rgba(255, 159, 67, 0.06));
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.2rem;
  display: grid;
  gap: .6rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.message-photo {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 4px;
}
.message-body {
  margin: 0;
  font-style: italic;
  color: var(--fg);
  line-height: 1.6;
}
.message-meta { font-size: .88rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.messages-empty { color: var(--muted); font-style: italic; }

/* ----- Section soutien ----- */
.section-soutien {
  background: linear-gradient(135deg, rgba(26,29,39,.85), rgba(17,19,26,.95));
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: var(--maxw);
  margin: 0 auto 2rem;
}
.section-soutien h2 { margin-bottom: .75rem; }
.soutien-intro {
  max-width: 52ch;
  line-height: 1.7;
  margin: 0 0 1.75rem;
}
.soutien-urgent {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1.5rem;
}
.soutien-urgent-num {
  font-family: ui-serif, Georgia, serif;
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--accent);
  text-decoration: none;
  line-height: 1;
  letter-spacing: .02em;
}
.soutien-urgent-num:hover { text-decoration: underline; }
.soutien-urgent strong {
  display: block;
  margin-bottom: .25rem;
  font-size: .95rem;
}
.soutien-sub { margin: 0 0 .5rem; }
.soutien-contacts {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: .5rem;
}
.soutien-contacts li {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: .75rem;
  align-items: baseline;
  font-size: .9rem;
}
.soutien-contacts a {
  font-weight: 600;
  text-decoration: none;
}
.soutien-contacts a:hover { text-decoration: underline; }
.soutien-contacts span { color: var(--muted); }
.soutien-emergency { margin: 0 0 1.75rem; }
.soutien-links-title {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 .35rem;
  letter-spacing: 0;
}
.soutien-links-lead { margin: 0 0 .75rem; }
.soutien-links {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: .65rem;
}
.soutien-links li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: .75rem;
  align-items: baseline;
  font-size: .9rem;
}
.soutien-links a { font-weight: 600; }
.soutien-links span { color: var(--muted); }
.soutien-disclaimer {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  line-height: 1.6;
  max-width: 60ch;
}
@media (max-width: 600px) {
  .soutien-contacts li,
  .soutien-links li { grid-template-columns: 1fr; gap: .15rem; }
}

/* ----- Footer ----- */
.footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ----- Navigation mobile ----- */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 85;
  height: var(--nav-h);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(14, 16, 24, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  grid-template-columns: 1fr 1fr 1fr;
  align-items: stretch;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem .25rem;
  min-height: 44px;
  transition: color .15s, background .15s;
}
.mobile-nav-link:hover,
.mobile-nav-link:focus { color: var(--accent); background: rgba(255, 159, 67, 0.08); }
.fab-share {
  display: none;
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 1rem));
  bottom: calc(var(--nav-h) + 1rem + env(safe-area-inset-bottom, 0));
  z-index: 86;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #111;
  font-size: 1.35rem;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255, 107, 157, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.15);
}
body.doom-fullscreen-active .mobile-nav,
body:has(.graph-host:not([hidden])) .mobile-nav,
body:has(.lightbox:not([hidden])) .mobile-nav,
body.doom-fullscreen-active .fab-share,
body:has(.graph-host:not([hidden])) .fab-share,
body:has(.lightbox:not([hidden])) .fab-share {
  display: none !important;
}

/* ----- Responsive ----- */
@media (max-width: 800px) {
  .mobile-nav { display: grid; }
  .fab-share { display: flex; }
  body { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0)); }
  .lightbox {
    grid-template-columns: 1fr;
    grid-template-rows: min(42dvh, 45%) 1fr;
    overflow: hidden;
  }
  .lightbox-side {
    border-left: none;
    border-top: 1px solid var(--border);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .lightbox-close { top: max(.5rem, env(safe-area-inset-top)); right: .5rem; width: 44px; height: 44px; }
  .lightbox-form input,
  .lightbox-form textarea,
  .lightbox-form button[type=submit] { font-size: 16px; min-height: 44px; }
  .lightbox-comments { max-height: 22vh; }
  .section { padding: 2.5rem 1rem; }
  h2 { font-size: 1.6rem; }
  .hero { padding: 3rem 1rem 2rem; }
  .cta { padding: .85rem 1.5rem; font-size: 1rem; }
  .share-form { padding: 1.2rem; }
  .share-form input:not([type=file]),
  .share-form textarea { font-size: 16px; }
  .share-submit { width: 100%; justify-self: stretch; text-align: center; }
  .messages-wall { grid-template-columns: 1fr; }
  .graph-side { width: 100%; max-height: 55%; bottom: 0; top: auto; border-left: none; border-top: 1px solid var(--border); }
  .graph-exit, .graph-refresh {
    top: max(.5rem, env(safe-area-inset-top));
    min-height: 44px;
    padding: .55rem 1rem;
  }
  .graph-exit { right: .5rem; }
  .graph-refresh { right: auto; left: .5rem; }
  #graph-inline-canvas { height: 260px; }
  .doom-viewport { height: min(55vh, 420px); min-height: 280px; }
  .prevention-numbers { flex-direction: column; gap: .75rem; }
  .prevention-label { margin-right: 0; display: block; }
  .cta-row .cta { flex: 1 1 100%; text-align: center; }
}
