/* Gästebuch: Seitenansichten statt offenem Formular, identische SKTC-Buttons */
#seitenanfang{display:block;height:0}
.guest-main{width:100%;flex:1 0 auto}
.guest-main:has(.guest-reader:not([hidden])){display:flex;flex-direction:column}
.guest-reader:not([hidden]){flex:1;min-height:calc(100dvh - 92px);margin-top:12px;margin-bottom:14px}
.guest-reader .entry-stage{overflow:visible;min-height:clamp(260px,calc(100dvh - 280px),850px)}
.guest-reader .single-entry{min-height:inherit}
.guest-reader .entry-text{overflow-wrap:anywhere}
.guest-reader .pagination{position:static!important;inset:auto!important;display:contents!important;margin:0!important;padding:0!important;border:0!important}
.guest-reader .leaf-arrow{position:fixed!important;top:50dvh!important;transform:translateY(-50%);width:42px!important;height:42px!important;min-height:42px!important;display:flex;align-items:center;justify-content:center;z-index:1050;box-sizing:border-box;box-shadow:0 4px 13px #0003!important;background:#19385e!important;border:0!important;color:#fff!important}
.guest-reader .leaf-arrow.prev{left:max(8px,env(safe-area-inset-left))!important}
.guest-reader .leaf-arrow.next{right:max(8px,env(safe-area-inset-right))!important}
.guest-reader .leaf-arrow.is-disabled{opacity:.25!important}
.guest-reader .single-entry{padding-inline:clamp(36px,5vw,58px)}
.guest-reader-actions{display:flex;justify-content:flex-end;margin:0 0 14px}
.guest-write-button,.guest-reader-return{display:inline-flex;align-items:center;min-height:40px;padding:8px 15px;border-radius:999px;background:#19385e;color:#fff!important;text-decoration:none;font:650 14px/1.35 system-ui,sans-serif;box-shadow:0 2px 7px #0002}
.guest-write-button:hover,.guest-reader-return:hover{background:#28517f;color:#fff!important}
.guest-cover{flex:1 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:calc(100dvh - 100px);margin:0 auto!important;padding:20px 16px!important}
.guest-cover .cover-link{width:100%;max-width:560px}
.guest-cover .cover-artwork{display:block;max-height:calc(100dvh - 145px);width:auto;max-width:100%;height:auto;object-fit:contain;margin:0 auto}
.guest-decoration{display:none!important}
@media(max-width:600px){.guest-reader{padding-inline:10px!important}.guest-reader .single-entry{padding-inline:37px!important}.guest-reader .leaf-arrow{width:36px!important;height:36px!important;min-height:36px!important}.guest-reader .leaf-arrow-icon{width:28px;height:28px}.guest-reader-actions{justify-content:center}.guest-cover{min-height:calc(100dvh - 85px)}}
@media print{.guest-reader .leaf-arrow,.guest-write-button{display:none!important}}

.guest-language-switch{display:none!important}

/* Handschrift-Anmutung nur fuer die Eintragstexte; Formular/Navigation unveraendert.
   Systemschrift-Fallback, da keine lizenzierte lokale Schriftdatei im Paket vorliegt. */
.guest-reader .entry-text{font-family:"Segoe Print","Bradley Hand","Lucida Handwriting",cursive;font-size:clamp(1.2rem,2.5vw,1.55rem);line-height:1.7;color:#19385e;letter-spacing:.01em}

/* Drei abwechselnde handschriftliche Anmutungen. Auf Endgeraeten ohne die
   jeweiligen Systemfonts werden unterschiedliche Stilvarianten genutzt. */
.guest-reader .guest-handwriting-0 .entry-text{font-family:"Segoe Print","Comic Sans MS",cursive;font-style:normal;font-weight:400;letter-spacing:.015em;line-height:1.75}
.guest-reader .guest-handwriting-1 .entry-text{font-family:"Bradley Hand","Segoe Print",cursive;font-style:italic;font-weight:400;letter-spacing:.005em;line-height:1.8}
.guest-reader .guest-handwriting-2 .entry-text{font-family:"Lucida Handwriting","Segoe Print",cursive;font-style:normal;font-weight:500;letter-spacing:.025em;line-height:1.72}


/* Ein Buchblatt pro sichtbarem Display, identisches Format für Deckblatt und Einträge. */
.guest-book-page{box-sizing:border-box!important;width:min(750px,calc(100% - 28px))!important;
  height:calc(100dvh - 88px)!important;min-height:330px!important;max-height:none!important;
  margin:10px auto 12px!important;overflow:hidden!important;position:relative!important;
  background:#fffdf8!important;border:1px solid #d4dce6!important;border-radius:10px!important;
  box-shadow:0 10px 24px #142a4630!important}
.guest-reader.guest-book-page{display:flex!important;flex-direction:column!important;padding:clamp(12px,2vw,20px)!important}
.guest-reader .card-head{flex:0 0 auto;margin:0!important;padding:0 40px 6px!important}
.guest-reader .card-head .kicker{margin:0!important}
.guest-reader .card-head h2{margin:0!important}
.guest-reader .guest-reader-actions{flex:0 0 auto;margin:0 0 5px!important}
.guest-reader .entry-stage{display:flex;flex:1 1 auto;min-height:0!important;height:auto!important;overflow:hidden!important;align-items:stretch}
.guest-reader .single-entry{display:block;box-sizing:border-box;height:100%!important;min-height:0!important;width:100%;margin:0!important;padding:5px clamp(27px,5vw,52px)!important;overflow:hidden!important}
.guest-reader .single-entry .entry{display:block;box-sizing:border-box;overflow:hidden!important;height:100%!important;max-height:100%!important;margin:0!important;padding:6px 12px!important}
.guest-reader .entry-text{display:block;transform-origin:50% 50%;margin:9px auto!important;overflow-wrap:anywhere;white-space:normal}
.guest-reader .guest-tilt-0 .entry-text{transform:rotate(-4deg);width:89%}
.guest-reader .guest-tilt-1 .entry-text{transform:rotate(5deg);width:87%}
.guest-reader .guest-tilt-2 .entry-text{transform:rotate(-5deg);width:87%}
.guest-reader .guest-tilt-3 .entry-text{transform:rotate(4deg);width:89%}
.guest-book-page-indicator{flex:0 0 auto;min-height:16px;text-align:center;font:500 11px/1.2 system-ui,sans-serif;color:#48617b;margin:2px 0 0}
.guest-cover.guest-book-page{display:flex!important;flex-direction:column!important;align-items:center;justify-content:center;padding:14px 24px 30px!important}
.guest-cover .cover-link{display:flex;min-height:0;flex:1 1 auto;max-height:100%;align-items:center;justify-content:center}
.guest-cover .cover-artwork{object-fit:contain;max-width:100%;max-height:100%;height:100%;width:auto}
.guest-cover .cover-hint{position:absolute;bottom:5px;left:10px;right:10px;text-align:center;font:500 12px/1.2 system-ui,sans-serif}
.guest-cover-next{position:fixed;top:50dvh;right:max(8px,env(safe-area-inset-right));z-index:1050;
  display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:#19385e;color:#fff;box-shadow:0 4px 13px #0003}
.guest-cover-next svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
/* Schlichtes horizontales Seiten-Schieben statt 3D-Umblättern. */
.guest-slide-next{animation:guestSlideNext .22s ease-out both}
.guest-slide-prev{animation:guestSlidePrev .22s ease-out both}
@keyframes guestSlideNext{from{opacity:.65;transform:translateX(12px)}to{opacity:1;transform:translateX(0)}}
@keyframes guestSlidePrev{from{opacity:.65;transform:translateX(-12px)}to{opacity:1;transform:translateX(0)}}
@media(max-width:600px){
  .guest-book-page{width:calc(100% - 12px)!important;height:calc(100dvh - 77px)!important;margin:5px auto!important}
  .guest-reader.guest-book-page{padding:8px!important}
  .guest-reader .card-head{padding:0 20px 5px!important}
  .guest-reader .card-head .kicker{display:none}
  .guest-reader .card-head h2{font-size:1.1rem!important}
  .guest-reader .single-entry{padding:4px 22px!important}
  .guest-reader .single-entry .entry{padding:3px 6px!important}
  .guest-reader .guest-tilt-0 .entry-text,.guest-reader .guest-tilt-1 .entry-text,.guest-reader .guest-tilt-2 .entry-text,.guest-reader .guest-tilt-3 .entry-text{width:88%}
  .guest-reader .leaf-arrow,.guest-cover-next{width:36px!important;height:36px!important}
}
@media(prefers-reduced-motion:reduce){.guest-slide-next,.guest-slide-prev{animation:none!important}}

/* 19.11.2026: identische äußere Blattgröße, keine vertikale Scrollfläche im Eintrag. */
.guest-cover.guest-book-page,.guest-reader.guest-book-page{
  width:min(750px,calc(100% - 28px))!important;
  height:calc(100dvh - 114px)!important;
  min-height:0!important;max-height:none!important;
  flex:0 0 auto!important;
  margin:8px auto!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
.guest-cover.guest-book-page{padding:12px 16px 30px!important}
.guest-cover.guest-book-page .cover-link{width:100%!important;max-width:none!important;height:100%!important;flex:1 1 auto!important;min-height:0!important}
.guest-cover.guest-book-page .cover-artwork{width:100%!important;height:100%!important;max-height:100%!important;max-width:100%!important;object-fit:contain!important}
.guest-reader.guest-book-page .entry-stage{flex:1 1 0!important;height:0!important;min-height:0!important;overflow:hidden!important}
.guest-reader.guest-book-page .single-entry{flex:1 1 auto!important;height:100%!important;min-height:0!important;overflow:hidden!important}
.guest-reader.guest-book-page .single-entry .entry{height:100%!important;min-height:0!important;overflow:hidden!important}
.guest-reader.guest-book-page .guest-book-continuation .entry-text{margin-top:20px!important}
@media(max-width:600px){
  .guest-cover.guest-book-page,.guest-reader.guest-book-page{width:calc(100% - 12px)!important;height:calc(100dvh - 96px)!important;margin:5px auto!important}
}

/* Vereinheitlichung Deckblatt/Eintragsblatt: exakt gleicher Außenrahmen. */
.guest-cover.guest-book-page,.guest-reader.guest-book-page{
  width:min(750px,calc(100% - 28px))!important;
  height:calc(100dvh - 114px)!important;
  min-height:0!important;max-height:none!important;
  margin:8px auto!important;overflow:hidden!important;
  box-sizing:border-box!important;flex:0 0 auto!important
}
.guest-reader.guest-book-page .entry-stage{height:0!important;flex:1 1 0!important;min-height:0!important;overflow:hidden!important}
.guest-reader.guest-book-page .single-entry{height:100%!important;max-height:100%!important;box-sizing:border-box!important;overflow:hidden!important}
.guest-reader.guest-book-page .single-entry .entry{height:100%!important;max-height:100%!important;box-sizing:border-box!important;overflow:hidden!important}
.guest-reader.guest-book-page .single-entry .entry-text{box-sizing:border-box!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;line-height:1.55!important;margin-top:8px!important;margin-bottom:8px!important}
.guest-reader.guest-book-page .card-head{flex:0 0 auto!important}
.guest-book-page-indicator{display:block!important;min-height:18px!important;flex:0 0 auto!important}
@media(max-width:600px){
 .guest-cover.guest-book-page,.guest-reader.guest-book-page{width:calc(100% - 12px)!important;height:calc(100dvh - 96px)!important;margin:5px auto!important}
 .guest-reader.guest-book-page .single-entry{padding-left:23px!important;padding-right:23px!important}
 .guest-reader.guest-book-page .guest-tilt-0 .entry-text,.guest-reader.guest-book-page .guest-tilt-1 .entry-text,.guest-reader.guest-book-page .guest-tilt-2 .entry-text,.guest-reader.guest-book-page .guest-tilt-3 .entry-text{width:86%!important}
}
/* Das Listenblatt füllt den freien Buchraum; keine Flex-Schrumpfung auf Textbreite. */
.guest-reader.guest-book-page .entry-stage > .entries.single-entry{
  flex:1 1 100%!important;width:100%!important;min-width:0!important;max-width:100%!important;
}
/* Freiraum an der oberen Kante für leicht gedrehte Handschrift. */
.guest-reader.guest-book-page .single-entry .entry-text{transform-origin:center top!important;margin-top:22px!important}
.guest-reader.guest-book-page .guest-book-continuation .entry-text{margin-top:34px!important}
/* Schrägschrift mit großzügigen Seitenrändern, damit die Rotation keine Zeilen abschneidet. */
.guest-reader.guest-book-page :is(.guest-tilt-0,.guest-tilt-1,.guest-tilt-2,.guest-tilt-3) .entry-text{width:76%!important}
@media(max-width:600px){.guest-reader.guest-book-page :is(.guest-tilt-0,.guest-tilt-1,.guest-tilt-2,.guest-tilt-3) .entry-text{width:76%!important}}

/* Nur die Eingabemaske wird als Dialog angezeigt, nicht der Gästebucheintrag. */
.guest-write-dialog{box-sizing:border-box;width:min(670px,calc(100vw - 24px));max-height:calc(100dvh - 30px);overflow-y:auto;padding:0;border:1px solid #b6c9dc;border-radius:15px;background:#edf3f9;color:#19385e;box-shadow:0 20px 60px #0f264766}
.guest-write-dialog::backdrop{background:#10263eb0}
.guest-write-dialog .card-form{position:relative;width:100%!important;max-width:none!important;min-height:0!important;margin:0!important;border:0!important;border-radius:15px!important;background:#edf3f9!important;padding:clamp(12px,3vw,28px)!important;box-shadow:none!important}
.guest-write-dialog .card-head{padding-right:32px}
.guest-write-close{position:absolute;top:10px;right:10px;width:30px!important;height:30px!important;min-width:30px!important;padding:0;border:0;border-radius:50%;background:#19385e;color:#fff;font:22px/1 system-ui;cursor:pointer}
.guest-write-dialog .form-note{margin-top:12px!important}
@media(max-width:600px){.guest-write-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}.guest-write-dialog .card-form{padding:12px!important}}

/* FIX: Der rechte Buchpfeil bleibt ein echtes steuerbares Element, auch beim letzten Eintrag.
   Erst wenn alle Folgeseiten gelesen sind, ist er deaktiviert. */
.guest-reader .leaf-arrow:is(button){appearance:none;-webkit-appearance:none;border:0;cursor:pointer}
.guest-reader .leaf-arrow:is(button):disabled{cursor:default}
.guest-reader .leaf-arrow:not(.is-disabled){opacity:1!important;pointer-events:auto!important}
