/* ==========================================================
   TAGEBUCH „Heilung erleben“
   Übersicht (/heilung-erleben/) und Eintragsseiten
   (/heilung-erleben/<eintrag>/). Wird nur auf diesen Seiten geladen.
   ========================================================== */

/* ---------- Übersicht: Hinweis ---------- */
#en-heilung .tg-hinweis{max-width:var(--w-breit);display:grid;grid-template-columns:1fr 1fr;gap:12px 40px;margin:34px auto 0;padding:18px 22px;background:#fff;border:1px solid var(--blau-linie);border-left:3px solid var(--rot);text-align:left}
#en-heilung .tg-hinweis p{font-size:.95rem;line-height:1.7;color:var(--navy)}
#en-heilung .tg-hinweis strong{color:var(--rot)}
#en-heilung .tg-hinweis details{margin-top:10px}
#en-heilung .tg-hinweis summary{cursor:pointer;list-style:none;font-weight:700;color:var(--rot);font-size:.9rem;display:inline-block}
#en-heilung .tg-hinweis summary::-webkit-details-marker{display:none}
#en-heilung .tg-hinweis summary::before{content:"+";display:inline-block;width:1em}
#en-heilung .tg-hinweis details[open] summary::before{content:"–"}
#en-heilung .tg-hinweis details p{margin-top:8px;color:var(--navy-soft)}

