.history-page {
  background: #f7f7f4;
  color: #161616;
}

.history-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: clip;
  background: #f7f7f4;
}

.history-shell > main {
  flex: 1 0 auto;
}

.history-footer__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 28px;
  fill: none;
  stroke: #050505;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.history-footer__icon circle {
  fill: #050505;
  stroke: none;
}

.history-footer__trigger { flex:0 1 auto; display:flex; align-items:center; gap:.55rem; margin:0; padding:.25rem; border:0; background:transparent; color:#050505; cursor:pointer; text-align:center; }
.history-footer__trigger > span { flex:0 1 auto; height:auto; background:transparent; font-family:Georgia,serif; font-size:1.1rem; }
.history-footer__trigger:focus-visible { outline:2px solid #050505; outline-offset:4px; }

.canon-card--add { display:grid; place-content:center; gap:.3rem; border:2px dashed #bd8210; background:#fff; color:#6d510f; font-family:var(--display); font-size:1rem; font-weight:700; cursor:pointer; text-transform:uppercase; }
.canon-card--add strong { font:2.5rem/1 var(--body); font-weight:300; }
.is-history-editor-mode .canon-card[data-history-id] { cursor:pointer; }
.is-history-editor-mode .canon-card[data-history-id] .canon-card__paper { outline:1px dashed #bd8210; outline-offset:3px; }
.is-history-editor-mode .canon-card[data-history-id] .canon-card__paper::after { content:"Bewerken"; position:absolute; z-index:3; top:1rem; right:.65rem; padding:.28rem .52rem; background:#d59a18; color:#090909; font-family:var(--display); font-size:.78rem; font-weight:700; letter-spacing:.08em; pointer-events:none; text-transform:uppercase; }

.history-editor { width:min(680px,calc(100vw - 2rem)); max-height:min(900px,calc(100vh - 2rem)); overflow-y:auto; padding:0; border:0; background:#f4f1e9; color:#17120a; box-shadow:0 24px 80px rgb(0 0 0 / .45); }
.history-editor::backdrop { background:rgb(5 5 5 / .72); backdrop-filter:blur(3px); }
.history-data-status { margin: 2rem 0; color: #6f5a2b; font: 600 1rem/1.4 var(--body); }
.history-editor__form { padding:0 0 1.5rem; background:#f4f1e9; color:#17120a; }
.history-editor__header { position:relative; display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding:clamp(1.35rem,3vw,2rem) clamp(1.25rem,3vw,2rem); background:var(--gold); color:var(--black); }
.history-editor__header > div { min-width:0; padding-right:3rem; }
.history-editor__header p { margin:0 0 .3rem; color:var(--black); font:700 .82rem/1 var(--display); letter-spacing:.12em; text-transform:uppercase; }
.history-editor__header h2 { margin:0; color:var(--black); font:700 clamp(2rem,4vw,3rem)/.9 var(--display); text-transform:uppercase; }
.history-editor__header button { position:absolute; top:clamp(1.1rem,3vw,1.65rem); right:clamp(1.1rem,3vw,1.65rem); display:grid; width:44px; height:44px; place-items:center; border:1px solid var(--black); background:var(--black); color:var(--gold-light); font:700 2rem/1 var(--body); cursor:pointer; }
.history-editor__header button:hover { background:var(--pure-white); color:var(--black); }
.history-editor__status { margin:1.1rem 1.5rem 0; color:#76520c; line-height:1.35; }
.history-editor__status:empty { display:none; }
.history-editor__status.is-error { color:#9a2a18; }
.history-editor label { display:grid; gap:.35rem; margin:1.1rem 1.5rem 0; color:#27241f; font:700 1rem/1.1 var(--display); text-transform:uppercase; }
.history-editor input,.history-editor textarea { width:100%; box-sizing:border-box; padding:.65rem; border:1px solid #c9c6bd; background:var(--pure-white); color:var(--ink); font:400 1rem/1.35 var(--body); text-transform:none; }
.history-upload { margin:1.5rem 1.5rem 0; padding-top:1.1rem; border-top:1px solid #d8c58f; }
.history-upload h3 { margin:0 0 .6rem; color:#76520c; font:700 1.25rem/1.1 var(--display); text-transform:uppercase; }
.history-upload__dropzone { display:grid; min-height:120px; place-content:center; gap:.3rem; border:1px dashed #b98212; background:#fbfaf5; color:#17120a; cursor:pointer; text-align:center; }
.history-upload__dropzone.is-dragging { background:#eee7d6; }
.history-upload__dropzone strong { font:700 1.2rem/1.1 var(--display); text-transform:uppercase; }
.history-upload__dropzone span { color:#615d54; font-size:.85rem; }
.history-upload__preview { display:grid; grid-template-columns:90px minmax(0,1fr) auto; gap:.7rem; align-items:center; margin-top:.7rem; padding:.55rem; border:1px solid #d8d3c7; background:#fbfaf5; color:#17120a; }
.history-upload__preview[hidden] { display:none; }
.history-upload__preview img { width:90px; height:60px; object-fit:cover; }
.history-upload__preview button,.history-editor__actions button { min-height:40px; padding:.55rem .7rem; border:1px solid #b8b2a7; background:transparent; color:#615d54; cursor:pointer; }
.history-upload__preview button:hover,.history-editor__actions button:hover { border-color:#b98212; color:#76520c; }
.history-upload__preview button { border-color:#a94335; color:#8d2f23; }
.history-upload__preview button:hover { border-color:#8d2f23; color:#742319; }
.history-editor__actions { display:grid; grid-template-columns:auto 1fr auto auto; gap:.65rem; align-items:center; margin:1.35rem 1.5rem 0; padding-top:1rem; border-top:1px solid #d8c58f; }
.history-editor__actions button[type="submit"] { border-color:var(--gold); background:var(--gold); color:#17120a; font:700 1rem/1 var(--display); letter-spacing:.04em; text-transform:uppercase; }
.history-editor__actions button[type="submit"]:hover { background:var(--gold-light); }
.history-editor__delete { border-color:#a94335!important; color:#8d2f23!important; }
.history-editor-bar{position:fixed;z-index:20;right:2rem;bottom:2rem;display:flex;align-items:center;gap:1rem;padding:.7rem 1rem;background:#111;color:#fff;box-shadow:0 8px 25px rgb(0 0 0 / .35)}.history-editor-bar p{margin:0;font-family:var(--display);font-size:1.1rem;text-transform:uppercase}.history-editor-bar button{border:1px solid #f0b62a;background:transparent;color:#f0b62a;padding:.45rem .65rem;cursor:pointer}
.history-editor-bar[hidden]{display:none}
.history-editor button:focus-visible,.history-editor input:focus-visible,.history-editor textarea:focus-visible,.history-editor-bar button:focus-visible{outline:2px solid #f0b62a;outline-offset:3px}
.history-delete-dialog__message { margin:1.25rem 1.5rem 0; color:#27241f; font:400 1rem/1.45 var(--body); }
.history-delete-dialog .history-auth__actions .history-delete-dialog__confirm { border-color:#a94335; background:#a94335; color:#fff; font:700 1rem/1 var(--display); letter-spacing:.04em; text-transform:uppercase; }
.history-delete-dialog .history-auth__actions .history-delete-dialog__confirm:hover { border-color:#742319; background:#8d2f23; color:#fff; }
.history-delete-dialog button:focus-visible { outline:2px solid #76520c; outline-offset:3px; }
@media (max-width:800px) { .history-delete-dialog__message { margin-inline:1rem; } }

body:has(.history-lightbox[open]) {
  overflow: hidden;
}

.history-lightbox {
  position: fixed;
  inset: 0;
  width: min(1180px, calc(100vw - 2rem));
  height: min(840px, calc(100dvh - 2rem));
  max-width: none;
  max-height: min(840px, calc(100dvh - 2rem));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d8d3c7;
  background: #f8f8f7;
  box-shadow: 0 24px 70px rgb(0 0 0 / .55);
  color: #1d1d1d;
}

.history-lightbox::backdrop { background: rgb(0 0 0 / .82); backdrop-filter: blur(3px); }

.history-lightbox__layout {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr);
  grid-template-rows: minmax(0, 1fr);
}

.history-lightbox__media {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #090909;
}

.history-lightbox__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  filter: contrast(1.05);
  object-fit: contain;
}

.history-lightbox__content {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-self: stretch;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  padding-right: max(3.5rem, clamp(1.75rem, 4vw, 3.25rem));
}

.history-lightbox__meta { margin: 0 0 .7rem; color: #966100; font-family: var(--display); font-size: clamp(1.4rem, 2.3vw, 2.15rem); font-weight: 700; letter-spacing: .015em; line-height: .85; }
.history-lightbox h2 { margin: 0; font-family: var(--display); font-size: clamp(2.15rem, 4.5vw, 3.75rem); letter-spacing: -.02em; line-height: .94; overflow-wrap: anywhere; }

.history-lightbox__copy {
  min-height: 0;
  margin-top: 1.35rem;
  margin-right: -.5rem;
  padding: 1.15rem 1rem 0 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  border-top: 1px solid #dbc078;
  color: #3d3d3d;
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.history-lightbox__copy:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.history-lightbox__copy p { margin: 0 0 1.1rem; }
.history-lightbox__close,.history-lightbox__navigate { position: absolute; z-index: 2; border: 1px solid rgb(255 255 255 / .58); background: rgb(5 5 5 / .82); color: #fff; cursor: pointer; }
.history-lightbox__close { top: .7rem; right: .7rem; width: 42px; height: 42px; border-radius: 50%; font-size: 2rem; line-height: 1; }
.history-lightbox__navigate { top: 50%; width: 46px; height: 62px; font-size: 3rem; line-height: 1; transform: translateY(-50%); }
.history-lightbox__navigate--previous { left: 0; border-left: 0; border-radius: 0 5px 5px 0; }
.history-lightbox__navigate--next { right: 0; border-right: 0; border-radius: 5px 0 0 5px; }
.history-lightbox__close:hover,.history-lightbox__navigate:hover:not(:disabled) { background: #d59a18; color: #050505; }
.history-lightbox__navigate:disabled { opacity: .28; cursor: not-allowed; }
.history-lightbox__close:focus-visible,.history-lightbox__navigate:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.history-lightbox__year-panel {
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  overflow: hidden;
  padding: 3rem 4rem;
  background: var(--black);
  color: var(--gold);
  text-align: center;
}

.history-lightbox__document {
  width: 64px;
  height: 86px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-lightbox__year {
  max-width: 100%;
  font: 700 clamp(5rem, 24vw, 22rem)/0.85 var(--display);
  letter-spacing: -0.035em;
}

.history-lightbox__year--long {
  font-size: clamp(3rem, 8vw, 8rem);
}

.history-lightbox__club {
  color: var(--pure-white);
  font: 700 clamp(0.8rem, 1.6vw, 1.15rem)/1.3 var(--display);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.history-lightbox--no-image .history-lightbox__media {
  display: flex;
  flex-direction: column;
}

.history-canon {
  min-height: 100vh;
  padding: clamp(2rem, 3.8vw, 4rem) 0 2.4rem;
  background:
    radial-gradient(circle at 16% 6%, rgb(213 154 24 / 0.07), transparent 22rem),
    linear-gradient(90deg, rgb(0 0 0 / 0.02) 1px, transparent 1px),
    #f7f7f4;
  background-size: auto, 28px 28px, auto;
}

.story-year {
  margin: 0 0 0.35rem;
  color: #b87908;
  font-family: var(--display);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.canon-route {
  position: relative;
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 3vw, 3rem);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(var(--canon-row-count, 4), 350px);
  gap: 0 clamp(0.65rem, 1.5vw, 1.5rem);
  isolation: isolate;
}

.canon-route__intro {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 0;
  align-self: start;
  width: max-content;
  padding: clamp(0.5rem, 1.6vw, 1.25rem) 0;
  isolation: isolate;
}

.canon-route__watermark {
  position: absolute;
  z-index: -1;
  top: clamp(-5.2rem, -6vw, -3.5rem);
  left: clamp(-5.5rem, -5vw, -2.4rem);
  width: clamp(20rem, 28vw, 26rem);
  height: auto;
  fill: none;
  stroke: #bd8210;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  opacity: 0.08;
  pointer-events: none;
}

.canon-route__intro h1 {
  margin: 0;
  color: #050505;
  font-family: var(--display);
  font-size: clamp(4.1rem, 6vw, 5.8rem);
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 0.8;
  text-transform: uppercase;
}

.canon-route__intro > p {
  margin: 0.44rem 0 0;
  color: #b17d15;
  font-family: var(--display);
  font-size: clamp(1.1rem, 1.7vw, 1.28rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.canon-route__line {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.canon-route__line path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.canon-route__halo {
  stroke: var(--gold);
  stroke-width: 6px;
  opacity: 0.32;
  filter: blur(1.15px);
}

.canon-route__path {
  stroke: var(--gold);
  stroke-width: 3.6px;
}

.canon-route__end {
  stroke: var(--gold);
  stroke-width: 3.8px;
}

.canon-card {
  --canon-card-offset-x: 0px;
  position: relative;
  z-index: 0;
  width: min(100%, 202px);
  height: 198px;
  min-width: 0;
  align-self: start;
  justify-self: center;
  overflow: visible;
  translate: var(--canon-card-offset-x) 0;
  grid-column: var(--canon-grid-column);
  grid-row: var(--canon-grid-row);
}

.canon-card:not(.canon-card--no-image):not(.canon-card--jubilee) { height: 174px; }
.canon-card--no-image { height: 174px; }

.canon-card__paper {
  position: relative;
  z-index: 1;
  height: 100%;
  border: 1px solid #beb8ac;
  border-bottom: 3px solid var(--gold);
  background: var(--canon-paper-color);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.canon-card__link {
  --canon-paper-color: #fff;
  position: relative;
  display: block;
  height: 100%;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  filter:
    drop-shadow(0 1px 2px rgb(67 57 43 / 0.18))
    drop-shadow(4px 7px 14px rgb(53 45 33 / 0.28));
  transition: filter 160ms ease;
}

.canon-card__link::before,
.canon-card__link::after {
  position: absolute;
  right: 50%;
  z-index: 2;
  content: "";
  pointer-events: none;
  transform: translateX(50%);
}

.canon-card__link::before {
  bottom: -8px;
  width: 27px;
  height: 10px;
  right: 50%;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.canon-card__link::after {
  right: 50%;
  bottom: -5px;
  z-index: 3;
  width: 17px;
  height: 7px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.canon-card:hover .canon-card__link,
.canon-card:focus-within .canon-card__link {
  --canon-paper-color: #f2efe7;
}

.canon-card::after {
  position: absolute;
  right: 50%;
  bottom: -69px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px #f7f7f4, 0 1px 4px rgb(91 66 20 / 0.18);
  content: "";
  transform: translateX(50%);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.canon-card::before {
  position: absolute;
  right: 50%;
  bottom: -52px;
  z-index: -1;
  width: 3px;
  height: 52px;
  background: var(--gold);
  content: "";
  transform: translateX(50%);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.canon-card__route-highlight {
  position: absolute;
  z-index: -1;
  right: 50%;
  bottom: -61px;
  width: 62px;
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 8px rgb(213 154 24 / 0.6);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(50%);
  transition: opacity 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

@media (min-width: 1367px) {
  .canon-route > .canon-card:nth-of-type(odd):not(.canon-card--jubilee):not(.canon-card--add) { --canon-card-offset-y: -12px; }
  .canon-route > .canon-card:nth-of-type(even):not(.canon-card--jubilee):not(.canon-card--add) { --canon-card-offset-y: 12px; }
  .canon-card:not(.canon-card--jubilee):not(.canon-card--add) .canon-card__link { translate: 0 var(--canon-card-offset-y, 0px); }
  .canon-card:not(.canon-card--jubilee):not(.canon-card--add)::after { bottom: -93px; }
  .canon-card:not(.canon-card--jubilee):not(.canon-card--add)::before { bottom: -76px; height: calc(76px - var(--canon-card-offset-y, 0px)); }
  .canon-card:not(.canon-card--jubilee):not(.canon-card--add) .canon-card__route-highlight { bottom: -88px; }
}

.canon-card:hover .canon-card__route-highlight,
.canon-card:focus-within .canon-card__route-highlight {
  opacity: 1;
}

.canon-card:hover::before,
.canon-card:focus-within::before {
  background: var(--gold);
  box-shadow: 0 0 7px rgb(213 154 24 / 0.6);
}

.canon-card:hover::after,
.canon-card:focus-within::after {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 0 3px #f7f7f4, 0 0 9px rgb(213 154 24 / 0.72);
}

.canon-card__image-frame {
  --image-corner-cut: 19px;
  width: calc(100% - 1.4rem);
  height: 110px;
  margin: 0.7rem 0.7rem 0;
  clip-path: polygon(0 0, calc(100% - var(--image-corner-cut)) 0, 100% var(--image-corner-cut), 100% 100%, 0 100%);
  overflow: hidden;
}

.canon-card:not(.canon-card--no-image):not(.canon-card--jubilee) .canon-card__image-frame { margin-bottom: 0; }

.canon-card img {
  width: 100%;
  height: 100%;
  margin: 0;
  display: block;
  filter: contrast(1.04);
  object-fit: cover;
  object-position: var(--image-position, center);
  transform: scale(var(--image-scale, 1));
  transition: transform 180ms ease;
}

/* Volledige pagina-scans worden in het kleine kaartvenster als leesbare bronpassage getoond. */
.canon-card--2 img,
.canon-card--3 img,
.canon-card--4 img,
.canon-card--5 img,
.canon-card--7 img,
.canon-card--9 img,
.canon-card--10 img,
.canon-card--12 img,
.canon-card--13 img,
.canon-card--14 img {
  --image-scale: 1.48;
  --image-position: center 44%;
}

/* Bij scans met een archieffoto krijgt de foto voorrang boven de omliggende tekst. */
.canon-card--6 img,
.canon-card--8 img,
.canon-card--11 img {
  --image-position: center bottom;
  --image-scale: 1.24;
}

.canon-card:hover img {
  transform: scale(calc(var(--image-scale, 1) + 0.04));
}

.canon-card__body {
  height: calc(100% - 121px);
  padding: 0.52rem 0.7rem 0.62rem;
  display: flex;
  flex-direction: column;
}

.canon-card:not(.canon-card--no-image) .canon-card__body {
  padding-bottom: 0.35rem;
}

.canon-card__route-year {
  position: absolute;
  right: calc(50% + 1rem);
  top: calc(100% + 51px);
  z-index: 1;
  margin: 0;
  padding: 0 0.28rem;
  background: #f7f7f4;
  color: #c28614;
  font-family: var(--display);
  font-size: clamp(0.94rem, 1.35vw, 1.14rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateY(-100%);
}

.canon-card h2 {
  min-height: 2.08em;
  margin: 0;
  overflow: hidden;
  color: #1b1a18;
  font-family: var(--display);
  font-size: clamp(0.96rem, 1.28vw, 1.14rem);
  font-weight: 700;
  letter-spacing: 0.012em;
  line-height: 0.98;
}

.canon-card:not(.canon-card--no-image):not(.canon-card--jubilee) .canon-card__body { padding-block: 0.4rem; }
.canon-card:not(.canon-card--no-image):not(.canon-card--jubilee) .canon-card__body > h2 { margin-block: auto; }
.canon-card--title-only .canon-card__body > h2 { margin-top: auto; }

.canon-card--no-image .canon-card__link {
  --canon-paper-color: #fff;
}

.canon-card--no-image:hover .canon-card__link,
.canon-card--no-image:focus-within .canon-card__link {
  --canon-paper-color: #f2efe7;
}

.canon-card--no-image .canon-card__note {
  position: relative;
  container-type: inline-size;
  height: 100%;
  padding: 0.95rem 0.7rem 0.75rem;
}

.canon-card--no-image .canon-card__note > :not(.canon-card__year-watermark) {
  position: relative;
  z-index: 1;
}

.canon-card__eyebrow {
  flex-shrink: 0;
  margin: 0 0 0.4rem;
  padding-right: 0.6rem;
  color: #b87908;
  font: 700 0.55rem/1.2 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.canon-card__title-rule {
  height: 1px;
  flex-shrink: 0;
  margin: 0.35rem 0;
  background: var(--gold);
}

.canon-card--no-image h2 {
  flex-shrink: 0;
  min-height: 0;
  overflow-wrap: anywhere;
  line-height: 1.05;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.canon-card__excerpt {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0 0 0.6rem;
}

.canon-card__year-watermark {
  position: absolute;
  top: 15%;
  left: 29%;
  right: 0.55rem;
  z-index: 0;
  color: rgb(213 154 24 / 0.15);
  font: 700 clamp(3.5rem, 62cqw, 8.5rem)/0.8 var(--display);
  letter-spacing: -0.04em;
  pointer-events: none;
  text-align: right;
  user-select: none;
}

.canon-card__text-preview {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: #3d3d3d;
  font-family: var(--body);
  font-size: 0.8rem;
  line-height: 1.4;
}

.story-back {
  display: inline-block;
  margin-top: auto;
  color: #6d510f;
  font-family: var(--body);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.canon-card--jubilee .canon-card__link {
  cursor: default;
}

.canon-card--jubilee .canon-card__paper {
  background: #fffdf7;
}

.canon-card--jubilee:hover .canon-card__link {
  --canon-paper-color: #fffdf7;
}

.canon-card__jubilee-body {
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 0.65rem 0.68rem;
  text-align: center;
}

.canon-card__century {
  margin: 0;
  color: transparent;
  font-family: var(--display);
  font-size: clamp(3.4rem, 5vw, 4.9rem);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.78;
  -webkit-text-stroke: 1.5px #c28614;
}

.canon-card__jubilee-year {
  margin: 0.5rem 0 0;
  color: #c28614;
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.8vw, 1.58rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
}

.canon-card__jubilee-body h2 {
  min-height: 0;
  margin-top: 0.25rem;
  font-size: clamp(0.95rem, 1.15vw, 1.06rem);
}

.history-canon__source {
  max-width: 1560px;
  margin: 1rem auto 0;
  padding: 0 clamp(1.2rem, 3vw, 3rem);
  color: #706c64;
  font-size: 0.85rem;
  font-style: italic;
}

.history-story {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 5vw, 4rem) 5rem;
}

.story-back {
  margin-bottom: 2rem;
}

.story-header {
  max-width: 760px;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #d8d3c7;
}

.story-kicker {
  margin: 0 0 0.55rem;
  color: #8b661c;
  font-family: var(--body);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.history-story h1 {
  max-width: 740px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 5.7rem);
  letter-spacing: 0.018em;
  line-height: 0.87;
}

.story-figure {
  max-width: 800px;
  margin: 2rem 0 2.1rem;
}

.story-image {
  width: 100%;
  max-height: 510px;
  margin: 0;
  display: block;
  border-bottom: 5px solid #d59a18;
  filter: contrast(1.05);
  object-fit: cover;
}

.story-figure figcaption {
  margin-top: 0.55rem;
  color: #706c64;
  font-family: var(--body);
  font-size: 0.78rem;
  font-style: italic;
}

.story-copy {
  max-width: 700px;
  font-size: 1.08rem;
  line-height: 1.7;
}

.story-copy p {
  margin: 0 0 1.15rem;
}

.story-source {
  max-width: 700px;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #d8d3c7;
  color: #706c64;
  font-size: 0.88rem;
  font-style: italic;
}

@media (max-width: 1366px) and (min-width: 768px) {
  .history-canon { padding-top: 2rem; }
  .canon-route { padding: 0 1rem; gap: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(var(--canon-row-count, 4), 286px); }
  .canon-route__intro { padding: 0.5rem 0; }
  .canon-route__watermark { top: -3.75rem; left: -3.25rem; width: clamp(17rem, 27vw, 21rem); }
  .canon-route__intro h1 { font-size: clamp(3.7rem, 7.2vw, 4.8rem); }
  .canon-route__intro > p { font-size: clamp(0.9rem, 1.5vw, 1rem); }
  .canon-card { width: min(88%, 190px); height: 166px; }
  .canon-card:not(.canon-card--no-image):not(.canon-card--jubilee) { height: 146px; }
  .canon-card--no-image { height: 146px; }
  .canon-card__link {
    filter:
      drop-shadow(0 1px 2px rgb(67 57 43 / 0.15))
      drop-shadow(3px 5px 10px rgb(53 45 33 / 0.24));
  }
  .canon-card__image-frame { --image-corner-cut: 22px; width: calc(100% - 0.9rem); height: 86px; margin: 0.45rem; }
  .canon-card__body { height: calc(100% - 98px); padding: 0.38rem 0.5rem 0.46rem; }
  .canon-card:not(.canon-card--no-image):not(.canon-card--jubilee) .canon-card__body { height: calc(100% - 93px); padding: 0.35rem 0.5rem; }
  .canon-card h2 { min-height: 2.08em; font-size: 0.92rem; }
  .canon-card--no-image .canon-card__note { padding: 0.75rem 0.6rem 0.6rem; }
  .canon-card__eyebrow { font-size: 0.5rem; }
  .canon-card--no-image .canon-card__text-preview { font-size: 0.77rem; }
  .canon-card__title-rule { margin-block: 0.22rem; }
  .canon-card__excerpt { margin-block: 0.35rem 0.4rem; }
  .canon-card--jubilee .canon-card__jubilee-body { height: 100%; align-items: center; justify-content: center; padding: 0.8rem 0.65rem 0.68rem; text-align: center; }
  .canon-card--jubilee .canon-card__jubilee-body h2 { width: 100%; min-height: 0; margin-top: 0.25rem; text-align: center; }
  .canon-card__link::before { bottom: -7px; width: 21px; height: 9px; }
  .canon-card__link::after { bottom: -4px; width: 13px; height: 5px; }
  .canon-card::before { bottom: -39px; height: 39px; }
  .canon-card::after { bottom: -54px; width: 12px; height: 12px; border-width: 2px; }
  .canon-card:not(.canon-card--jubilee):not(.canon-card--add)::after { bottom: -72.5px; }
  .canon-card:not(.canon-card--jubilee):not(.canon-card--add)::before { bottom: -57.5px; height: 57.5px; }
  .canon-card:not(.canon-card--jubilee):not(.canon-card--add) .canon-card__route-highlight { bottom: -68.5px; }
  .canon-card__route-year { top: calc(100% + 44px); right: calc(50% + 0.8rem); font-size: 0.84rem; }
  .is-history-editor-mode .canon-card[data-history-id] .canon-card__paper::after { top:.72rem; right:.45rem; padding:.2rem .38rem; font-size:.64rem; }
}

@media (max-width: 767px) {
  .history-lightbox__year-panel {
    min-height: 0;
    height: 100%;
    padding: 1rem 3rem;
    gap: 0.6rem;
  }
  .history-lightbox__document { width: 36px; height: 48px; }
  .history-lightbox__year { font-size: clamp(3rem, 18vw, 6rem); }
  .history-lightbox__year--long { font-size: clamp(2.5rem, 15vw, 5rem); }
  .history-lightbox__club { font-size: 0.85rem; letter-spacing: 0.2em; }

  .history-editor__header { padding:1.2rem 1rem 1.1rem; }
  .history-editor__header > div { padding-right:2.75rem; }
  .history-editor__header h2 { font-size:clamp(1.9rem,7vw,2.5rem); }
  .history-editor__header button { top:1rem; right:1rem; width:40px; height:40px; }
  .history-editor__status,
  .history-editor label,
  .history-upload,
  .history-editor__actions { margin-inline:1rem; }
  .history-canon { padding: 2.5rem 1.15rem 3rem; background-size: auto, 20px 20px, auto; }
  .canon-route { margin-left: 0; padding: 0 0 0 5rem; display: grid; grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: auto; gap: 1.25rem; }
  .canon-route__intro { grid-column: 1; grid-row: auto; margin: 0 0 1.25rem -5rem; padding: 0; text-align: left; }
  .canon-route__watermark { top: -3.5rem; left: -3.8rem; width: clamp(14rem, 65vw, 18rem); }
  .canon-route__intro h1 { font-size: clamp(3.25rem, 14.5vw, 4rem); }
  .canon-route__intro > p { font-size: clamp(0.9rem, 4.4vw, 1.02rem); }
  .canon-route::before { display: none; }
  .canon-route__line { display: none; }
  .canon-card[class*="canon-card--"] { --canon-card-offset-x: 0px; grid-column: 1; grid-row: auto; }
  .canon-card { z-index: 1; width: min(100%, 202px); height: auto; aspect-ratio: 202 / 174; justify-self: start; }
  .canon-card__link {
    filter:
      drop-shadow(0 1px 2px rgb(67 57 43 / 0.14))
      drop-shadow(2px 5px 9px rgb(53 45 33 / 0.22));
  }
  .canon-card__link::before,
  .canon-card__link::after { display: none; }
  .canon-card__paper { z-index: 1; }
  .canon-card::before { top: calc(2.2rem + 5.5px); right: auto; bottom: auto; left: calc(-3.62rem - 3px); z-index: 0; width: calc(3.62rem + 3px); height: 3px; transform: none; }
  .canon-card::after { top: 2.2rem; right: auto; bottom: auto; left: calc(-4.35rem - 5.5px); z-index: 2; width: 14px; height: 14px; box-shadow: 0 1px 4px rgb(91 66 20 / 0.18); transform: none; }
  .canon-card:hover::after,
  .canon-card:focus-within::after { box-shadow: 0 0 9px rgb(213 154 24 / 0.72); }
  .canon-card__route-highlight { top: calc(2.2rem + 5.5px); right: auto; bottom: auto; left: calc(-3.62rem - 3px); z-index: 0; width: calc(3.62rem + 3px); height: 3px; transform: none; }
  .canon-card--0 .canon-card__route-highlight { top: calc(2.2rem + 7px); left: -4.35rem; width: 3px; height: var(--canon-mobile-line-height); opacity: 1; background: var(--gold); box-shadow: 0 0 2px rgb(213 154 24 / 0.32); }
  .canon-card--0:hover .canon-card__route-highlight,
  .canon-card--0:focus-within .canon-card__route-highlight { background: var(--gold); box-shadow: 0 0 7px rgb(213 154 24 / 0.6); }
  .canon-card__route-year { top: 2.2rem; right: auto; left: -4.35rem; width: 3.6rem; font-size: 0.82rem; text-align: center; background: transparent; transform: translateY(-145%); }
  .canon-card__image-frame { --image-corner-cut: 17px; width: calc(100% - 2rem); height: 90px; margin: 1rem 1rem 0; }
  .canon-card__body { height: calc(100% - 106px); padding: 0.7rem 1rem 0.8rem; }
  .canon-card:not(.canon-card--no-image):not(.canon-card--jubilee) .canon-card__body { padding: 0.45rem 1rem; }
  .canon-card:not(.canon-card--no-image):not(.canon-card--jubilee) h2 { font-size: 1.25rem; }
  .canon-card--no-image .canon-card__note { padding: 1.2rem 1rem 1rem; }
  .canon-card__eyebrow { font-size: 0.65rem; }
  .canon-card--no-image h2 { font-size: 1.25rem; }
  .canon-card--no-image .canon-card__text-preview { font-size: 0.95rem; }
  .canon-card__title-rule { margin-block: 0.28rem; }
  .canon-card__excerpt { margin-block: 0.35rem 0.5rem; }
  .canon-card--jubilee .canon-card__jubilee-body { height: 100%; padding: 1.25rem 1rem 1rem; }
  .canon-card--jubilee .canon-card__century { font-size: clamp(3.1rem, 16vw, 4.25rem); }
  .canon-card--jubilee .canon-card__jubilee-year { margin-top: 0.4rem; font-size: clamp(1.2rem, 6vw, 1.5rem); }
  .canon-card--jubilee .canon-card__jubilee-body h2 { margin-top: 0.35rem; font-size: clamp(1rem, 5vw, 1.22rem); }
  .is-history-editor-mode .canon-card[data-history-id] .canon-card__paper::after { top:1.1rem; right:1rem; font-size:.72rem; }
  .history-canon__source { margin-top: 1.75rem; padding: 0; }
  .history-footer__icon { width: 28px; height: 19px; }
  .history-footer__trigger > span { font-family:var(--body); font-size:clamp(.7rem,3.1vw,.95rem); }
  .history-lightbox {
    --story-media-height: min(28dvh, 220px);
    width: min(calc(100vw - 1rem), 620px);
    height: calc(100dvh - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  .history-lightbox__layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--story-media-height) minmax(0, 1fr); }
  .history-lightbox__content { padding: 1.5rem 1.25rem 1.8rem; }
  .history-lightbox h2 { padding-right: 0; }
  .history-lightbox__navigate { top: calc(var(--story-media-height) / 2); width: 40px; height: 52px; font-size: 2.5rem; }
  .history-editor__actions{grid-template-columns:1fr 1fr}.history-editor__actions>span{display:none}.history-editor__delete{grid-column:1 / -1}.history-upload__preview{grid-template-columns:72px 1fr}.history-upload__preview img{width:72px}.history-upload__preview button{grid-column:1 / -1}.history-editor-bar{right:1rem;bottom:1rem;left:1rem;justify-content:space-between}
}

@media (max-height: 600px) {
  .history-lightbox__content { padding-block: 1rem; }
  .history-lightbox h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
  .history-lightbox__copy { margin-top: .75rem; padding-top: .75rem; }
  .history-lightbox__year-panel { flex-direction: row; gap: .75rem; padding: .75rem 3rem; }
  .history-lightbox__document { width: 24px; height: 32px; }
  .history-lightbox__year { font-size: clamp(2rem, 8vw, 4rem); }
  .history-lightbox__year--long { font-size: clamp(1.5rem, 6vw, 3rem); }
  .history-lightbox__club { font-size: .65rem; letter-spacing: .1em; }
}

@media (max-width: 767px) and (max-height: 600px) {
  .history-lightbox__navigate--previous { left: 3.75rem; border-left-width: 1px; }
  .history-lightbox__navigate--next { right: 3.75rem; border-right-width: 1px; }
}

@media (prefers-reduced-motion: reduce) {
  .canon-card, .canon-card img, .canon-card__link, .canon-card__paper { transition: none; }
}

/* Keep single-line controls consistent across all dialog forms and breakpoints. */
.history-auth input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.history-editor input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.history-editor select {
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  padding-block: 0.3rem;
  line-height: 1.2;
}

@media (max-width: 800px) {
  .history-auth input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  .history-editor input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  .history-editor select {
    height: 32px;
    min-height: 32px;
    padding-block: 0.2rem;
  }
}
