/* Besuch: Taschenuhr mit Live-Status, Öffnungszeiten, gezeichnete Innenstadtkarte, Nähe-Liste */

/* ---------- Raster ---------- */
.besuch-raster { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--r5) clamp(40px, 5vw, 88px); align-items: start; }
.besuch-text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--r3); }
.besuch-text > .zeile { order: 1; }
.besuch-text > h2 { order: 2; }
.besuch-text > .uhr { order: 3; }
.besuch-text > .besuch-status { order: 4; }
.besuch-text > .zeiten { order: 5; }
.besuch-text > .knopfreihe { order: 6; }
.besuch h2 { max-width: 13em; }
.besuch h2 em { display: block; }

/* Status unter der Uhr */
.besuch-status { align-self: stretch; text-align: center; margin-top: calc(-1 * var(--r2)); }
.besuch-status .status { font-size: 1.12rem; color: var(--hell); justify-content: center; }

/* Öffnungszeiten */
.besuch .zeiten { align-self: stretch; padding: var(--r3) 0 0; border-top: 1px solid rgba(216, 184, 120, .18); gap: 6px 22px; font-size: 1rem; }
.besuch .zeiten dt { color: var(--hell-2); }
.besuch .zeiten .heute { color: var(--gold-hell); font-weight: 700; }
.besuch .knopfreihe { margin-top: var(--r1); }

/* ---------- Taschenuhr ---------- */
.uhr { align-self: stretch; position: relative; }
.uhr-bühne { position: relative; display: flex; justify-content: center; padding: 6px 0 0;
  background: radial-gradient(closest-side, rgba(216, 184, 120, .1), rgba(216, 184, 120, 0) 72%); }
.uhr-knopf { position: relative; display: block; width: min(48%, 250px); padding: 0; margin: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: transform .9s var(--aus-expo); }
.uhr-knopf:focus-visible { outline: 2px solid var(--gold-hell); outline-offset: 8px; border-radius: 10px; }
.uhr-gerät { position: relative; display: block; width: 100%; perspective: 1500px; }
.uhr-körper, .uhr-foto { position: absolute; inset: 0; width: 100%; height: 100%; }
.uhr-foto { object-fit: contain; }
.uhr-zeiger-ebene { position: absolute; }
.uhr-ziffern, .uhr-ort, .uhr-widmung { font-family: var(--antiqua); }
.uhr-signatur { font-family: var(--text-font); font-weight: 700; letter-spacing: .22em; }

/* Sprungdeckel: Scharnier links, springt mit kleinem Federn auf */
.uhr-deckel { position: absolute; display: block; transform-origin: 0 50%; transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
  transform: rotateY(0deg); transition: transform .55s cubic-bezier(.55, 0, .85, .35), opacity .3s; will-change: transform; }
