@charset "UTF-8";

/* ── Reset (normalize.css handles most, we add box-sizing) ───── */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ── Variables ───────────────────────────────────────────────── */
:root {
  /* Colors */
  --color-background:       #f5f4f0;
  --color-ink:              #1a1a1a;
  --color-ink-faint:        rgba(26, 26, 26, 0.15);
  --color-ink-mid:          rgba(26, 26, 26, 0.45);

  /* Fonts — everyday typefaces */
  --font-body:              Arial, Helvetica, sans-serif;
  --font-question:          'Times New Roman', Times, serif;
  --font-mono:              'Space Mono', 'Courier New', monospace;

  /* World dimensions */
  --world-w:                4000px;
  --world-h:                3000px;

  /* Spacing */
  --margin:                 1rem;
  --margin-xs:              calc(var(--margin) * 0.5);
  --margin-s:               calc(var(--margin) * 1);
  --margin-m:               calc(var(--margin) * 2);
  --margin-l:               calc(var(--margin) * 3);
  --margin-xl:              calc(var(--margin) * 5);
}

/* ── Base ────────────────────────────────────────────────────── */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-background);
  cursor: none;
}

/* Hide the title line break on desktop */
#intro-title br {
  display: none;
}

/* ── World (the large floor) ─────────────────────────────────── */
#world {
  position: fixed;
  width: var(--world-w);
  height: var(--world-h);
  top: 0;
  left: 0;
  will-change: transform;
}

/* ── Grid canvas ─────────────────────────────────────────────── */
#grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ── Stage (fragment + chapter container) ────────────────────── */
#stage {
  position: absolute;
  inset: 0;
  overflow: visible;
}

/* ── Custom cursor ───────────────────────────────────────────── */
#cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  border: 1px solid var(--color-ink);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
  z-index: 1000;
}

#cursor.idle {
  width: 22px;
  height: 22px;
  opacity: 0.25;
}

/* ── Trail dots ──────────────────────────────────────────────── */
.trail-dot {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--color-ink);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: trailFade 3s ease-out forwards;
  z-index: 999;
}

@media (max-width: 768px) {
  .trail-dot { display: none; }
}

@keyframes trailFade {
  0%   { opacity: 0.3;  transform: translate(-50%, -50%) scale(1);   }
  100% { opacity: 0;    transform: translate(-50%, -50%) scale(0.1); }
}

/* ── Text fragments ──────────────────────────────────────────── */
.fragment {
  position: absolute;
  pointer-events: none;
  max-width: 320px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1.4s ease, transform 1.4s ease;
  user-select: none;
  white-space: pre-line;
  z-index: 20;
}

.fragment.visible {
  opacity: 1;
  transform: translateY(0);
}

.fragment.fading {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 2.2s ease, transform 2.2s ease;
}

/* Fragment types */
.fragment.question   { font-family: var(--font-question); color: var(--color-ink); }
.fragment.body       { font-family: var(--font-body);     color: var(--color-ink); }
.fragment.annotation { font-family: var(--font-mono);     color: var(--color-ink-mid); letter-spacing: 0.02em; }

/* Fragment sizes */
.fragment.s  { font-size: 11px; }
.fragment.m  { font-size: 14px; }
.fragment.l  { font-size: 18px; }
.fragment.xl { font-size: 28px; line-height: 1.2; }

/* ── Chapter images ──────────────────────────────────────────── */
.chapter {
  position: absolute;
  width: 640px;
  cursor: pointer;
  pointer-events: all;
}

.chapter img,
.chapter video {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
  filter: grayscale(15%);
  transition: filter 0.4s ease, transform 0.4s ease;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 1;           /* always visible — first frame acts as poster */
}

.chapter:hover img,
.chapter:hover video {
  filter: grayscale(0%);
  transform: scale(1.012);
}

/* Disable chapter hover while the report drawer is open */
body.report-open .chapter:hover img,
body.report-open .chapter:hover video {
  filter: grayscale(15%);
  transform: scale(1);
}

