:root {
  --bg: #11100f;
  --bg-2: #181513;
  --surface: #201b17;
  --surface-2: #2b231d;
  --line: rgba(235, 211, 160, .16);
  --line-strong: rgba(235, 211, 160, .28);
  --text: #fff8ea;
  --muted: #c9bda9;
  --soft: #8c8172;
  --gold: #d9a441;
  --gold-2: #f0c46c;
  --red: #a84a3d;
  --moss: #5b9570;
  --ink: #15100c;
  --shadow: 0 24px 70px rgba(0, 0, 0, .36);
  --radius: 8px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(217, 164, 65, .045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(217, 164, 65, .035) 1px, transparent 1px),
    linear-gradient(145deg, #0f0e0d 0%, #171412 42%, #211812 100%);
  background-size: 64px 64px, 64px 64px, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .45)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018), rgba(255, 255, 255, .018) 1px, transparent 1px, transparent 4px);
  opacity: .8;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 15, 13, .82);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .26);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #f7eedc;
}

.brand-name {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 6px;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, .07);
  outline: none;
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
  min-height: calc(100vh - 84px);
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(48px, 8vw, 98px) 0 38px;
}

.hero-copy {
  max-width: 620px;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 6vw, 78px);
  line-height: .94;
  letter-spacing: 0;
}

.hero p {
  margin: 22px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
}

.button.primary {
  color: #1b1208;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 18px 36px rgba(217, 164, 65, .22);
}

.button.secondary {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, .05);
}

.hero-media {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  grid-template-rows: 220px 170px 150px;
  gap: 12px;
  min-height: 560px;
  transition: opacity 0.4s ease;
}

.hero-media.hero-fading {
  opacity: 0;
}

.media-tile {
  position: relative;
  overflow: hidden;
  min-height: 140px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #30261d, #151210);
  box-shadow: var(--shadow);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, filter .14s ease;
}

.media-tile:hover,
.media-tile:focus-visible {
  border-color: rgba(240, 196, 108, .55);
  filter: brightness(1.05);
  outline: none;
  transform: translateY(-1px);
}

.media-tile:focus-visible {
  box-shadow: var(--shadow), 0 0 0 3px rgba(240, 196, 108, .18);
}

.media-tile:first-child {
  grid-row: span 2;
}

.media-tile:nth-child(4) {
  grid-column: span 2;
}

.media-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.95) contrast(1.05);
}

.media-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding-top: 70px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .74));
}

.media-caption strong {
  font-size: 14px;
  color: #fff;
  line-height: 1.2;
}

.media-date {
  font-size: 11px;
  font-weight: 700;
  color: rgba(240, 196, 108, .9);
  letter-spacing: 0.04em;
}

.metrics {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: min(900px, calc(100% - 32px));
  margin: -46px auto 54px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.metric {
  padding: 10px 12px;
  border: 1px solid rgba(235, 211, 160, .10);
  border-radius: 8px;
  background: rgba(30, 25, 21, .36);
}

.metric + .metric {
  border-left: 1px solid rgba(235, 211, 160, .10);
}

.metric strong {
  display: block;
  color: var(--gold-2);
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.games-section,
.presentation-section,
.archives-section {
  padding: 48px 0 36px;
}

.games-section .section-head,
.presentation-section .section-head,
.archives-section .section-head {
  margin-bottom: 16px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.games-section .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.section h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1;
  letter-spacing: 0;
}

.section p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 660px;
  line-height: 1.55;
}

.text-link {
  color: var(--gold-2);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(240, 196, 108, .42);
  min-width: max-content;
}

.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.session-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(32, 27, 23, .86);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .2);
}

.session-art {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  padding: 4px;
  width: 100%;
  border: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(240, 196, 108, .10), transparent 58%),
    linear-gradient(135deg, #2f2922, #15110f);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 0;
}

.session-art:hover,
.session-art:focus-visible {
  filter: brightness(1.05);
  outline: none;
}

.session-art:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(240, 196, 108, .22);
}