/* ---------- Übersicht: Einstieg, Sortierung, Filter ---------- */
#tg-tagebuch{padding:0 clamp(20px,5vw,40px);margin:0 auto 10px}
#tg-tagebuch *,#tg-tagebuch *::before,#tg-tagebuch *::after{box-sizing:border-box}
#tg-tagebuch [hidden],#inhalt [hidden]{display:none!important}
#tg-tagebuch .tg-einstieg{max-width:var(--w-breit);margin:30px auto 0;display:grid;grid-template-columns:1fr 1fr;gap:12px 14px}
#tg-tagebuch .tg-spalte{display:grid;grid-template-rows:subgrid;grid-row:span 2;gap:10px;min-width:0}
#tg-tagebuch .tg-tipp{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--blau-linie);padding:12px 14px;text-decoration:none;color:var(--navy);min-width:0;transition:border-color .2s,transform .2s}
#tg-tagebuch .tg-tipp:hover{border-color:var(--rot);transform:translateY(-2px)}
#tg-tagebuch .tg-tipp img{width:56px;height:56px;object-fit:cover;flex:none}
#tg-tagebuch .tg-tipp small{display:block;font-size:.7rem;letter-spacing:.15em;text-transform:uppercase;color:var(--rot);font-weight:700;margin-bottom:3px}
#tg-tagebuch .tg-tipp strong{display:block;font-family:var(--script);font-size:1.3rem;line-height:1.15;color:var(--rot);font-weight:700}
#tg-tagebuch .tg-knoepfe{display:flex;border:1px solid var(--rot);background:#fff}
#tg-tagebuch .tg-knoepfe button{flex:1;border:0;background:transparent;font-family:var(--serif);font-weight:700;font-size:.88rem;color:var(--rot);padding:8px 10px;cursor:pointer;white-space:nowrap}
#tg-tagebuch .tg-knoepfe button+button{border-left:1px solid var(--rot)}
#tg-tagebuch .tg-knoepfe button[aria-pressed="true"]{background:var(--rot);color:#fff}
#tg-tagebuch .tg-knoepfe button:focus-visible{outline:2px solid var(--rot);outline-offset:2px}
#tg-tagebuch .tg-frei{max-width:var(--w-breit);margin:14px auto 0;font-size:.92rem;color:var(--navy-soft);display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center}
#tg-tagebuch .tg-frei button{border:0;background:none;padding:0;color:var(--rot);text-decoration:underline;cursor:pointer;font:inherit}
@media (max-width:640px){
  #tg-tagebuch .tg-einstieg{grid-template-columns:1fr;gap:10px}
  #tg-tagebuch .tg-spalte{grid-row:auto;grid-template-rows:auto auto}
  #tg-tagebuch .tg-spalte+.tg-spalte{margin-top:12px}
}
@media (max-width:400px){#tg-tagebuch .tg-knoepfe button{font-size:.8rem;padding:8px 6px}}

/* ---------- Übersicht: Notizbuch mit Karten ---------- */
#tg-tagebuch .tg-notizbuch{max-width:var(--w-breit);margin:22px auto 0;border:1px solid #e8e1d6;padding:34px 18px 40px 42px;background:
  linear-gradient(90deg,transparent 28px,rgba(138,30,30,.18) 28px,rgba(138,30,30,.18) 29px,transparent 29px),
  repeating-linear-gradient(180deg,#fffdf9 0 31px,#ede7dd 31px 32px)}
#tg-tagebuch .tg-raster{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:34px 24px}
@media (max-width:1000px){#tg-tagebuch .tg-raster{grid-template-columns:repeat(3,minmax(0,1fr));gap:30px 18px}}
#tg-tagebuch .tg-raster>li{margin:0;padding:0;min-width:0;display:flex}
#tg-tagebuch .tg-raster>li[hidden]{display:none}
#tg-tagebuch .tg-karte{position:relative;display:flex;flex-direction:column;width:100%;background:#fff;padding:10px 10px 14px;text-decoration:none;color:var(--navy);box-shadow:0 1px 2px rgba(44,58,84,.08),0 8px 18px -10px rgba(44,58,84,.35);transition:transform .25s ease,box-shadow .25s ease;transform:rotate(-.6deg)}
#tg-tagebuch .tg-raster>li:nth-child(even) .tg-karte{transform:rotate(.5deg)}
#tg-tagebuch .tg-karte:hover,#tg-tagebuch .tg-karte:focus-visible{transform:rotate(0) translateY(-4px);box-shadow:0 2px 4px rgba(44,58,84,.1),0 16px 28px -12px rgba(44,58,84,.45)}
#tg-tagebuch .tg-karte:focus-visible{outline:2px solid var(--rot);outline-offset:4px}
#tg-tagebuch .tg-karte::before{content:"";position:absolute;top:-9px;left:50%;width:42%;height:18px;transform:translateX(-50%) rotate(-2deg);background:rgba(243,214,214,.9)}
#tg-tagebuch .tg-raster>li:nth-child(3n) .tg-karte::before{background:rgba(215,232,243,.95)}
#tg-tagebuch .tg-bild{position:relative;display:block;aspect-ratio:4/5;overflow:hidden;background:var(--rosa)}
#tg-tagebuch .tg-bild img{display:block;width:100%;height:100%;object-fit:cover}
#tg-tagebuch .tg-marke{position:absolute;top:8px;left:8px;background:#fff;color:var(--rot);font-size:.66rem;letter-spacing:.14em;text-transform:uppercase;font-weight:700;padding:3px 7px}
#tg-tagebuch .tg-schloss{position:absolute;right:8px;bottom:8px;display:flex;align-items:center;gap:5px;background:rgba(44,58,84,.88);color:#fff;font-size:.72rem;font-weight:700;padding:4px 8px}
#tg-tagebuch .tg-schloss svg{width:12px;height:12px}
#tg-tagebuch .tg-schloss .tg-auf{display:none}
.tg-ist-frei #tg-tagebuch .tg-schloss{background:rgba(138,30,30,.85)}
.tg-ist-frei #tg-tagebuch .tg-schloss .tg-zu{display:none}
.tg-ist-frei #tg-tagebuch .tg-schloss .tg-auf{display:inline}
#tg-tagebuch .tg-nr{display:flex;justify-content:space-between;gap:6px;margin:10px 2px 0;font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:var(--navy-soft);font-weight:700}
#tg-tagebuch .tg-titel{display:block;font-family:var(--script);color:var(--rot);font-weight:700;font-size:clamp(1.15rem,2vw,1.4rem);line-height:1.15;margin:4px 2px 0;text-wrap:balance;hyphens:auto;overflow-wrap:break-word}
#tg-tagebuch .tg-meta{display:block;margin:6px 2px 0;font-size:.82rem;color:var(--navy-soft)}
@media (max-width:700px){
  #tg-tagebuch .tg-notizbuch{padding:22px 12px 28px 20px;background:#fffdf9}
  #tg-tagebuch .tg-raster{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 12px}
  #tg-tagebuch .tg-raster>li.tg-erste{grid-column:1/-1}
  #tg-tagebuch .tg-raster>li.tg-erste .tg-bild{aspect-ratio:4/3}
  #tg-tagebuch .tg-meta{display:none}
  #tg-tagebuch .tg-nr{letter-spacing:.08em}
}
@media (prefers-reduced-motion:reduce){#tg-tagebuch .tg-karte{transition:none}}

/* ---------- Codewort-Fenster (Übersicht) ---------- */
.tg-fenster{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:20px;background:rgba(44,58,84,.55)}
.tg-fenster[hidden]{display:none}
.tg-fenster-box{position:relative;width:100%;max-width:400px;background:#fff;padding:28px 24px 22px;box-shadow:0 20px 50px -20px rgba(0,0,0,.5);font-family:var(--serif);color:var(--navy)}
.tg-fenster-box::before{content:"";position:absolute;top:-10px;left:50%;width:110px;height:20px;transform:translateX(-50%) rotate(-2deg);background:rgba(215,232,243,.95)}
.tg-fenster-box h2{font-family:var(--script);color:var(--rot);font-size:1.9rem;line-height:1.15;margin:0;text-align:center}
.tg-fenster-box .tg-fenster-text{text-align:center;margin:6px 0 16px;color:var(--navy-soft);font-size:.95rem;line-height:1.6}

/* ---------- Codewort-Formular (Fenster + Eintragsseite) ---------- */
.tg-form label{display:block;font-size:.75rem;letter-spacing:.14em;text-transform:uppercase;font-weight:700;margin-bottom:6px;color:var(--navy)}
.tg-form input{width:100%;font-family:var(--serif);font-size:1rem;padding:10px 12px;border:1px solid #c9c2b8;background:#fffdf9;color:var(--navy);border-radius:0}
.tg-form input:focus{outline:2px solid var(--rot);outline-offset:1px}
#inhalt#inhalt .tg-form p.tg-meldung,.tg-form .tg-meldung{min-height:1.4em;margin:8px 0 0;font-size:.9rem;color:var(--rot)}
.tg-form .tg-form-knoepfe{display:flex;gap:10px;margin-top:12px}
.tg-form .tg-form-knoepfe button{flex:1;padding:10px 12px;font-family:var(--serif);font-weight:700;font-size:.95rem;cursor:pointer;border:1px solid var(--navy)}
.tg-form .tg-ja{background:var(--navy);color:#fff}
.tg-form .tg-ja:disabled{opacity:.6;cursor:wait}
.tg-form .tg-nein{background:#fff;color:var(--navy)}
.tg-form .tg-klein{margin:12px 0 0;text-align:center;font-size:.82rem;color:var(--navy-soft);line-height:1.5}
.tg-form.tg-wackeln{animation:tg-wackeln .4s}
@keyframes tg-wackeln{20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}

/* ---------- Eintragsseite ---------- */
#inhalt#inhalt p.tg-unterzeile{margin:14px 0 0;font-style:italic;font-size:var(--t-lead)!important;color:var(--navy);line-height:1.5;text-wrap:balance}
#inhalt .tg-hinweis-eintrag{margin:0 0 2em;padding:14px 18px;background:var(--rosa);border-left:3px solid var(--rot);font-size:.95rem;line-height:1.65}
#inhalt .tg-hinweis-eintrag strong{color:var(--rot)}
#inhalt#inhalt .beitrag-text p.tg-betont{font-family:var(--script)!important;color:var(--rot);font-weight:700;font-size:clamp(1.45rem,2.6vw,1.75rem)!important;line-height:1.3!important;text-align:center;margin:1.4em auto;max-width:28em;text-wrap:balance}
#inhalt .beitrag-text .tg-eng p{margin:0 0 .25em}
#inhalt .beitrag-text .tg-eng{margin:0 0 1.15em}
#inhalt .beitrag-text figure.tg-bild{margin:2.2em auto;max-width:440px;background:#fff;padding:12px 12px 8px;box-shadow:0 2px 3px rgba(44,58,84,.06),0 18px 36px -14px rgba(44,58,84,.4);transform:rotate(-1deg)}
#inhalt .beitrag-text figure.tg-bild:nth-of-type(even){transform:rotate(1.1deg)}
#inhalt .beitrag-text figure.tg-bild img{margin:0;width:100%;height:auto}
#inhalt .beitrag-text figure.tg-bild figcaption{font-family:var(--script);font-size:1.2rem;color:var(--navy-soft);margin-top:6px}
#inhalt .beitrag-text .tg-streifen{width:100%;aspect-ratio:15/1;margin:2em 0;background-repeat:no-repeat;background-size:100% auto}
#inhalt .tg-alle{text-align:center;margin:26px auto 0}
#inhalt .tg-alle a{display:inline-block;background:var(--rot);color:#fff;text-decoration:none;font-weight:700;letter-spacing:.06em;padding:11px 22px}
#inhalt .tg-alle a:hover{background:var(--rot-dunkel)}

/* geschützter Eintrag */
#inhalt .tg-tor{max-width:420px;margin:0 auto 1em;background:#fff;border:1px solid var(--blau-linie);padding:26px 24px 20px;text-align:center}
#inhalt#inhalt .tg-tor p.tg-tor-titel{font-family:var(--script)!important;color:var(--rot);font-size:1.7rem!important;line-height:1.2!important;margin:0 0 6px;font-weight:700}
#inhalt .tg-tor .tg-tor-text{font-size:.95rem;line-height:1.6;color:var(--navy)}
#inhalt .tg-tor .tg-form{text-align:left;margin-top:14px}
#inhalt .tg-geschuetzt-inhalt:empty{display:none}
#inhalt .tg-sperren{text-align:center;margin:1.5em 0 0;font-size:.9rem}
#inhalt .tg-sperren button{border:0;background:none;padding:0;color:var(--navy-soft);text-decoration:underline;cursor:pointer;font:inherit}
/* alte Kachel-Teile, die auf der Eintragsseite nicht gebraucht werden */
.tg-geschuetzt-inhalt [id$="-z"],.tg-geschuetzt-inhalt .back{display:none!important}

/* geschützte Einträge: Untertitel im Text und Brief-Form (Eintrag 12) */
#inhalt#inhalt .beitrag-text p.tg-unterzeile-inhalt{font-style:italic;font-size:var(--t-lead)!important;text-align:center;color:var(--navy);margin:0 auto 1.6em;max-width:32em;text-wrap:balance}
#inhalt .tg-brief{background:#fbf3ec;background-image:linear-gradient(transparent 0,transparent 31px,rgba(139,101,90,.12) 32px);background-size:100% 32px;border:1px solid #eadbcc;padding:clamp(22px,4vw,40px) clamp(18px,4vw,34px);margin:1.6em 0;box-shadow:0 10px 26px -18px rgba(44,58,84,.45)}
#inhalt#inhalt .tg-brief p{font-family:var(--script)!important;font-weight:600;font-size:clamp(1.2rem,2.2vw,1.4rem)!important;line-height:1.6!important;color:#3a2a20}
#inhalt#inhalt .tg-brief p.tg-brief-anrede{font-size:clamp(1.35rem,2.4vw,1.6rem)!important;margin-bottom:1.2em}
#inhalt#inhalt .tg-brief p.tg-brief-gruss{text-align:right;margin-top:1.4em}
#inhalt .tg-brief figure.tg-bild{max-width:380px}

@media (max-width:760px){#en-heilung .tg-hinweis{grid-template-columns:1fr}}
