body {
  background: linear-gradient(to bottom, #f5e6c8, #e0c097);
  font-family: "Segoe UI", Arial, sans-serif;
  padding: 30px;
  color: #3b2a1a;
}

h1.page-title {
  text-align: center;
  font-size: 2.5rem;
  color: #5a3b1c;
  text-shadow: 2px 2px 4px #fbe9d7, 0 0 10px #ffecb3;
  font-weight: bold;
  margin: 40px 0 20px 0;

  font-family: 'Lucida Console', 'Courier New', monospace;
}
/* Tabelle */
.phase-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff8ec;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Header */
.phase-table thead th {
  background: linear-gradient(to bottom, #6b3f1d, #4b2a12);
  color: #ffd66b;
  font-size: 1.1rem;
  text-align: center;
  padding: 15px;
  border: none;
}

/* Zellen */
.phase-table td {
  border: 1px solid #d6b98c;
  padding: 15px;
  vertical-align: top;
  background: #fffdf7;
}

/* Erste Spalte (Text) */
.phase-table td:first-child {
  width: 80%;
  text-align: left;
}

/* Listen */
.phase-table ul {
  padding-left: 20px;
}

.phase-table li {
  margin-bottom: 6px;
}

/* Abschnittstitel */
.phase-table strong {
  color: #7a4a22;
  font-size: 1.05rem;
}

/* Hover-Effekt */
.phase-table tbody tr:hover {
  background: #fff1d6;
  transition: 0.2s;
}


table.inner-grid {
    table-layout: fixed;
    width: 100%;
}

.playfield-img {
  width: 200px;              /* Breite des Thumbnails */
  aspect-ratio: 704 / 1520;  /* Original Seitenverhältnis (H/B) */
  background-size: cover;     /* Bild füllt Container, Zuschneiden möglich */
  background-position: center;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.playfield-img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

td img, td .playfield-img {
  display: block;
  margin: 0 auto; /* zentriert horizontal */
}

/* Top-Bar / Buttons */
#top-bar {
  background: linear-gradient(to right, #f5e6c8, #e0c097); /* Sandfarben */
  border: 2px solid #c9a35f;      /* dunkler Holzrahmen */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  padding: 12px 20px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 500;
  color: #3b2a1a;
}

#top-bar a {
  text-decoration: none;
  font-weight: bold;
  color: #7a4a22; /* dunkles Holz / Western-Braun */
  margin: 0 5px;
  transition: color 0.2s;
}

#top-bar a:hover {
  color: #d4a017; /* Gold */
  text-shadow: 0 0 3px #fff;
}

/* ===============================
   Footer Box Style (Commit + Copyright)
=============================== */

#site-footer {
  background: transparent; /* Außen nur Hintergrund */
  padding: 40px 20px;
}

/* Innere Box */
.footer-inner {
  background: linear-gradient(to right, #fff8ec, #f5e6c8);
  border: 2px solid #c9a35f;
  border-radius: 14px;

  box-shadow: 0 5px 15px rgba(0,0,0,0.25);

  max-width: 900px;
  margin: 0 auto;

  padding: 15px 25px;

  font-family: 'Courier New', monospace;
  font-weight: bold;
  color: #5a3b1c;

  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Einzelne Bereiche */
.footer-left,
.footer-center,
.footer-right {
  flex: 1;
  min-width: 200px;
  text-align: center;
}

/* Footer Links */
#site-footer a {
  color: #7a4a22;
  font-weight: bold;
  text-decoration: none;
  margin: 0 4px;
  transition: all 0.2s ease;
}

#site-footer a:hover {
  color: #d4a017;
  text-shadow: 0 0 4px #fff;
}

/* Navigation innerhalb Header */
/* Navigation Buttons als Holzplaketten */
nav a {
  display: inline-block;
  padding: 8px 16px;
  margin-right: 12px;
  text-decoration: none;
  font-weight: bold;
  color: #fff8e7;                   /* heller Sandton für Text */
  background: linear-gradient(to bottom, #a25d23, #6b3f1d); /* Holz-Gradient */
  border: 2px solid #d4a017;        /* Goldrahmen */
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.4);
  transition: all 0.2s ease;
  font-family: 'Lucida Console', 'Courier New', monospace;
  text-align: center;
}