.session-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.session-art.is-full::after {
  content: "COMPLET";
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  transform: rotate(-8deg);
  padding: 6px 12px;
  border: 2px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  color: rgba(255, 255, 255, .92);
  background: rgba(191, 27, 27, .74);
  box-shadow: 0 10px 24px rgba(127, 29, 29, .30);
  font-size: 16px;
  font-weight: 950;
  letter-spacing: .08em;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .42);
  pointer-events: none;
}

.session-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 7px;
  padding: 12px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.session-card h3,
.game-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.session-card h3 {
  font-size: 17px;
}

.scenario {
  color: var(--gold-2);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.session-card p,
.game-card p,
.archive-item p {
  color: var(--muted);
  line-height: 1.5;
}

.session-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.38;
}

.capacity {
  margin-top: auto;
  display: grid;
  gap: 6px;
}

.capacity-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.capacity-status {
  color: var(--gold-2);
  text-align: right;
  white-space: nowrap;
}

.session-full .capacity-status {
  color: #d7b7ad;
}

.session-low .capacity-status {
  color: #f0c46c;
}

.capacity-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  overflow: hidden;
}

.capacity-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--moss), var(--gold));
}

.session-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
}

.session-actions .small-button {
  justify-content: center;
  min-width: 0;
  min-height: 30px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.label-short {
  display: none;
}

.small-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  min-height: 34px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, .06);
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.small-button:hover,
.small-button:focus-visible {
  border-color: rgba(240, 196, 108, .62);
  outline: none;
}

.catalog-controls {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 170px;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.programme-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) repeat(4, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 10px 0 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}

.programme-controls[hidden] {
  display: none !important;
}

.game-filters[hidden] {
  display: none !important;
}

.programme-filter-panel,
.game-filter-panel {
  margin: 0 0 10px;
}

.game-filters {
  margin: 10px 0 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}

.game-filters .catalog-controls {
  justify-content: flex-start;
  margin-bottom: 12px;
}

.filter-toggle {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, .045);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.filter-toggle::after {
  content: '+';
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-2);
}

.programme-filter-panel.open .filter-toggle::after,
.game-filter-panel.open .filter-toggle::after {
  content: '-';
}

.filter-toggle small {
  margin-left: auto;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.programme-controls .programme-search {
  grid-column: span 2;
}

.programme-meta {
  margin-top: 0;
}

.search,
.select-control {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search {
  min-width: min(320px, 100%);
}

.select-control {
  min-width: 170px;
}

.search input,
.select-control select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, .06);
  font: inherit;
  text-transform: none;
}

.select-control select {
  cursor: pointer;
  color-scheme: light;
}

.select-control option {
  color: #1a1209;
  background: #fff8ea;
}

.select-control option:checked {
  color: #1a1209;
  background: var(--gold-2);
}

.search input:focus,
.select-control select:focus {
  border-color: rgba(240, 196, 108, .68);
  outline: none;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, .045);
  font-weight: 800;
  cursor: pointer;
}

.filter-button.active {
  color: #1a1209;
  border-color: transparent;
  background: var(--gold);
}

.list-meta {
  min-height: 18px;
  margin: -6px 0 14px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.list-actions {
  display: flex;
  justify-content: center;
  min-height: 38px;
  margin-top: 18px;
}

.list-actions:empty {
  display: none;
  min-height: 0;
  margin-top: 0;
}

.load-more-button {
  min-width: 160px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.game-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(32, 27, 23, .88);
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.game-card:hover,
.game-card:focus-visible {
  border-color: rgba(240, 196, 108, .62);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .26);
  outline: none;
  transform: translateY(-2px);
}

.game-cover {
  aspect-ratio: 16 / 10;
  padding: 6px;
  background:
    radial-gradient(circle at 50% 35%, rgba(240, 196, 108, .10), transparent 58%),
    linear-gradient(135deg, #2f2922, #15110f);
}

.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.game-card h3 {
  font-size: 18px;
  line-height: 1.08;
}

.game-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 13px;
}

.games-panel {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(23, 20, 18, .78);
}

.games-panel div {
  display: grid;
  gap: 6px;
}

.games-panel strong {
  font-size: 20px;
  line-height: 1.1;
}

.games-panel span {
  color: var(--muted);
  line-height: 1.4;
}

.game-open-button {
  white-space: nowrap;
}

.game-library-modal {
  display: grid;
  gap: 14px;
}

.game-library-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.game-library-head h2 {
  margin-top: 4px;
}

.game-library-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, .45fr) minmax(170px, .55fr);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.game-row-list {
  display: grid;
  gap: 8px;
}

