/* Schülerseiten: Anmeldung mit Klassencode und Roboter-Werkstatt */

.rw-codefeld {
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.3rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.rw-kopf {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  margin-top: 1rem;
}

.rw-vorschau {
  flex: 0 0 auto;
  width: 270px;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.rw-vorschau svg { display: block; width: 100%; height: auto; }

.rw-info { flex: 1 1 16rem; }
.rw .rw-info p { margin: .2rem 0; }
.rw-name { font-size: 1.15rem; }
.rw-level { font-size: 1.05rem; }

.rw-balken {
  width: 100%;
  max-width: 320px;
  height: 12px;
  margin: .5rem 0;
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
}
.rw-balken span { display: block; height: 100%; background: var(--akzent); transition: width .4s ease; }

.rw-gespeichert { min-height: 1.5em; color: var(--ok-text); font-weight: 600; }

/* Werkstatt */
.rw-bereich { margin-top: 1rem; }
.rw .rw-bereich-titel { margin: 0 0 .4rem; font-size: 1rem; }

.rw-teile {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: .5rem;
}
.rw-farben { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
/* Rollen haben lange Namen (Kreativdenker:in): etwas breitere Kacheln */
.rw-rollen { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
/* Bereiche mit 10 Teilen (Gesicht, Frisur): alle in einer Reihe, auf schmalen Bildschirmen in zwei */
.rw-zehn { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: .35rem; }
.rw-zehn .rw-teil { padding: .35rem .15rem; font-size: .72rem; }
.rw-zehn .rw-probe { width: 100%; max-width: 64px; }
/* Mehr als 10 Teile (Frisuren): zwei gleich lange Reihen statt 10 + Rest */
.rw-zehn.rw-viele { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1000px) {
  .rw-zehn { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rw-zehn.rw-viele { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rw-zehn .rw-teil { font-size: .8rem; }
}

.rw-teil {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  margin: 0;
  padding: .45rem .3rem;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: .85rem;
}
.rw-teil:hover { background: var(--card); border-color: var(--grau); }
.rw-teil.aktiv { border-color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent) inset; }
.rw-teil.gesperrt,
.rw-teil:disabled { background: var(--card); opacity: .55; cursor: not-allowed; }
.rw .rw-laden-hinweis { margin: .4rem 0 0; font-size: .9rem; }
.rw-teil.gesperrt .rw-probe,
.rw-teil.gesperrt .rw-tupfer { filter: grayscale(1); }

.rw-probe { display: block; width: 60px; }
.rw-symbol { height: 70px; font-size: 2.2rem; line-height: 70px; text-align: center; }
.rw-probe svg { display: block; width: 100%; height: auto; }
.rw-tupfer {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, .15);
}
/* Lange Namen umbrechen: zuerst mit deutscher Silbentrennung, notfalls an beliebiger Stelle */
.rw-teilname { max-width: 100%; line-height: 1.2; text-align: center; hyphens: auto; overflow-wrap: anywhere; }
.rw-schloss { font-size: .75rem; color: var(--muted); }

.rw-upgrades { list-style: none; }
.rw-upgrades li {
  display: flex;
  gap: .7rem;
  padding: .3rem 0;
  border-bottom: 1px solid var(--line);
}
.rw-upgrade-level { min-width: 4.5rem; font-weight: 700; color: var(--akzent); }

@media (max-width: 480px) {
  .rw-vorschau { width: 200px; margin: 0 auto; }
}
