/* Reisetagebuch (19.11.2026) – gemeinsamer Stil für Editor und Leseansicht. Scrapbook-Look:
   Papier, Polaroids, Klebestreifen, Handschrift (Comic Neue, SIL OFL, liegt selbst auf dem Server –
   keine Google-Fonts-Anfrage, also keine IP-Weitergabe). */
@font-face { font-family: "TB Hand"; src: url("/reisetipps/fonts/ComicNeue-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "TB Hand"; src: url("/reisetipps/fonts/ComicNeue-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
    --papier: #fbf6ec; --papier-punkt: #eadfca; --karte: #ffffff; --tinte: #2b2520; --leise: #85796b;
    --linie: #e6dccb; --rot: #c8102e; --rot-hell: #fdecee; --gold: #e0a526; --gold-hell: #fff4d6;
    --blau: #2f6db5; --gruen: #2e7d4f; --schatten: 0 2px 6px rgba(60, 40, 20, .14), 0 10px 24px rgba(60, 40, 20, .08);
    --tape1: rgba(240, 190, 90, .55); --tape2: rgba(130, 180, 220, .5); --tape3: rgba(230, 130, 150, .45);
    --hand: "TB Hand", "Comic Neue", "Comic Sans MS", "Segoe Print", cursive;
    --sicher-unten: env(safe-area-inset-bottom, 0px); --sicher-oben: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --papier: #1f1b17; --papier-punkt: #2d2721; --karte: #2a2520; --tinte: #f1ebe2; --leise: #b2a593;
        --linie: #3e362e; --rot: #f0566b; --rot-hell: #3a1a1e; --gold-hell: #3a2f15;
        --schatten: 0 2px 6px rgba(0, 0, 0, .4), 0 10px 24px rgba(0, 0, 0, .3);
    }
}
:root[data-theme="dark"] {
    --papier: #1f1b17; --papier-punkt: #2d2721; --karte: #2a2520; --tinte: #f1ebe2; --leise: #b2a593;
    --linie: #3e362e; --rot: #f0566b; --rot-hell: #3a1a1e; --gold-hell: #3a2f15;
    --schatten: 0 2px 6px rgba(0, 0, 0, .4), 0 10px 24px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
    background-color: var(--papier);
    background-image: radial-gradient(var(--papier-punkt) 1.2px, transparent 1.3px);
    background-size: 22px 22px;
    color: var(--tinte);
    font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--rot); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--rot); outline-offset: 2px; }
