/* après moi le déluge — one stylesheet for every page */

@font-face {
  font-family: "Hina Mincho";
  src: url("fonts/HinaMincho-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #fff;
  --line: rgba(255, 255, 255, .2);
  --muted: rgba(255, 255, 255, .56);
  --noise-opacity: .1;
  --font: "Hina Mincho", serif;
  --pad: clamp(16px, 3vw, 32px);
  --gap: 4px;
  --duration: 200ms;
  --bar-height: 53px;
  --cols: 1;
  color-scheme: dark;
}

/* Column count of the works grid. main.js reads --cols, so breakpoints live only here. */
@media (min-width: 560px) { :root { --cols: 2; } }
@media (min-width: 900px) { :root { --cols: 3; } }
@media (min-width: 1280px) { :root { --cols: 4; } }

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

html.is-locked {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

img,
video,
iframe {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 2px;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Grain — one fixed layer over everything, tuned by --noise-opacity   */
/* ------------------------------------------------------------------ */

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 1000;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1.2 0 0 0 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: var(--noise-opacity);
  animation: grain .9s steps(1) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-6%, 4%); }
  40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, -5%); }
  80% { transform: translate(7%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ------------------------------------------------------------------ */
/* Page frame                                                          */
/* ------------------------------------------------------------------ */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.page > main {
  flex: 1 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.brand {
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 20px;
}

.site-nav a,
.filter-button,
.overlay-button {
  color: var(--muted);
  transition: color var(--duration) ease, border-color var(--duration) ease;
}

.site-nav a[aria-current="page"] {
  color: var(--fg);
}

.site-footer {
  margin-top: 48px;
  padding: 20px var(--pad) 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.status {
  margin: 0;
  padding: 48px var(--pad);
  color: var(--muted);
}

/* ------------------------------------------------------------------ */
/* Filters                                                             */
/* ------------------------------------------------------------------ */

.filters {
  display: grid;
  gap: 6px;
  padding: 12px var(--pad);
  border-bottom: 1px solid var(--line);
}

.filter-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.filter-label {
  flex: none;
  width: 48px;
  color: var(--muted);
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  min-width: 0;
}

.filter-button {
  padding: 2px 0;
  border-bottom: 1px solid transparent;
}

.filter-button[aria-pressed="true"] {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.filter-count {
  margin: 0;
  color: var(--muted);
}

/* ------------------------------------------------------------------ */
/* Works grid — columns are filled by main.js, cards keep their ratio  */
/* ------------------------------------------------------------------ */

.grid {
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
  padding: var(--gap);
}

.grid-col {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}

.card {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(255, 255, 255, .03);
}

.card-media:empty {
  aspect-ratio: 4 / 5;
}

.card-media > * {
  transition: opacity var(--duration) ease;
}

.card img,
.card video {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.card img {
  aspect-ratio: auto 4 / 5;
}

.card video {
  aspect-ratio: auto 16 / 9;
}

.card-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  color: var(--muted);
}

.card-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, .72);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) ease;
}

.card-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-year {
  flex: none;
  color: var(--muted);
}

.card:focus-visible .card-caption,
.card.is-revealed .card-caption {
  opacity: 1;
}

.card:focus-visible {
  outline-offset: -1px;
}

@media (hover: hover) {
  .site-nav a:hover,
  .filter-button:hover,
  .overlay-button:not(:disabled):hover {
    color: var(--fg);
  }

  .card:hover .card-caption {
    opacity: 1;
  }

  .card:hover .card-media > * {
    opacity: .82;
  }
}

/* ------------------------------------------------------------------ */
/* Detail overlay                                                      */
/* ------------------------------------------------------------------ */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(0, 0, 0, .97);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration) ease, visibility 0s linear var(--duration);
}

.overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--duration) ease, visibility 0s linear 0s;
}

.overlay-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  height: var(--bar-height);
  padding: 4px calc(var(--pad) - 12px);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.overlay-button {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  font-size: 15px;
}

.overlay-button:disabled {
  opacity: .3;
  cursor: default;
}

