/* Rundgang (rundgang.html). Layered on css/style.css + css/editorial.css, so the colours are the
   site's tokens and follow the light/dark theme. The 3D scene is fixed behind the chapters;
   everything below also works as a plain page when WebGL is off (Save-Data, failed download). */

.tour-page main { position: relative; z-index: 2; }
.tour-page .footer { position: relative; z-index: 3; }

.tour-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.tour-poster { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: opacity 1s; }
.is-ready .tour-poster { opacity: 0; }
.tour-stage { position: fixed; inset: 0; z-index: 0; }
.tour-stage canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1s; }
.is-ready .tour-stage canvas { opacity: 1; }
.no-webgl .tour-stage { display: none; }

.tour-progress { position: fixed; z-index: 7; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; }
.tour-progress i { display: block; height: 100%; background: var(--color-secondary); transform: scaleX(0); transform-origin: left; }

.tour-loader { position: fixed; z-index: 6; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; text-align: center;
               color: #fff; background: rgba(10, 30, 40, .45); font-weight: 500; }
.tour-loader[hidden] { display: none; }
.tour-loader .bar { width: min(260px, 60vw); height: 4px; background: rgba(255, 255, 255, .3); border-radius: 4px; overflow: hidden; }
.tour-loader .bar i { display: block; height: 100%; width: 4%; background: #fff; transition: width .25s; }

/* ---- chapters and cards: phone first ---- */
.tour-chapter { min-height: 105svh; display: flex; align-items: flex-end; padding: 0 12px 14px; }
.tour-card { width: 100%; padding: 16px 16px 18px; background: var(--color-surface); color: var(--color-text-main);
             border: 1px solid var(--color-border); border-radius: 16px; box-shadow: 0 22px 44px -24px rgba(0, 0, 0, .55); }
.tour-card h2 { font-family: var(--font-family-heading); font-weight: 500; font-size: 1.4rem; line-height: 1.15; margin: 0 0 .45em; color: var(--color-text-main); }
.tour-card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--color-text-light); }
.tour-card .tour-kicker { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--color-primary-ink); margin: 0 0 6px; }

.tour-chips { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; margin: 12px 0 0; padding: 0; }
.tour-chips li { font-size: 12px; font-weight: 500; color: var(--color-text-main); border: 1px solid var(--color-border); border-radius: 999px; padding: 2px 9px; background: var(--color-surface-alt); }
.tour-chips.units li { border-color: var(--color-primary-ink); }

.tour-pics { display: grid; gap: 5px; margin: 0 0 12px; grid-template-columns: repeat(3, 1fr); }
.tour-pics.n1 { grid-template-columns: 1fr; }
.tour-pics.n2 { grid-template-columns: repeat(2, 1fr); }
.tour-pics img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--color-surface-alt); }
.tour-pics.n1 img { aspect-ratio: 16 / 7; }

