/* Train shows (SPEC 79). Linked only by the show pages (TrainShowPages::CSS), after clubs.css, whose look they share (cards, lists, chips,
   the dark and light tokens). Every class here starts ks-. The picture panels are dark on purpose, whatever the theme, so words on a
   photo always read; the show pictures keep a calm area on their left third (headers) or lower third (heroes) for them. */

/* page headers: the picture fills the box, the words sit on its calm left third */
.ks-head, .ks-hero { position: relative; overflow: hidden; border-radius: var(--radius); background: #1a1510; margin: 0 0 1.25rem; min-height: 12rem; display: grid; align-items: center; padding: 1.25rem 1rem; }
.ks-head-big { min-height: 22rem; }
.ks-head-pic, .ks-hero-pic { position: absolute; inset: 0; display: block; }
.ks-head-pic img, .ks-hero-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ks-head-panel, .ks-hero-panel { position: relative; z-index: 2; max-width: 36rem; width: 100%; justify-self: start; padding: 1.05rem 1.25rem 1.15rem; border-radius: 12px; color: #f6efe0;
  background: rgba(14, 12, 9, .78); border: 1px solid rgba(217, 169, 90, .45); box-shadow: 0 6px 24px rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ks-head-panel h1, .ks-hero-panel h1 { margin: 0; color: #fff4dc; font-size: clamp(1.45rem, 4vw, 2.1rem); overflow-wrap: anywhere; }
.ks-head-panel .kc-lead { margin: .35rem 0 0; font-size: 1rem; }
.ks-head-panel a, .ks-hero-panel a { color: #f1c97a; }
.ks-head-panel .kc-near-hint { color: #d9ccb4; }

/* the hero of a show: the words low on the picture, where it is calm */
.ks-hero { min-height: 19rem; align-items: end; }
.ks-hero-panel { max-width: 40rem; }
/* a drawn banner (79.17): the show's name is lettered on the picture's lower band, so the picture stands whole and the words sit below it */
.ks-hero-banner { display: block; min-height: 0; padding: 0; }
.ks-banner-pic { display: block; }
.ks-banner-pic img { display: block; width: 100%; height: auto; }
.ks-hero-banner .ks-hero-panel { max-width: none; border-radius: 0; border: 0; box-shadow: none; }
.ks-tags { margin: 0 0 .4rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.ks-tags .kc-tag { color: #f1c97a; border-color: #d9a95a; }
.ks-tags .kc-tag.kc-cancel { color: #ffb4a8; border-color: #ff8a78; }
.ks-tags .kc-tag.kc-run { background: #d9a95a; color: #1a1510; }
.ks-place { display: flex; align-items: center; gap: .45rem; margin: .35rem 0 0; font-size: 1.05rem; }
.ks-hero-when { margin: .25rem 0 0; font-weight: 700; color: #fff4dc; }
.ks-aka { margin: .3rem 0 0; font-size: .9rem; color: #d9ccb4; }

/* the search form: words, near, how far, kind */
.ks-search { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: .5rem; margin: .9rem 0 0; }
.ks-search #ks-q { grid-column: 1 / -1; }   /* the words get a row of their own; near + how far, then kind + Find (2026-11-14: four in a row was cramped in the hero panel) */
.ks-search input[type=search], .ks-search select, .ks-search .btn { min-height: 44px; min-width: 0; }
.ks-search .btn { justify-self: start; }
.ks-search select.ks-idle { opacity: .8; color: var(--muted); }
.ks-search select.ks-idle:focus { opacity: 1; }
.ks-matched { font-size: .88rem; margin: .15rem 0 0; }

/* lists */
.ks-sec { margin: 0 0 1.25rem; }
.ks-row-tags { margin: 0 0 .25rem; }
.ks-when { display: flex; align-items: center; gap: .6rem; margin: .3rem 0 .15rem; font-weight: 600; }
.ks-when .kc-date { min-height: 2.6rem; min-width: 2.6rem; padding: 0 .3rem; }
.ks-when .kc-date-d { font-size: 1.1rem; }
.ks-row .kc-where { margin: 0; }
/* A show in a list (2026-11-29, Jamie: the small picture left most of each card empty): the clubs' card (clubs.css .kc-club), its picture
   flush to the edge, top to bottom, up to 14rem wide. A show's card has no line about it, so a list wide enough for two 27rem cards (the
   page's 58rem main column on a laptop) puts two side by side to fill the row; auto-fill, because a container query can't style the
   container itself. A narrow list (a phone, or a side column: a container query, so the list's own width decides) stacks the picture full
   width over the words. The date badge never shrinks (two across, its month wrapped to N/O/V). Sharp copies: ShowArt::thumb's srcset. */
.ks-list { container-type: inline-size; grid-template-columns: repeat(auto-fill, minmax(min(27rem, 100%), 1fr)); }
.ks-list > .ks-row { grid-template-columns: clamp(11rem, 42%, 14rem) minmax(0, 1fr); gap: 0; padding: 0; align-items: center; overflow: hidden; }
.ks-list > .ks-row > .kc-thumb { border-radius: 0; height: 100%; align-self: stretch; }
.ks-list > .ks-row > .kc-row-text { padding: .7rem 1.1rem; }
.ks-list .ks-when .kc-date { flex: none; }
.ks-list .ks-when .kc-date-m { white-space: nowrap; }
@container (max-width: 36rem) {
  .ks-list > .ks-row { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .ks-list > .ks-row > .kc-thumb { height: auto; }
  .ks-list > .ks-row > .kc-row-text { padding: .65rem .9rem .8rem; }
}
.ks-month { margin-top: 1.1rem; }
.ks-countries { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.ks-country .kc-regions { margin-top: .5rem; }
.ks-usual { margin: 0; padding-left: 1.1rem; }
.ks-usual li { margin: 0 0 .45rem; }
.ks-how ul { margin: 0 0 .6rem; padding-left: 1.1rem; }
.ks-how li { margin: 0 0 .35rem; max-width: 46rem; }
.ks-empty { display: flex; align-items: center; gap: 1rem; margin: .4rem 0 1rem; color: var(--muted); }
.ks-empty-pic { flex: none; width: 10rem; display: block; }
.ks-empty-pic img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; opacity: .9; }
.ks-empty p { margin: 0; }
.ks-card-pic { display: block; max-width: 14rem; margin: 0 0 .75rem; }
.ks-card-pic img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.ks-lost { text-align: left; }

/* a show's page: on a laptop the next date and the facts on the left, our words on the right; one column on a phone */
.ks-cols { display: grid; gap: 0 1.25rem; }
.ks-side > .kc-card:first-child, .ks-main > .kc-card:first-child { margin-top: 0; }
.ks-next-when { font-size: 1.1rem; font-weight: 700; color: var(--kc-head); }
.ks-onnow { display: inline-block; margin: 0 0 .6rem; padding: .1rem .6rem; border-radius: 999px; background: var(--accent); color: var(--btn-text); font-weight: 700; }
.ks-tba p { max-width: 40rem; }
.ks-took { font-weight: 700; color: var(--kc-head); }
.ks-facts .kc-dl > div { grid-template-columns: 8.5rem minmax(0, 1fr); }
.ks-there { margin: 0 0 .6rem; padding-left: 1.1rem; }
.ks-there li { margin: 0 0 .3rem; }
.ks-sources ul, .ks-pastlist { margin: 0; padding-left: 1.1rem; }
.ks-sources li, .ks-pastlist li { margin: 0 0 .4rem; overflow-wrap: anywhere; }
.ks-nearby { margin-top: 1.5rem; }
/* 79.15: every coming date in full (each one the page marks up), and which zone this weekend is counted in */
.ks-also-list { list-style: none; margin: 0; padding: 0; }
.ks-also-date { padding: .6rem 0; border-top: 1px solid var(--line, rgba(127,127,127,.25)); overflow-wrap: anywhere; }
.ks-also-date:first-child { border-top: 0; padding-top: 0; }
.ks-also-date p { margin: 0 0 .3rem; }
.ks-zone { margin: -.2rem 0 .6rem; }

@media (min-width: 768px) {
  .ks-cols { grid-template-columns: minmax(0, 23rem) minmax(0, 1fr); align-items: start; }
  .ks-search .btn { justify-self: stretch; }
  .ks-countries { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .ks-head, .ks-hero { padding: .8rem .6rem; min-height: 0; }
  .ks-head-big { min-height: 0; }
  .ks-hero { padding-top: 9rem; }
  .ks-head-panel, .ks-hero-panel { padding: .85rem .9rem .95rem; }
  .ks-facts .kc-dl > div { grid-template-columns: minmax(0, 1fr); }
  .ks-empty { flex-direction: column; align-items: flex-start; }
}

/* SPEC 79.19 (phase 2): "Is this your show?" and the manager panel */
.ks-claim { display: grid; gap: 1rem; align-items: center; }
.ks-claim-pic { display: block; }
.ks-claim-pic img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; }
.ks-claim-text > :last-child { margin-bottom: 0; }
@media (min-width: 700px) { .ks-claim { grid-template-columns: minmax(0, 20rem) 1fr; } }
.ks-manage .kc-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
/* ---------- site polish (2026-11-18): the same page-top as clubs and shops: words on the left over a dark fade, no glass box ---------- */
.ks-head { padding: clamp(1.25rem, 4vw, 2.75rem) clamp(.9rem, 3vw, 2rem); min-height: 20rem; }
.ks-head::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(16,13,10,.94) 0%, rgba(16,13,10,.84) 42%, rgba(16,13,10,.32) 78%, rgba(16,13,10,.06) 100%); }
.ks-head-panel { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; max-width: 40rem; }
.ks-head-panel h1 { font-size: clamp(1.7rem, 5vw, 2.7rem); line-height: 1.12; }
@media (max-width: 640px) { .ks-head::before { background: rgba(16,13,10,.8); } }

/* ---------- the Christmas season (2026-11-22): festive touches on holiday train rides and displays only (ShowArt::festive),
   the hub's "Christmas trains" card and /shows/christmas-trains. Everything else keeps the site's look. No motion. ---------- */
:root { --ks-xred: #c8423a; --ks-xgreen: #2f7d4f; --ks-xgold: #d9a95a; }
/* a thin garland line: red, gold and green in turn */
.ks-holiday, .ks-festive-page .ks-sec, .ks-row.ks-festive { position: relative; }
.ks-holiday::before, .ks-row.ks-festive::before, .ks-festive-page .ks-head::after, .ks-hero.ks-festive::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; z-index: 3; pointer-events: none; border-radius: var(--radius) var(--radius) 0 0;
  background: repeating-linear-gradient(90deg, var(--ks-xred) 0 18px, var(--ks-xgold) 18px 24px, var(--ks-xgreen) 24px 42px, var(--ks-xgold) 42px 48px); }
/* a festive listing row: the garland on top and a warm edge */
.ks-row.ks-festive { border-color: color-mix(in srgb, var(--ks-xred) 45%, var(--kc-edge)); overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ks-xred) 7%, var(--kc-card)) 0%, var(--kc-card) 55%); }
.ks-row.ks-festive:hover { border-color: var(--ks-xred); }
/* the kind tag on a festive listing: a snowflake and holiday red */
.kc-tag.ks-tag-holiday { border-color: var(--ks-xred); color: #fff; background: var(--ks-xred); }
.kc-tag.ks-tag-holiday::before { content: "\2744\FE0E"; margin-right: .3em; font-size: .9em; }
.ks-tags .kc-tag.ks-tag-holiday { color: #fff; border-color: var(--ks-xred); background: var(--ks-xred); }
/* the hub's Christmas trains card */
.ks-holiday { padding: 1.1rem 1.25rem 1rem; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--ks-xgold) 55%, var(--kc-edge)); overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.55) 0 1.2px, transparent 2px),
    radial-gradient(circle at 37% 8%, rgba(255,255,255,.45) 0 1px, transparent 1.8px),
    radial-gradient(circle at 63% 22%, rgba(255,255,255,.5) 0 1.4px, transparent 2.2px),
    radial-gradient(circle at 88% 12%, rgba(255,255,255,.45) 0 1px, transparent 1.8px),
    linear-gradient(160deg, #13233f 0%, #1c2f52 45%, #2a1a1a 100%);
  box-shadow: var(--kc-shadow); color: #f3ead8; }
.ks-holiday-top .kc-k { color: var(--ks-xgold); }
.ks-holiday-top .kc-h { color: #fff4dc; margin-top: 0; }
.ks-holiday-top .kc-quiet { color: #d8cfbd; margin: .2rem 0 .8rem; }
.ks-holiday .kc-row { background: rgba(10, 16, 30, .72); border-color: rgba(217, 169, 90, .35); color: #f3ead8; }
.ks-holiday .kc-row a, .ks-holiday .kc-row .kc-name { color: #ffe3a6; }
.ks-holiday .kc-row .kc-where, .ks-holiday .kc-row .kc-quiet { color: #cfc6b5; }
.ks-holiday .kc-more { margin: .8rem 0 0; }
.ks-holiday .btn { background: var(--ks-xred); border-color: var(--ks-xred); color: #fff; }
/* /shows/christmas-trains: the header words high, over the open night sky */
.ks-festive-page .ks-head { align-items: start; }
.ks-festive-page .ks-head .kc-k { color: var(--ks-xgold); }
.ks-festive-page .ks-sec > .kc-h { display: flex; align-items: center; gap: .5rem; }
.ks-festive-page .ks-sec > .kc-h::before { content: "\2744\FE0E"; color: var(--ks-xred); font-size: .8em; }
.ks-holiday-region { margin: 0 0 .5rem; border: 1px solid var(--kc-edge); border-radius: var(--radius); background: var(--kc-card); }
.ks-holiday-region > summary { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem .85rem; min-height: 44px; cursor: pointer; font-weight: 600; }
.ks-holiday-region[open] > summary { border-bottom: 1px solid var(--kc-edge); }
.ks-holiday-region > ul, .ks-holiday-region > ol { padding: .6rem; margin: 0; }

/* ---------- /classes (2026-11-22): where to learn the hobby (ClassPages). The shows look, plus a CSS-only filter (:has). ---------- */
.kx-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1rem 0 .25rem; }
.kx-cb { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kx-filter label.btn { min-height: 44px; display: inline-flex; align-items: center; }
.kx-cb:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.kx-cb:checked + label { background: var(--accent); border-color: var(--accent); color: var(--btn-text); }
.kx-page:has(#kx-kids:checked) .kx-row:not(.kx-kids), .kx-page:has(#kx-free:checked) .kx-row:not(.kx-free) { display: none; }
.kx-page:has(#kx-kids:checked) .kx-region:not(.kx-has-kids), .kx-page:has(#kx-free:checked) .kx-region:not(.kx-has-free),
.kx-page:has(#kx-kids:checked):has(#kx-free:checked) .kx-region:not(.kx-has-both) { display: none; }
.kc-row.kx-row { grid-template-columns: minmax(0, 1fr); }
.kx-row .kc-row-text { display: grid; gap: .2rem; }
.kx-what { margin: .15rem 0 0; }
.kx-facts { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin: .1rem 0 0; font-size: .92rem; color: var(--muted, inherit); }
.kx-facts b { font-weight: 600; color: var(--text); }
.kc-tag.kx-tag-kids { border-color: #4f8a5b; color: #4f8a5b; }
.kc-tag.kx-tag-free { border-color: #a07a2c; color: #a07a2c; }
.kc-tag.kx-tag-next { background: var(--accent); color: var(--btn-text); }
[data-theme="dark"] .kc-tag.kx-tag-kids { border-color: #7fc28c; color: #7fc28c; }
[data-theme="dark"] .kc-tag.kx-tag-free { border-color: #e0b95f; color: #e0b95f; }
.kc-tag.kx-tag-past { border-style: dashed; opacity: .85; }
.kc-tag.kx-tag-yearly { border-color: #6b7fa8; color: #6b7fa8; }
[data-theme="dark"] .kc-tag.kx-tag-yearly { border-color: #9fb3dc; color: #9fb3dc; }