.detail {
  display: grid;
  gap: 24px;
  max-width: 1680px;
  margin: 0 auto;
  padding: 20px var(--pad) 96px;
}

.detail-title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}

.detail-description {
  margin: 16px 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.detail-media {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.media-item {
  margin: 0;
  min-width: 0;
}

.media-image img {
  width: 100%;
  height: auto;
  max-height: 92vh;
  aspect-ratio: auto 4 / 3;
  object-fit: contain;
  cursor: zoom-in;
}

.media-image.is-full {
  overflow-x: auto;
}

.media-image.is-full img {
  width: auto;
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.media-video video {
  width: 100%;
  height: auto;
  max-height: 92vh;
  background: var(--bg);
}

.embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg);
}

.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (min-width: 900px) {
  .detail {
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 40px;
    padding-top: 28px;
  }

  .detail-info {
    position: sticky;
    top: calc(var(--bar-height) + 28px);
    align-self: start;
  }
}

/* ------------------------------------------------------------------ */
/* Key / value rows (detail meta and about contacts)                   */
/* ------------------------------------------------------------------ */

.meta-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.meta-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.meta-row dt {
  color: var(--muted);
}

.meta-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.meta-row a {
  border-bottom: 1px solid var(--line);
  transition: border-color var(--duration) ease;
}

@media (hover: hover) {
  .meta-row a:hover {
    border-bottom-color: var(--fg);
  }
}

/* ------------------------------------------------------------------ */
/* About                                                               */
/* ------------------------------------------------------------------ */

.about {
  width: 100%;
  max-width: 760px;
  padding: 56px var(--pad) 40px;
}

.about-name {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .06em;
}

.about-alias {
  margin: 4px 0 0;
  color: var(--muted);
}

.about-bio {
  max-width: 64ch;
  margin-top: 32px;
}

.about-bio p {
  margin: 0 0 1em;
}

.about-list {
  margin-top: 40px;
}

.about-list .meta-row {
  grid-template-columns: 96px minmax(0, 1fr);
}

/* ------------------------------------------------------------------ */
/* Header wrap — three nav items still fit on a 375px screen           */
/* ------------------------------------------------------------------ */

.site-header {
  flex-wrap: wrap;
  row-gap: 6px;
}

/* ------------------------------------------------------------------ */
/* Room — the collage entrance                                         */
/* ------------------------------------------------------------------ */

body[data-page="room"] {
  overflow: hidden;
}

.room {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
}

.room.is-scrollable {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.room.is-scrollable::-webkit-scrollbar {
  display: none;
}

/* Larger than the screen on purpose: the visitor drifts around inside it. */
.room-canvas {
  --nx: 0;
  --ny: 0;
  position: relative;
  width: max(150vw, 980px);
  aspect-ratio: 16 / 11;
  transform: translate3d(var(--pan-x, 0px), var(--pan-y, 0px), 0);
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-position: center;
  background-size: 72px 72px;
}

.room.is-scrollable .room-canvas {
  transform: none;
}

.room-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 45% 35% at 50% 42%, rgba(255, 255, 255, .07), transparent 70%);
  animation: hum 7s steps(1) infinite;
}

@keyframes hum {
  0%, 100% { opacity: 1; }
  61% { opacity: .55; }
  62% { opacity: 1; }
  64% { opacity: .7; }
  65% { opacity: 1; }
}

.piece {
  position: absolute;
  top: var(--y);
  left: var(--x);
  z-index: calc(var(--depth) + 1);
  display: block;
  width: var(--w);
  transform: translate3d(calc(var(--nx) * var(--depth) * -12px), calc(var(--ny) * var(--depth) * -12px), 0) rotate(var(--rot));
  -webkit-tap-highlight-color: transparent;
}

.piece.is-decor {
  pointer-events: none;
}

.piece-inner {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i) * 90ms);
}

.room.is-ready .piece-inner {
  opacity: 1;
  transform: none;
}

