/* Hofdetektiv: baut auf den Farben, Schriften und Abständen von ommen.css auf (Plugin Ferienhof Ommen). */

/* ---------- Hofkarte zum Ausmalen ---------- */
.hd-karte-svg { display: block; width: 100%; height: auto; border-radius: var(--rund); background: var(--papier); }
.hd-grund { fill: #fbfaf6; }
.hd-weg { fill: none; stroke: #d9ddd5; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.hd-weg-breit { stroke-width: 30; }
.hd-umriss { fill: #f1f2ee; stroke: #c9cec6; stroke-width: 3; }
.hd-strasse { font: 400 26px var(--schrift-text); fill: #8c938a; }
.hd-flaeche { fill: var(--papier); stroke: var(--tinte); stroke-width: 5; stroke-linejoin: round; transition: fill 700ms var(--ease-out); }
.hd-nummer { fill: var(--papier); stroke: var(--tinte); stroke-width: 4; }
.hd-nummer-text { font: 700 32px var(--schrift-titel); fill: var(--tinte); }
.hd-nummer-gross { font-size: 58px; }
.hd-name { font: 700 30px var(--schrift-titel); fill: var(--tinte); paint-order: stroke; stroke: #fbfaf6; stroke-width: 8px; stroke-linejoin: round; }
.hd-karte-spiel .hd-station { cursor: pointer; }
.hd-karte-spiel .hd-station:focus-visible { outline: none; }
.hd-karte-spiel .hd-station:focus-visible .hd-flaeche,
.hd-karte-spiel .hd-station:hover .hd-flaeche { stroke: var(--klinker); stroke-width: 8; }
.hd-station[data-gemalt] .hd-nummer { fill: var(--tinte); }
.hd-station[data-gemalt] .hd-nummer-text { fill: var(--weiss); }
.hd-station[data-neu] .hd-flaeche { animation: hd-aufmalen 900ms var(--ease-out); }
@keyframes hd-aufmalen { from { opacity: 0.25; } to { opacity: 1; } }

/* ---------- Infoseite ---------- */
.hd-info .hd-schritte { padding-left: 1.4rem; }
.hd-info .hd-schritte li { margin-bottom: var(--raum-2); }
.hd-vorschau { margin: var(--raum-2) 0; }
.hd-vorschau figcaption { font-size: 0.95rem; color: var(--tinte-2); margin-top: var(--raum-1); }
.hd-stationen { columns: 2 14rem; padding-left: 1.4rem; }
.hd-stationen li { margin-bottom: 0.3rem; break-inside: avoid; }
.hd-farbpunkt { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 50%; margin-right: 0.45rem; vertical-align: -0.05rem; border: 1px solid rgb(0 0 0 / 0.2); }
.hd-farbname { color: var(--tinte-2); }

/* ---------- Spiel ---------- */
.hd-spiel { max-width: 46rem; margin: 0 auto; padding: var(--raum-3) var(--raum-2) var(--raum-5); }
.hd-titel { font: 700 clamp(2.2rem, 1.6rem + 2vw, 3rem)/1.05 var(--schrift-titel); margin: 0 0 var(--raum-2); color: var(--weide); }
.hd-feld { display: grid; gap: 0.35rem; margin: var(--raum-2) 0; font-weight: 600; }
.hd-feld input { font: 400 1.25rem var(--schrift-text); padding: 0.75rem 0.9rem; border: 2px solid var(--linie); border-radius: var(--rund); width: 100%; min-height: 52px; }
.hd-feld input:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; border-color: var(--fokus); }
.hd-stufe { border: 0; padding: 0; margin: var(--raum-2) 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--raum-1); }
.hd-stufe legend { font-weight: 600; margin-bottom: 0.35rem; padding: 0; }
.hd-stufe label { position: relative; }
.hd-stufe input { position: absolute; opacity: 0; inset: 0; }
.hd-stufe span { display: block; padding: 0.8rem 1rem; border: 2px solid var(--linie); border-radius: var(--rund); font-weight: 700; min-height: 64px; cursor: pointer; }
.hd-stufe small { font-weight: 400; color: var(--tinte-2); }
.hd-stufe input:checked + span { border-color: var(--weide); background: #e6efe7; }
.hd-stufe input:focus-visible + span { outline: 3px solid var(--fokus); outline-offset: 2px; }
.hd-regeln-kurz { margin: var(--raum-2) 0; }
.hd-regeln-kurz summary { font-weight: 700; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.hd-hallo { font: 700 1.25rem/1.3 var(--schrift-titel); margin: 0 0 var(--raum-2); }
.hd-karte { margin: 0 0 var(--raum-2); box-shadow: 0 2px 12px rgb(23 38 29 / 0.12); border-radius: var(--rund); }
.hd-loesung { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0.35rem; max-width: 26rem; margin: 0 0 var(--raum-3); }
.hd-buchstabe { height: 3rem; display: inline-flex; align-items: center; justify-content: center; border: 2px dashed var(--linie); border-radius: 8px; font: 700 1.6rem var(--schrift-titel); color: var(--tinte-2); }
.hd-buchstabe[data-gefunden] { border-style: solid; border-color: transparent; }
.hd-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.hd-stationsknopf { width: 100%; display: flex; align-items: center; gap: 0.75rem; min-height: 56px; padding: 0.5rem 0.9rem; border: 2px solid var(--linie); border-radius: var(--rund); background: var(--papier); font: inherit; text-align: left; cursor: pointer; color: var(--tinte); }
.hd-stationsknopf:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
.hd-nr { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 1.1rem var(--schrift-titel); border: 3px solid var(--hd-farbe); }
.hd-stationsname { flex: 1; font-weight: 700; }
.hd-status { font-size: 0.95rem; color: var(--tinte-2); }
.hd-stationsknopf[data-gemalt] .hd-nr { background: var(--hd-farbe); color: var(--hd-schrift, var(--weiss)); }
.hd-stationsknopf[data-gemalt] .hd-status { color: var(--weide); font-weight: 700; }
.hd-unten { margin-top: var(--raum-3); }

/* ---------- Dialog an der Station ---------- */
.hd-dialog { width: min(34rem, calc(100% - 1.5rem)); max-height: calc(100% - 1.5rem); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 20px 60px rgb(0 0 0 / 0.35); }
.hd-dialog::backdrop { background: rgb(23 38 29 / 0.55); }
.hd-dialog-inhalt { padding: var(--raum-3) var(--raum-3) var(--raum-2); position: relative; }
.hd-dialog h2 { font: 700 1.8rem/1.1 var(--schrift-titel); margin: 0.4rem 0 var(--raum-2); }
.hd-dialog-nr { display: inline-block; margin: 0; padding: 0.2rem 0.7rem; border-radius: 999px; font-weight: 700; font-size: 0.95rem; }
.hd-zu { position: absolute; top: 0.6rem; right: 0.6rem; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--grund); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.hd-zu:focus-visible { outline: 3px solid var(--fokus); }
.hd-frage { font-size: 1.25rem; font-weight: 600; }
.hd-antworten { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.hd-antwort { width: 100%; min-height: 56px; padding: 0.7rem 1rem; border: 2px solid var(--linie); border-radius: var(--rund); background: var(--papier); font: 700 1.1rem var(--schrift-text); text-align: left; cursor: pointer; }
.hd-antwort:hover, .hd-antwort:focus-visible { border-color: var(--weide); outline: none; background: #e6efe7; }
.hd-gut { font: 700 1.4rem var(--schrift-titel); color: var(--weide); }
.hd-fast { font-size: 1.1rem; }
.hd-fehler { color: #a4161a; font-weight: 600; min-height: 1.4em; }
.hd-wissen { font-size: 1.1rem; }
.hd-foto { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rund); margin: var(--raum-1) 0; }
.hd-malstift { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 60px; padding: 0.8rem 1.4rem; border: 0; border-radius: 999px; font: 700 1.15rem var(--schrift-titel); cursor: pointer; box-shadow: 0 4px 14px rgb(0 0 0 / 0.2); transition: transform 160ms var(--ease-out); }
.hd-malstift:active { transform: scale(0.97); }
.hd-malstift:focus-visible { outline: 3px solid var(--tinte); outline-offset: 3px; }
.hd-malstift svg { width: 1.6rem; height: 1.6rem; }

/* ---------- Urkunde ---------- */
.hd-urkunde-blatt { border: 6px double var(--weide); border-radius: 14px; padding: var(--raum-4) var(--raum-3); text-align: center; background: #fbfaf6; margin-bottom: var(--raum-3); }
.hd-urkunde-kopf { font: 700 1rem var(--schrift-titel); letter-spacing: 0.2em; text-transform: uppercase; color: var(--tinte-2); margin: 0; }
.hd-urkunde-name { font: 700 clamp(2rem, 1.4rem + 3vw, 3rem)/1.1 var(--schrift-titel); margin: var(--raum-2) 0 var(--raum-1); color: var(--klinker); }
.hd-urkunde-titel { font: 700 clamp(2.4rem, 1.6rem + 4vw, 3.6rem)/1 var(--schrift-titel); color: var(--weide); margin: var(--raum-2) 0; }
.hd-urkunde-wort { letter-spacing: 0.25em; }
.hd-urkunde-datum { color: var(--tinte-2); }

@media (prefers-reduced-motion: reduce) {
  .hd-flaeche, .hd-malstift { transition: none; }
  .hd-station[data-neu] .hd-flaeche { animation: none; }
}

/* Drucken der Urkunde: nur das Blatt */
@media print {
  body * { visibility: hidden; }
  .hd-urkunde-blatt, .hd-urkunde-blatt * { visibility: visible; }
  .hd-urkunde-blatt { position: absolute; inset: 0; margin: 15mm; }
}
