/* ---------- Putztipps ----------
   Auf der Kühlschranktür (/zettel.css): Anleitungen als Karteikarten, jede wie ein Rezept mit
   Zutaten und Schritten. Die Bilder zeigen die Mini-WG aus Blender (render/); bewegt wird nur,
   was jemand antippt, etwa das Häkchen wie mit dem Kuli. */

:root {
  --pt-achtung-bg: #fff4d4;
  --pt-achtung: #8a5a00;
  --pt-info-bg: #ececfd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --pt-achtung-bg: #33290f;
    --pt-achtung: #ffd37a;
    --pt-info-bg: #22233d;
  }
}

/* ---------- Gerüst ---------- */

.seite.pt-schmal {
  max-width: 940px;
}

.seite.pt-breit {
  max-width: 1120px;
}

.pt-pfad {
  display: flex;
  gap: 8px;
  margin: 32px 0 0;
  color: var(--subtext);
  font-size: 14px;
}

/* Größere Tippfläche, ohne dass die Zeile höher wird */
.pt-pfad a {
  display: inline-block;
  margin: -10px 0;
  padding: 10px 0;
  text-decoration: none;
}

.pt-titel {
  max-width: 760px;
  padding-top: 12px;
}

.pt-breit .pt-titel {
  padding-top: 40px;
}