.chapter-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink-mid);
  margin-top: 8px;
}

/* ── Chapter play hint overlay ───────────────────────────────── */
.chapter-hint {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 360px;         /* matches the video height */
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.35s ease;
  z-index: 10;
}

.chapter-hint-pill {
  background: rgba(245, 244, 240, 0.6);
  /* backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); */
  border: 1px solid rgba(245, 244, 240, 0.4);
  border-radius: 40px;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-ink);
}

.chapter-hint.hidden {
  opacity: 0;
}

/* ── Intro overlay ───────────────────────────────────────────── */
#intro {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  pointer-events: none;
  animation: introFade 1s ease 2.8s forwards;
}

#intro-title {
  font-family: var(--font-mono);
  font-size: clamp(32px, 6vw, 72px);
  color: var(--color-ink);
  letter-spacing: -0.01em;
  text-align: center;
  /* text-decoration: underline; */
  opacity: 0;
  animation: titleReveal 1s ease 0.3s forwards;
}

@keyframes titleReveal {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes introFade {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ── Hint ────────────────────────────────────────────────────── */
#hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--color-ink-faint);
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity 2.5s ease;
  z-index: 100;
}

#hint.hidden {
  opacity: 0;
}

/* ── Minimap ─────────────────────────────────────────────────── */
#minimap {
  position: fixed;
  bottom: 28px;
  right: 32px;
  width: 180px;
  height: 135px;
  border: 1px solid var(--color-ink-faint);
  z-index: 300;
  overflow: hidden;
  cursor: crosshair;
  pointer-events: all;
  transition: right 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Shift minimap left when report drawer is open */
body.report-open #minimap {
  right: calc(680px + 32px);
}

#minimap-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--color-ink);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: left 0.1s, top 0.1s;
  z-index: 2;
  pointer-events: none;
}

#minimap-viewport {
  position: absolute;
  border: 1px solid var(--color-ink-faint);
  pointer-events: none;
  z-index: 1;
}

.minimap-anchor {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-ink);
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: all;
  z-index: 1;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.minimap-anchor:hover {
  opacity: 1;
}
/* ── UI Buttons ──────────────────────────────────────────────── */
#ui-buttons {
  position: fixed;
  bottom: 28px;
  right: 224px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  z-index: 300;
  transition: right 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Shift buttons left when report drawer is open */
body.report-open #ui-buttons {
  right: calc(680px + 224px);
}

/* Shift info panel left when report drawer is open */
body.report-open #panel-info {
  right: calc(680px + 32px);
}

.ui-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink);
  background: transparent;
  border: 1px solid var(--color-ink-faint);
  padding: 5px 10px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.ui-btn:hover {
  opacity: 1;
  border-color: var(--color-ink);
}

/* ── Panels ──────────────────────────────────────────────────── */
.panel {
  position: fixed;
  bottom: 185px;
  right: 32px;
  width: 320px;
  max-height: 60vh;
  background: rgba(245, 244, 240, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-ink-faint);
  padding: 28px 28px 24px;
  z-index: 200;
  overflow-y: auto;
  transition: opacity 0.35s ease, transform 0.35s ease, right 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.panel.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.panel-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-ink-mid);
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s ease;
}

.panel-close:hover {
  color: var(--color-ink);
}

.panel-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Panel typography ────────────────────────────────────────── */
.panel-content p {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.75;
  color: var(--color-ink);
  margin: 0 0 16px 0;
}

.panel-content strong {
  font-family: Arial, Helvetica, sans-serif;
}

.panel-content em {
  font-family: Arial, Helvetica, sans-serif;
}

.panel-title {
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  font-style: normal !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-mid) !important;
  padding-bottom: 4px;
}

.panel-label {
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  font-style: normal !important;
  color: var(--color-ink-mid) !important;
  letter-spacing: 0.05em;
}

.panel-content a {
  color: var(--color-ink-mid);
  text-decoration: none;
  transition: color 0.2s ease;
}

