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

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

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;

  display: flex;
  flex-direction: column; /* Felder untereinander */
}

#rightfield1, #rightfield3 {
  height: 90px;
  background: #aaa;
  flex-shrink: 0;
  padding:5px;
  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: 100px;
}

.linie {
	border: 1px solid black;
	padding: 2px;
}

#rightfield1 span,
#rightfield3 span {
    display: inline-block;
    transform: rotate(90deg);
    transform-origin: center;
    text-align: center;
}
.perlschnur-wrapper {
    width: 70%;
    margin: 0 auto;
    padding-top: 120px; /* Platz für Namen */
}

.perlschnur {
    display: flex;
    justify-content: space-between;
    align-items: center;    /* Icons auf Linie */
    position: relative;
}

.perlschnur-line {
    position: absolute;
    top: 50%;               
    left: 8px;              
    right: 8px;             
    height: 6px;            /* dicke Linie */
    background-color: black;
    z-index: 0;             
    transform: translateY(-50%);  /* genau zentrieren */
}

.stop {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    z-index: 1;             /* Icons über Linie */
}

.stop-name {
    position: absolute;
    bottom: 100%;           /* direkt über Icon */
    left: 0;
    transform: rotate(-45deg);
    transform-origin: bottom left;
    white-space: nowrap;
    font-size: 0.8em;
	margin-left:12px;
    margin-bottom: 2px;
}

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

.container {
  display: flex;
}