.uhr-seite { position: absolute; inset: 0; display: block; overflow: hidden; border-radius: 50%; transform: rotateY(0deg) translateZ(.1px);
  backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.uhr-seite svg { width: 100%; height: 100%; }
.uhr-seite-innen { transform: rotateY(180deg) translateZ(.1px); }
/* Seitenwechsel, wenn der Deckel senkrecht steht (unabhängig von backface-visibility) */
.uhr-seite-aussen { visibility: visible; transition: visibility 0s linear .42s; }
.uhr-seite-innen { visibility: hidden; transition: visibility 0s linear .42s; }
.uhr.auf .uhr-seite-aussen { visibility: hidden; transition-delay: .18s; }
.uhr.auf .uhr-seite-innen { visibility: visible; transition-delay: .18s; }
.uhr.still .uhr-seite { transition: none; }
.uhr.auf .uhr-knopf { transform: translateX(41%); }
.uhr.auf .uhr-deckel { transform: rotateY(-148deg); transition: transform 1.15s cubic-bezier(.3, 1.42, .52, 1), opacity .3s; }
.uhr.still .uhr-knopf, .uhr.still .uhr-deckel { transition: none; }
.uhr.ruhig .uhr-s { display: none; }

/* Fotofassung (sobald Bilder eingetragen sind) */
.uhr-deckel-foto img { position: absolute; max-width: none; height: auto; }
.uhr-deckel-foto .uhr-seite-innen { background: radial-gradient(circle at 55% 45%, #F3E1AE, #C9A266 55%, #7A5A2E); }
.mit-fotos .uhr-deckel { transition: transform .55s cubic-bezier(.55, 0, .85, .35), opacity .25s .3s; }
.uhr.auf .mit-fotos .uhr-deckel { opacity: 0; transition: transform 1s cubic-bezier(.3, 1.2, .52, 1), opacity .35s .65s; }

/* ---------- Karte ---------- */
.besuch-karte { position: relative; }
.karte { position: relative; aspect-ratio: 1 / 1.02; overflow: hidden; background: #161815; border: 1px solid rgba(216, 184, 120, .5); border-radius: 2px; }
.karte::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(216, 184, 120, .24); pointer-events: none; z-index: 3; }
.karte.lädt { background: #161815 radial-gradient(circle at 50% 50%, rgba(216, 184, 120, .08), transparent 60%); }
.karte-svg, .karte-ersatz { position: absolute; inset: 0; width: 100%; height: 100%; }
.karte-ersatz { object-fit: cover; }
.karte-svg text { font-kerning: normal; }
.karte .k-str { font-family: var(--text-font); font-size: 25px; font-weight: 640; letter-spacing: .1em; fill: #DDD6C8;
  paint-order: stroke; stroke: #3A3A34; stroke-width: 6px; stroke-linejoin: round; dominant-baseline: central; }
.karte .k-platzname { font-family: var(--antiqua); font-size: 30px; font-style: italic; fill: #EAD9B2; paint-order: stroke; stroke: #2A2B27; stroke-width: 6px; stroke-linejoin: round; }
.karte .k-laden-name { font-family: var(--antiqua); font-size: 30px; fill: var(--gold-hell); paint-order: stroke; stroke: #161815; stroke-width: 7px; stroke-linejoin: round; }

/* Fußweg und Ankunft */
.karte .k-laden-hof { opacity: 0; transform: scale(.55); transform-box: fill-box; transform-origin: center; }
.karte.gezeichnet .k-laden-hof { opacity: 1; transform: none; transition: opacity .7s 1.35s, transform 1.1s var(--aus-expo) 1.35s; }
.karte.still .k-laden-hof { transition: none; }

/* Tippen öffnet die Route */
.karte-tipp { position: absolute; inset: 0; z-index: 2; display: block; -webkit-tap-highlight-color: transparent; }
.karte-hinweis { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px;
  background: rgba(18, 19, 17, .92); color: var(--gold-hell); border: 1px solid rgba(216, 184, 120, .45); border-radius: 999px;
  font-size: .86rem; font-weight: 700; letter-spacing: .02em; transition: background-color .25s, color .25s; }
.karte-hinweis .ic { width: 16px; height: 16px; }
.karte-tipp:hover .karte-hinweis { background: var(--gold-hell); color: var(--stein); }
.karte-quelle { position: absolute; left: 12px; bottom: 12px; z-index: 4; font-size: .7rem; line-height: 1; padding: 5px 7px; color: var(--hell-2);
  background: rgba(18, 19, 17, .85); border-radius: 2px; pointer-events: none; letter-spacing: .02em; }

/* Legende unter der Karte */
.karte-legende { display: flex; align-items: center; gap: 12px; margin-top: var(--r2); color: var(--hell-2); }
.karte-legende-weg { flex: none; width: 34px; height: 3px; background: repeating-linear-gradient(90deg, var(--gold-hell) 0 6px, transparent 6px 11px); border-radius: 2px; }

/* ---------- Nähe-Liste ---------- */
.nähe { list-style: none; margin: var(--r3) 0 0; padding: 0; border-top: 1px solid rgba(216, 184, 120, .18); }
.nähe li { display: flex; align-items: baseline; gap: 12px; min-height: 46px; padding: 11px 0; border-bottom: 1px solid rgba(216, 184, 120, .1); color: var(--hell); line-height: 1.35; }
.nähe li::after { content: ""; order: 2; flex: 1 1 24px; min-width: 24px; border-bottom: 1px dotted rgba(216, 184, 120, .4); transform: translateY(-4px); }
.nähe li > span { order: 1; }
.nähe li > b { order: 3; color: var(--gold-hell); font-weight: 750; white-space: nowrap; }
.nähe-zeichen { order: 0; flex: none; width: 18px; height: 18px; color: var(--gold-blass); align-self: center; }

/* ---------- Tablet und Handy ---------- */
@media (max-width: 959px) {
  .besuch-raster { grid-template-columns: minmax(0, 1fr); row-gap: var(--r3); }
  .besuch-text { display: contents; }
  .besuch-text > .zeile { order: 1; justify-self: start; }
  .besuch-text > h2 { order: 2; }
  .besuch-text > .uhr { order: 3; margin-top: var(--r2); }
  .besuch-text > .besuch-status { order: 4; margin-top: 0; }
  .besuch-karte { order: 5; margin-top: var(--r3); }
  .besuch-text > .zeiten { order: 6; margin-top: var(--r3); }
  .besuch-text > .knopfreihe { order: 7; }
  .karte { aspect-ratio: 3 / 2; }
}
@media (max-width: 600px) {
  .karte { aspect-ratio: 4 / 5; }
  .uhr-knopf { width: min(50%, 220px); }
  .besuch .knopfreihe .knopf { flex: 1 1 100%; }
  .karte-hinweis { right: 10px; bottom: 10px; }
  .karte-quelle { left: 10px; bottom: 10px; }
}