.panel-content a:hover {
  color: var(--color-ink);
}

.panel-content a:hover {
  border-color: var(--color-ink);
}
/* Report main title — treated as a proper masthead */
.report-main-title {
  font-family: var(--font-mono);
  font-size: 44px;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--color-ink);
  margin: 0 0 12px 0;
}

/* Report panel layout — full-height right drawer ──────────── */
#panel-report {
  /* Override the shared .panel positioning */
  bottom: auto;
  right: 0;
  top: 0;
  width: min(680px, 100vw);
  max-height: 100vh;
  height: 100vh;
  background: var(--color-background);
  border-left: 1px solid var(--color-ink-faint);
  border-top: 3px solid var(--color-ink);
  border-right: none;
  border-bottom: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  opacity: 1;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -16px 0 64px rgba(26, 26, 26, 0.10);
  z-index: 200;
}

#panel-report.open {
  transform: translateX(0);
  pointer-events: all;
  opacity: 1;
}

#panel-report .panel-close {
  position: absolute;
  top: 16px;
  left: 20px;
  right: auto;
  z-index: 10;
  font-size: 18px;
  color: var(--color-ink-mid);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

#panel-report .panel-close:hover {
  opacity: 1;
  color: var(--color-ink);
}

/* Sticky index nav */
.report-index {
  position: sticky;
  top: 0;
  background: rgba(245, 244, 240, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-ink-faint);
  padding: 14px 52px 14px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: column;
  grid-template-rows: repeat(4, auto);
  gap: 5px 24px;
  z-index: 5;
  flex-shrink: 0;
}

.report-index a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink-mid);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.report-index a:hover {
  color: var(--color-ink);
}

/* Report content area */
#panel-report .panel-content {
  padding: 40px 60px 72px;
  overflow-y: auto;
  flex: 1;
  gap: 0;
}

/* Body text — deliberate reading size */
#panel-report .panel-content p {
  font-size: 18px;
  line-height: 1.9;
  margin: 0 0 24px 0;
}

/* Section headings */
.report-heading {
  font-family: var(--font-mono) !important;
  font-size: 30px !important;
  letter-spacing: -0.025em !important;
  text-transform: none !important;
  color: var(--color-ink) !important;
  margin-top: 64px !important;
  margin-bottom: 24px !important;
  padding-top: 36px;
  border-top: 1px solid var(--color-ink-faint);
}

section:first-of-type .report-heading {
  margin-top: 8px !important;
  border-top: none;
  padding-top: 0;
}

/* Footnotes */
.footnotes {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.75;
  color: var(--color-ink-mid);
  margin: 24px 0 0 0;
  padding-left: 20px;
  list-style-type: decimal;
}

.footnotes li {
  margin-bottom: 6px;
}

.footnotes em {
  font-style: italic;
}

/* Footnote superscript links */
sup a {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--color-ink-mid);
  text-decoration: none;
  vertical-align: super;
  line-height: 0;
  transition: color 0.2s ease;
}

sup a:hover {
  color: var(--color-ink);
}

/* Bibliography */
.bibliography {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.75;
  color: var(--color-ink);
  padding-left: 20px;
  margin: 0;
}

.bibliography li {
  margin-bottom: 6px;
}

.bibliography em {
  font-style: italic;
}
.hotspot {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  z-index: 5;
}

.hotspot.visible {
  opacity: 1;
  transform: translateY(0);
}

.hotspot img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* ── Hotspot crosses ─────────────────────────────────────────── */
.hotspot-cross {
  position: absolute;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.4;
  transition: opacity 0.6s ease;
  z-index: 6;
}

.hotspot-cross::before,
.hotspot-cross::after {
  content: '';
  position: absolute;
  background: var(--color-ink);
}

