/* Gäste-Bereich nach Entwurf C (abgenommen 14.11.2026). Nur Klassen g-…, nur Tokens der Grundlage (--ps-…).
   Titelbild, Siegel, Anhänger, Flächen, Muster, Kennzahlen, Monatsblatt kommen aus grundlage.css; hier steht nur,
   was es nur im Gäste-Bereich gibt: Spur, Zeitband, Kartei, Verzeichnis, Register, Anwesenheits-Spur. */

.g-seite { display: grid; gap: 0; min-width: 0; }
.g-laden { max-width: 640px; }

/* ---------- Suche ---------- */
.g-treffer { display: grid; gap: var(--ps-abst-m); max-width: 900px; margin-bottom: var(--ps-abst-g); }
.g-treffer:empty { display: none; }
.g-treffer-gruppe { display: grid; gap: var(--ps-abst-k); }
.g-treffer-zahl { color: var(--ps-tinte-2); }
.g-treffer mark { background: var(--ps-kaffee-zart); color: inherit; border-radius: 3px; padding: 0 1px; }
.g-zimmer-treffer { flex-direction: row; align-items: flex-start; }
.g-zimmer-treffer > div { display: grid; gap: var(--ps-abst-k); min-width: 0; }

/* ---------- Einstieg ---------- */
.g-kopf { display: grid; gap: var(--ps-abst-m); margin-bottom: var(--ps-abst-g); }
.g-aussage { max-width: 34ch; }
.g-aussage-zwei { display: block; margin-top: var(--ps-abst-k); font-size: .62em; line-height: 1.35; color: var(--ps-tinte-2); }
.g-hinweis-link { min-height: 44px; padding-inline: 12px; text-decoration: none; }
.g-hinweis-link .ps-ic { width: 16px; height: 16px; }
.g-hinweis-link:hover { filter: brightness(.97); text-decoration: underline; }
/* Ab 1500 px: die Hinweise zum Bestand stehen als Fläche rechts neben der Aussage (Entwurf C, kein leerer Kopf am Breitbild) */
@media (min-width: 1500px) {
  .g-kopf { grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); align-items: end; column-gap: var(--ps-abst-g); }
  .g-kopf > :not(.g-kopf-hinweise) { grid-column: 1; }
  .g-kopf > .g-kopf-hinweise { grid-column: 2; grid-row: 1 / span 3; align-self: end; display: grid; gap: var(--ps-abst-k); padding: var(--ps-abst-m);
    border-radius: var(--ps-r-karte); background: var(--ps-leinen); box-shadow: inset 0 0 0 1px var(--ps-leinen-kante); }
  .g-kopf > .g-kopf-hinweise > .g-hinweis-link { justify-content: flex-start; font-size: var(--ps-t-unter); }
}

.g-start { display: grid; gap: var(--ps-abst-g); grid-template-columns: minmax(0, 1fr); }
.g-start-links { display: grid; gap: var(--ps-abst-g); grid-template-columns: minmax(0, 1fr); align-content: start; }
.g-jetzt, .g-bald { display: grid; gap: var(--ps-abst-m); align-content: start; min-width: 0; }
@media (min-width: 900px) { .g-start-links { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 1500px) {
  .g-start { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .g-start-links { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1500px) and (min-height: 1200px) { .g-start-links { position: sticky; top: 104px; } }

.g-jetzt-zeile .ps-anh-reihe { justify-content: flex-end; flex-wrap: nowrap; }
.g-anh-mehr { align-self: center; font-size: var(--ps-t-fuss); color: var(--ps-tinte-2); }
.g-zeile-bald .ps-zeile-text { gap: 2px; }
.g-grundlage { font: italic var(--ps-t-fuss)/1.4 var(--ps-f-titel); color: var(--ps-tinte-2); }
.g-pause-hinweis { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--ps-abst-m); width: 100%; min-height: 64px;
  padding: var(--ps-abst-m); border: 0; border-radius: var(--ps-r-karte); background: var(--ps-leinen); box-shadow: inset 0 0 0 1px var(--ps-leinen-kante);
  color: var(--ps-tinte); text-align: left; transition: background-color var(--ps-d-mikro); }
.g-pause-hinweis:hover { background: var(--ps-blatt-2); }
.g-pause-hinweis > span { display: grid; gap: 2px; }
.g-pause-hinweis > span > span { font-size: var(--ps-t-unter); color: var(--ps-tinte-2); }
.g-pause-hinweis > .ps-ic { color: var(--ps-tinte-2); }
.g-loeschfrist { margin-top: var(--ps-abst-g); }

/* ---------- Kartei ---------- */
.g-kartei { display: grid; gap: var(--ps-abst-m); align-content: start; min-width: 0; }
.g-kartei-kopf { display: grid; gap: var(--ps-abst-k); }
.g-legende { margin: 0; }
.g-steuer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--ps-abst-k) var(--ps-abst-m); }
.g-gruppe { display: grid; gap: var(--ps-abst-k); }
.g-gruppe-titel { font: 600 var(--ps-t-text)/1.3 var(--ps-f-text); margin-top: var(--ps-abst-m); scroll-margin-top: 96px; }
.g-gruppe-titel span { font-weight: 400; color: var(--ps-tinte-2); font-size: var(--ps-t-unter); }
.g-gruppe-pause .ps-liste { background: var(--ps-leinen); border-color: var(--ps-leinen-kante); }
.g-mehr { justify-self: start; }

