:root {
  --ink: #ece6da;
  --muted: #8f897e;
  --line: rgba(236, 230, 218, 0.16);
  --panel: rgba(18, 18, 20, 0.94);
  --chip: rgba(236, 230, 218, 0.08);
  --accent: #e8b56a;
  color-scheme: dark;
}

html[data-theme="day"] {
  --ink: #1d1b18;
  --muted: #7a7266;
  --line: rgba(29, 27, 24, 0.14);
  --panel: rgba(251, 248, 242, 0.96);
  --chip: rgba(29, 27, 24, 0.06);
  --accent: #1f3f8f;
  color-scheme: light;
}

* { box-sizing: border-box; }

/* --bg1 and --bg2 are set from the sun over Marbella */
html {
  --bg1: #141416;
  --bg2: #050506;
  background: var(--bg2);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 19px;
  line-height: 1.5;
  background: radial-gradient(ellipse at 50% 60%, var(--bg1) 0%, var(--bg2) 64%);
  transition: color 0.8s;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ------------------------------------------------------------ the scene */

#scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
#scene.ready { opacity: 1; }
#scene canvas { display: block; touch-action: none; }
#scene.pointing canvas { cursor: pointer; }

/* ------------------------------------------------------------ loading */

.loader { display: none; }
html.three .loader {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 6;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0s 0.9s;
}
html.three.loading .loader { opacity: 1; visibility: visible; transition: none; }
html.loading .hero, html.loading .era, html.loading .clock, html.loading .hint, html.loading .quick { opacity: 0; }
.hero, .era, .clock { transition: opacity 0.9s ease 0.3s; }

.loader-art { overflow: visible; margin-bottom: 10px; }
.loader-sun {
  fill: var(--accent);
  opacity: 0.9;
  animation: sunrise 4.8s ease-in-out infinite;
}
.loader-horizon { stroke: var(--ink); stroke-width: 1.2; stroke-linecap: round; opacity: 0.55; }
.loader-wave {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-dasharray: 6 5;
  animation: swell 2.4s linear infinite;
}
.loader-wave.w1 { opacity: 0.4; }
.loader-wave.w2 { opacity: 0.28; animation-duration: 3s; animation-direction: reverse; }
.loader-wave.w3 { opacity: 0.18; animation-duration: 3.6s; }
.loader-name {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 30px;
  letter-spacing: 0.01em;
}
.loader-note {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}
.loader-dots i { font-style: normal; animation: blink 1.5s infinite both; }
.loader-dots i:nth-child(2) { animation-delay: 0.25s; }
.loader-dots i:nth-child(3) { animation-delay: 0.5s; }
@keyframes sunrise {
  0%, 100% { transform: translateY(20px); }
  50% { transform: translateY(-2px); }
}
@keyframes swell { to { stroke-dashoffset: -22; } }
@keyframes blink { 0%, 100% { opacity: 0.15; } 40% { opacity: 1; } }

/* ------------------------------------------------------------ name */

.hero {
  position: relative;
  z-index: 2;
  padding: 40px 24px 8px;
  max-width: 640px;
  margin: 0 auto;
}
.hero h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.05;
  letter-spacing: 0.005em;
}
.hero .name, .hero .is { display: block; }
.hero .is { color: var(--muted); }
.hero em {
  display: inline-block;
  color: var(--ink);
  font-weight: 500;
  transition: opacity 0.36s ease, transform 0.36s ease;
}
.hero em.out { opacity: 0; transform: translateY(-0.3em); }
.hero em.in { opacity: 0; transform: translateY(0.3em); transition: none; }

html.three .hero {
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  padding: 34px 40px;
  pointer-events: none;
}

/* ------------------------------------------------------------ chrome */

.quick, .era, .clock, .hint, .bubble, .panel, .veil { display: none; }

html.three .era, html.three .clock, html.three .hint, html.three .panel, html.three .veil { display: flex; }

html.three .quick {
  display: flex;
  position: fixed;
  z-index: 3;
  top: 16px;
  right: 16px;
  gap: 6px;
  /* hidden until a keyboard reaches it */
  clip-path: inset(50%);
  opacity: 0;
}
html.three .quick:focus-within { clip-path: none; opacity: 1; }
.quick button {
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 15px;
  backdrop-filter: blur(6px);
}