.room.is-settled .piece-inner {
  transition-duration: var(--duration);
  transition-delay: 0s;
}

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

.piece-label {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 10px;
  padding: 2px 7px;
  background: var(--fg);
  color: var(--bg);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: rotate(calc(var(--rot) * -1));
  transform-origin: left top;
  pointer-events: none;
  transition: opacity var(--duration) ease;
}

.piece:focus-visible {
  outline: none;
}

.piece:focus-visible .piece-inner {
  outline: 1px solid var(--fg);
  outline-offset: 6px;
}

.piece:hover,
.piece:focus-visible,
.piece.is-revealed {
  z-index: 20;
}

.piece:focus-visible .piece-label,
.piece.is-revealed .piece-label {
  opacity: 1;
}

.room.is-settled .piece:focus-visible .piece-inner,
.room.is-settled .piece.is-revealed .piece-inner {
  transform: translate(-4px, -6px) rotate(2deg) scale(1.04);
}

@media (hover: hover) {
  .room.is-settled .piece:hover .piece-inner {
    transform: translate(-4px, -6px) rotate(2deg) scale(1.04);
  }

  .piece:hover .piece-label {
    opacity: 1;
  }

  .piece:hover img {
    animation: shiver 360ms steps(3) infinite;
  }

  .room.is-settled .room-canvas:has(a.piece:hover) .piece:not(:hover) .piece-inner {
    opacity: .32;
  }
}

@keyframes shiver {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(1px, -1px) rotate(.6deg); }
  66% { transform: translate(-1px, 1px) rotate(-.5deg); }
}

.room-top {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 14px var(--pad);
  mix-blend-mode: difference;
  pointer-events: none;
}

.room-top a {
  pointer-events: auto;
}

.room-skip {
  color: var(--muted);
  transition: color var(--duration) ease;
}

.room-meta {
  position: fixed;
  right: var(--pad);
  bottom: 14px;
  left: var(--pad);
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .14em;
  text-transform: uppercase;
  mix-blend-mode: difference;
  pointer-events: none;
}

.room-fallback {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
}

@media (hover: hover) {
  .room-skip:hover {
    color: var(--fg);
  }
}

/* ------------------------------------------------------------------ */
/* Room in WebGL — drawn on one canvas, labels stay in the page        */
/* ------------------------------------------------------------------ */

.room-gl {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: var(--bg);
  touch-action: none;
}

.room-gl:focus {
  outline: none;
}

.room-gl.is-pointing {
  cursor: pointer;
}

/* Game screens borrow the look of late-90s console horror: serif captions outlined in black, no panels. */
.game-text,
.game-hint,
.game-caption,
.game-code,
.game-items,
.game-corner,
.game-page-back {
  --font-game: var(--font);
  font-family: var(--font-game);
}

body.is-game .room-top .brand,
body.is-game .room-meta {
  display: none;
}

body.is-game .room-skip {
  position: absolute;
  left: -9999px;
}

body.is-game .room-skip:focus-visible {
  position: static;
}

.game-text {
  position: fixed;
  bottom: 10vh;
  left: 50%;
  z-index: 65;
  width: min(640px, calc(100% - 32px));
  color: #e6e4de;
  font-size: clamp(17px, 2.3vw, 22px);
  line-height: 1.55;
  text-align: center;
  text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000, 0 2px 6px #000;
  transform: translateX(-50%);
  pointer-events: none;
}

.game-text-line {
  margin: 0;
  white-space: pre-line;
}

.game-choice {
  display: flex;
  justify-content: center;
  gap: 56px;
  margin-top: 12px;
  pointer-events: auto;
}

.game-choice-option {
  position: relative;
  padding: 2px 6px;
  color: rgba(230, 228, 222, .4);
  font: inherit;
  text-shadow: inherit;
}

.game-choice-option[hidden] { display: none; }
.game-choice-option[aria-pressed="true"] {
  color: #fff;
}

.game-choice-option[aria-pressed="true"]::before {
  content: "\25B8";
  position: absolute;
  right: 100%;
  margin-right: 4px;
}