/* Karteizeile: Handy dreizeilig (Status, dann Spur unter dem Text), breit mit Spur-Spalte */
.g-kartei-zeile { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "s t" "s z" "s p"; row-gap: 6px; align-items: start; }
.g-kartei-zeile > .ps-siegel { grid-area: s; }
.g-kartei-zeile > .ps-zeile-text { grid-area: t; }
.g-kartei-zeile > .g-spur { grid-area: p; }
.g-kartei-zeile > .g-status { grid-area: z; text-align: left; white-space: normal; }
.g-kernsatz { color: var(--ps-tinte); }
.g-meta { color: var(--ps-tinte-2); font-size: var(--ps-t-fuss); }
.g-achse-zeile { display: none; }
@media (min-width: 760px) {
  .g-kartei-zeile, .g-achse-zeile { grid-template-columns: 48px minmax(0, 1fr) minmax(160px, 34%) 9rem; grid-template-areas: "s t p z"; align-items: center; }
  .g-kartei-zeile > .g-status { text-align: right; }
  .g-achse-zeile { display: grid; gap: var(--ps-abst-m); padding: 6px var(--ps-abst-m); background: var(--ps-blatt-2); }
  .g-achse-zeile > .g-spur-achse { grid-column: 3; }
}
.g-status-vermutet { white-space: normal; }
.g-status-pause { color: var(--ps-tinte-2); font-style: normal; }
.g-status-gebucht { color: var(--ps-kaffee); font-weight: 600; }