/* horizontal bar */
.hotspot-cross::before {
  width: 10px;
  height: 1px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

/* vertical bar */
.hotspot-cross::after {
  width: 1px;
  height: 10px;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.hotspot-cross.hidden {
  opacity: 0;
}
/* ═══════════════════════════════════════════════════════════════
   MOBILE  (max-width: 768px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Hide all desktop-only elements */
  #world,
  #cursor,
  #minimap,
  #ui-buttons,
  .panel {
    display: none !important;
  }

  /* Let body scroll normally on mobile */
  html, body {
    overflow: auto;
    height: auto;
    cursor: auto;
  }

  /* Intro — grid visible behind, title on top */
  #intro {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    pointer-events: none;
    background: var(--color-background);
    animation: introFade 1s ease 2.8s forwards;
  }

  /* Hint hidden on mobile */
  #hint {
    display: none;
  }

  /* Show title line break on mobile */
  #intro-title br {
    display: block;
  }

  /* ── Mobile UI shell ───────────────────────────────────────── */
  #mobile-ui {
    position: relative;
    min-height: 100vh;
    width: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
  }

  /* Grid canvas — fixed behind everything, same opacity as desktop */
  #mobile-grid {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
  }

  /* Background colour sits behind the grid */
  body {
    background: var(--color-background);
  }

  /* Content sits above the grid */
  #mobile-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 0 80px 0;
  }

  /* Intro title — larger, two-line layout */
  #intro-title {
    font-family: var(--font-mono);
    font-size: clamp(36px, 11vw, 64px);
    color: var(--color-ink);
    letter-spacing: -0.01em;
    text-align: center;
    line-height: 1.1;
    opacity: 0;
    animation: titleReveal 1s ease 0.3s forwards;
  }

  /* ── More button ───────────────────────────────────────────── */
  #mobile-more-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 50;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-ink);
    background: var(--color-background);
    border: 1px solid var(--color-ink-faint);
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 20px;
    transition: border-color 0.2s ease;
  }

  #mobile-more-btn:active {
    border-color: var(--color-ink);
  }

  /* ── Mobile overlay ────────────────────────────────────────── */
  #mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--color-background);
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
  }

  /* Grid canvas inside the overlay — only visible on report section */
  #mobile-overlay-grid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  #mobile-overlay-grid.visible {
    opacity: 1;
  }

  #mobile-overlay.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  /* Sticky header */
  #mobile-overlay-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-ink-faint);
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
  }

  #mobile-overlay-title {
    font-family: var(--font-mono);
    font-size: 15px;
    letter-spacing: 0.02em;
    color: var(--color-ink);
  }

  #mobile-overlay-close {
    font-family: var(--font-mono);
    font-size: 20px;
    color: var(--color-ink-mid);
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
  }

  #mobile-overlay-close:active {
    color: var(--color-ink);
  }

  /* Sticky report index — hidden by default, shown on scroll */
  #mobile-report-index {
    position: sticky;
    top: 61px;
    z-index: 9;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-ink-faint);
    padding: 16px 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: column;
    grid-template-rows: repeat(4, auto);
    column-gap: 16px;
    row-gap: 10px;
    flex-shrink: 0;
    opacity: 1;
    pointer-events: all;
    transition: opacity 0.3s ease;
  }

  #mobile-report-index a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-ink-mid);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 2px 0;
  }

  #mobile-report-index a:active {
    color: var(--color-ink);
  }

  /* Scrollable content area */
  #mobile-overlay-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 32px 24px 60px;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    z-index: 1;
  }

  /* Report section gets a transparent background so overlay grid shows */
  #mobile-report-section {
    position: relative;
  }

  #mobile-report-section::before {
    content: "";
    position: absolute;
    inset: -32px -24px;
    background: transparent;
    z-index: -1;
  }

  /* Section divider heading */
  .mobile-section-heading {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-ink-mid);
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-ink-faint);
  }

  /* Info section spacing */
  #mobile-info-section {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--color-ink-faint);
  }

  #mobile-info-section p {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--color-ink);
    margin: 0 0 16px 0;
  }

  #mobile-info-section a {
    color: var(--color-ink-mid);
    text-decoration: none;
  }

  /* Report section */
  #mobile-report-section p {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--color-ink);
    margin: 0 0 16px 0;
  }

  #mobile-report-section section {
    margin-bottom: 8px;
  }

  #mobile-report-section .report-heading {
    font-size: 22px !important;
    letter-spacing: -0.01em !important;
    text-transform: none !important;
    color: var(--color-ink) !important;
    margin-top: 40px !important;
    margin-bottom: 16px !important;
    padding-top: 24px;
  }

  #mobile-report-section section:first-of-type .report-heading {
    border-top: none;
    margin-top: 8px !important;
    padding-top: 0;
  }

  /* ── Field screens ─────────────────────────────────────────── */
  .field-screen {
    display: none;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    position: relative;
  }

  .field-screen.active {
    display: flex;
    flex-direction: column;
  }

  .field-screen-inner {
    flex: 1;
    padding: 72px 32px 160px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  /* ── Exercise number — large graphic watermark ─────────────── */
  .field-exercise-number {
    font-family: var(--font-mono);
    font-size: clamp(100px, 28vw, 140px);
    color: var(--color-ink-faint);
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin: 0 0 4px -5px;
    user-select: none;
  }

  /* Intro screen title */
  .field-intro-text {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .field-intro-title {
    font-family: var(--font-mono);
    font-size: clamp(32px, 9vw, 52px);
    color: var(--color-ink);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
  }

  /* Exercise label — small, sits under the number */
  .field-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-ink-mid);
    margin: 0 0 32px 0;
  }

  /* ── Card — light grey frame with rounded corners ──────────── */
  .field-card {
    background: rgba(26, 26, 26, 0.05);
    border-radius: 16px;
    padding: 28px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  /* Main heading */
  .field-heading {
    font-family: var(--font-mono);
    font-size: clamp(44px, 12vw, 60px);
    color: var(--color-ink);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0;
  }

  /* Body */
  .field-body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    line-height: 1.75;
    color: var(--color-ink);
    margin: 0;
  }

  /* Annotation */
  .field-annotation {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-ink-mid);
    margin: 24px 0 0 0;
  }

  /* ── Button — fixed to bottom of screen ────────────────────── */
  .field-btn-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 32px 48px;
    background: linear-gradient(to bottom, transparent, var(--color-background) 35%);
    z-index: 10;
    display: none;
    text-align: center;
  }

  .field-screen.active .field-btn-wrap {
    display: block;
  }

  .field-btn {
    display: inline-block;
    width: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-background);
    background: var(--color-ink);
    border: none;
    padding: 18px 36px;
    cursor: pointer;
    border-radius: 40px;
    transition: opacity 0.15s ease;
  }

  .field-btn:active {
    opacity: 0.65;
  }

  /* ── Notes area ────────────────────────────────────────────── */
  .field-notes-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
  }

  .field-textarea {
    width: 100%;
    min-height: 100px;
    background: transparent;
    border: 1px solid var(--color-ink-faint);
    padding: 14px 16px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-ink);
    resize: none;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    /* -webkit-appearance: none; */
    border-radius: 12px;
  }

  .field-textarea::placeholder {
    color: var(--color-ink-mid);
  }

  .field-textarea:focus {
    border-color: var(--color-ink-mid);
  }

  .field-add-btn {
    align-self: flex-end;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-ink-mid);
    background: transparent;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    transition: color 0.2s ease;
  }

  .field-add-btn:active {
    color: var(--color-ink);
  }

  .field-notes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 40px;
  }

  .field-note-item {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-ink);
    padding: 10px 14px;
    border: 1px solid var(--color-ink-faint);
    border-radius: 8px;
    animation: noteAppear 0.4s ease forwards;
  }

  @keyframes noteAppear {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
  }

}

/* Hide mobile UI on desktop */
#mobile-ui {
  display: none;
}

@media (max-width: 768px) {
  #mobile-ui {
    display: block;
  }
}