.game-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}

.game-row:hover,
.game-row:focus-visible {
  border-color: rgba(240, 196, 108, .62);
  background: rgba(255, 255, 255, .055);
  outline: none;
}

.game-row-cover {
  display: grid;
  aspect-ratio: 16 / 10;
  padding: 5px;
  place-items: center;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 35%, rgba(240, 196, 108, .10), transparent 58%),
    linear-gradient(135deg, #2f2922, #15110f);
}

.game-row-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-row-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.game-row-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 19px;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-row-main p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-row-action {
  white-space: nowrap;
}

.game-body p,
.archive-item p {
  margin: 0;
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 850;
}

.session-tag-row {
  margin-top: 7px;
  margin-bottom: 2px;
}

.session-tag-row .tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(238, 190, 82, .28);
  border-radius: 999px;
  background: rgba(238, 190, 82, .10);
  line-height: 1;
}

.day-seat-note {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 4px 8px;
  border: 1px solid rgba(238, 190, 82, .24);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(238, 190, 82, .08);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
}

.archive-list {
  display: block;
}

.presentation-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(23, 20, 18, .78);
}

.presentation-panel div {
  display: grid;
  gap: 6px;
}

.presentation-panel strong {
  color: var(--gold-2);
  font-size: 20px;
  line-height: 1.1;
}

.presentation-panel span {
  color: var(--muted);
  line-height: 1.4;
}

.presentation-panel .button {
  white-space: nowrap;
}

.archives-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(23, 20, 18, .78);
}

.archives-panel div {
  display: grid;
  gap: 6px;
}

.archives-panel strong {
  font-size: 20px;
  line-height: 1.1;
}

.archives-panel span {
  color: var(--muted);
  line-height: 1.4;
}

.archive-open-button {
  white-space: nowrap;
}

.archive-row-list {
  display: grid;
  gap: 8px;
}

.archive-row {
  display: grid;
  grid-template-columns: 145px minmax(0, 1.35fr) minmax(130px, .55fr) 90px;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.archive-row-date,
.archive-row-universe,
.archive-row-players {
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.archive-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.archive-row-main strong,
.archive-item h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.archive-row-main span {
  color: var(--gold-2);
  font-weight: 900;
}

.archive-row-main p {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.archive-row-players {
  text-align: right;
}

.archive-modal-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.archive-modal-head h2 {
  margin-top: 4px;
}

.archive-modal-tools {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.archive-modal-sort {
  min-width: 180px;
}

.archive-count {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(238, 190, 82, .08);
  font-size: 13px;
  font-weight: 900;
}

.empty {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, .04);
}

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 20px auto 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 13px;
}

.footer a {
  color: var(--gold-2);
  font-weight: 800;
  text-decoration: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .72);
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  position: relative;
  width: min(900px, 100%);
  max-height: min(780px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #181411;
  box-shadow: var(--shadow);
}

.modal-close {
  position: sticky;
  top: 12px;
  float: right;
  z-index: 2;
  width: 38px;
  height: 38px;
  margin: 12px 12px 0 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, .08);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.modal-image {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  background: #2a221c;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-image.is-full::after {
  content: "COMPLET";
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  transform: rotate(-8deg);
  padding: 8px 14px;
  border: 2px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  color: rgba(255, 255, 255, .92);
  background: rgba(191, 27, 27, .74);
  box-shadow: 0 10px 24px rgba(127, 29, 29, .30);
  font-size: 18px;
  font-weight: 950;
  letter-spacing: .08em;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .42);
  pointer-events: none;
}

.disabled-button {
  color: #eadbc7;
  border-color: rgba(235, 211, 160, .18);
  background: rgba(255, 255, 255, .08);
  cursor: default;
}

.game-detail {
  grid-template-columns: minmax(320px, 1fr) minmax(0, .95fr);
}

.game-detail-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(70vh, 620px);
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(240, 196, 108, .08), transparent 36%),
    #100d0b;
}