/* Spur: vier Jahre als feiner Streifen; je Besuch ein Strich, gebucht blass, vermutet hohl in Bleistiftgrau */
.g-spur { display: block; width: 100%; height: 16px; overflow: visible; }
.g-spur .g-spur-jahr { stroke: var(--ps-linie-stark); stroke-width: 1; vector-effect: non-scaling-stroke; }
.g-spur .g-spur-heute { stroke: var(--ps-heute-linie); stroke-width: 2; vector-effect: non-scaling-stroke; }
.g-spur-firma { --g-spur: var(--ps-kaffee-fuell); }
.g-spur-booking { --g-spur: var(--ps-portal); }
.g-spur-privat { --g-spur: var(--ps-tinte-2); }
.g-spur .g-spur-b { fill: var(--g-spur); }
.g-spur .g-spur-k { fill: var(--g-spur); opacity: .42; }
.g-spur .g-spur-p { fill: var(--ps-bleistift-zart); stroke: var(--ps-bleistift); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.g-spur-achse { display: grid; grid-template-columns: repeat(4, 1fr); font-size: var(--ps-t-klein); color: var(--ps-tinte-2); }
.g-spur-achse span { border-left: 1px solid var(--ps-linie-stark); padding-left: 4px; }

/* ---------- Verzeichnis A–Z ---------- */
.g-vz-sprung { position: sticky; top: 88px; z-index: var(--ps-z-haftend); display: flex; flex-wrap: wrap; gap: 4px; padding: var(--ps-abst-k) 0;
  background: var(--ps-glas); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.g-vz-taste { min-width: 44px; height: 44px; padding: 0 6px; border-radius: var(--ps-r-knopf); border: 1px solid var(--ps-linie-stark); background: var(--ps-blatt);
  font: 400 1.0625rem/1 var(--ps-f-titel); color: var(--ps-tinte); }
.g-vz-taste:hover { background: var(--ps-kaffee-zart); }
.g-vz-legende { margin: 0; }
.g-vz-achse { display: none; }
.g-vz { display: grid; gap: var(--ps-abst-m); }
.g-vz-gruppe { display: grid; gap: var(--ps-abst-k); }
.g-vz-b { font: 400 1.5rem/1 var(--ps-f-titel); color: var(--ps-kaffee); scroll-margin-top: 160px; }
.g-vz-zeile { grid-template-columns: 36px minmax(0, 1fr); grid-template-areas: "s t" "s z" "s r"; row-gap: 6px; align-items: start; }
.g-vz-zeile > .ps-siegel { grid-area: s; }
.g-vz-zeile > .ps-zeile-text { grid-area: t; }
.g-vz-zeile > .g-spur { grid-area: r; }
.g-vz-zeile > .g-status { grid-area: z; text-align: left; white-space: normal; }
.g-vz-zeile .ps-zeile-text > b { font-size: 1rem; }
@media (prefers-reduced-transparency: reduce) { .g-vz-sprung { background: var(--ps-papier); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (max-width: 759px) { .g-vz-sprung { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; top: 80px; } }
@media (min-width: 760px) {
  .g-vz-zeile, .g-vz-achse { grid-template-columns: 36px minmax(0, 1fr) minmax(160px, 34%) 9rem; grid-template-areas: "s t r z"; align-items: center; column-gap: var(--ps-abst-m); }
  .g-vz-zeile > .g-status { text-align: right; }
  .g-vz-achse { display: grid; padding: 0 var(--ps-abst-m); }
  .g-vz-achse > .g-spur-achse { grid-column: 3; }
}
@media (min-width: 1500px) { .g-vz-zeile, .g-vz-achse { grid-template-columns: 36px minmax(0, 1fr) minmax(320px, 44%) 9rem; } }

/* ---------- Akte ---------- */
.g-akte { display: grid; gap: var(--ps-abst-g); min-width: 0; }
.g-akte > .ps-zurueck { margin-bottom: calc(var(--ps-abst-g) * -1 + var(--ps-abst-k)); }
.g-ueber-firma { font: 400 var(--ps-t-klein)/1.3 var(--ps-f-text); letter-spacing: 0; text-transform: none; }
.g-akte-knoepfe { margin-top: calc(var(--ps-abst-g) * -1 + var(--ps-abst-m)); }
.g-akte-raster > .g-zelle > * { min-width: 0; }
@media (min-width: 1100px) { .g-akte .ps-titel > .ps-karte { align-self: start; } }
.g-rechnung-zeile { width: 100%; text-align: left; }
.g-betrag { font-weight: 600; }
.g-betrag-ungueltig { text-decoration: line-through; color: var(--ps-tinte-2); }
.g-aufenthalt-storniert .g-aufenthalt-datum { text-decoration: line-through; color: var(--ps-tinte-2); }
.g-verwaltung-inhalt { display: grid; gap: var(--ps-abst-m); }
.g-weitere-inhalt { display: grid; gap: var(--ps-abst-k); padding-top: var(--ps-abst-k); }
.g-naechster-datum { font: 400 1.5rem/1.2 var(--ps-f-titel); }
.ps-pergament .g-naechster-datum { font-style: italic; }
.g-schritt { font-weight: 600; }
.g-grundlage-auf > summary { min-height: 44px; }
.g-naechster .ps-monat { max-width: 340px; }

/* Zeitband: je Jahr eine Zeile, Januar bis Dezember; Höhe der Balken = Zimmer gleichzeitig (Firma) */
.g-band { display: grid; padding: var(--ps-abst-k) 0 0; }
.g-band-firma { --g-band: var(--ps-kaffee-fuell); }
.g-band-booking { --g-band: var(--ps-portal); }
.g-band-privat { --g-band: var(--ps-tinte-2); }
.g-band-monate { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); font-size: var(--ps-t-klein); color: var(--ps-tinte-2); }
.g-band-monate > div { display: grid; grid-template-columns: repeat(12, 1fr); }
.g-band-monate > div { min-width: 0; }
.g-band-monate > div span { min-width: 0; overflow: hidden; white-space: nowrap; padding-left: 3px; }
@media (max-width: 559px) { .g-band-monate > div span:not(:nth-child(3n + 1)) { visibility: hidden; } }
.g-band-reihe { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); align-items: center; border-top: 1px solid var(--ps-linie); }
.g-band-jahr { font: 400 1rem/1 var(--ps-f-titel); color: var(--ps-tinte-2); font-variant-numeric: lining-nums; }
.g-band-spur { position: relative; height: 66px; cursor: pointer; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 1px), var(--ps-linie) calc(100% / 12 - 1px) calc(100% / 12)); }
.g-band-b { position: absolute; top: 50%; min-width: 4px; padding: 0; border: 0; border-radius: 3px; background: var(--g-band); transform: translateY(-50%); cursor: pointer; transform-origin: 0 50%; }
.g-band-b:hover { filter: brightness(1.12); }
.g-band-b[aria-pressed="true"] { outline: 2px solid var(--ps-tinte); outline-offset: 2px; z-index: 2; }
.g-band-b.g-band-gebucht { background: var(--ps-blatt); box-shadow: inset 0 0 0 2px var(--g-band); }
.g-band-p { position: absolute; top: 50%; min-width: 6px; transform: translateY(-50%); border-radius: 3px; background: var(--ps-schraffur-dicht), var(--ps-bleistift-zart);
  box-shadow: inset 0 0 0 1.5px var(--ps-bleistift); }