.era {
  position: fixed;
  z-index: 2;
  left: 32px;
  bottom: 28px;
  align-items: center;
  gap: 12px;
}
.era-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 20px;
  line-height: 1;
}
.era-btn:disabled { opacity: 0.35; cursor: default; }
.era.busy .era-btn { opacity: 0.35; pointer-events: none; }
.era-text { display: flex; flex-direction: column; line-height: 1.15; }
.era-name { font-family: "Cormorant Garamond", Georgia, serif; font-size: 24px; font-weight: 500; }
.era-note { font-size: 14px; color: var(--muted); font-style: italic; }

.clock {
  position: fixed;
  z-index: 2;
  right: 28px;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
  border: 0;
  background: transparent;
  padding: 4px 2px;
  text-align: right;
}
.clock-place {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.clock-time {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.clock-note { font-size: 14px; font-style: italic; color: var(--muted); }
.clock-now { display: flex; align-items: center; gap: 8px; }
.clock-wx { display: inline-flex; width: 22px; height: 22px; color: var(--ink); opacity: 0.8; transition: opacity 0.4s ease; }
.clock-wx svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.clock-wx[hidden] { display: none; }
.clock[aria-pressed="true"] .clock-wx { opacity: 0; }
.clock[aria-pressed="true"] .clock-time { color: var(--accent); }

.hint {
  position: fixed;
  z-index: 2;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
  transition: opacity 0.8s;
  pointer-events: none;
  white-space: nowrap;
}
.hint.gone { opacity: 0; }

/* in the coaster car: the street hint gives way to a way back out */
.ride-bar {
  display: none;
  position: fixed;
  z-index: 3;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}
html.riding .ride-bar { display: flex; }
html.riding .hint { opacity: 0; }
.ride-hint { font-size: 15px; font-style: italic; color: var(--muted); }
/* at the bar (and the tiles, and the boom box) there is only the way back:
   the name, the era and the clock fade out while you look */
html[data-visit="radio"] .hero, html[data-visit="radio"] .era, html[data-visit="radio"] .clock, html[data-visit="radio"] .ride-hint,
html[data-visit="alice"] .hero, html[data-visit="alice"] .era, html[data-visit="alice"] .clock, html[data-visit="alice"] .ride-hint,
html[data-visit="bar"] .hero, html[data-visit="bar"] .era, html[data-visit="bar"] .clock, html[data-visit="bar"] .ride-hint,
html[data-visit="tiles"] .hero, html[data-visit="tiles"] .era, html[data-visit="tiles"] .clock, html[data-visit="tiles"] .ride-hint {
  opacity: 0;
  pointer-events: none;
}
.ride-exit {
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 16px;
  backdrop-filter: blur(6px);
}
.ride-exit:hover { background: var(--line); }
/* at the boom box the light is its own: the way back on dark glass, as the caption */
html[data-visit="radio"] .ride-hint { display: none; }
html[data-visit="radio"] .ride-exit { background: rgba(18, 18, 20, .62); color: #f3ead8; border-color: rgba(255, 255, 255, .14); backdrop-filter: blur(12px); }
html[data-visit="radio"] .ride-exit:hover { background: rgba(40, 40, 44, .75); }
/* in the car the cabin is dark round the screen's edge: the way out on
   light glass, dark lettering, a shadow to lift it off the black */
html[data-visit="ride"] .ride-exit { background: rgba(250, 246, 238, .9); color: #1d1b18; border-color: rgba(255, 255, 255, .6); box-shadow: 0 2px 14px rgba(0, 0, 0, .45); backdrop-filter: blur(12px); }
html[data-visit="ride"] .ride-exit:hover { background: #fff; }
html[data-visit="ride"] .ride-hint { color: #f3ead8; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
/* at the shrine the altar fills the lower part of the screen: the name, the
   era and the clock fade, and the way back goes up to the top left, where
   the name was (just the button, glass as ever) */
html[data-visit="shrine"] .hero, html[data-visit="shrine"] .era, html[data-visit="shrine"] .clock {
  opacity: 0;
  pointer-events: none;
}
html[data-visit="shrine"] .ride-bar {
  left: 20px;
  top: 20px;
  bottom: auto;
  transform: none;
  flex-direction: row-reverse;
}
html[data-visit="shrine"] .ride-hint { display: none; }

html.three .bubble:not([hidden]) {
  display: block;
  position: fixed;
  z-index: 3;
  left: 0;
  top: 0;
  padding: 6px 14px 7px;
  border-radius: 14px;
  background: #fffdf8;
  color: #1d1b18;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 20px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}
html.three .bubble.note:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px 6px 14px;
  pointer-events: auto;
}
.note-close {
  border: 0;
  background: transparent;
  color: #8a8175;
  font: 400 22px/1 Georgia, serif;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  padding: 0 0 2px;
}
.note-close:hover { background: rgba(29, 27, 24, 0.08); color: #1d1b18; }
.bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  margin-left: -7px;
  border: 7px solid transparent;
  border-bottom: 0;
  border-top-color: #fffdf8;
}

/* ------------------------------------------------------------ panel */

.panel {
  position: fixed;
  z-index: 4;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  flex-direction: column;
  padding: 56px 40px 40px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(10px);
  overflow-y: auto;
  transform: translateX(105%);
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s 0.4s;
  outline: none;
}
.panel.open {
  transform: none;
  visibility: visible;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.panel h2 {
  margin: 0 0 18px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 1.1;
}
.panel-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  color: var(--muted);
}
.panel-close:hover { color: var(--ink); }

/* ------------------------------------------------------------ the tiles */

/* the azulejo panel, opened: the About text laid over the tiles, clear, in
   the very places the lettering is cut, so what shows is the real panel in
   its light; the text is there to select, to be read aloud, and to follow
   the links (sizes in tiles, as the lettering is) */
.tiles {
  --tile: 80px;
  --cobalt: #1f3f8f;
  position: fixed;
  z-index: 4;
  /* its size is the panel's seen straight on; a perspective transform
     lays it on the panel wherever it is on the screen */
  left: 0;
  top: 0;
  transform-origin: 0 0;
  padding: calc(var(--tile) * 0.58) calc(var(--tile) * 0.5);
  outline: none;
  color: transparent;
  touch-action: none;
}
.tiles[hidden] { display: none; }
.tiles ::selection { color: transparent; background: rgba(31, 63, 143, 0.22); }
/* the field inside the border; scrolls only if the text outgrows it */
.tiles-field {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 calc(var(--tile) * 0.08);
  text-align: center;
}
.tiles-title {
  margin: 0 0 calc(var(--tile) * 0.035);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: calc(var(--tile) * 0.5);
  line-height: 1.1;
}
/* room for the flourish under the title */
.tiles-title::after {
  content: "";
  display: block;
  height: calc(var(--tile) * 0.1);
  margin: calc(var(--tile) * 0.06) auto calc(var(--tile) * 0.14);
}
.tiles-body {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: calc(var(--tile) * 0.29);
  line-height: 1.42;
}
.tiles-body p { margin: 0; }
.tiles-body p + p { margin-top: 0.8em; }
.tiles .links {
  position: absolute; left: 0; right: 0;
  bottom: calc(var(--tile) * 0.54);
  display: flex; justify-content: center; gap: calc(var(--tile) * 0.3);
  margin: 0;
  font-style: normal;
  font-size: calc(var(--tile) * 0.2);
  line-height: 1;
  letter-spacing: 0.04em;
}
/* a row the height of a mark, centred where the links are cut */
.tiles .links li { margin: 0; height: calc(var(--tile) * 0.36); display: flex; align-items: center; }
/* the cut lettering can't change, so a link shows itself with a line, a
   mark with a ring */
.tiles .links a { text-decoration: none; padding: 0.2em 0.1em; border-radius: 3px; }
.tiles .links a:hover, .tiles .links a:focus-visible { text-decoration: underline; text-decoration-color: var(--cobalt); text-decoration-thickness: max(1px, calc(var(--tile) * 0.012)); text-underline-offset: 0.18em; outline: none; }
.tiles .links a[data-icon] { display: block; padding: 0; border-radius: 50%; }
.tiles .links a[data-icon] .mark { display: block; width: calc(var(--tile) * 0.36); height: calc(var(--tile) * 0.36); }
.tiles .links a[data-icon]:hover, .tiles .links a[data-icon]:focus-visible { box-shadow: 0 0 0 max(1.5px, calc(var(--tile) * 0.03)) rgba(31, 63, 143, 0.45); }
.links .mark { width: 1.15em; height: 1.15em; vertical-align: -0.22em; }
/* the panel's other pages (the skills, one skill): each line of painted
   words has its clear twin laid exactly over it, and each pill, word and
   arrow a button in its place (sizes and places in tiles, from tileviews.js) */
.tiles-nav, .tiles-page { position: absolute; inset: 0; pointer-events: none; }
.tiles-page[hidden], .tiles-field[hidden] { display: none; }
.tiles-line {
  position: absolute;
  margin: 0;
  white-space: nowrap;
  font-family: "Cormorant Garamond", Georgia, serif;
  text-align: center;
  pointer-events: auto;
}
.tiles-quiet { font-size: 0 !important; }
.tiles-hit {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: transparent;
  font: inherit;
  font-size: 0;
  cursor: pointer;
  pointer-events: auto;
  border-radius: calc(var(--tile) * 0.06);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.tiles-pill { border-radius: 999px; }
.tiles-step { border-radius: 50%; }
.tiles-hit:hover, .tiles-hit:focus-visible {
  outline: none;
  background: rgba(31, 63, 143, 0.06);
  box-shadow: 0 0 0 max(1.5px, calc(var(--tile) * 0.022)) rgba(31, 63, 143, 0.4);
}
.tiles-nav .tiles-hit:hover, .tiles-nav .tiles-hit:focus-visible { box-shadow: none; background: rgba(31, 63, 143, 0.08); }
.tiles-nav [aria-current] { cursor: default; }
@media (prefers-reduced-motion: reduce) { .tiles-hit { transition: none; } }


/* ------------------------------------------------------------ the GitHub box */

.gh {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.gh.open { opacity: 1; }
.gh[hidden] { display: none; }
.gh-box {
  --l0: rgba(236, 230, 218, 0.08); --l1: #0e4429; --l2: #006d32; --l3: #26a641; --l4: #39d353;
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 26px 28px 22px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  outline: none;
}
html[data-theme="day"] .gh-box { --l0: #ebedf0; --l1: #9be9a8; --l2: #40c463; --l3: #30a14e; --l4: #216e39; }
.gh-box h2 {
  display: flex;
  align-items: center;
  gap: 0.36em;
  margin: 0 0 18px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.1;
}
/* the GitHub mark before the title, a touch under the capitals' height */
.gh-mark { flex: none; width: 0.8em; height: 0.8em; transform: translateY(0.02em); }
.gh-close {
  position: absolute; top: 10px; right: 12px;
  width: 38px; height: 38px;
  border: 0; background: transparent;
  font-size: 28px; line-height: 1;
  color: var(--muted);
}
.gh-close:hover { color: var(--ink); }
.gh-years { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 18px; padding-right: 30px; }
.gh-year {
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit; font-size: 12.5px; letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.gh-year:hover { color: var(--ink); }
.gh-year[aria-pressed="true"] { color: var(--ink); background: var(--chip); border-color: var(--accent); }
.gh-year:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* all-time is for the high scores only */
.gh-year[data-year="all"] { display: none; }
.gh.playing .gh-year[data-year="all"] { display: inline-block; }
.gh.waiting .gh-cal svg { opacity: 0.45; transition: opacity 0.2s ease; }
.gh-accounts { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-bottom: 20px; }
.gh-account {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 0; border: 0; background: none;
  color: var(--muted);
  font: inherit; font-size: 12px; letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.gh-account img {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--chip);
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow 0.2s ease;
}
.gh-account:hover, .gh-account[aria-pressed="true"] { color: var(--ink); }
.gh-account[aria-pressed="true"] img { box-shadow: 0 0 0 2px var(--accent); }
.gh.some .gh-account[aria-pressed="false"] { opacity: 0.45; }
.gh.some .gh-account[aria-pressed="false"]:hover { opacity: 0.8; }
.gh-account:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.gh-sum, .gh-day { margin: 0; font-size: 13px; color: var(--muted); min-height: 1.4em; }
.gh-sum { margin-bottom: 10px; color: var(--ink); }
.gh-cal { position: relative; }
.gh-cal svg { display: block; width: 100%; height: auto; transition: opacity 0.3s ease; }
/* raised into 3D: the drawing gives way to the blocks laid exactly over it */
.gh-cal.raised svg { opacity: 0; }
.gh-3d { position: absolute; top: 0; left: 0; width: 100%; display: block; touch-action: none; cursor: grab; }
.gh-3d:active { cursor: grabbing; }
.gh-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
/* the little blocks, in 3D, bottom left */
.gh-blocks {
  flex: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--chip);
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.gh-blocks canvas { display: block; width: 44px; height: 44px; }
.gh-blocks:hover, .gh-blocks[aria-pressed="true"] { border-color: var(--accent); }
.gh-blocks:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gh-blocks[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* at the arcade the calendar is the cabinet's screen: no days to point at */
.gh.playing .gh-day { visibility: hidden; }
.gh-arcade { cursor: default; }
.gh-cal rect { stroke: rgba(127, 127, 127, 0.08); stroke-width: 0.5; }
.gh-cal rect:hover { stroke: var(--ink); stroke-width: 1; }
.gh-cal .l0 { fill: var(--l0); } .gh-cal .l1 { fill: var(--l1); } .gh-cal .l2 { fill: var(--l2); } .gh-cal .l3 { fill: var(--l3); } .gh-cal .l4 { fill: var(--l4); }
.gh-cal text { fill: var(--muted); font-size: 8px; font-family: inherit; }
@media (max-width: 520px) {
  .gh-box { padding: 22px 16px 16px; }
  .gh-accounts { gap: 12px; justify-content: space-between; }
  .gh-account img { width: 44px; height: 44px; }
}

a { color: inherit; text-underline-offset: 3px; }
.links { list-style: none; padding: 0; margin: 18px 0 0; }
.links li { margin: 4px 0; }

.veil {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}
.veil.on { opacity: 1; }

/* ------------------------------------------------------------ text version */

#content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 24px 64px;
}
#content h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 30px;
  margin: 36px 0 8px;
}

html.three #content {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  padding: 0;
  margin: 0;
}

/* ------------------------------------------------------------ small screens */

@media (max-width: 640px) {
  html.three .hero { padding: 22px 20px; }
  /* no menu pills: the signs in the street turn to face you instead (the
     pills are still there for keyboards, as on big screens) */
  html.three .quick {
    top: auto;
    bottom: 76px;
    left: 12px;
    right: 12px;
    justify-content: center;
    flex-wrap: wrap;
  }
  .era { left: 16px; bottom: 18px; }
  .clock { right: 14px; bottom: 16px; }
  .clock-place { display: none; }
  .hint { display: none !important; }
  .ride-bar { bottom: 76px; }
  .ride-hint { display: none; }
  .panel { padding: 56px 24px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero em, .panel, #scene, .veil, .gh { transition: none; }
  .loader-sun, .loader-wave, .loader-dots i { animation: none; }
}

/* the ALICE collision (collide.js): nothing over it but the way back */
html.colliding .hero, html.colliding .era, html.colliding .clock, html.colliding .hint, html.colliding .ride-hint { opacity: 0; pointer-events: none; transition: opacity .6s; }
html.colliding .ride-exit { opacity: 0; transition: opacity .6s .8s; }
.veil.white { background: #fff; }
/* the credits run closes in smoke */
.veil.smoke { background: radial-gradient(ellipse at 50% 45%, #ddd7cd, #a59e93); transition: opacity 1.6s ease; }
.credits-card {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 16px;
  text-align: center;
  color: #2a2620;
  animation: credits-in 1.2s ease both;
}
.credits-card[hidden] { display: none; }
.credits-card p { margin: 0; font: italic 400 clamp(24px, 4vw, 38px)/1.2 "Cormorant Garamond", Georgia, serif; }
.credits-card button {
  padding: 9px 18px;
  border: 1px solid rgba(42, 38, 32, 0.3);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.6);
  color: inherit;
  font: 15px/1 inherit;
  cursor: pointer;
}
.credits-card button:hover { background: #fffdf8; }
@keyframes credits-in { from { opacity: 0; transform: translateY(8px); } }

/* the olives: a card for each small project, beside its olive */
.fan { display: none; }
html.three .fan { display: block; position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.olive-card {
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
  padding: 11px 15px 12px 11px;
  border-radius: 16px;
  background: #fffdf8;
  color: #1d1b18;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.3s;
  will-change: transform, opacity;
}
.olive-card::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  background: #fffdf8;
  transform: rotate(45deg);
  border-radius: 2px;
}
.fan:not(.open) .olive-card { opacity: 0 !important; }
.olive-icon svg, .olive-icon img { display: block; width: 40px; height: 40px; }
.olive-icon.house img { width: 54px; height: 54px; margin: -6px 0 0 -8px; filter: drop-shadow(0 3px 3px rgba(40, 30, 20, 0.28)); }
.olive-card h3 { margin: 1px 0 3px; font: 600 20px/1.1 "Cormorant Garamond", Georgia, serif; }
.olive-card p { margin: 0; font-size: 15px; line-height: 1.38; color: #4b463f; }
.fan-close {
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  padding: 0 0 3px;
  border: 0;
  border-radius: 50%;
  background: #fffdf8;
  color: #1d1b18;
  font: 400 26px/1 Georgia, serif;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.3s;
}
.fan:not(.open) .fan-close { opacity: 0; pointer-events: none; }
@media (max-width: 640px) {
  .olive-card { grid-template-columns: 32px 1fr; gap: 9px; padding: 9px 12px 10px 9px; }
  .olive-icon svg, .olive-icon img { width: 32px; height: 32px; }
  .olive-icon.house img { width: 42px; height: 42px; margin: -4px 0 0 -6px; }
  .olive-card h3 { font-size: 17px; }
  .olive-card p { font-size: 13px; }
}
