/* =====================================================================
   plan.css – Der Planexport.

   Eigene Datei neben style.css und aussen.css. Und diesmal ist die
   Palette bewusst UMGEDREHT: die beiden Spielseiten sind dunkel, weil
   dort Dunkelheit die Wahrheit ist. Hier liegt Papier auf dem Tisch.
   ===================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background: #14171a;
  color: #d6d2c4;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.4rem 1.5rem 4rem;
}

/* ---------- Kopf ---------- */

header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.2rem;
  margin-bottom: 0.4rem;
}

h1 {
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: #e8e4d8;
}

.subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6b7276;
}

nav.back {
  margin-left: auto;
  display: flex;
  gap: 0.3rem;
}

nav.back a {
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  color: #9aa3a7;
  text-decoration: none;
  border: 1px solid rgba(154, 163, 167, 0.22);
  border-radius: 2px;
}

nav.back a:hover {
  color: #e8e4d8;
  border-color: rgba(232, 228, 216, 0.4);
}

/* ---------- Kennzahlen ---------- */

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.8rem;
  margin: 1.1rem 0 1.4rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(154, 163, 167, 0.16);
  font-size: 0.85rem;
  color: #cfd6d8;
}

.meta em {
  display: block;
  font-style: normal;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b7276;
}

.meta a {
  color: #ffd9a8;
}

/* ---------- Schalter ---------- */

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}

.group {
  display: flex;
  gap: 0.15rem;
}

.group button {
  padding: 0.34rem 0.8rem;
  font: inherit;
  font-size: 0.8rem;
  color: #9aa3a7;
  background: rgba(154, 163, 167, 0.07);
  border: 1px solid rgba(154, 163, 167, 0.2);
  border-radius: 2px;
  cursor: pointer;
}

.group button:hover {
  color: #e8e4d8;
}

.group button.on {
  color: #14171a;
  background: #cfd6d8;
  border-color: #cfd6d8;
}

a.download {
  margin-left: auto;
  padding: 0.36rem 0.9rem;
  font-size: 0.8rem;
  color: #14171a;
  background: #ffd9a8;
  border: 1px solid #ffd9a8;
  border-radius: 2px;
  text-decoration: none;
}

a.download:hover {
  background: #ffe8c8;
}

.hidden {
  display: none !important;
}

/* ---------- Das Blatt ---------- */

.sheet {
  /* Papier auf dunklem Tisch, mit Schattenwurf. */
  background: #fbfaf6;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  /* Breite Pläne dürfen im Blatt scrollen, nie die Seite. */
  overflow-x: auto;
}

.sheet svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 680px;
}

/* ---------- Kataster ---------- */

.kataster {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(154, 163, 167, 0.16);
}

.kataster h2 {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #8a9296;
  margin-bottom: 0.9rem;
}

.kataster table {
  border-collapse: collapse;
  width: 100%;
  max-width: 34rem;
  font-size: 0.86rem;
}

.kataster th {
  text-align: left;
  font-weight: 400;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b7276;
  padding: 0 0.9rem 0.4rem 0;
}

.kataster td {
  padding: 0.3rem 0.9rem 0.3rem 0;
  border-top: 1px solid rgba(154, 163, 167, 0.12);
  color: #e2ded2;
}

.kataster td:first-child {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #9aa3a7;
}

.note {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  font-style: italic;
  color: #7d858a;
}

/* ---------- Drucken ----------

   Auf Papier fällt alles weg, was nicht der Plan ist. Das Blatt liegt
   dann ohne Schatten und ohne Rahmen quer auf der Seite.               */

@media print {
  html,
  body {
    background: #fff;
    color: #000;
  }

  .wrap {
    max-width: none;
    padding: 0;
  }

  header,
  nav.back,
  .controls,
  .meta {
    display: none !important;
  }

  .sheet {
    box-shadow: none;
    overflow: visible;
  }

  .sheet svg {
    min-width: 0;
  }

  .kataster {
    border-top: 1px solid #ccc;
    page-break-before: always;
  }

  .kataster h2,
  .kataster th,
  .kataster td,
  .note {
    color: #000;
  }
}

@page {
  size: landscape;
  margin: 12mm;
}