.g-band-text { position: absolute; top: 3px; font-size: var(--ps-t-mini); line-height: 1; color: var(--ps-tinte-2); white-space: nowrap; pointer-events: none; }
.g-band-text-p { font: italic var(--ps-t-mini)/1 var(--ps-f-titel); }
.g-band-heute { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ps-heute-linie); z-index: 3; pointer-events: none; }
.g-band-heute span { position: absolute; bottom: 3px; right: 5px; font-size: var(--ps-t-mini); line-height: 1; color: var(--ps-tinte-2); background: var(--ps-papier); padding: 1px 2px; }
.g-band-detail { min-height: 3em; color: var(--ps-tinte-2); font-size: var(--ps-t-unter); }
.g-band-detail b { color: var(--ps-tinte); font-weight: 600; }

/* Postkarte: der eine Besuch */
.g-postkarte { flex-direction: row; justify-content: space-between; gap: var(--ps-abst-m); max-width: 760px; }
.g-pk-text { display: grid; gap: 6px; align-content: start; }
.g-pk-datum { font: 400 1.75rem/1.15 var(--ps-f-titel); }
.g-pk-notiz { font: italic 1rem/1.4 var(--ps-f-titel); color: var(--ps-tinte-2); }
.g-pk-rechts { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: var(--ps-abst-m); }
.g-pk-stempel { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--ps-kaffee); color: var(--ps-kaffee);
  font: 400 1.125rem/1 var(--ps-f-titel); transform: rotate(-9deg); }
@media (max-width: 420px) { .g-postkarte { flex-direction: column; } .g-pk-rechts { flex-direction: row; align-items: center; } }

.g-steckbrief { margin-top: var(--ps-abst-k); }
.g-umsatz { margin: 0; }

/* Muster */
.g-muster-teile { display: grid; gap: var(--ps-abst-i); }
.g-mz-zwei { display: block; font: 400 var(--ps-t-zeile)/1.3 var(--ps-f-titel); }
.g-block { width: 86px; height: 22px; }
.g-rueckkehr { width: 52px; height: 26px; }
.g-taktleiste { width: 60px; height: 22px; }

/* Personen der Firma */
.g-person-zeile { grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "s t r" "s p p"; row-gap: 6px; align-items: center; }
.g-person-zeile > .ps-siegel { grid-area: s; }
.g-person-zeile > .ps-zeile-text { grid-area: t; }
.g-person-zeile > .g-ap, .g-person-zeile > span:empty { grid-area: p; }
.g-person-zeile > .ps-zeile-rechts { grid-area: r; }
@media (min-width: 760px) {
  .g-person-zeile { grid-template-columns: 36px minmax(0, 1fr) minmax(120px, 30%) auto; grid-template-areas: "s t p r"; }
}
.g-ap { display: block; width: 100%; height: 16px; }
.g-ap-an { fill: var(--ps-kaffee-fuell); }
.g-ap-aus { fill: var(--ps-linie); }
.g-kaertchen-liste { display: flex; flex-wrap: wrap; gap: var(--ps-abst-k); margin: 0; padding: 0; list-style: none; }
.g-kaertchen { display: inline-flex; align-items: center; gap: var(--ps-abst-k); min-height: 44px; padding: 4px 14px 4px 4px; border-radius: var(--ps-r-rund);
  background: var(--ps-blatt); box-shadow: inset 0 0 0 1px var(--ps-linie); color: var(--ps-tinte); text-decoration: none; }
