/* Die Inselreise - Gestaltung. Senioren-Standard: 22px Grundschrift, grosse Knoepfe. */
html { font-size: 22px; }
* { box-sizing: border-box; }
:root {
  --tinte: #2b2219;
  --papier: #fbf4e4;
  --papier-dunkel: #efe2c2;
  --meer: #2f6d8f;
  --gold: #e8b53a;
  --rot: #b5473a;
  --gruen: #3f7a3a;
  --schatten: 0 6px 24px rgba(40, 25, 10, 0.18);
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--tinte);
  background: radial-gradient(ellipse at top, #d9ecf5 0%, #f6efe0 55%, #efe2c2 100%) fixed;
  line-height: 1.5;
  overflow-x: hidden;
}
body[data-ort="forum"], body[data-ort="pythia"] { background: radial-gradient(ellipse at top, #2a3a5a 0%, #3a4560 50%, #4a4a5a 100%) fixed; }
body[data-ort="senoria"], body[data-ort="spielepark"] { background: radial-gradient(ellipse at top, #f3c6a8 0%, #f2dfc8 60%, #e8d2b8 100%) fixed; }
.ir-rahmen { max-width: 1500px; margin: 0 auto; padding: 0.5rem 0.7rem 1rem; }

/* Kopf */
.ir-kopf {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem;
  background: var(--papier); border: 3px solid #c9a86a; border-radius: 16px; padding: 0.4rem 0.8rem; box-shadow: var(--schatten);
}
.ir-titel h1 { font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; margin: 0; color: #7a3a22; letter-spacing: 0.02em; }
.ir-titel p { margin: 0; font-size: 0.7rem; color: #6a5a48; font-style: italic; }
.ir-funde { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.fund-label { font-size: 0.7rem; color: #6a5a48; }
.fundleiste { display: flex; gap: 0.3rem; }
.fund {
  width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 3px dashed #c9b48a; background: #fffaf0;
  font-size: 1.1rem; line-height: 1; cursor: pointer; color: #b8a888; font-weight: bold; padding: 0;
}
.fund.hat { border: 3px solid var(--gold); background: radial-gradient(circle, #fff6d0, #ffe7a0); color: inherit; box-shadow: 0 0 12px rgba(232, 181, 58, 0.6); }
.ir-werkzeuge { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.werkzeug {
  font-size: 0.75rem; padding: 0.35rem 0.7rem; min-height: 44px; border-radius: 12px; border: 2px solid #c9a86a;
  background: #fff; color: var(--tinte); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; font-family: inherit;
}
.werkzeug:hover, .werkzeug:focus-visible { background: #fff3cf; }

/* Spielflaeche */
.spielflaeche { display: grid; grid-template-columns: 1fr; gap: 0.7rem; margin-top: 0.7rem; }
@media (min-width: 1100px) {
  .spielflaeche { grid-template-columns: minmax(0, 1fr) minmax(360px, 30%); align-items: start; }
  .seite { max-height: calc(100vh - 2rem); overflow-y: auto; position: sticky; top: 0.5rem; padding-right: 0.2rem; }
}
.buehne {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden;
  border: 4px solid #c9a86a; box-shadow: var(--schatten); background: #9fc7de;
}
@supports not (aspect-ratio: 16 / 9) { .buehne { height: 0; padding-top: 56.25%; } }
#leinwand { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ortsname {
  position: absolute; left: 0.6rem; top: 0.6rem; background: rgba(251, 244, 228, 0.92); border: 2px solid #c9a86a;
  border-radius: 10px; padding: 0.15rem 0.6rem; font-family: Georgia, serif; font-size: 0.85rem; font-weight: bold; color: #5a3320;
  pointer-events: none;
}
.ortsname:empty { display: none; }
.pins { position: absolute; inset: 0; }
.pin {
  position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 0.3rem;
  background: rgba(255, 252, 240, 0.94); border: 3px solid var(--gold); border-radius: 999px; padding: 0.15rem 0.6rem 0.15rem 0.3rem;
  font-size: 0.68rem; font-family: inherit; color: var(--tinte); cursor: pointer; min-height: 44px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  white-space: nowrap; animation: atmen 3s ease-in-out infinite;
}
.pin:hover, .pin:focus-visible { background: #fff3c4; transform: translate(-50%, -50%) scale(1.08); animation: none; }
.pin.aus { border-color: #bbb; background: rgba(240, 240, 240, 0.9); animation: none; }
.pin-bild { font-size: 1.15rem; line-height: 1; }
@keyframes atmen { 0%, 100% { box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); } 50% { box-shadow: 0 0 0 6px rgba(232, 181, 58, 0.35), 0 3px 10px rgba(0, 0, 0, 0.3); } }
@media (max-width: 760px) {
  .pin { padding: 0.15rem; min-width: 44px; justify-content: center; }
  .pin-text { display: none; }
  .ortsname { font-size: 0.62rem; left: 0.3rem; top: 0.3rem; }
  .ir-titel h1 { font-size: 1.15rem; }
  .ir-rahmen { padding: 0.3rem 0.35rem 1rem; }
  /* Kopf auf dem Handy kompakt, damit das Bild schneller sichtbar ist */
  .ir-kopf { padding: 0.3rem 0.5rem; gap: 0.3rem 0.6rem; }
  .ir-titel p, .fund-label { display: none; }
  .fund { width: 44px; height: 44px; font-size: 0.85rem; border-width: 2px; }
  .werkzeug { font-size: 0.68rem; padding: 0.2rem 0.45rem; }
  .spielflaeche { margin-top: 0.4rem; }
}

/* Gespraech */
.erzaehler {
  display: flex; gap: 0.7rem; align-items: flex-start; background: var(--papier); border: 3px solid #c9a86a;
  border-radius: 16px; padding: 0.7rem 0.8rem; box-shadow: var(--schatten);
}
.sprecher-bild {
  flex: 0 0 auto; width: 3rem; height: 3rem; border-radius: 50%; background: radial-gradient(circle, #fff, #f3e3bd);
  border: 3px solid var(--gold); display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
}
.sprecher-name { margin: 0; font-weight: bold; font-family: Georgia, serif; color: #7a3a22; font-size: 0.85rem; }
.sprecher-text { margin: 0.15rem 0 0; font-size: 1rem; }
.sprecher-text.neu { animation: einblenden 0.5s ease; }
@keyframes einblenden { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.aktionen { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.6rem; }
.knopf {
  font-family: inherit; font-size: 0.95rem; text-align: left; padding: 0.55rem 0.9rem; min-height: 56px; border-radius: 14px;
  border: 3px solid #c9a86a; background: #fffdf6; color: var(--tinte); cursor: pointer; box-shadow: 0 2px 0 #c9a86a;
}
.knopf:hover, .knopf:focus-visible { background: #fff3cf; outline: 3px solid #3a7fd0; outline-offset: 2px; }
.knopf.haupt { background: linear-gradient(#ffe9a8, #ffd672); border-color: #c08a1f; font-weight: bold; box-shadow: 0 3px 0 #a87618; }
.knopf.leise { background: #f6f0e2; font-size: 0.85rem; }
.knopf:disabled { opacity: 0.55; cursor: not-allowed; }
.knopf:active { transform: translateY(2px); box-shadow: none; }

/* Zusatzflaeche */
.panel { margin-top: 0.7rem; background: #fffdf6; border: 3px solid #c9a86a; border-radius: 16px; padding: 0.7rem 0.9rem; box-shadow: var(--schatten); }
.panel h2 { font-family: Georgia, serif; margin: 0 0 0.4rem; font-size: 1.1rem; color: #7a3a22; }
.panel label { display: block; font-weight: bold; margin-bottom: 0.3rem; }
.panel input[type="text"], .panel input:not([type]), .panel textarea {
  width: 100%; font-size: 1rem; font-family: inherit; padding: 0.5rem; border: 3px solid #c9a86a; border-radius: 10px; margin-bottom: 0.5rem; background: #fff;
}
.panel .knopf { margin: 0.2rem 0.4rem 0.2rem 0; text-align: center; }
.mitlesen { font-weight: normal !important; font-size: 0.85rem; margin-top: 0.4rem; cursor: pointer; }
.mitlesen input { width: 1.2rem; height: 1.2rem; vertical-align: middle; }
.orakelstatus { font-style: italic; color: #4a5a7a; min-height: 1.4em; }
.orakelantwort { background: #f2f6fb; border-left: 5px solid #8fa8d8; padding: 0.5rem 0.7rem; border-radius: 8px; margin-top: 0.4rem; font-family: Georgia, serif; }
.brett { list-style: none; padding: 0; margin: 0; }
.brett li { margin: 0 0 0.35rem; }
.brett-link {
  display: block; padding: 0.4rem 0.6rem; background: #fff8e6; border: 2px solid #e2cc9c; border-radius: 10px;
  color: #234a7a; text-decoration: none; font-size: 0.9rem; margin-top: 0.3rem;
}
.brett-link:hover, .brett-link:focus-visible { background: #fff0c4; text-decoration: underline; }
.neu-marke { background: var(--rot); color: #fff; border-radius: 8px; font-size: 0.6rem; padding: 0.05rem 0.35rem; margin-left: 0.4rem; vertical-align: middle; }
.brett-fuss, .klein { font-size: 0.7rem; color: #6a5a48; margin: 0.4rem 0 0; }
.geschichte-titel { font-style: italic; }
.geschichte .absatz { font-family: Georgia, serif; font-size: 1rem; margin: 0 0 0.6rem; }
.absatz.neu { animation: einblenden 0.8s ease; }
.zettel {
  background: #fffef6; border: 1px solid #ddd3b8; border-radius: 4px; padding: 0.9rem 1rem; transform: rotate(-1deg);
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.15); font-family: Georgia, serif; font-size: 1.05rem;
  background-image: repeating-linear-gradient(transparent, transparent 1.45em, #e3ecf3 1.45em, #e3ecf3 1.5em);
}
.zettel p { margin: 0; }
.namensform .knopf { display: inline-block; }
.buden { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.5rem; }
.bude {
  display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--tinte);
  background: linear-gradient(#fff, #fff4dc); border: 3px solid #e2a04a; border-top: 10px solid #c9443b; border-radius: 12px; padding: 0.4rem 0.3rem;
}
.bude:nth-child(2n) { border-top-color: #3a7fd0; }
.bude:nth-child(3n) { border-top-color: #3f9a5a; }
.bude:hover, .bude:focus-visible { transform: translateY(-3px); box-shadow: var(--schatten); }
.bude-bild { font-size: 1.6rem; }
.bude-name { font-weight: bold; font-size: 0.8rem; }
.bude-ort { font-size: 0.62rem; color: #6a5a48; font-style: italic; }
.urkunde {
  text-align: center; font-family: Georgia, serif; background: #fffaf0; border: 8px double #c08a1f; border-radius: 6px; padding: 1rem;
}
.urkunde-kopf { font-size: 1.6rem; letter-spacing: 0.2em; color: #7a3a22; margin: 0; text-transform: uppercase; }
.urkunde-name { font-size: 1.4rem; font-style: italic; color: #234a7a; border-bottom: 2px solid #c9a86a; display: inline-block; padding: 0 1rem; }
.urkunde-funde { font-size: 1.8rem; letter-spacing: 0.3em; }
.urkunde-titel { font-weight: bold; color: #7a3a22; font-size: 1.1rem; }

/* Geschenk-Fenster */
.geschenk { position: fixed; inset: 0; background: rgba(20, 15, 5, 0.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.geschenk[hidden] { display: none; }
.geschenk-karte {
  background: var(--papier); border: 5px solid var(--gold); border-radius: 22px; padding: 1.2rem 1.4rem; max-width: 26rem; text-align: center;
  box-shadow: 0 0 60px rgba(255, 220, 120, 0.7); animation: aufgehen 0.6s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes aufgehen { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.geschenk-kopf { margin: 0; font-size: 0.8rem; color: #6a5a48; }
.geschenk-bild { font-size: 4rem; line-height: 1.2; animation: schweben 2.5s ease-in-out infinite; }
@keyframes schweben { 50% { transform: translateY(-8px); } }
.geschenk-name { font-family: Georgia, serif; font-weight: bold; font-size: 1.2rem; color: #7a3a22; margin: 0.2rem 0; }
.geschenk-karte .knopf { text-align: center; width: 100%; margin-top: 0.6rem; }

/* Info unten */
.ir-info { margin-top: 1rem; background: rgba(255, 253, 246, 0.9); border-radius: 16px; padding: 0.6rem 1rem; border: 2px solid #e2cc9c; }
.ir-info h2 { font-family: Georgia, serif; font-size: 1.05rem; margin: 0.2rem 0; color: #7a3a22; }
.ir-info p { font-size: 0.85rem; }
.ir-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; }
.ir-links a { color: #234a7a; }
.ir-links a.whatsapp { color: #128c4a; font-weight: bold; }
body[data-ort="forum"] .ir-info, body[data-ort="pythia"] .ir-info { background: rgba(255, 253, 246, 0.92); }

/* Einfach nur schauen */
body.nur-schauen .ir-kopf, body.nur-schauen .seite, body.nur-schauen .ir-info, body.nur-schauen .pins, body.nur-schauen .ortsname { visibility: hidden; }
body.nur-schauen .buehne { position: fixed; inset: 0; z-index: 40; border: 0; border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; background: #000; }
body.nur-schauen #leinwand { object-fit: contain; }
.zurueck-schwebend { position: fixed; right: 1rem; bottom: 1rem; z-index: 45; text-align: center; opacity: 0.85; }

@media (prefers-reduced-motion: reduce) {
  .pin, .geschenk-bild, .geschenk-karte, .sprecher-text.neu, .absatz.neu { animation: none !important; }
}

/* Druck: nur die Urkunde */
@media print {
  body * { visibility: hidden; }
  .urkunde, .urkunde * { visibility: visible; }
  .urkunde { position: absolute; left: 0; top: 0; width: 100%; border-width: 10px; }
}