.game-detail-image img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
}

.game-detail-body {
  align-content: start;
}

.full-description {
  color: var(--muted);
  line-height: 1.62;
  white-space: pre-wrap;
}

.image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 280px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--soft);
  font-weight: 800;
}

.modal-body {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.modal-body h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
}

.modal-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
  white-space: pre-wrap;
}

.presentation-modal {
  gap: 20px;
  max-width: 980px;
}

.presentation-modal-head {
  display: grid;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.presentation-modal-head p {
  max-width: 820px;
  color: var(--soft);
}

.presentation-lead {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(240, 196, 108, .34);
  border-radius: var(--radius);
  background: rgba(240, 196, 108, .08);
}

.presentation-lead strong {
  color: var(--gold-2);
  font-size: 22px;
  line-height: 1.15;
}

.presentation-lead span {
  color: var(--text);
  line-height: 1.45;
}

.presentation-block {
  display: grid;
  gap: 8px;
}

.presentation-block h3 {
  margin: 0;
  color: var(--gold-2);
  font-size: 20px;
}

.presentation-block p {
  max-width: none;
}

.presentation-block ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.presentation-block blockquote {
  margin: 4px 0 0;
  padding: 14px 16px;
  border-left: 4px solid var(--gold-2);
  border-radius: 8px;
  color: var(--text);
  background: rgba(240, 196, 108, .08);
  font-weight: 850;
}

.presentation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.presentation-grid article {
  display: grid;
  gap: 7px;
  min-height: 108px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
}

.presentation-grid strong {
  color: var(--text);
}

.presentation-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.presentation-signature {
  display: grid;
  gap: 5px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.presentation-signature strong {
  color: var(--gold-2);
  font-size: 20px;
}

.presentation-signature span {
  color: var(--text);
  font-weight: 850;
}

.player-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, .045);
  font-size: 13px;
  font-weight: 800;
}

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sitemap-grid a {
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  color: var(--text);
  text-decoration: none;
}

.sitemap-grid a:hover,
.sitemap-grid a:focus-visible {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, .075);
}

.sitemap-grid strong {
  font-size: 16px;
}

.sitemap-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.contact-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(16, 12, 8, .96);
  color: var(--text);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .38);
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}

.contact-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-media {
    min-height: 470px;
  }

  .metrics,
  .archive-list,
  .sitemap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .session-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-media {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 180px);
    min-height: auto;
  }

  .media-tile,
  .media-tile:first-child,
  .media-tile:nth-child(4) {
    grid-column: auto;
    grid-row: auto;
  }

  .metrics,
  .archive-list,
  .presentation-grid,
  .sitemap-grid {
    grid-template-columns: 1fr;
  }

  .presentation-panel,
  .archives-panel,
  .games-panel,
  .archive-modal-head,
  .game-library-head,
  .archive-modal-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .archive-open-button,
  .presentation-panel .button,
  .game-open-button,
  .archive-modal-sort {
    width: 100%;
  }

  .game-library-controls,
  .archive-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .game-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .game-row-cover {
    width: 100%;
    max-width: 240px;
  }

  .game-row-action {
    width: 100%;
  }

  .archive-row-players {
    text-align: left;
  }

  .session-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .session-card {
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 190px;
  }

  .session-art {
    aspect-ratio: auto;
    height: 100%;
  }

  .session-body {
    min-width: 0;
    gap: 6px;
    padding: 10px;
  }

  .session-card h3 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.08;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .session-card .scenario {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.15;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }

  .session-card p {
    -webkit-line-clamp: 2;
    font-size: 12px;
  }

  .capacity-line {
    align-items: center;
    font-size: 11px;
  }

  .session-actions {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    gap: 6px;
  }

  .session-actions .small-button {
    min-height: 30px;
    padding: 0 7px;
    font-size: 11px;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .catalog-controls,
  .search,
  .select-control {
    width: 100%;
  }

  .games-section .section-head,
  .catalog-controls {
    grid-template-columns: 1fr;
  }

  .modal-layout {
    grid-template-columns: 1fr;
  }

  .modal-image {
    min-height: 260px;
  }

  .game-detail-image {
    min-height: 320px;
    max-height: none;
  }
}

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

  .section {
    padding: 54px 0;
  }

  .session-card {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 176px;
  }

  .session-card p {
    -webkit-line-clamp: 1;
  }

  .capacity-track {
    height: 6px;
  }

  .label-full {
    display: none;
  }

  .label-short {
    display: inline;
  }
}

