/* --- Basis HTML --- */
html {
  font-family: Arial, Helvetica, sans-serif;
  background: #333333;
}

/* --- DIN A5 Querformat --- */
@page {
  size: A5 landscape;
  margin: 0.1mm;
}

@font-face {
    font-family: 'Fpl Mono'; /* Gib der Schrift einen eigenen Namen */
    src: url('droid-sans-mono.regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
  margin: 0;
  padding: 0;
  width: 210mm;
  height: 148mm;
  position: relative;
  border: 1px solid #ccc; /* nur zur Kontrolle */
  overflow: hidden;
  box-sizing: border-box;
  background: white; /* weiße "Seite" im grauen Hintergrund */
}

/* --- Rightbar rechts --- */
#rightbar {
  position: absolute;
  top: 0;
  right: 0;
  width: 90px;
  height: 100%;
  background: #eee;
  border-left: 1px solid black;
background: #aaa;
  display: flex;
  flex-direction: column; /* Felder untereinander */
}

#rightfield1, #rightfield3 {
  height: 90px;
  background: #aaa;
  flex-shrink: 0;
  padding:2px;
  margin:2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#rightfield2 {
    flex: 1;  /* füllt den Platz zwischen R1 und R3 */
    background: #aaa;

    display: flex;
    align-items: center;      /* vertikal zentriert im Div */
    justify-content: center;  /* horizontal zentriert */

    writing-mode: vertical-rl;  /* Text senkrecht lesen, Zeilen umbrechen am Rand */
    text-orientation: mixed;    /* normale Buchstabenrotation */
    text-align: center;
    padding: 5px;               /* optional: Abstand innen */
}

/* --- Topbar oben --- */
#topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 90px; /* Platz für rightbar */
  height: 50px;
  display: flex;
}

#topfield1, #topfield2 {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#topfield3 {
    flex: 1;
    display: flex;
    align-items: center;       /* horizontal zentrieren */
    justify-content: center;   /* vertikal zentrieren */
}

#topfield3 .text-wrapper {
    display: flex;
    flex-direction: column;    /* untereinander */
    align-items: center;       /* horizontal zentrieren */
	margin: 0;       /* entfernt die leeren Abstände zwischen <p> */
    line-height: 1.2; /* optional: Zeilenhöhe */
}

.text-wrapper p + p {
    margin-top: 5px; /* Abstand nur zwischen zwei <p> */
}

/* --- Main Content --- */
#main {
  position: absolute;
  top: 50px;
  left: 0;
  right: 92px;
  bottom: 0;
  text-align: center;
  padding-top: 220px;
}

#main2 {
  position: absolute;
  top: 50px;
  left: 0;
  right: 92px;
  bottom: 0;
  text-align: left;
  font-size:0.6em;
  padding-top: 10px;
  height:480px;
  margin: auto;
}

.linie {
	border: 1px solid black;
	padding: 2px;
    min-width: 30px;
    text-align:center;
}

#rightfield1 span,
#rightfield3 span {
    display: inline-block;
    transform: rotate(90deg);
    transform-origin: center;
    text-align: center;
}
.perlschnur-wrapper {
    width: 75%;
    margin: 0 auto;
    height: 240px;
    position: relative;
	margin-right:120px;
	margin-bottom:-100px;
}

.perlschnur {
    position: relative;
    width: 100%;
    height: 100%;
}

.perlschnur-line {
    position: absolute;
    top: 2px;              /* genau mittig durch die Icons */
    left: 8px;
    right: 8px;
    height: 8px;
    background-color: black;
    z-index: 0;
}

.stop {
    position: absolute;
    text-align: center;
    z-index: 1;
}

.stop-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.stop-name {
    position: absolute;
    bottom: 100%;              /* direkt über dem Icon */
    left: 0;                   /* Startpunkt ist linke Kante vom Icon */
    transform: rotate(-45deg); /* schräge Schrift */
    transform-origin: bottom left;
    white-space: nowrap;
    font-size: 0.8em;
    margin-bottom: 1px;
	margin-left: 17px; 
}

.stop-icon img {
    width: 12px;
    height: 12px;
    display: block;
}

.stop-extra-icons {
    position: absolute;
    top: calc(100% + 4px); 
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stop-extra-icons img {
    width: 10px;
    height: auto;
    display: block;
}

    .fahrpl { margin-left:20px; border-collapse: collapse;border: 1px solid #000000; }
	.fahrpl tr { background-color: #EEEEEE;	}
    .fahrpl td {font-family: 'Fpl Mono', monospace;letter-spacing: -0.10em;}
	.fahrpl tr:nth-of-type(even) { background-color: #DDDDDD; }
    
    .fahrpltitel {border-collapse: collapse;margin-left:20px; border: 1px solid #000000; border-bottom-style:none; text-align: center; font-style: italic; }
    .fahrpltitel tr { background-color: #00beff;font-weight:bold;border-right:1px solid #000000; }
    
    .fahrpl th:first-child,
.fahrpl td:first-child {
    border-right: 1px solid black;
}
    .fahrpltitel th:first-child,
.fahrpltitel td:first-child {
    border-right: 1px solid black;