.hand { font-family: var(--hand); }
.tb-breite { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* ---------- Deckblatt ---------- */
.tb-deckel { text-align: center; padding: calc(22px + var(--sicher-oben)) 0 8px; }
.tb-deckel .tb-label { display: inline-block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--leise); margin-bottom: 10px; }
.tb-deckel h1 { font-family: var(--hand); font-weight: 700; font-size: clamp(30px, 7vw, 46px); line-height: 1.12; margin: 0 0 6px; color: var(--tinte); overflow-wrap: anywhere; }
.tb-deckel .tb-unter { font-family: var(--hand); font-size: 20px; color: var(--leise); margin: 0; }
.tb-deckel .tb-titelbild { display: inline-block; margin: 22px auto 6px; padding: 12px 12px 44px; background: #fff; box-shadow: var(--schatten); transform: rotate(-2deg); position: relative; max-width: min(520px, 92%); }
.tb-deckel .tb-titelbild img { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: cover; background: #eee; }
.tb-deckel .tb-titelbild::before { content: ""; position: absolute; top: -12px; left: 50%; width: 120px; height: 26px; margin-left: -60px; background: var(--tape1); transform: rotate(3deg); }
.tb-logo { height: 48px; width: auto; }

/* ---------- Tage ---------- */
.tb-tag { margin: 34px 0 10px; scroll-margin-top: 70px; }
.tb-tag-kopf { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; padding: 0 2px 8px; border-bottom: 2px dashed var(--linie); margin-bottom: 18px; }
.tb-tag-nr { font-family: var(--hand); font-weight: 700; font-size: 28px; color: var(--rot); line-height: 1.1; }
.tb-tag-datum { font-family: var(--hand); font-size: 19px; color: var(--tinte); }
.tb-wetter { margin-left: auto; font-size: 14px; color: var(--leise); background: var(--karte); border: 1px solid var(--linie); border-radius: 20px; padding: 2px 10px; white-space: nowrap; }
.tb-seite { columns: 2 300px; column-gap: 22px; }
.tb-leer { font-family: var(--hand); color: var(--leise); font-size: 18px; margin: 4px 2px 12px; }

/* ---------- Karten ---------- */
/* inline-block statt block: im Spaltensatz sonst landet der Klebestreifen (ragt nach oben heraus) am Fuß der Vorspalte */
.tb-k { break-inside: avoid; display: inline-block; width: 100%; vertical-align: top; position: relative; margin: 12px 0 14px; background: var(--karte); box-shadow: var(--schatten);
        transform: rotate(var(--dreh, 0deg)); border-radius: 3px; color: var(--tinte); }
.tb-k.klickbar { cursor: pointer; }
.tb-k.klickbar:hover { box-shadow: 0 0 0 3px var(--gold), var(--schatten); }
.tb-tape { position: absolute; top: -11px; left: 50%; width: 92px; height: 22px; margin-left: -46px; background: var(--tape1); transform: rotate(var(--tdreh, -4deg)); z-index: 1; }
.tb-k:nth-child(3n+2) .tb-tape { background: var(--tape2); }
.tb-k:nth-child(3n) .tb-tape { background: var(--tape3); }

.tb-foto { padding: 10px 10px 12px; background: #fff; color: #2b2520; }
.tb-foto img { display: block; width: 100%; height: auto; background: #eee; cursor: zoom-in; }
.tb-k.klickbar.tb-foto img { cursor: pointer; }
.tb-foto figcaption { font-family: var(--hand); font-size: 18px; line-height: 1.35; padding: 10px 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-foto { margin-left: 0; margin-right: 0; }

.tb-notiz { padding: 18px 18px 14px; background-image: repeating-linear-gradient(transparent 0 27px, var(--linie) 27px 28px); background-position: 0 12px; }
.tb-notiz .tb-txt { font-family: var(--hand); font-size: 18px; line-height: 28px; white-space: pre-wrap; overflow-wrap: anywhere; }

.tb-sticker { padding: 18px 18px 14px; border: 2px solid var(--gold); background: var(--gold-hell); }
.tb-sticker .tb-art { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a5a00; background: var(--gold); color: #3a2600; border-radius: 20px; padding: 2px 10px; margin-bottom: 8px; }
.tb-sticker .tb-gross { font-family: var(--hand); font-weight: 700; font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
.tb-sticker .tb-txt { font-family: var(--hand); font-size: 17px; margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }

.tb-zitat { padding: 22px 20px 16px; }
.tb-zitat .tb-gross { font-family: var(--hand); font-size: 23px; line-height: 1.3; overflow-wrap: anywhere; white-space: pre-wrap; }
.tb-zitat .tb-gross::before { content: "„"; color: var(--rot); font-weight: 700; margin-right: 1px; }
.tb-zitat .tb-gross::after { content: "“"; color: var(--rot); font-weight: 700; margin-left: 1px; }
.tb-zitat .tb-wer { text-align: right; font-family: var(--hand); color: var(--leise); margin-top: 6px; }

.tb-stimmung { padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.tb-stimmung > div:nth-of-type(2) { flex: 1 1 0; min-width: 0; }
.tb-stimmung .tb-meta, .tb-stimmung .tb-komm { flex: 1 0 100%; margin-top: 4px; }
.tb-stimmung .tb-emoji { font-size: 52px; line-height: 1; }
.tb-stimmung .tb-txt { font-family: var(--hand); font-size: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }

.tb-ticket { padding: 14px 18px 12px 26px; border-left: 8px dotted var(--papier); background: linear-gradient(90deg, var(--rot-hell), var(--karte) 60%); }
.tb-ticket .tb-art { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rot); }
.tb-ticket .tb-gross { font-family: var(--hand); font-weight: 700; font-size: 26px; line-height: 1.2; }
.tb-ticket .tb-titel { font-family: var(--hand); font-size: 18px; overflow-wrap: anywhere; }
.tb-ticket .tb-txt { font-family: var(--hand); font-size: 16px; color: var(--leise); white-space: pre-wrap; overflow-wrap: anywhere; }

.tb-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--leise); margin-top: 10px; flex-wrap: wrap; }
.tb-foto .tb-meta { padding: 0 4px; color: #85796b; }
.tb-meta .tb-von { font-family: var(--hand); font-size: 15px; }
.tb-meta .tb-aktionen { margin-left: auto; display: flex; gap: 6px; }
.tb-mini { border: 1px solid var(--linie); background: var(--karte); color: var(--tinte); border-radius: 20px; padding: 3px 10px; font-size: 14px; cursor: pointer; line-height: 1.4; }
.tb-foto .tb-mini { background: #fff; color: #2b2520; border-color: #e6dccb; }
.tb-mini.an { background: var(--rot-hell); border-color: var(--rot); color: var(--rot); }
.tb-mini:disabled { cursor: default; opacity: .85; }

/* ---------- Kommentare ---------- */
.tb-komm { margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--linie); font-size: 14px; }
.tb-foto .tb-komm { margin: 10px 4px 0; border-color: #e6dccb; color: #2b2520; }
.tb-komm[hidden] { display: none; }
.tb-komm ul { list-style: none; margin: 0 0 8px; padding: 0; }
.tb-komm li { margin: 0 0 6px; overflow-wrap: anywhere; }
.tb-komm li b { font-weight: 700; }
.tb-komm li .x { border: 0; background: none; color: var(--leise); cursor: pointer; padding: 0 4px; font-size: 13px; }
.tb-komm form { display: grid; gap: 6px; }
.tb-komm input, .tb-komm textarea { width: 100%; border: 1px solid var(--linie); border-radius: 8px; padding: 7px 9px; background: var(--papier); color: var(--tinte); font-size: 15px; }
.tb-komm textarea { min-height: 54px; resize: vertical; }
.tb-komm .falle { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Knöpfe, Kästen ---------- */
.tb-knopf { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 11px 18px; background: var(--rot); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; font-size: 16px; }
.tb-knopf.zweit { background: var(--karte); color: var(--tinte); border: 1px solid var(--linie); }
.tb-knopf:disabled { opacity: .55; cursor: default; }
.tb-kasten { background: var(--karte); border: 1px solid var(--linie); border-radius: 14px; padding: 16px 18px; margin: 16px 0; box-shadow: 0 1px 3px rgba(60, 40, 20, .06); }
.tb-kasten h2, .tb-kasten h3 { margin: 0 0 8px; font-size: 18px; }
.tb-hinweis { font-size: 14px; color: var(--leise); }
.tb-story { margin: -8px 0 6px; }

/* ---------- Lightbox / Overlay ---------- */
.tb-lb { position: fixed; inset: 0; background: rgba(15, 10, 5, .92); z-index: 60; display: none; align-items: center; justify-content: center; padding: 16px; }
.tb-lb.offen { display: flex; }
.tb-lb img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.tb-lb .zu { position: absolute; top: calc(10px + var(--sicher-oben)); right: 12px; border: 0; background: rgba(255,255,255,.15); color: #fff; width: 42px; height: 42px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.tb-lb .tb-lb-box { display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 100%; }
.tb-lb .tb-lb-box img { max-height: calc(100vh - 140px); }

/* ---------- Werbung (dezent) ---------- */
.tb-werbung { text-align: center; margin: 44px 0 20px; padding: 22px 18px; background: var(--karte); border: 2px dashed var(--linie); border-radius: 16px; }
.tb-werbung img { height: 54px; width: auto; }
.tb-werbung p { margin: 8px 0 14px; }
.tb-fuss { text-align: center; font-size: 13px; color: var(--leise); padding: 18px 0 calc(28px + var(--sicher-unten)); }
.tb-fuss img { height: 30px; width: auto; vertical-align: middle; }

@media (max-width: 640px) {
    .tb-seite { columns: 1; }
    .tb-k { --dreh: 0deg !important; }
    .tb-k.tb-foto { transform: rotate(var(--dreh-mobil, 0deg)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
    body { background: #fff; }
    .tb-mini, .tb-komm form, .tb-story, .tb-werkzeug, .tb-fab, .tb-reiter { display: none !important; }
}