.game-hint {
  position: fixed;
  bottom: 4vh;
  left: 50%;
  z-index: 64;
  margin: 0;
  color: rgba(255, 255, 255, .5);
  font-size: 13px;
  letter-spacing: .28em;
  text-transform: uppercase;
  white-space: pre;
  text-shadow: 1px 1px 0 #000;
  transform: translateX(-50%);
  pointer-events: none;
}

.game-corner {
  position: fixed;
  top: 14px;
  right: var(--pad);
  z-index: 64;
  display: flex;
  gap: 22px;
}

.game-corner-button {
  color: rgba(255, 255, 255, .3);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 #000;
}

.game-corner-button:focus-visible,
.game-page-back:focus-visible,
.game-code-action:focus-visible {
  outline: 1px solid rgba(255, 255, 255, .5);
  outline-offset: 4px;
}

/* ?debug only: where the player stands, in the numbers a room file's "objects" use */
.game-where {
  position: fixed;
  top: var(--pad);
  left: var(--pad);
  z-index: 64;
  margin: 0;
  color: rgba(230, 228, 222, .8);
  font: 13px/1.4 var(--font);
  text-shadow: 1px 1px 0 #000;
  pointer-events: none;
}

.game-caption {
  position: fixed;
  bottom: 5vh;
  left: var(--pad);
  z-index: 64;
  margin: 0;
  color: rgba(230, 228, 222, .7);
  font-size: clamp(15px, 1.8vw, 19px);
  font-style: italic;
  letter-spacing: .06em;
  text-shadow: 1px 1px 0 #000, 0 0 8px #000;
  pointer-events: none;
}

.game-code,
.game-items {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 66;
  width: min(520px, calc(100% - 32px));
  color: #e6e4de;
  text-align: center;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 0 2px 6px #000;
  transform: translate(-50%, -50%);
}

.game-items {
  display: flex;
  max-height: min(76vh, 620px);
  flex-direction: column;
  padding: 22px 20px 20px;
  border: 1px solid rgba(230, 228, 222, .18);
  background: rgba(0, 0, 0, .82);
  /* The rest of the room goes dark behind it, the way a console item screen does. */
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .66);
}

.game-items-list,
.game-items-note {
  scrollbar-width: thin;
  scrollbar-color: rgba(230, 228, 222, .3) transparent;
}

.game-items-list::-webkit-scrollbar,
.game-items-note::-webkit-scrollbar {
  width: 6px;
}

.game-items-list::-webkit-scrollbar-thumb,
.game-items-note::-webkit-scrollbar-thumb {
  background: rgba(230, 228, 222, .3);
}

.game-items-list::-webkit-scrollbar-track,
.game-items-note::-webkit-scrollbar-track {
  background: transparent;
}

.game-code-label,
.game-items-title {
  margin: 0 0 18px;
  font-size: clamp(17px, 2.3vw, 22px);
}