.tour-shop { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.tour-shop h3 { font-family: inherit; font-weight: 600; font-size: 11.5px; line-height: 1.3; letter-spacing: .12em; text-transform: uppercase; color: var(--color-primary-ink); margin: 0 0 8px; }
.tour-shop dl { margin: 0; display: grid; gap: 2px; font-size: 13.5px; }
.tour-shop dt { font-weight: 600; color: var(--color-text-main); margin-top: 6px; }
.tour-shop dd { margin: 0; color: var(--color-text-light); }

.tour-avail .avail-head { margin: 10px 0 6px; color: var(--color-text-main); font-weight: 600; font-size: 14px; }
.tour-avail .avail-list { margin: 0 0 10px; padding-left: 1.1em; font-size: 14px; color: var(--color-text-light); }
.tour-avail .avail-grid { display: grid; gap: 2px; }
.tour-avail .avail-row { display: grid; grid-template-columns: 26px repeat(31, 1fr); gap: 1px; align-items: center; font-size: 10px; color: var(--color-text-light); }
.tour-avail .avail-row i { display: block; height: 7px; background: rgba(15, 74, 90, .28); border-radius: 1px; }
.tour-avail .avail-row i.busy { background: var(--color-secondary); }
.tour-avail .avail-row i.past { background: transparent; box-shadow: inset 0 0 0 1px var(--color-border); }
.tour-avail .avail-row i.none { background: transparent; }
.tour-avail .avail-note { margin-top: 6px; font-size: 12px; }
.tour-legend { display: flex; gap: 14px; margin: 8px 0 0 !important; font-size: 12px !important; }
.tour-legend b { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 5px; }
.tour-legend b.free { background: rgba(15, 74, 90, .28); }
.tour-legend b.busy { background: var(--color-secondary); }

.tour-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tour-row .btn { min-height: 44px; }

.tour-dots, .tour-note { display: none; }
.no-webgl .tour-chapter { min-height: 0; padding-top: 12px; }
.no-webgl main { padding-top: 12px; }

/* ---- web: bigger cards next to the picture ---- */
@media (min-width: 900px) {
  .tour-chapter { min-height: 135vh; align-items: center; padding: 0 clamp(24px, 6vw, 110px); }
  .tour-chapter:nth-of-type(even) { justify-content: flex-end; }
  .tour-card { width: min(620px, 44vw); padding: 34px 40px 38px; border-radius: 22px; }
  @supports (background: color-mix(in srgb, red 50%, blue)) {
    .tour-card { background: color-mix(in srgb, var(--color-surface) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  }
  .tour-card .tour-kicker { font-size: 13px; }
  .tour-card h2 { font-size: clamp(2rem, 2.6vw, 2.8rem); }
  .tour-card p { font-size: 1.12rem; line-height: 1.6; }
  .tour-chips { gap: 8px; margin-top: 18px; }
  .tour-chips li { font-size: 14.5px; padding: 4px 13px; }
  .tour-pics { gap: 8px; margin-bottom: 20px; }
  .tour-pics img { aspect-ratio: 3 / 2; border-radius: 12px; }
  .tour-pics.n3 { grid-template-columns: repeat(2, 1fr); }
  .tour-pics.n3 img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .tour-pics.n1 img { aspect-ratio: 16 / 9; }
  .tour-shop { margin-top: 20px; padding-top: 18px; }
  .tour-shop h3 { font-size: 12.5px; }
  .tour-shop dl { grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 16px; }
  .tour-shop dt { margin-top: 0; }
  .tour-avail .avail-head { font-size: 16px; }
  .tour-avail .avail-list { font-size: 16px; }
  .tour-avail .avail-row { grid-template-columns: 34px repeat(31, 1fr); font-size: 12px; }
  .tour-avail .avail-row i { height: 11px; }
  .tour-legend, .tour-avail .avail-note { font-size: 13.5px !important; }
  .tour-row .btn { min-height: 48px; }
  .tour-dots { display: flex; position: fixed; z-index: 5; right: 16px; top: 50%; transform: translateY(-50%); flex-direction: column; gap: 2px; }
  .tour-dots a { display: block; width: 28px; height: 28px; position: relative; }
  .tour-dots a::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: rgba(255, 255, 255, .75); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); transition: inset .2s; }
  .tour-dots a[aria-current]::after { inset: 7px; background: var(--color-secondary); box-shadow: 0 0 0 2px #fff; }
  .tour-dots a:focus-visible { outline: 3px solid var(--color-primary-ink); outline-offset: 1px; border-radius: 50%; }
  .tour-dots span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tour-note { display: block; position: fixed; z-index: 5; left: 18px; bottom: 14px; max-width: 60vw; margin: 0; font-size: 12px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .75); }
  .no-webgl .tour-chapter { padding-top: 28px; padding-bottom: 28px; }
  .no-webgl .tour-note { display: none; }
}
@media (min-width: 1500px) { .tour-card { width: min(680px, 42vw); } .tour-card p { font-size: 1.2rem; } }
@media (prefers-reduced-motion: reduce) { .tour-poster, .tour-stage canvas { transition: none; } }

/* Very short screens: keep the text, drop the extras (the cards must fit the screen). */
@media (max-height: 640px) { #c8 .tour-pics, .tour-avail .avail-grid, .tour-legend { display: none; } }