nav a:hover {
  background: linear-gradient(to bottom, #d4a017, #b57c35); /* goldiges Highlight beim Hover */
  color: #3b2a1a; /* dunkles Holz */
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.5);
}

.card-image {
  width: 100%;
  aspect-ratio: 4 / 3;      /* Rechteckig – kannst du auch 1/1 für quadratisch machen */
  background-size: cover;    /* Bild füllt Container komplett */
  background-position: center; /* Zentriert das Bild, mittiger Ausschnitt */
  border-radius: 6px;        /* optional: abgerundete Ecken */
}

.print-img {
  display: none; /* standardmäßig unsichtbar */
}


/* Print Controls Container */
#print-controls {
  margin: 20px 0;
  text-align: center;
  font-family: 'Lucida Console', monospace;
}

/* Label */
#print-controls label {
  font-weight: bold;
  color: #3b2a1a;
  margin-right: 10px;
}

/* Input Number */
#print-controls input[type="number"] {
  width: 60px;
  padding: 4px;
  border: 2px solid #d4a017;  /* gold border */
  border-radius: 6px;
  text-align: center;
  font-family: 'Courier New', monospace;
}

/* Print Button */
#print-btn {
  margin-left: 20px;
  padding: 8px 16px;
  font-family: 'Lucida Console', monospace;
  font-weight: bold;
  color: #fff8e7;
  background: linear-gradient(to bottom, #a25d23, #6b3f1d); /* Holz-Gradient */
  border: 2px solid #d4a017; /* gold border */
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Button Hover Effect */
#print-btn:hover {
  background: linear-gradient(to bottom, #d4a017, #b57c35); /* gold highlight */
  color: #3b2a1a; /* dunkles Holz */
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.5);
}


@media print {

  /* Grundlegende Druckanpassungen */
  body {
    background: #fff !important;
    color: #000 !important;
    padding: 0;
    margin: 0;
  }

  /* Unsichtbar auf dem Druck: Navigation, Top-Bar, Modal, Print Controls */
  #top-bar, nav, #print-controls, .modal {
    display: none !important;
  }

  /* Phase-Tabelle */
  .phase-table {
    border-radius: 0 !important;
    width: 100%;
    border-collapse: collapse !important;
    overflow: visible !important;
    box-shadow: none !important;

    page-break-inside: avoid;   /* Tabelle nicht zerschneiden */
    page-break-before: always;  /* Jede Tabelle auf neuer Seite */
  }

  .phase-table th, .phase-table td {
    background-color: #fff8ec !important;
    color: #3b2a1a !important;
    padding: 8px !important;
    vertical-align: top !important;
    border: 1px solid #d6b98c !important;
  }

  .phase-table thead th {
    background: linear-gradient(to bottom, #6b3f1d, #4b2a12) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color: #ffd66b !important;
  }

  /* Playfield-Spalte rechts ausblenden, Zelle behalten für Layout */
  .phase-table td:nth-child(2),
  .phase-table th:nth-child(2) {
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    padding: 0 !important;
  }

  .phase-table td:nth-child(2) .playfield-img {
    display: none !important;  /* nur kleine Thumbnails verstecken */
  }

  /* Große Druckbilder */
  .phase-table td img.print-img,
  .print-img {
    display: block !important;
    width: auto;
    max-width: 90%;
    max-height: var(--print-img-scale, 80vh);
    margin: 0 auto 40px auto;
    page-break-inside: avoid !important;  /* Bilder nicht zerschneiden */
    page-break-after: always;
    border-radius: 0;
  }

  /* Verschachtelte Tabellen ("inner-grid") – keine Ränder, gleiche Farbe */
  table.inner-grid {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
    page-break-inside: auto !important;
  }

  table.inner-grid th,
  table.inner-grid td {
    border: none !important;
    background-color: #fff8ec !important;
    color: #ffd66b !important;
    padding: 6px !important;
    vertical-align: top !important;
  }

  /* Zeilen, Listen */
  .phase-table tbody tr {
    page-break-after: auto;
    page-break-inside: avoid;
  }

  .phase-table ul {
    margin: 0 0 0.5em 1.5em !important;
    padding-left: 1.5em !important;
    page-break-inside: avoid;
  }

  .phase-table li {
    page-break-inside: avoid !important;
  }

  /* Footer sichtbar machen */
  #site-footer {
    display: block !important;
    position: relative;
    page-break-inside: avoid;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
  }
}