.game-items-title {
  flex: 0 0 auto;
  margin-bottom: 14px;
  color: rgba(230, 228, 222, .75);
  font-size: 13px;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.game-code-digits {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.game-code-digit {
  width: 44px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(230, 228, 222, .3);
  color: rgba(230, 228, 222, .55);
  font: inherit;
  font-size: 30px;
  text-shadow: inherit;
}

.game-code-digit[aria-pressed="true"] {
  border-bottom-color: #fff;
  color: #fff;
}

.game-code-actions {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 22px;
}

.game-code-action {
  color: rgba(230, 228, 222, .6);
  font: inherit;
  font-size: 16px;
  letter-spacing: .12em;
  text-shadow: inherit;
}

.game-items-list {
  display: grid;
  max-height: 24vh;
  flex: 0 0 auto;
  gap: 6px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  font-size: 18px;
}

.game-items-list button {
  color: rgba(230, 228, 222, .5);
  font: inherit;
  text-shadow: inherit;
}

.game-items-list button[aria-pressed="true"] {
  color: #fff;
}

/* The map of the rooms that stopped moving. Bottom left, from the end of the opening onwards. */
.game-map {
  position: fixed;
  bottom: calc(5vh + 32px); /* clear of the room caption, which sits at 5vh */
  left: var(--pad);
  z-index: 64;
  width: min(148px, 26vw);
  color: #e6e4de;
  font-family: var(--font);
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 0 2px 6px #000;
  pointer-events: none;
}

.game-items-use {
  flex: 0 0 auto;
  margin: 16px auto 0;
  padding: 4px 12px;
  border: 1px solid rgba(230, 228, 222, .45);
  color: #e6e4de;
  font: inherit;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-shadow: inherit;
}

.game-items-use:hover,
.game-items-use:focus-visible {
  border-color: #fff;
  background: rgba(230, 228, 222, .12);
  color: #fff;
}

.game-items-back {
  flex: 0 0 auto;
  margin: 16px auto 0;
  padding: 3px 9px;
  border: 1px solid rgba(230, 228, 222, .2);
  color: rgba(230, 228, 222, .55);
  font: inherit;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-shadow: inherit;
}

.game-items-back:hover,
.game-items-back:focus-visible {
  border-color: rgba(230, 228, 222, .45);
  color: #fff;
}

/* The floor is about as deep as it is wide, so the map is square, like docs/floor-plan.svg. */
.game-map svg {
  display: block;
  width: 100%;
  max-height: 24vh;
  aspect-ratio: 1;
}

.game-map-empty,
.game-map-count {
  margin: 3px 0 0;
  color: rgba(230, 228, 222, .5);
  font-size: 10px;
  letter-spacing: .06em;
}

.game-items-note {
  max-height: 46vh;
  flex: 0 1 auto;
  overflow-y: auto;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(230, 228, 222, .14);
  color: rgba(230, 228, 222, .82);
  font-size: 16px;
  font-style: italic;
  line-height: 1.8;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: pre-line;
}

.game-items-note:empty {
  min-height: 3em;
}

.game-page {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #000;
}

/* The film, lifted off the tube and put on the whole screen. The same stream keeps playing; nothing reloads. */
.game-film {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: #000;
}

.game-film-stage {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
}

/* Up close the film is shown plainly: no grain, no filter, no pixels — the grade belongs to the tube, not here. */
.game-film-stage video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
  image-rendering: auto;
}

.game-film-credit {
  margin: 0;
  padding: 12px var(--pad) 26px;
  color: rgba(230, 228, 222, .6);
  font-family: var(--font);
  font-size: 14px;
  font-style: italic;
  letter-spacing: .04em;
  text-align: center;
}

.game-page-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.game-page-back {
  position: fixed;
  right: var(--pad);
  bottom: 14px;
  z-index: 81;
  padding: 3px 9px;
  border: 1px solid rgba(230, 228, 222, .2);
  background: rgba(0, 0, 0, .6);
  color: rgba(230, 228, 222, .55);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.game-page-back:hover,
.game-page-back:focus-visible {
  border-color: rgba(230, 228, 222, .45);
  color: #fff;
}

.game-stick {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Notes — blog, murmurs, songs                                        */
/* ------------------------------------------------------------------ */

.notes-list {
  margin: 0;
  padding: 0 var(--pad);
  list-style: none;
}

.note-row {
  display: grid;
  grid-template-columns: 96px 88px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.note-date,
.note-topic {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.note-title {
  overflow-wrap: anywhere;
}

@media (hover: hover) {
  .note-row:hover .note-title {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }

  .note-back:hover {
    color: var(--fg);
  }

  .note-body a:hover {
    border-bottom-color: var(--fg);
  }
}

@media (max-width: 559px) {
  .note-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 12px;
  }

  .note-title {
    grid-column: 1 / -1;
  }
}

.note-view {
  width: 100%;
  max-width: 760px;
  padding: 32px var(--pad) 40px;
}

.note-back {
  color: var(--muted);
  transition: color var(--duration) ease;
}

.note-meta {
  margin: 32px 0 6px;
  color: var(--muted);
}

.note-heading {
  margin: 0 0 24px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}

.note-body {
  max-width: 64ch;
}

.note-body p {
  margin: 0 0 1.2em;
  overflow-wrap: anywhere;
}

.note-body a {
  border-bottom: 1px solid var(--line);
  transition: border-color var(--duration) ease;
}

/* ------------------------------------------------------------------ */
/* Reduced motion — no grain flicker, no transitions                   */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}

/* Shop: the order (main.js initShopPage). Kept to the shop's own column. */
/* The shop page (it used to sit in shop.html, where style-src 'self' stopped it). */
.shop { padding: var(--gap, 16px); max-width: 72ch; }
.shop h1 { font-weight: normal; font-size: 1.4rem; margin: 0 0 1rem; }
.shop h2 { font-weight: normal; font-size: 1.1rem; margin: 2rem 0 .5rem; }
.shop p { line-height: 1.7; }
.shop .muted { color: var(--muted, #8c8c86); }
.shop .photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 1rem 0; }
.shop .photos img { width: 100%; height: auto; display: block; background: rgba(255,255,255,.03); }
.shop dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.2rem; line-height: 1.7; }
.shop dt { color: var(--muted, #8c8c86); }
.shop a.button { display: inline-block; padding: .5rem 1rem; border: 1px solid var(--line, #444); margin-top: .5rem; }
.order { display: grid; gap: .8rem; max-width: 36rem; margin: 1rem 0 2rem; }
.order label { display: grid; gap: .3rem; color: var(--muted, #8c8c86); }
.order input,
.order textarea { font: inherit; color: inherit; background: transparent; border: 1px solid var(--line, #444); padding: .5rem .6rem; border-radius: 0; }
.order input:focus-visible,
.order textarea:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }
.order-send { justify-self: start; font: inherit; color: inherit; background: transparent; border: 1px solid var(--line, #444); padding: .5rem 1rem; cursor: pointer; }
.order-missing { margin: 0; }
.order-sent { margin: 0; }
.order-failed { display: grid; gap: .6rem; }
.order-failed[hidden] { display: none; }
.order-failed p { margin: 0; }
.order-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order-where { border: 0; padding: 0; margin: 0; display: flex; gap: 1.4rem; flex-wrap: wrap; color: var(--muted, #8c8c86); }
.order-where legend { padding: 0; margin-bottom: .3rem; }
.order-where label { display: inline-flex; gap: .4rem; align-items: center; color: inherit; }
.order-pay { border-top: 1px solid var(--line, #444); padding-top: 1rem; }
.order-pay h3 { font-weight: normal; font-size: 1rem; margin: 0 0 .5rem; }


/* ------------------------------------------------------------------ */
/* Live (live.json, main.js): ticket cards, reservations, the gate     */
/* ------------------------------------------------------------------ */

.room-top-links { display: inline-flex; gap: 18px; }

.live { padding: var(--pad); max-width: 1080px; }
.live h1 { font-weight: normal; font-size: 1.4rem; margin: 0 0 1.2rem; }
.live-section { margin: 0 0 3rem; }
.live-section > h2 { font-weight: normal; font-size: 1rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: .5rem; margin: 0 0 1.2rem; }

/* A ticket: the flyer on the left, the stub on the right, a perforation between. */
.ticket { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); margin: 0 0 1.4rem; background: rgba(255, 255, 255, .02); }
@media (min-width: 720px) { .ticket { grid-template-columns: minmax(200px, 34%) minmax(0, 1fr); } }
.ticket-flyer { background: rgba(255, 255, 255, .03); border-bottom: 1px dashed var(--line); }
@media (min-width: 720px) { .ticket-flyer { border-bottom: 0; border-right: 1px dashed var(--line); } }
.ticket-flyer img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ticket-body { padding: 1.2rem 1.4rem 1.4rem; display: grid; gap: .7rem; align-content: start; }
.ticket-date { display: flex; align-items: baseline; gap: .8rem; margin: 0; }
.ticket-day { font-size: 2.6rem; line-height: 1; }
.ticket-when { color: var(--muted); letter-spacing: .06em; }
.ticket-presenter { margin: 0; font-size: .9rem; }
.ticket-title { font-weight: normal; font-size: 1.6rem; margin: 0; line-height: 1.25; }
.ticket-facts,
.ticket-lineup { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1.2rem; margin: 0; line-height: 1.6; }
.ticket-facts dt,
.ticket-lineup dt { color: var(--muted); }
.ticket-facts dd,
.ticket-lineup dd { margin: 0; }
.ticket-lineup { border-top: 1px solid var(--line); padding-top: .7rem; }
.ticket-prices { list-style: none; margin: 0; padding: .7rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .35rem; }
.ticket-prices li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .9rem; }
.ticket-kind { min-width: 7.5em; color: var(--muted); }
.ticket-price { font-size: 1.25rem; }
.ticket-note { margin: 0; font-size: .9rem; }
.ticket-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding-top: .4rem; }
.ticket-buy,
.ticket-hold,
.live-gate-enter { font: inherit; color: var(--bg); background: var(--fg); border: 1px solid var(--fg); padding: .55rem 1.2rem; cursor: pointer; text-decoration: none; }
.ticket-hold { color: inherit; background: transparent; border-color: var(--line); }
.ticket-buy:hover,
.ticket-hold:hover,
.live-gate-enter:hover { opacity: .8; }
.ticket-until { font-size: .85rem; }
.ticket-reserve { margin: .4rem 0 0; }
.ticket-reserve select { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); padding: .4rem .6rem; justify-self: start; }
.ticket-played { margin: 0; letter-spacing: .08em; }
.ticket.is-past { opacity: .62; }
.ticket.is-compact .ticket-day { font-size: 2rem; }
.ticket.is-compact .ticket-title { font-size: 1.3rem; }
@media (min-width: 720px) { .ticket.is-compact { grid-template-columns: 140px minmax(0, 1fr); } }

/* The record (linkco.re): cover and the services. */
.release { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); margin: 0 0 1.4rem; }
@media (min-width: 720px) { .release { grid-template-columns: 220px minmax(0, 1fr); } }
.release-cover img { display: block; width: 100%; height: auto; }
.release-body { padding: 1.2rem 1.4rem; display: grid; gap: .5rem; align-content: start; }
.release-body p { margin: 0; }
.release-title { font-weight: normal; font-size: 1.3rem; margin: 0; line-height: 1.3; }
.release-links { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.release-links a { display: inline-block; border: 1px solid var(--line); padding: .35rem .8rem; text-decoration: none; }
.release-links a:hover { border-color: var(--fg); }
.release-all { color: var(--muted); justify-self: start; }

/* The gate at the entrance: laid over the rooms until it is closed. */
.live-gate { position: fixed; inset: 0; z-index: 200; overflow-y: auto; background: rgba(0, 0, 0, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.live-gate-inner { max-width: 920px; margin: 0 auto; padding: calc(var(--pad) * 2) var(--pad) calc(var(--pad) * 3); }
.live-gate-brand { margin: 0; color: var(--muted); letter-spacing: .08em; }
.live-gate-title { font-weight: normal; font-size: 1rem; letter-spacing: .3em; text-transform: uppercase; margin: .4rem 0 1.4rem; }
.live-gate-soon { margin: 0 0 1.6rem; }
.live-gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 1.2rem; }
.live-gate-more { color: var(--muted); }
/* No flyer (or cover) yet: the stub takes the whole width. */
.ticket:not(:has(.ticket-flyer)),
.ticket.is-compact:not(:has(.ticket-flyer)),
.release:not(:has(.release-cover)) { grid-template-columns: minmax(0, 1fr); }
.release-tracks { margin: .3rem 0 0; padding-left: 1.4rem; line-height: 1.7; }
/* A flyer is shown whole (it is the poster): its own height, top of the stub. */
.ticket-flyer { align-self: start; }
.ticket-flyer img { height: auto; object-fit: initial; }