.pt-lead {
  max-width: 36em;
  margin: 0;
  color: var(--subtext);
  font-size: 19px;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---------- Bild: das Zimmer der Mini-WG, freigestellt auf der Tür ---------- */

.pt-buehne {
  margin: 20px 0 12px;
}

.pt-bild {
  display: block;
  width: 100%;
  height: auto;
}

/* Im Überblick der breite Streifen über den Karten */
.pt-buehne-breit {
  margin: 4px 0 20px;
}

/* ---------- Karteikarten im Überblick ---------- */

.pt-karten {
  display: grid;
  gap: 28px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 680px) {
  .pt-karten {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .pt-karten {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.pt-karte {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  color: var(--tinte);
  text-decoration: none;
  transform: rotate(var(--dreh, -0.6deg));
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.pt-karten li:nth-child(2n) .pt-karte {
  --dreh: 0.5deg;
}

.pt-karten li:nth-child(3n) .pt-karte {
  --dreh: -0.3deg;
}

/* Beim Zeigen richtet sich die Karte auf und hebt sich ein Stück */
.pt-karte:hover,
.pt-karte:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 1px 1px rgba(20, 22, 60, 0.07), 0 20px 34px -16px rgba(20, 22, 60, 0.38);
}

.pt-karte:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .pt-karte {
    transition: none;
  }
}

/* Das Zimmer als Vorschau oben auf der Karte, etwas näher dran als im Kopf der Anleitung */
.pt-karte-bild {
  display: block;
  overflow: hidden;
  border-bottom: 2px solid var(--papier-rot);
}

.pt-karte-bild .pt-bild {
  transform: scale(1.14);
  transform-origin: 50% 46%;
}

/* Liniertes Papier: jede Zeile genau 28 px, damit die Schrift auf den Linien sitzt */
.pt-karte-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 20px 28px;
  background: repeating-linear-gradient(to bottom, transparent 0 27px, var(--papier-linie) 27px 28px);
  line-height: 28px;
}

.pt-karte-raum {
  color: var(--rot-text);
  font-size: 14px;
  font-weight: 600;
}

.pt-karte-titel {
  margin: 0;
  color: var(--tinte);
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.01em;
}

.pt-karte-kurz {
  color: var(--tinte-weich);
  font-size: 15.5px;
}

.pt-karte-dauer {
  margin-top: auto;
  padding-top: 28px;
  color: var(--kuli);
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Überblick: ein Abschnitt je Raum ----------
   Breit: vier Spalten, Bad füllt eine Reihe, Küche, Auszug und Ganze WG teilen sich die zweite.
   Mittel: zwei Spalten. Handy: Querkarten, Bild links, damit die Seite nicht endlos wird. */

.pt-raeume {
  display: grid;
  gap: 44px 28px;
}

.pt-raum {
  min-width: 0;
}

/* Die Zahl steht immer in der zweiten Zeile, so liegen die Karten einer Reihe auf einer Höhe */
.pt-raum-titel {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.1;
}

.pt-raum-zahl {
  display: block;
  margin-top: 2px;
  color: var(--kuli);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.pt-raum .pt-karten {
  margin: 0;
}

.pt-raum .pt-karte-titel {
  font-size: 20px;
}

@media (min-width: 680px) {
  .pt-raeume {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pt-raum-4,
  .pt-raum-3,
  .pt-raum-2 {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1000px) {
  .pt-raeume {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pt-raum-4 { grid-column: span 4; }
  .pt-raum-3 { grid-column: span 3; }
  .pt-raum-2 { grid-column: span 2; }
  .pt-raum-1 { grid-column: span 1; }

  .pt-raum-4 .pt-karten { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pt-raum-3 .pt-karten { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pt-raum-2 .pt-karten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-raum-1 .pt-karten { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 679px) {
  .pt-raum .pt-karten {
    gap: 16px;
  }

  .pt-raum .pt-karte {
    flex-direction: row;
  }

  .pt-raum .pt-karte-bild {
    flex: none;
    width: 38%;
    border-right: 2px solid var(--papier-rot);
    border-bottom: 0;
  }

  .pt-raum .pt-karte-bild .pt-bild {
    height: 100%;
    object-fit: cover;
    transform: scale(1.3);
  }

  .pt-raum .pt-karte-text {
    padding: 0 14px 10px;
    background: repeating-linear-gradient(to bottom, transparent 0 23px, var(--papier-linie) 23px 24px);
    line-height: 24px;
  }

  .pt-raum .pt-karte-titel {
    font-size: 17px;
    line-height: 24px;
  }

  .pt-raum .pt-karte-kurz {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14.5px;
    line-height: 24px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .pt-raum .pt-karte-dauer {
    padding-top: 4px;
    font-size: 14px;
    line-height: 24px;
  }

}

/* Unter einer Anleitung: kleine Karten ohne Bild */
.pt-karten-klein .pt-karte-text {
  padding-top: 14px;
  border-top: 2px solid var(--papier-rot);
}

.pt-karten-klein .pt-karte-titel {
  font-size: 19px;
}

@media (min-width: 1000px) {
  .pt-karten-klein {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Die Anleitung als Rezeptkarte ---------- */

.pt-rezept {
  margin: 0;
  padding: 0;
}

/* Kopf der Karte: drei Angaben, darunter die rote Linie der Karteikarte */
.pt-fakten {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 18px 26px 14px;
  border-bottom: 2px solid var(--papier-rot);
}

.pt-fakten div {
  padding-right: 12px;
}

.pt-fakten div + div {
  padding-left: 14px;
  border-left: 1px dashed rgba(32, 34, 79, 0.25);
}

.pt-fakten dt {
  color: var(--tinte-weich);
  font-size: 14px;
}

.pt-fakten dd {
  margin: 2px 0 0;
  hyphens: auto;
  overflow-wrap: break-word;
  color: var(--kuli);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

/* Am Handy stehen die drei Angaben untereinander, sonst werden die Spalten zu schmal */
@media (max-width: 520px) {
  .pt-fakten {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 20px 12px;
  }

  .pt-fakten div {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    padding: 4px 0;
  }

  .pt-fakten div + div {
    padding-left: 0;
    border-left: 0;
    border-top: 1px dashed rgba(32, 34, 79, 0.2);
  }

  .pt-fakten dd {
    margin: 0;
  }
}

.pt-rezept-inhalt {
  display: grid;
  gap: 8px 40px;
  padding: 10px 26px 30px;
}

@media (min-width: 860px) {
  .pt-rezept-inhalt {
    grid-template-columns: 250px minmax(0, 1fr);
  }
}

.pt-rezept h2,
.pt-wissen h2,
.pt-mehr h2 {
  margin: 22px 0 10px;
  font-size: 23px;
  line-height: 1.15;
}

.pt-zutaten .pt-liste {
  padding-left: 0;
  list-style: none;
}

/* Zutaten wie auf einem Rezept, mit kleinem Strich davor */
.pt-zutaten .pt-liste li {
  position: relative;
  margin: 0;
  padding: 6px 0 6px 18px;
  border-bottom: 1px dashed rgba(32, 34, 79, 0.18);
}

.pt-zutaten .pt-liste li::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 2px;
  width: 8px;
  height: 2px;
  border-radius: 1px;
  background: var(--kuli);
}

.pt-liste {
  margin: 0;
  padding-left: 20px;
}

.pt-liste li {
  margin: 4px 0;
}

/* ---------- Schritte zum Abhaken ---------- */

.pt-abhaken {
  margin: 0 0 4px;
  color: var(--tinte-weich);
  font-size: 15px;
}

.pt-schritte {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: schritt;
}

.pt-schritte li {
  counter-increment: schritt;
  border-bottom: 1px dashed rgba(32, 34, 79, 0.2);
}

.pt-schritte li:last-child {
  border-bottom: 0;
}

.pt-schritte label {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  padding: 14px 0;
  cursor: pointer;
}

/* Echtes Kästchen für Tastatur und Screenreader, sichtbar ist der Kreis daneben */
.pt-schritte input {
  position: absolute;
  top: 16px;
  left: 0;
  width: 38px;
  height: 38px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.pt-haken {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--control);
  border-radius: 50%;
  color: var(--kuli);
  font-family: var(--schrift-hand);
  font-size: 17px;
  font-weight: 700;
  transition: border-color 0.2s;
}

.pt-haken::before {
  content: counter(schritt);
}

.pt-haken svg {
  position: absolute;
  inset: -6px;
  width: 50px;
  height: 50px;
  overflow: visible;
}

/* Der Kuli-Strich: unsichtbar, bis abgehakt wird, dann zieht er sich */
.pt-strich {
  fill: none;
  stroke: var(--kuli);
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  transition: stroke-dashoffset 0.32s ease-out;
}

.pt-schritte input:checked + .pt-haken {
  border-color: var(--kuli);
}

.pt-schritte input:checked + .pt-haken::before {
  content: "";
}

.pt-schritte input:checked + .pt-haken .pt-strich {
  stroke-dashoffset: 0;
}

.pt-schritte input:focus-visible + .pt-haken {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .pt-strich {
    transition: none;
  }
}

.pt-schritt {
  padding-top: 6px;
  color: var(--tinte-weich);
}

.pt-schritt strong {
  color: var(--tinte);
}

/* Erledigtes tritt zurück, bleibt aber gut lesbar */
.pt-schritte input:checked ~ .pt-schritt strong {
  color: var(--tinte-weich);
  text-decoration: line-through;
  text-decoration-color: var(--kuli);
  text-decoration-thickness: 2px;
}

.pt-fertig {
  display: none;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1.5px dashed var(--kuli);
  border-radius: 14px;
}

.pt-fertig p {
  margin: 0;
}

.pt-fertig-app {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.pt-fertig-app a {
  font-family: var(--schrift-titel);
  font-weight: 700;
}

.pt-fertig strong {
  color: var(--kuli);
  font-size: 19px;
}

.pt-froh {
  flex: none;
  width: 46px;
  height: auto;
}

/* Alles abgehakt, sichtbar ganz ohne Skript */
.pt-schritte:not(:has(input:not(:checked))) + .pt-fertig {
  display: flex;
  animation: pt-auftauchen 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes pt-auftauchen {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
}

.pt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Checkliste drucken ---------- */

/* Klein und rechts unter der Karte; ohne Skript bleibt er versteckt (hidden im HTML) */
.pt-drucken {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.pt-drucken .button.secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 10px 16px;
  border-color: var(--control);
  background: var(--feld);
  color: var(--text);
  font-size: 15px;
}

.pt-drucken .button:hover {
  border-color: var(--text);
}

.pt-drucken .button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Nur auf Papier: wo es mehr Anleitungen gibt */
.pt-druckfuss {
  display: none;
}

/* ---------- Klebezettel: Hinweis und „Wer ist dran“ ---------- */

.pt-hinweis {
  --dreh: 0.7deg;
  max-width: 560px;
  margin: 48px 0 0 auto;
}

/* „So geht’s“ mit dem Stand daneben */
.pt-schritte-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.pt-stand {
  color: var(--kuli);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Warnung als Klebezettel auf der Karte, vor den Schritten */
.pt-hinweis-karte {
  --dreh: -0.6deg;
  max-width: none;
  margin: 18px -6px 4px;
}

.pt-hinweis p {
  margin: 0;
}

.pt-hinweis .pt-hinweis-titel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-family: var(--schrift-titel);
  font-size: 18px;
}

.pt-icon {
  flex: none;
  width: 20px;
  height: 20px;
}

.pt-wissen {
  max-width: 720px;
  margin-top: 28px;
}

.pt-mehr {
  margin-top: 64px;
}

@media (prefers-reduced-motion: reduce) {
  .pt-fertig {
    animation: none !important;
  }
}

/* ---------- Drucken: nur die Anleitung, A4 hochkant, immer hell ----------
   Zum Aufhängen im Bad: Titel, Antwort, Rezeptkarte, Hinweis und „Gut zu wissen“, möglichst auf
   einer Seite. Die Kreise zeigen immer die Nummer, abgehakt wird auf Papier mit dem Stift. */

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 14mm 10mm;
  }

  :root {
    color-scheme: light;
    --bg: #fff;
    --text: #20224f;
    --subtext: #575a76;
    --border: rgba(32, 34, 79, 0.16);
    --papier: #fff;
    --papier-linie: #cdd8f1;
    --papier-rot: #e5484d;
    --rot-text: #c42a30;
    --control: #80829a;
    --control-papier: #7b7e98;
    --tinte: #20224f;
    --tinte-weich: #575a76;
    --kuli: #2340c8;
    --notiz-gelb: #ffe57a;
    --notiz-mint: #c6efdb;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.tuer {
    padding: 0;
    background: #fff;
    color: var(--tinte);
    font-size: 10.5pt;
    line-height: 1.4;
  }

  .seite.pt-schmal {
    max-width: none;
  }

  .site-header,
  .pt-pfad,
  .pt-buehne,
  .pt-drucken,
  .pt-abhaken,
  .pt-stand,
  .app-karte,
  .pt-fertig,
  .pt-mehr,
  .seite > footer {
    display: none !important;
  }

  .pt-titel {
    max-width: none;
    padding-top: 0;
  }

  .tuer h1 {
    margin: 0 0 4pt;
    font-size: 20pt;
  }

  .pt-lead {
    max-width: none;
    color: var(--tinte-weich);
    font-size: 10.5pt;
    line-height: 1.38;
  }

  /* Die Karte: weiß mit dünnem Rand statt Schatten, die rote Linie bleibt */
  .pt-rezept {
    margin-top: 8pt;
    border: 1pt solid rgba(32, 34, 79, 0.22);
    border-radius: 4pt;
    background: #fff;
    box-shadow: none;
  }

  .pt-fakten {
    padding: 7pt 12pt 6pt;
  }

  .pt-fakten dt {
    font-size: 8.5pt;
  }

  .pt-fakten dd {
    font-size: 10.5pt;
  }

  .pt-rezept-inhalt {
    grid-template-columns: 42mm minmax(0, 1fr);
    gap: 0 6mm;
    padding: 0 12pt 8pt;
  }

  .pt-rezept h2,
  .pt-wissen h2 {
    margin: 8pt 0 3pt;
    font-size: 13pt;
    break-after: avoid;
  }

  .pt-zutaten .pt-liste li {
    padding: 2.5pt 0 2.5pt 11pt;
    font-size: 9.5pt;
    line-height: 1.3;
  }

  .pt-zutaten .pt-liste li::before {
    top: 8pt;
    width: 6pt;
  }

  .pt-schritte li {
    break-inside: avoid;
  }

  .pt-schritte label {
    grid-template-columns: 20pt minmax(0, 1fr);
    gap: 8pt;
    padding: 3.5pt 0;
  }

  .pt-schritte input,
  .pt-haken svg {
    display: none;
  }

  .pt-haken,
  .pt-schritte input:checked + .pt-haken {
    width: 20pt;
    height: 20pt;
    border-width: 1.2pt;
    border-color: var(--control);
    font-size: 10pt;
  }

  .pt-schritte input:checked + .pt-haken::before {
    content: counter(schritt);
  }

  .pt-schritt {
    padding-top: 2pt;
    font-size: 9.5pt;
    line-height: 1.33;
  }

  .pt-schritte input:checked ~ .pt-schritt strong {
    color: var(--tinte);
    text-decoration: none;
  }

  /* Der Hinweis bleibt farbig, aber gerade, ohne Klebeband und mit Rand für Schwarzweiß-Drucker */
  .pt-hinweis {
    max-width: none;
    margin: 8pt 0 0;
    padding: 7pt 12pt;
    border: 1pt solid rgba(32, 34, 79, 0.3);
    border-radius: 4pt;
    box-shadow: none;
    transform: none;
    break-inside: avoid;
  }

  .pt-hinweis::before {
    display: none;
  }

  .pt-hinweis .pt-hinweis-titel {
    margin-bottom: 3pt;
    font-size: 12pt;
  }

  .pt-hinweis p {
    font-size: 9.5pt;
    line-height: 1.38;
  }

  .pt-wissen {
    max-width: none;
    margin-top: 4pt;
  }

  .pt-wissen .pt-liste li {
    margin: 1.5pt 0;
    font-size: 9.5pt;
    line-height: 1.33;
    break-inside: avoid;
  }

  .pt-druckfuss {
    display: block;
    margin: 8pt 0 0;
    color: var(--tinte-weich);
    font-size: 8.5pt;
    text-align: right;
  }
}