@media (max-width: 380px) {
  .session-card {
    grid-template-columns: 1fr;
  }

  .session-art {
    aspect-ratio: 16 / 10;
  }

  .session-card p {
    -webkit-line-clamp: 2;
  }

  .label-full {
    display: inline;
  }

  .label-short {
    display: none;
  }
}

/* Mobile polish: make the public programme scan like a compact list. */
@media (max-width: 720px) {
  #programme.section {
    padding-top: 44px;
  }

  #programme .section-head {
    gap: 14px;
    margin-bottom: 18px;
  }

  #programme .section-head p {
    display: none;
  }

  #programme .text-link {
    min-height: 34px;
    font-size: 13px;
  }

  #programme .filter-toggle {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  #programme .filter-toggle small {
    font-size: 10.5px;
  }

  #programme .programme-controls {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
    margin-bottom: 10px;
  }

  #programme .programme-controls .programme-search {
    grid-column: 1 / -1;
  }

  #programme .programme-controls .search,
  #programme .programme-controls .select-control {
    gap: 5px;
    min-width: 0;
    font-size: 10px;
  }

  #programme .programme-controls input,
  #programme .programme-controls select {
    min-height: 36px;
    padding: 0 9px;
    font-size: 12px;
  }

  #programme .programme-meta {
    margin: 0 0 8px;
  }

  #jeux .filter-toggle {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  #jeux .filter-toggle small {
    font-size: 10.5px;
  }

  #jeux .game-filters {
    padding: 10px;
    margin-bottom: 10px;
  }

  #jeux .game-filters .catalog-controls {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #programme .session-grid {
    gap: 8px;
  }

  #programme .session-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 132px;
    border-radius: 8px;
  }

  #programme .session-art {
    aspect-ratio: auto;
    height: 100%;
    min-height: 118px;
  }

  #programme .session-art.is-full::after {
    right: 5px;
    bottom: 5px;
    padding: 3px 6px;
    border-width: 1px;
    border-radius: 5px;
    font-size: 9px;
    letter-spacing: .05em;
  }

  #programme .session-body {
    gap: 4px;
    padding: 8px 9px;
  }

  #programme .meta-row {
    display: block;
    font-size: 10px;
    line-height: 1.2;
  }

  #programme .meta-row span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  #programme .meta-row span + span {
    margin-top: 2px;
  }

  #programme .session-card h3 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.05;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }

  #programme .session-card .scenario {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.12;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }

  #programme .session-card p {
    display: none;
  }

  #programme .capacity {
    gap: 4px;
    margin-top: 2px;
  }

  #programme .capacity-line {
    gap: 6px;
    font-size: 10.5px;
  }

  #programme .capacity-track {
    height: 5px;
  }

  #programme .session-actions {
    grid-template-columns: .8fr .8fr 1fr;
    gap: 6px;
  }

  #programme .session-actions .small-button {
    min-height: 28px;
    padding: 0 7px;
    border-radius: 6px;
    font-size: 10.5px;
  }
}

