/* Unter Dampf – Gestaltung der Schüler-App. Alles ist unter .ud-root gekapselt, damit das Theme nicht stört. */
.ud-root {
  --ud-paper: #f4ead6;
  --ud-paper-2: #ebdcc0;
  --ud-card: #fbf6ea;
  --ud-ink: #2b2118;
  --ud-ink-2: #5b4a3a;
  --ud-line: #cdb894;
  --ud-brick: #9c3d26;
  --ud-brick-2: #7d2f1c;
  --ud-ochre: #c58a2c;
  --ud-soot: #3a3632;
  --ud-green: #3f6b3a;
  --ud-red: #a3302a;
  --ud-blue: #2f4f6e;
  --ud-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --ud-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-family: var(--ud-serif);
  color: var(--ud-ink);
  font-size: 18px;
  line-height: 1.55;
  /* Auf der Seite: genau so breit wie der Inhaltsbereich des Themes */
  width: 100%;
  max-width: 100%;
}
.ud-dd, .ud-dd * { user-select: none; -webkit-user-select: none; }
.ud-root *, .ud-root *::before, .ud-root *::after { box-sizing: border-box; }
.ud-root h1, .ud-root h2, .ud-root h3, .ud-root h4 { font-family: var(--ud-serif); color: var(--ud-ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: 0; text-transform: none; }
.ud-root p { margin: 0 0 .8em; }
.ud-root button { font: inherit; cursor: pointer; text-transform: none; letter-spacing: 0; box-shadow: none; }
.ud-root button:disabled { cursor: not-allowed; }
.ud-root :focus-visible { outline: 3px solid var(--ud-ochre); outline-offset: 2px; }
.ud-root img { max-width: 100%; height: auto; display: block; }

/* ---------- Buttons ---------- */
.ud-btn {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .6em 1.2em; min-height: 44px;
  border: 2px solid var(--ud-ink); border-radius: 6px;
  background: var(--ud-card); color: var(--ud-ink);
  font-family: var(--ud-sans) !important; font-weight: 700; font-size: 16px;
  transition: transform .1s, background .15s;
}
.ud-btn:hover:not(:disabled) { background: #fff; }
.ud-btn:active:not(:disabled) { transform: translateY(1px); }
.ud-btn--primary { background: var(--ud-brick); border-color: var(--ud-brick-2); color: #fff; }
.ud-btn--primary:hover:not(:disabled) { background: var(--ud-brick-2); }
.ud-btn:disabled { opacity: .5; }
.ud-link { background: none; border: 0; padding: .3em .2em; color: var(--ud-brick); font-family: var(--ud-sans) !important; font-size: 15px; text-decoration: underline; }
.ud-chip { background: var(--ud-paper-2); border: 1px solid var(--ud-line); border-radius: 99px; padding: .25em .9em; font-family: var(--ud-sans) !important; font-size: 14px; color: var(--ud-ink); margin-bottom: .8em; }
.ud-actions { display: flex; gap: .6em; flex-wrap: wrap; margin-top: 1em; }

/* ---------- Login ---------- */
.ud-login {
  min-height: 560px; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background-size: cover; background-position: center; border-radius: 10px; position: relative; overflow: hidden;
}
.ud-login::before { content: ""; position: absolute; inset: 0; background: rgba(43, 33, 24, .45); }
.ud-login-card {
  position: relative; width: 100%; max-width: 420px; background: var(--ud-card); border: 1px solid var(--ud-line);
  border-radius: 10px; padding: 28px 28px 20px; box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.ud-login-card label { display: block; font-family: var(--ud-sans); font-size: 14px; font-weight: 700; margin: 14px 0 4px; color: var(--ud-ink-2); }
.ud-login-card input { width: 100%; font-size: 18px; padding: 10px 12px; border: 2px solid var(--ud-line); border-radius: 6px; background: #fff; color: var(--ud-ink); }
.ud-login-card input:focus { border-color: var(--ud-ochre); outline: none; }
.ud-login-card .ud-btn { width: 100%; justify-content: center; margin-top: 16px; }
.ud-kicker { font-family: var(--ud-sans); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ud-brick); margin: 0 0 .2em !important; font-weight: 700; }
.ud-title { font-size: 44px !important; margin: 0 !important; }
.ud-subtitle { font-style: italic; color: var(--ud-ink-2); margin-bottom: 4px !important; }
.ud-error { color: var(--ud-red); font-family: var(--ud-sans); font-size: 15px; min-height: 1.2em; margin: 10px 0 0 !important; }
.ud-small { font-family: var(--ud-sans); font-size: 13px; color: var(--ud-ink-2); }
.ud-login-card .ud-small { margin-top: 12px !important; }

/* ---------- Kopf ---------- */
.ud-app { background: var(--ud-paper); border-radius: 10px; overflow: hidden; border: 1px solid var(--ud-line); }
.ud-head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 18px; background: var(--ud-soot); color: #f4ead6;
}
.ud-brand { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
.ud-brand-title { font-size: 22px; font-weight: 700; }
.ud-brand-sub { font-style: italic; opacity: .75; font-size: 15px; }
.ud-user { font-family: var(--ud-sans); font-size: 14px; display: flex; gap: 10px; align-items: center; }
.ud-head .ud-link { color: #f0c987; }
.ud-back { order: -1; font-size: 15px; }
.ud-offline { flex-basis: 100%; background: var(--ud-ochre); color: var(--ud-ink); font-family: var(--ud-sans); font-size: 14px; padding: 6px 10px; border-radius: 4px; }
.ud-main { padding: 20px; }
.ud-intro { font-size: 18px; max-width: 60ch; }
.ud-loading { padding: 40px; text-align: center; font-style: italic; }

/* ---------- Startkarte ---------- */
.ud-map { position: relative; border-radius: 8px; overflow: hidden; border: 3px solid var(--ud-soot); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.ud-map-img { width: 100%; display: block; filter: grayscale(1) contrast(.95); }
.ud-spot {
  position: absolute; padding: 0; margin: 0; border: 0; background: none; border-radius: 6px; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: flex-start;
  transition: transform .25s, box-shadow .25s; z-index: 1;
}
.ud-spot-img { position: absolute; inset: 0; background-repeat: no-repeat; filter: grayscale(1) contrast(.95); transition: filter .35s; }
.ud-spot-tag { position: relative; }
.ud-spot--open { cursor: pointer; }
.ud-spot--open:hover, .ud-spot--open:focus-visible, .ud-spot--open.is-active, .ud-spot--open.is-hint {
  z-index: 3; transform: scale(1.02); outline: none;
  box-shadow: 0 0 0 3px #fff3d6, 0 0 22px 8px rgba(255, 196, 92, .9), 0 0 48px 14px rgba(240, 160, 60, .55);
}
.ud-spot--open:hover .ud-spot-img, .ud-spot--open:focus-visible .ud-spot-img,
.ud-spot--open.is-active .ud-spot-img, .ud-spot--open.is-hint .ud-spot-img { filter: none; }
.ud-spot--locked { pointer-events: none; }
.ud-spot-tag {
  margin: 6px; padding: 3px 9px; border-radius: 4px; font-family: var(--ud-sans); font-size: 13px; line-height: 1.3;
  background: rgba(43, 33, 24, .82); color: #f4ead6; white-space: nowrap;
}
.ud-spot--open .ud-spot-tag { background: var(--ud-brick); color: #fff; }
.ud-spot-tag b { font-weight: 800; }

.ud-station-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.ud-station-list li { margin: 0; }
.ud-list-btn {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; width: 100%; text-align: left; padding: 10px 12px;
  background: var(--ud-card); border: 1px solid var(--ud-line); border-radius: 6px; color: var(--ud-ink); font-size: 16px;
}
.ud-list-btn b { font-family: var(--ud-sans); color: var(--ud-brick); }
.ud-list-btn em { font-family: var(--ud-sans); font-style: normal; font-size: 13px; color: var(--ud-ink-2); margin-left: auto; }
.is-locked .ud-list-btn { opacity: .55; }
button.ud-list-btn:hover { border-color: var(--ud-brick); }

/* ---------- Station ---------- */
.ud-station-head { margin-bottom: 12px; }
.ud-station-title { font-size: 32px !important; }
.ud-leitfrage { font-style: italic; font-size: 19px; color: var(--ud-ink-2); border-left: 4px solid var(--ud-ochre); padding-left: 12px; max-width: 70ch; }
.ud-leitfrage span { font-style: normal; font-weight: 700; color: var(--ud-ink); }

.ud-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; }
.ud-steps li { margin: 0; }
.ud-dot {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ud-line); background: var(--ud-card);
  font-family: var(--ud-sans) !important; font-size: 15px; font-weight: 700; color: var(--ud-ink-2); padding: 0;
}
.ud-dot.is-done { background: var(--ud-green); border-color: var(--ud-green); color: #fff; }
.ud-dot.is-current { border-color: var(--ud-brick); box-shadow: 0 0 0 3px rgba(156, 61, 38, .25); color: var(--ud-ink); }
.ud-dot.is-current.is-done { color: #fff; }
.ud-dot:disabled { opacity: .45; }

.ud-paper {
  background: var(--ud-card); border: 1px solid var(--ud-line); border-radius: 8px; padding: 22px 26px;
  box-shadow: 0 2px 0 var(--ud-paper-2);
}
.ud-step-label { font-family: var(--ud-sans); font-size: 13px; color: var(--ud-ink-2); text-transform: uppercase; letter-spacing: .08em; }
.ud-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.ud-task { font-family: var(--ud-sans); font-size: 16px; background: var(--ud-paper); border-left: 4px solid var(--ud-blue); padding: 8px 12px; border-radius: 0 4px 4px 0; }
.ud-note { font-family: var(--ud-sans); font-size: 14px; color: var(--ud-green); }

/* Lesen */
.ud-reading { display: grid; gap: 22px; }
.ud-reading--fig { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
.ud-text { max-width: 66ch; font-size: 19px; }
.ud-text strong { color: var(--ud-brick-2); }
.ud-reading--side { grid-template-columns: minmax(0, 66ch) minmax(220px, 1fr); align-items: start; }
.ud-side { display: grid; gap: 16px; align-content: start; }
.ud-glossary-box { background: var(--ud-paper); border: 1px solid var(--ud-line); border-left: 4px solid var(--ud-ochre); border-radius: 6px; padding: 12px 16px; font-family: var(--ud-sans); }
.ud-glossary-title { margin: 0 0 8px !important; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ud-ink-2); }
.ud-glossary { margin: 0; font-size: 15px; line-height: 1.4; }
.ud-glossary dt { font-weight: 700; margin: 10px 0 2px; color: var(--ud-brick-2); }
.ud-glossary dt:first-child { margin-top: 0; }
.ud-glossary dd { margin: 0; }
/* Kein blinkender Text-Cursor auf Knöpfen und Texten (nur in Eingabefeldern) */
.ud-root { caret-color: transparent; }
.ud-root input, .ud-root textarea, .ud-root select, .ud-root [contenteditable="true"] { caret-color: auto; }
.ud-dot, .ud-steps, .ud-btn, .ud-chip, .ud-strip-btn { -webkit-user-select: none; user-select: none; }

/* Bilder */
.ud-figure { margin: 0 0 12px; }
.ud-figure img { border-radius: 6px; border: 1px solid var(--ud-line); }
.ud-figure figcaption { font-family: var(--ud-sans); font-size: 13px; color: var(--ud-ink-2); margin-top: 6px; }
.ud-figure--placeholder .ud-ph {
  aspect-ratio: 4 / 3; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 16px;
  background: repeating-linear-gradient(45deg, var(--ud-paper), var(--ud-paper) 12px, var(--ud-paper-2) 12px, var(--ud-paper-2) 24px);
  border: 2px dashed var(--ud-line); border-radius: 6px; font-family: var(--ud-sans); font-size: 13px; color: var(--ud-ink-2);
}
.ud-ph strong { font-size: 15px; color: var(--ud-ink); }
.ud-ph-file { font-family: ui-monospace, monospace; font-size: 12px; }
.ud-ph-prompt { font-style: italic; }
.ud-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Auswahl */
.ud-checklist { display: grid; gap: 6px; margin-bottom: 8px; }
.ud-check-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 2px solid var(--ud-line); border-radius: 6px; background: #fff; font-size: 17px; cursor: pointer; }
.ud-check-opt input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.ud-check-opt.is-right { border-color: var(--ud-green); background: #eef5ea; }
.ud-check-opt.is-wrong { border-color: var(--ud-red); background: #f9e9e6; }
.ud-feedback { font-family: var(--ud-sans); font-size: 16px; min-height: 1.4em; margin: 10px 0 0 !important; }
.ud-feedback.is-right { color: var(--ud-green); }
.ud-feedback.is-wrong { color: var(--ud-red); }

/* Ziehen und Ablegen */
.ud-card {
  display: block; width: 100%; text-align: left; padding: 10px 14px; min-height: 44px; margin: 0;
  background: #fff; border: 2px solid var(--ud-ink-2); border-radius: 6px; color: var(--ud-ink);
  font-family: var(--ud-sans) !important; font-size: 16px; font-weight: 600; touch-action: none; user-select: none;
  box-shadow: 0 2px 0 var(--ud-line);
}
.ud-card.is-selected { border-color: var(--ud-ochre); box-shadow: 0 0 0 3px rgba(197, 138, 44, .45); }
.ud-card.is-dragging { opacity: .3; }
.ud-card.is-fixed { cursor: default; box-shadow: none; }
.ud-card:disabled { opacity: .45; text-decoration: line-through; }
.ud-ghost { position: fixed; z-index: 99999; pointer-events: none; transform: rotate(-2deg); box-shadow: 0 10px 24px rgba(0,0,0,.3); background: #fff; }
.ud-card.is-shake { animation: ud-shake .45s; border-color: var(--ud-red); }
@keyframes ud-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.ud-dd.has-selection [data-drop] { outline: 2px dashed var(--ud-ochre); outline-offset: 2px; }
[data-drop].is-over { background: #fff4df !important; outline: 3px solid var(--ud-ochre) !important; }

.ud-pool { display: grid; gap: 8px; align-content: start; min-height: 60px; padding: 8px; border-radius: 6px; background: var(--ud-paper); }
.ud-puzzle { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
.ud-dropzone { position: relative; border: 3px dashed var(--ud-line); border-radius: 8px; padding: 8px; cursor: pointer; background: var(--ud-paper); }
.ud-dropzone .ud-figure { margin: 0; pointer-events: none; }
.ud-dropzone-label { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: var(--ud-soot); color: #fff; font-family: var(--ud-sans); font-size: 14px; padding: 4px 12px; border-radius: 99px; white-space: nowrap; pointer-events: none; }
.ud-placed { margin: 0; padding-left: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; counter-reset: ud; }
.ud-placed li { margin: 0; padding: 8px 12px; border-radius: 6px; font-family: var(--ud-sans); font-size: 15px; }
.ud-slot-empty { border: 2px dashed var(--ud-line); color: var(--ud-line); text-align: center; font-weight: 700; }
.ud-slot-full { background: #eef5ea; border: 2px solid var(--ud-green); animation: ud-pop .3s; }
.ud-slot-full strong { display: block; }
@keyframes ud-pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }

/* Reihenfolge */
.ud-order-game { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; margin-top: 14px; }
.ud-order { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ud-order-slot { display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 5px; border: 2px dashed var(--ud-line); border-radius: 6px; background: var(--ud-paper); margin: 0; cursor: pointer; }
.ud-order-slot .ud-card { flex: 1; }
.ud-order-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ud-soot); color: #fff; display: grid; place-items: center; font-family: var(--ud-sans); font-weight: 700; font-size: 14px; }
.ud-order-slot.is-wrong { border-color: var(--ud-red); border-style: solid; background: #f9e9e6; }
.ud-order-slot.is-right { border-color: var(--ud-green); border-style: solid; background: #eef5ea; }

/* Dampfmaschine */
.ud-engine-stage { max-width: 480px; margin: 0 auto; }
.ud-engine { width: 100%; height: auto; display: block; }
.ud-figure--engine { background: #efe2c6; border: 1px solid var(--ud-line); border-radius: 8px; padding: 10px; }
.e-ground { fill: #b9a27c; }
.e-boiler { fill: #8a5a3c; stroke: #3a2a1c; stroke-width: 3; }
.e-water { fill: none; stroke: #9cc3de; stroke-width: 3; }
.e-flame { fill: #d9822b; opacity: .35; transform-origin: 90px 246px; }
.is-running .e-flame { opacity: 1; animation: ud-flicker .25s infinite alternate; }
@keyframes ud-flicker { from { transform: scaleY(1); fill: #e0892d; } to { transform: scaleY(1.15); fill: #f2b33d; } }
.e-pipe { fill: none; stroke: #5d5550; stroke-width: 8; }
.e-cyl { fill: #d8cdb8; stroke: #3a2a1c; stroke-width: 3; }
.e-cond { fill: #7f97a8; stroke: #3a2a1c; stroke-width: 2; }
.e-piston { fill: #4a4440; }
.e-rod { stroke: #2f2a26; stroke-width: 6; stroke-linecap: round; }
.e-post { fill: #6b4a32; stroke: #3a2a1c; stroke-width: 2; }
.e-beam { fill: #4a4440; }
.e-pivot { fill: #c58a2c; stroke: #2f2a26; stroke-width: 2; }
.e-wheel { fill: none; stroke: #2f2a26; stroke-width: 9; }
.e-spoke { stroke: #2f2a26; stroke-width: 4; }
.e-puff { fill: #fff; opacity: 0; }
.is-running .e-puff { animation: ud-puff 1.6s infinite; }
.is-running .e-puff1 { animation-delay: .5s; }
.is-running .e-puff2 { animation-delay: 1s; }
@keyframes ud-puff { 0% { opacity: .8; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(14px, -70px) scale(1.8); } }
.e-puff { transform-box: fill-box; transform-origin: center; }
.e-label { font-family: var(--ud-sans); font-size: 12px; font-weight: 700; fill: #2b2118; paint-order: stroke; stroke: #efe2c6; stroke-width: 4px; }

/* Hand gegen Maschine */
.ud-race { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; background: var(--ud-paper); padding: 16px; border-radius: 8px; text-align: center; }
.ud-race h4 { font-size: 18px; }
.ud-race p { font-family: var(--ud-sans); margin: 8px 0 0 !important; }
.ud-count { font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; }
.ud-clock { font-family: var(--ud-sans); font-weight: 800; font-size: 28px; background: var(--ud-soot); color: #fff; padding: 8px 14px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.ud-spin { width: 150px; height: 150px; border-radius: 50%; border: 4px solid var(--ud-ink-2); background: #fff; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; touch-action: manipulation; user-select: none; }
.ud-spin b { font-family: var(--ud-sans); font-size: 13px; }
.ud-spin:disabled { opacity: .55; }
.ud-wheel { width: 70px; height: 70px; border-radius: 50%; border: 6px solid #7a5232; background: conic-gradient(#7a5232 0 4%, transparent 4% 25%, #7a5232 25% 29%, transparent 29% 50%, #7a5232 50% 54%, transparent 54% 75%, #7a5232 75% 79%, transparent 79%); }
.ud-spin.is-turn .ud-wheel { animation: ud-turn .25s; }
@keyframes ud-turn { to { transform: rotate(90deg); } }
.ud-spindles { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; max-width: 220px; margin: 0 auto; }
.ud-spindles i { display: block; height: 22px; border-radius: 3px; background: linear-gradient(#e9dcc2, #c9b48c); border: 1px solid #a8916a; }
.ud-spindles.is-on i { animation: ud-spindle .3s infinite alternate; }
.ud-spindles.is-on i:nth-child(odd) { animation-delay: .15s; }
@keyframes ud-spindle { to { background: linear-gradient(#fff, #e3d3b0); transform: scaleY(.85); } }
.ud-race-result { margin-top: 16px; }
.ud-bars { display: grid; gap: 8px; margin-bottom: 12px; font-family: var(--ud-sans); }
.ud-bar-row { display: grid; grid-template-columns: 90px 1fr 70px; gap: 10px; align-items: center; }
.ud-bar { height: 22px; background: var(--ud-paper-2); border-radius: 4px; overflow: hidden; }
.ud-bar i { display: block; height: 100%; background: var(--ud-ochre); }
.ud-bar--machine i { background: var(--ud-soot); }
.ud-bar-row b { text-align: right; font-variant-numeric: tabular-nums; }

/* Heft */
.ud-heft-hint, .ud-heft-task { display: flex; gap: 12px; align-items: flex-start; background: #fff4df; border: 2px solid var(--ud-ochre); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; font-family: var(--ud-sans); font-size: 16px; }
.ud-heft-hint p, .ud-heft-task p { margin: 0 !important; }
.ud-pen { font-size: 28px; line-height: 1; color: var(--ud-brick); }
.ud-heft {
  position: relative; padding: 18px 22px 18px 56px; border-radius: 4px; border: 1px solid #c9d3dd;
  background-color: #fffef8;
  background-image: linear-gradient(90deg, transparent 40px, #e8a2a2 40px, #e8a2a2 42px, transparent 42px), repeating-linear-gradient(#fffef8 0 31px, #c9d8e6 31px 32px);
  line-height: 32px; font-size: 18px;
}
.ud-heft p { margin: 0 0 0 !important; line-height: 32px; }
.ud-heft-title { font-weight: 700; text-decoration: underline; text-decoration-color: var(--ud-brick); text-underline-offset: 4px; font-size: 20px; }
.ud-blank-line { color: var(--ud-ink-2); }
.ud-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 10px; line-height: 1.3; }
.ud-chain span { border: 2px solid var(--ud-ink-2); border-radius: 6px; padding: 4px 10px; background: #fff; font-size: 16px; text-align: center; }
.ud-chain span small { font-size: 12px; color: var(--ud-ink-2); }
.ud-chain .ud-blank { min-width: 90px; border-style: dashed; color: var(--ud-line); font-weight: 700; }
.ud-chain i { font-style: normal; font-weight: 700; color: var(--ud-brick); }
.ud-heft--solution { background-image: none; border-left: 6px solid var(--ud-green); padding-left: 22px; line-height: 1.6; }
.ud-heft--solution p { line-height: 1.6; margin-bottom: .6em !important; }
.ud-check { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-family: var(--ud-sans); font-size: 16px; cursor: pointer; }
.ud-check input { width: 22px; height: 22px; }

/* Quiz */
.ud-quiz { max-width: 680px; }
.ud-q-count { font-family: var(--ud-sans); font-size: 13px; color: var(--ud-ink-2); margin-bottom: 4px !important; }
.ud-q { font-size: 21px; font-weight: 700; }
.ud-options { display: grid; gap: 8px; }
.ud-option { text-align: left; padding: 12px 14px; min-height: 48px; background: #fff; border: 2px solid var(--ud-line); border-radius: 6px; color: var(--ud-ink); font-size: 17px; }
.ud-option:hover { border-color: var(--ud-ink-2); }
.ud-option.is-right { border-color: var(--ud-green); background: #eef5ea; }
.ud-option.is-wrong { border-color: var(--ud-red); background: #f9e9e6; }
.ud-result { text-align: center; padding: 20px; background: var(--ud-paper); border-radius: 8px; }
.ud-big { font-size: 44px; font-weight: 700; color: var(--ud-brick); margin: 0 !important; }

.ud-extra { margin-top: 18px; padding: 12px 16px; border: 2px dashed var(--ud-blue); border-radius: 8px; }

/* Meldungen */
.ud-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 99999; background: var(--ud-soot); color: #fff; font-family: var(--ud-sans); padding: 10px 18px; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.3); transition: opacity .4s; max-width: calc(100% - 32px); }
.ud-toast--ok { background: var(--ud-green); }
.ud-toast--out { opacity: 0; }

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 760px) {
  .ud-root { font-size: 17px; }
  .ud-main { padding: 14px 12px; }
  .ud-paper { padding: 16px 14px; }
  .ud-reading--fig, .ud-reading--side, .ud-puzzle, .ud-order-game, .ud-two { grid-template-columns: 1fr; }
  .ud-race { grid-template-columns: 1fr; }
  .ud-spot-tag { font-size: 11px; padding: 2px 5px; margin: 3px; }
  .ud-station-title { font-size: 26px !important; }
  .ud-heft { padding-left: 50px; font-size: 16px; }
  .ud-brand-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ud-root *, .ud-root *::before, .ud-root *::after { animation: none !important; transition: none !important; }
}
.ud-dropzone .ud-figure figcaption { display: none; }

/* ---------- Vollbild nach dem Login ---------- */
html.ud-noscroll, html.ud-noscroll body { overflow: hidden !important; }
.ud-root.is-immersive {
  position: fixed; inset: 0; z-index: 100000; width: auto; max-width: none; margin: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--ud-paper);
}
.ud-root:fullscreen { background: var(--ud-paper); overflow-y: auto; }
.ud-root:-webkit-full-screen { background: var(--ud-paper); overflow-y: auto; }
.ud-root.is-immersive .ud-app { border-radius: 0; border: 0; min-height: 100%; }
.ud-root.is-immersive .ud-head { position: sticky; top: 0; z-index: 5; }
.ud-root.is-immersive .ud-main { max-width: 1180px; margin: 0 auto; }
.ud-root.is-immersive .ud-map { max-width: calc((100vh - 190px) * 1.777); margin: 0 auto; }
.ud-root.is-immersive .ud-login { min-height: 100%; border-radius: 0; }
.ud-root.is-immersive .ud-intro { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Login mit PIN ---------- */
.ud-login-card select { width: 100%; font-size: 18px; padding: 10px 12px; border: 2px solid var(--ud-line); border-radius: 6px; background: #fff; color: var(--ud-ink); font-family: var(--ud-serif); }
.ud-login-card select:focus { border-color: var(--ud-ochre); outline: none; }
.ud-pin { display: flex; gap: 10px; }
.ud-root .ud-pin-box {
  width: 54px; height: 60px; padding: 0; text-align: center; font-size: 28px; font-weight: 700; font-family: var(--ud-sans);
  border: 2px solid var(--ud-line); border-radius: 8px; background: #fff; color: var(--ud-ink);
  -webkit-text-security: disc; text-security: disc;
}
.ud-root .ud-pin-box:focus { border-color: var(--ud-ochre); box-shadow: 0 0 0 3px rgba(197, 138, 44, .3); outline: none; }
.ud-pin.is-shake { animation: ud-shake .45s; }
.ud-pin.is-shake .ud-pin-box { border-color: var(--ud-red); }
.ud-register-q { font-size: 18px; margin: 14px 0 4px !important; }
.ud-back-link { display: block; margin: 12px auto 0; }
.ud-login-card > .ud-btn + .ud-back-link { margin-top: 14px; }
.ud-name-row { display: flex; gap: 10px; align-items: flex-end; }
.ud-name-col { flex: 1; min-width: 0; }
.ud-class-col { flex: 0 0 104px; }
.ud-class-col select { padding-left: 8px; padding-right: 4px; }
.ud-hint { font-family: var(--ud-sans); font-size: 12px; color: var(--ud-ink-2); margin: 4px 0 0 !important; }

/* ---------- Startseite: aufgeräumte Leiste, im Vollbild ohne Scrollen ---------- */
.ud-strip { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.ud-strip-item { margin: 0; min-width: 0; }
.ud-strip-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 100%; min-height: 52px; margin: 0; padding: 6px 10px;
  text-align: left; background: var(--ud-card); border: 1px solid var(--ud-line); border-radius: 8px; color: var(--ud-ink);
  font-family: var(--ud-sans) !important; font-size: 14px; line-height: 1.2;
}
.ud-strip-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--ud-paper-2); color: var(--ud-ink-2); }
.ud-strip-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ud-strip-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.ud-strip-t small { font-size: 12px; color: var(--ud-ink-2); }
.ud-strip-s { flex: none; font-size: 15px; color: var(--ud-ink-2); }
.is-open .ud-strip-btn { border-color: var(--ud-brick); box-shadow: 0 0 0 2px rgba(156, 61, 38, .15); cursor: pointer; }
.is-open .ud-strip-n { background: var(--ud-brick); color: #fff; }
.is-open .ud-strip-s { color: var(--ud-brick); font-size: 22px; font-weight: 700; }
button.ud-strip-btn:hover { background: #fff; }
.is-done .ud-strip-btn { border-color: var(--ud-green); cursor: pointer; }
.is-done .ud-strip-n { background: var(--ud-green); color: #fff; }
.is-done .ud-strip-s { color: var(--ud-green); font-weight: 700; }
.is-locked .ud-strip-btn { opacity: .6; }

/* Vollbild: Kopf, Satz, Karte und Leiste passen auf einen Bildschirm */
.ud-root.is-immersive .ud-app--map { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.ud-root.is-immersive .ud-main--map { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; padding-top: 10px; padding-bottom: 14px; }
.ud-root.is-immersive .ud-main--map .ud-intro { margin: 0 auto 10px !important; font-size: 17px; }
.ud-root.is-immersive .ud-map-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; container-type: size; }
.ud-root.is-immersive .ud-map-stage .ud-map { max-width: none; width: min(100cqw, 100cqh * 1.7768); }
.ud-root.is-immersive .ud-strip { flex: none; }
.ud-root.is-immersive:has(.ud-app--map) { overflow: hidden; }
@media (max-width: 900px) {
  .ud-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .ud-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ud-root.is-immersive .ud-app--map { height: auto; overflow: visible; }
  .ud-root.is-immersive:has(.ud-app--map) { overflow-y: auto; }
  .ud-root.is-immersive .ud-map-stage { container-type: normal; }
  .ud-root.is-immersive .ud-map-stage .ud-map { width: 100%; }
}
.ud-root .ud-strip-t b { font-size: 14px; white-space: normal; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ud-root .ud-strip-t small { font-size: 12px; }
.is-open .ud-strip-t small { color: var(--ud-brick); font-weight: 700; }
.is-done .ud-strip-t small { color: var(--ud-green); font-weight: 700; }
/* Heft: jede Zeile genau 32px, Text sitzt auf der Linie (Position wird per JS gemessen) */
.ud-root .ud-heft, .ud-root .ud-heft p, .ud-root .ud-heft .ud-heft-title { line-height: 32px !important; margin: 0 !important; padding-top: 0; padding-bottom: 0; }
.ud-root .ud-heft { padding-top: 16px; padding-bottom: 16px; }
.ud-root .ud-heft-title { text-underline-offset: 3px; }
.ud-root .ud-heft .ud-chain { display: block; }
.ud-root .ud-heft .ud-chain i { font-style: normal; font-weight: 700; color: var(--ud-brick); padding: 0 4px; }
.ud-baseline-probe { display: inline-block; width: 0; height: 0; vertical-align: baseline; }
.ud-root .ud-heft--solution, .ud-root .ud-heft--solution p { line-height: 1.6 !important; }
.ud-root .ud-heft--solution p { margin-bottom: .6em !important; }
.ud-root .ud-heft .ud-wordbank { font-family: var(--ud-sans); font-size: 15px; color: var(--ud-ink-2); }

/* ---------- Bausteine für Stationen 2–6 ---------- */
.ud-pool--wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.ud-pool--wrap .ud-card { width: auto; flex: 1 1 220px; }
.ud-sort .ud-small { margin-bottom: 4px !important; }
.ud-zones { display: grid; gap: 12px; margin-top: 14px; }
.ud-zone { border: 3px dashed var(--ud-line); border-radius: 8px; background: var(--ud-paper); padding: 10px; min-height: 140px; cursor: pointer; }
.ud-zone .ud-figure { margin: 0 0 8px; pointer-events: none; }
.ud-zone-head { margin: 0 0 8px !important; font-family: var(--ud-sans); text-align: center; }
.ud-zone-head b { display: block; font-size: 17px; }
.ud-zone-head small { display: block; font-size: 13px; color: var(--ud-ink-2); }
.ud-zone-list { display: grid; gap: 6px; }
.ud-zone-list .ud-card { font-size: 14px; padding: 6px 10px; min-height: 0; border-color: var(--ud-green); background: #eef5ea; animation: ud-pop .3s; }
.ud-card--bubble { border-radius: 14px; font-weight: 500; font-style: italic; }
.ud-reveal { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.ud-reveal-card { border: 2px solid var(--ud-line); border-radius: 8px; background: #fff; overflow: hidden; }
.ud-reveal-card.is-open { border-color: var(--ud-ochre); }
.ud-reveal-head { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px 14px; background: var(--ud-paper); border: 0; text-align: left; color: var(--ud-ink); }
.ud-reveal-head::after { content: "▾"; margin-left: auto; font-family: var(--ud-sans); color: var(--ud-ink-2); }
.ud-reveal-card.is-open .ud-reveal-head::after { content: "▴"; }
.ud-reveal-icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; }
.ud-reveal-icon svg { width: 46px; height: 46px; }
.ud-reveal-title b { display: block; font-size: 17px; }
.ud-reveal-title small { display: block; font-family: var(--ud-sans); font-size: 13px; color: var(--ud-ink-2); }
.ud-reveal-body { padding: 12px 14px; font-size: 16px; }
.ud-reveal-body p:last-child { margin-bottom: 0 !important; }
.ud-sketch { margin: 0 0 14px; padding: 10px; background: #fffef8; border: 1px dashed var(--ud-line); border-radius: 6px; text-align: center; }
.ud-sketch svg { max-width: 520px; width: 100%; height: auto; }
.ud-sketch figcaption { font-family: var(--ud-sans); font-size: 13px; color: var(--ud-ink-2); }
.sk-box { fill: #fff; stroke: var(--ud-ink-2); stroke-width: 2; }
.sk-blank { fill: #fff; stroke: var(--ud-ink-2); stroke-width: 2; stroke-dasharray: 6 4; }
.sk-arrow { fill: none; stroke: var(--ud-brick); stroke-width: 3; }
.sk-t { font-family: var(--ud-sans); font-size: 14px; fill: var(--ud-ink); }
.sk-tb { font-family: var(--ud-sans); font-size: 15px; font-weight: 700; fill: var(--ud-ink); }
.ud-poll { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.ud-option.is-picked { border-color: var(--ud-ochre); background: #fff4df; }
.ud-poll-fb { margin-top: 12px; }
.ud-poll-fb p { background: var(--ud-paper); border-left: 4px solid var(--ud-ochre); padding: 10px 14px; border-radius: 0 6px 6px 0; font-family: var(--ud-sans); font-size: 16px; }
.ud-quote { font-style: italic; border-left: 4px solid var(--ud-line); padding: 6px 14px; margin: 0 0 12px; background: #fffaf0; }
.ud-quote cite { display: block; font-style: normal; font-family: var(--ud-sans); font-size: 13px; color: var(--ud-ink-2); margin-top: 4px; }
.ud-letter { background: #fffaf0; border: 1px solid var(--ud-line); box-shadow: 2px 3px 0 var(--ud-paper-2); padding: 18px 22px; font-style: italic; max-width: 62ch; transform: rotate(-.4deg); margin-bottom: 14px; }
.ud-tbl { border-collapse: collapse; width: 100%; font-family: var(--ud-sans); font-size: 15px; margin: 8px 0 12px; }
.ud-tbl th, .ud-tbl td { border: 1px solid var(--ud-line); padding: 6px 10px; text-align: left; vertical-align: top; }
.ud-tbl th { background: var(--ud-paper); }
.ud-tbl td.is-good { color: var(--ud-green); font-weight: 700; }
.ud-tbl td.is-bad { color: var(--ud-red); font-weight: 700; }
.ud-meter { display: grid; grid-template-columns: 150px 1fr 44px; gap: 10px; align-items: center; font-family: var(--ud-sans); font-size: 15px; }
.ud-meter .ud-bar i { transition: width .6s; }
.ud-event { background: #fff; border: 2px solid var(--ud-soot); border-radius: 8px; padding: 14px 16px; margin: 12px 0; box-shadow: 3px 4px 0 var(--ud-paper-2); animation: ud-pop .3s; }
.ud-event h4 { margin-bottom: 6px !important; }
.ud-choices { display: grid; gap: 8px; }
.ud-source { background: #f7f0dc; border: 1px solid #b9a47a; padding: 18px 22px; font-family: var(--ud-serif); max-width: 70ch; box-shadow: 2px 3px 0 var(--ud-paper-2); }
.ud-source h4 { text-align: center; letter-spacing: .06em; }
.ud-source p { margin-bottom: .5em !important; }
.ud-source-note { font-family: var(--ud-sans); font-size: 13px; color: var(--ud-ink-2); }
.ud-num { width: 90px; font: inherit; font-family: var(--ud-sans); padding: 6px 8px; border: 2px solid var(--ud-line); border-radius: 6px; text-align: right; }
.ud-num.is-right { border-color: var(--ud-green); background: #eef5ea; }
.ud-num.is-wrong { border-color: var(--ud-red); background: #f9e9e6; }
.ud-svgwrap { background: #efe2c6; border: 1px solid var(--ud-line); border-radius: 8px; padding: 6px; }
.ud-svgwrap svg { display: block; width: 100%; height: auto; }
.ud-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ud-stat { font-family: var(--ud-sans); background: var(--ud-paper); border-radius: 6px; padding: 6px 12px; }
.ud-stat b { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .ud-zones { grid-template-columns: 1fr !important; }
  .ud-meter { grid-template-columns: 110px 1fr 40px; }
}

/* Station 2 */
.ud-two--top { align-items: start; }
.ud-trip { background: var(--ud-paper); border-radius: 8px; padding: 12px 14px; }
.ud-road { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.ud-road-stop { margin: 0; display: flex; flex-direction: column; align-items: center; width: 74px; font-family: var(--ud-sans); text-align: center; opacity: .5; }
.ud-road-stop small { font-size: 11px; line-height: 1.2; }
.ud-road-dot { font-size: 18px; }
.ud-road-stop.is-past { opacity: .8; }
.ud-road-stop.is-here { opacity: 1; font-weight: 700; }
.ud-road-stop.is-here .ud-road-dot { transform: scale(1.3); }
.ud-rail-game { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ud-railmap { touch-action: manipulation; }
.m-sea { font-family: var(--ud-sans); font-size: 14px; font-style: italic; fill: #5d7d8a; }
.m-river { fill: none; stroke: #8fb3c4; stroke-width: 3; }
.m-mtn { fill: #a89272; opacity: .7; }
.m-city { fill: #fff; stroke: var(--ud-ink); stroke-width: 3; }
.m-city.is-coal { fill: #2b2118; }
.m-city.is-port { fill: #2f4f6e; }
.m-label { font-family: var(--ud-sans); font-size: 15px; font-weight: 700; fill: var(--ud-ink); paint-order: stroke; stroke: #efe2c6; stroke-width: 4px; }
.m-sym { font-family: var(--ud-sans); font-size: 11px; fill: var(--ud-ink-2); paint-order: stroke; stroke: #efe2c6; stroke-width: 3px; }
.m-edge { cursor: pointer; }
.m-hit { stroke: transparent; stroke-width: 22; }
.m-line { stroke: #b6a17d; stroke-width: 4; stroke-dasharray: 2 6; stroke-linecap: round; }
.m-edge:hover .m-line, .m-edge:focus .m-line { stroke: var(--ud-ochre); }
.m-edge.is-built .m-line { stroke: var(--ud-soot); stroke-width: 7; stroke-dasharray: 14 4; }
.m-cost { fill: #fff; stroke: var(--ud-ink-2); stroke-width: 2; }
.m-cost.is-mtn { fill: #a89272; }
.m-cost-t { font-family: var(--ud-sans); font-size: 13px; font-weight: 800; fill: var(--ud-ink); pointer-events: none; }
.m-edge.is-built .m-cost { fill: var(--ud-soot); }
.m-edge.is-built .m-cost-t { fill: #fff; }
.m-hist line { stroke: var(--ud-red); stroke-width: 3; stroke-dasharray: 5 4; opacity: 0; transition: opacity .6s; }
.show-hist .m-hist line { opacity: .9; }
.show-hist .m-hist { transform: translate(4px, 4px); }
.ud-orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-family: var(--ud-sans); font-size: 15px; }
.ud-orders li { margin: 0; padding: 6px 10px; border-radius: 6px; background: var(--ud-paper); }
.ud-orders li.is-ok { background: #eef5ea; color: var(--ud-green); font-weight: 600; }
.ud-orders small { color: var(--ud-ink-2); font-weight: 400; }
.ud-gallery .ud-reveal-head { background: #efe2c6; }
.ud-timeline { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.ud-tl-slot { margin: 0; min-height: 96px; border: 2px dashed var(--ud-line); border-radius: 6px; background: var(--ud-paper); padding: 6px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.ud-tl-year { font-family: var(--ud-sans); font-weight: 800; font-size: 18px; text-align: center; border-bottom: 3px solid var(--ud-soot); }
.ud-tl-slot .ud-card { font-size: 13px; padding: 6px 8px; min-height: 0; border-color: var(--ud-green); background: #eef5ea; }
.ud-root .ud-heft i { font-style: normal; font-weight: 700; color: var(--ud-brick); padding: 0 4px; }

/* Station 3 */
.ud-popwrap { margin-top: 10px; background: var(--ud-paper); border-radius: 6px; padding: 10px; }
.ud-popchart { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; height: 190px; }
.ud-popcol { display: flex; flex-direction: column; align-items: center; height: 100%; font-family: var(--ud-sans); }
.ud-popcol b { font-size: 13px; margin-bottom: 4px; }
.ud-popbar { flex: 1; width: 60%; display: flex; align-items: flex-end; }
.ud-popbar i { display: block; width: 100%; background: var(--ud-brick); border-radius: 4px 4px 0 0; transition: height 1.4s ease-out; }
.ud-popcol span { font-weight: 700; margin-top: 4px; }
.ud-flats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.ud-flat { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border: 2px solid var(--ud-line); border-radius: 8px; background: #fff; color: var(--ud-ink); }
.ud-flat b { font-size: 17px; }
.ud-flat small { font-family: var(--ud-sans); color: var(--ud-ink-2); }
.ud-flat-rent { font-family: var(--ud-sans); font-weight: 800; color: var(--ud-brick); }
.ud-flat.is-picked { border-color: var(--ud-ochre); box-shadow: 0 0 0 3px rgba(197, 138, 44, .35); }
.ud-book-sum td { font-weight: 800; border-top: 3px double var(--ud-ink-2); }
.ud-house .ud-hs { cursor: pointer; }
.ud-hs-c { fill: var(--ud-ochre); stroke: #fff; stroke-width: 3; animation: ud-pulse 1.6s infinite; transform-box: fill-box; transform-origin: center; }
.ud-hs.is-seen .ud-hs-c { fill: var(--ud-green); animation: none; }
.ud-hs-t { font-family: var(--ud-sans); font-weight: 800; font-size: 17px; fill: #fff; pointer-events: none; }
@keyframes ud-pulse { 50% { transform: scale(1.15); } }

/* Station 4 */
.ud-clock-wrap { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 18px; align-items: center; }
.ud-clock24 { width: 100%; height: auto; touch-action: none; user-select: none; }
.ud-wedge { stroke: #5b4a3a; stroke-width: 1.5; cursor: pointer; }
.ud-wedge:focus { outline: none; stroke: var(--ud-ochre); stroke-width: 3; }
.ud-clock-n { font-family: var(--ud-sans); font-size: 11px; font-weight: 700; fill: var(--ud-ink-2); }
.ud-clock-c { font-family: var(--ud-sans); font-size: 18px; font-weight: 800; fill: var(--ud-ink); }
.ud-clock-s { font-family: var(--ud-sans); font-size: 12px; fill: var(--ud-ink-2); }
.ud-palette { display: grid; gap: 6px; }
.ud-swatch { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 2px solid var(--ud-line); border-radius: 6px; background: #fff; font-family: var(--ud-sans) !important; font-size: 15px; text-align: left; color: var(--ud-ink); }
.ud-swatch i { width: 22px; height: 22px; border-radius: 4px; flex: none; }
.ud-swatch.is-on { border-color: var(--ud-ink); box-shadow: 0 0 0 3px rgba(197, 138, 44, .45); font-weight: 700; }
.ud-two--clocks svg { max-width: 300px; margin: 0 auto; display: block; }
.ud-lohn { max-width: 520px; }
.ud-threads { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; background: #e7dcc6; padding: 16px; border-radius: 8px; margin: 12px 0; }
.ud-thread { height: 110px; border: 2px solid #a8916a; border-radius: 8px; background: linear-gradient(#f4ead6, #e0cfa8); display: flex; justify-content: center; touch-action: manipulation; padding: 0; }
.ud-thread i { display: block; width: 4px; height: 100%; background: #fff; box-shadow: 0 0 0 1px #c9b48c; }
.ud-thread.is-torn { border-color: var(--ud-red); background: #f9e0dc; animation: ud-blink .35s infinite alternate; }
.ud-thread.is-torn i { background: linear-gradient(#fff 0 40%, transparent 40% 60%, #fff 60%); box-shadow: none; }
.ud-thread.is-fixed { border-color: var(--ud-green); background: #e3f0df; }
.ud-thread.is-lost { border-color: #000; background: #ccc; }
@keyframes ud-blink { to { background: #f1b7ae; } }
.ud-tbl--sketch td { height: 30px; }
.ud-tbl--sketch td:first-child { font-weight: 700; width: 30%; }

/* Station 5 und 6 */
.ud-meter--risk .ud-bar i { background: var(--ud-red); }
.ud-event--other { border-color: var(--ud-blue); }
.ud-card--file { background: #fffaf0; border-color: #8a7a5c; font-weight: 500; }
.ud-card--file b { font-weight: 800; }
.ud-zone-list .ud-card--file { font-size: 13px; }
.ud-reveal--three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ud-extra--final { border-color: var(--ud-brick); background: #fff4df; }
@media (max-width: 760px) {
  .ud-rail-game, .ud-clock-wrap, .ud-flats { grid-template-columns: 1fr; }
  .ud-threads { grid-template-columns: repeat(4, 1fr); }
  .ud-thread { height: 80px; }
  .ud-zones[style] { grid-template-columns: 1fr 1fr !important; }
}
.ud-legend { font-family: var(--ud-sans); margin: 8px 0 !important; }
.ud-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ud-ink); vertical-align: -1px; margin-right: 3px; }
.lg-coal { background: #2b2118; } .lg-port { background: #2f4f6e; } .ud-legend .lg-mtn { background: #a89272; border-color: var(--ud-ink-2); }
.ud-root .ud-popbar { flex: none; height: 130px; }
.ud-root .ud-popchart { height: auto; }
.ud-step-inner > .ud-figure { max-width: 680px; margin-left: auto; margin-right: auto; }

/* Nach einem Fehlversuch: Knopf „Eintreten“ markiert, wartet auf Klick oder Enter */
.ud-login-card .ud-btn--primary.is-ready { outline: 3px solid #f0c987; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(240, 201, 135, .35), 0 0 18px 4px rgba(240, 201, 135, .6); animation: ud-ready 1.2s ease-in-out infinite alternate; }
@keyframes ud-ready { from { box-shadow: 0 0 0 4px rgba(240, 201, 135, .25), 0 0 10px 2px rgba(240, 201, 135, .4); } to { box-shadow: 0 0 0 7px rgba(240, 201, 135, .45), 0 0 22px 6px rgba(240, 201, 135, .7); } }
@media (prefers-reduced-motion: reduce) { .ud-login-card .ud-btn--primary.is-ready { animation: none; } }