.g-kaertchen:hover { background: var(--ps-blatt-2); }

/* Register: alle Besuche */
.g-jahr { border-top: 1px solid var(--ps-linie); }
.g-jahr > summary { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ps-abst-m); min-height: 48px; padding: var(--ps-abst-k) 0; cursor: pointer;
  list-style: none; font: 400 1.125rem/1.2 var(--ps-f-titel); }
.g-jahr > summary::-webkit-details-marker { display: none; }
.g-jahr > summary::before { content: "›"; display: inline-block; width: 1em; color: var(--ps-tinte-2); transition: transform var(--ps-d-mikro); }
.g-jahr[open] > summary::before { transform: rotate(90deg); }
.g-jahr-zahl { flex: 1; color: var(--ps-kaffee); font-variant-numeric: lining-nums; }
.g-aufenthalte { list-style: none; margin: 0 0 var(--ps-abst-k); padding: 0; }
.g-aufenthalt { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "d z" "m z" "k k"; gap: 2px var(--ps-abst-m); align-items: center;
  padding: var(--ps-abst-k) 0 var(--ps-abst-k) 1em; border-top: 1px solid var(--ps-linie); }
.g-aufenthalt-datum { grid-area: d; font-weight: 600; font-variant-numeric: tabular-nums; }
.g-aufenthalt > .ps-meta { grid-area: m; }
.g-zimmer-knoepfe { grid-area: z; justify-content: flex-end; }
.g-aufenthalt-marken { grid-area: k; display: flex; flex-wrap: wrap; gap: 6px; }
.g-aufenthalt-marken:empty { display: none; }
@media (min-width: 760px) {
  .g-aufenthalt { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "d k z" "m k z"; }
  .g-aufenthalt-marken { justify-content: flex-end; }
}
.g-zimmer-knopf { padding: 0; border: 0; background: none; cursor: pointer; }
.g-aufenthalte-gebucht .g-aufenthalt-datum { color: var(--ps-kaffee); }
.g-rechnung-link { min-height: 32px; text-decoration: none; }
.g-storniert { margin-top: var(--ps-abst-k); }
.g-storniert > .liste { margin-top: var(--ps-abst-k); }

/* Verwaltung und Formulare */
.g-verwaltung { display: grid; gap: var(--ps-abst-m); }
.g-fehler { color: var(--ps-dringend); }
.g-feldgruppe { display: grid; gap: var(--ps-abst-k); margin: 0; padding: var(--ps-abst-m); border: 1px solid var(--ps-linie); border-radius: var(--ps-r-innen); }
.g-feldgruppe > legend { padding: 0 6px; font-weight: 600; }

/* ---------- Bewegung: nur beim Ansichtswechsel (.ps-szene), Endzustand steht ohne Animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .ps-szene .g-akte-raster > .g-zelle { animation: g-steigen var(--ps-d-auftritt) var(--ps-kurve) backwards; animation-delay: calc(var(--i, 0) * var(--ps-d-staffel) + 90ms); }
  .ps-szene .g-band-b { animation: g-zeichnen 520ms var(--ps-kurve) backwards; animation-delay: calc(var(--j, 0) * 110ms + 200ms); }
  .ps-szene .g-band-p { animation: g-zeichnen 500ms 600ms var(--ps-kurve) backwards; }
  .ps-szene .g-ap, .ps-szene .g-spur { animation: g-wischen 720ms 420ms var(--ps-kurve) backwards; }
  .g-band-heute { animation: g-glimmen 3.6s ease-in-out infinite; }
  @keyframes g-steigen { from { opacity: 0; transform: translateY(10px); } }
  @keyframes g-zeichnen { from { opacity: 0; transform: translateY(-50%) scaleX(0); } }
  @keyframes g-wischen { from { clip-path: inset(0 100% 0 0); } }
  @keyframes g-glimmen { 50% { opacity: .55; } }
}
@media print {
  .g-suchleiste, .g-akte-knoepfe, .g-verwaltung, .g-vz-sprung { display: none; }
}