@media (max-width: 430px) {
  #programme .programme-controls {
    grid-template-columns: 1fr;
  }

  #programme .session-card {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 126px;
  }

  #programme .session-body {
    padding: 7px 8px;
  }
}

@media (max-width: 360px) {
  #programme .session-card {
    grid-template-columns: 1fr;
  }

  #programme .session-art {
    aspect-ratio: 16 / 10;
    height: auto;
  }
}

/* Smartphone portrait: keep public cards compact even on high-density Android viewports. */
@media (max-width: 980px) and (orientation: portrait) {
  #programme.section {
    padding-top: 44px;
  }

  #programme .section-head {
    gap: 14px;
    margin-bottom: 18px;
  }

  #programme .section-head p {
    display: none;
  }

  #programme .filter-toggle {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  #programme .filter-toggle small {
    font-size: 10.5px;
  }

  #programme .programme-controls {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
    margin-bottom: 10px;
  }

  #programme .programme-controls .programme-search {
    grid-column: 1 / -1;
  }

  #programme .programme-controls .search,
  #programme .programme-controls .select-control {
    gap: 5px;
    min-width: 0;
    font-size: 10px;
  }

  #programme .programme-controls input,
  #programme .programme-controls select {
    min-height: 36px;
    padding: 0 9px;
    font-size: 12px;
  }

  #jeux .filter-toggle {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  #jeux .filter-toggle small {
    font-size: 10.5px;
  }

  #jeux .game-filters {
    padding: 10px;
    margin-bottom: 10px;
  }

  #jeux .game-filters .catalog-controls {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #programme .session-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #programme .session-card {
    grid-template-columns: 120px minmax(0, 1fr);
    min-height: 156px;
    border-radius: 8px;
  }

  #programme .session-art {
    aspect-ratio: auto;
    height: 100%;
    min-height: 138px;
  }

  #programme .session-body {
    gap: 5px;
    padding: 10px;
  }

  #programme .meta-row {
    display: block;
    font-size: 11px;
    line-height: 1.2;
  }

  #programme .meta-row span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  #programme .meta-row span + span {
    margin-top: 2px;
  }

  #programme .session-card h3 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.06;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }

  #programme .session-card .scenario {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.15;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }

  #programme .session-card p {
    display: none;
  }

  #programme .capacity {
    gap: 4px;
    margin-top: 2px;
  }

  #programme .capacity-track {
    height: 5px;
  }

  #programme .session-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  #programme .session-actions .small-button {
    min-height: 30px;
    padding: 0 6px;
    font-size: 11px;
  }
}

/* Mobile detail modal: reserve space for close button and show the image uncropped. */
@media (max-width: 980px) and (orientation: portrait), (max-width: 720px) {
  .modal-backdrop {
    align-items: flex-start;
    overflow: auto;
    padding: 10px;
  }

  .modal {
    width: min(100%, 620px);
    max-height: none;
    margin: 0 auto;
    padding-top: 54px;
    overflow: visible;
  }

  .modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    float: none;
    margin: 0;
  }

  .modal-layout {
    display: block;
  }

  .modal-image {
    min-height: 0;
    aspect-ratio: 16 / 10;
    padding: 8px;
    background:
      radial-gradient(circle at 50% 35%, rgba(240, 196, 108, .10), transparent 58%),
      #15110f;
  }

  .modal-image img {
    object-fit: contain;
  }

  .modal-image.is-full::after {
    right: 10px;
    bottom: 10px;
    padding: 6px 10px;
    font-size: 14px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-body h2 {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (min-width: 1600px) and (min-height: 900px) {
  .hero {
    min-height: auto;
    padding-top: clamp(72px, 7vh, 120px);
    padding-bottom: clamp(56px, 6vh, 100px);
  }

  .hero-media {
    min-height: clamp(500px, 42vh, 660px);
  }

  .metrics {
    margin-top: 0;
  }
}
