/* Stephis Smartboard – Styles (kein Build, keine externen Abhängigkeiten) */
:root {
  --ink: #2b3a55;
  --ink-soft: #5b6b88;
  --sky: #dff3ff;
  --mint: #d8f5e6;
  --sun: #ffe9a8;
  --coral: #ff7a6b;
  --primary: #3d7bff;
  --primary-dark: #2a5fd6;
  --card: #ffffff;
  --line: #dbe6f5;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 6px 24px rgba(43, 58, 85, .12);
  --shadow-lg: 0 18px 50px rgba(43, 58, 85, .25);
  --font: ui-rounded, "Nunito", "Segoe UI", "Trebuchet MS", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font); color: var(--ink); font-size: 18px;
  background: linear-gradient(180deg, #e8f6ff 0%, #f5fbff 60%, #eefbf3 100%);
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
#app { min-height: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
:focus-visible { outline: 4px solid rgba(61, 123, 255, .45); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }

/* ------------------------------------------------------------------ Buttons & Formulare */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border: 0; border-radius: 16px; font-weight: 800; font-size: 18px;
  background: #fff; color: var(--ink); box-shadow: 0 2px 0 rgba(43, 58, 85, .12), 0 4px 12px rgba(43, 58, 85, .08);
  transition: transform .12s, box-shadow .12s, background .15s; user-select: none; touch-action: manipulation;
}
.btn:active:not(:disabled) { transform: translateY(2px) scale(.98); box-shadow: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 3px 0 var(--primary-dark), 0 6px 14px rgba(61, 123, 255, .35); }
.btn-soft { background: #fff; }
.btn-danger { background: #e5484d; color: #fff; box-shadow: 0 3px 0 #b8343a; }
.btn.danger { color: #c4383d; }
.btn-lg { min-height: 64px; font-size: 22px; border-radius: 20px; }
.btn-icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 16px;
  background: #fff; color: var(--ink); touch-action: manipulation;
}
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: rgba(43, 58, 85, .08); }
.btn-icon.danger, .btn-ghost.danger { color: #c4383d; }

.input {
  width: 100%; min-height: 52px; padding: 10px 16px; border: 2px solid var(--line); border-radius: 14px;
  background: #fff; font-size: 18px; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(61, 123, 255, .18); }
.input-lg { min-height: 62px; font-size: 21px; border-radius: 18px; }
textarea.input { resize: vertical; line-height: 1.5; }
.field { display: block; margin-bottom: 16px; }
.field > span, .field-label { display: block; margin: 0 0 6px 4px; font-weight: 800; font-size: 15px; color: var(--ink-soft); }
.field-label { margin-top: 10px; }
.form-error { min-height: 24px; margin: 4px 0 12px; color: #c4383d; font-weight: 700; }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 64px; }
.pass-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }

/* ------------------------------------------------------------------ Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #bfe6ff 0%, #e6f6ff 55%, #fdf7dd 100%); }
.login-card { position: relative; z-index: 2; width: min(480px, 100%); padding: 38px 36px 32px; background: rgba(255, 255, 255, .92);
  border-radius: 36px; box-shadow: var(--shadow-lg); backdrop-filter: blur(8px); text-align: center; }
.login-card .field { text-align: left; }
.login-logo { font-size: 74px; line-height: 1; animation: bob 3.2s ease-in-out infinite; }
.login-card h1 { margin-top: 6px; font-size: 34px; }
.login-sub { margin: 6px 0 26px; color: var(--ink-soft); font-weight: 600; }
.login-card .btn { width: 100%; }
.login-sky i { position: absolute; display: block; }
.cloud { background: #fff; border-radius: 60px; height: 54px; width: 150px; opacity: .9; animation: drift 60s linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 70px; height: 70px; left: 24px; top: -34px; }
.cloud::after { width: 54px; height: 54px; left: 78px; top: -22px; }
.c1 { top: 9%; left: -200px; } .c2 { top: 24%; left: -200px; animation-duration: 90s; animation-delay: -30s; transform: scale(.7); }
.c3 { top: 5%; left: -200px; animation-duration: 75s; animation-delay: -55s; transform: scale(.5); }
.sun { right: 8%; top: 8%; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, #fff3b0, #ffd84d); box-shadow: 0 0 80px 30px rgba(255, 216, 77, .45); }
.login-sea { position: absolute; left: 0; right: 0; bottom: 0; height: 22vh; background: linear-gradient(180deg, #5fb8f5, #3d93e0); }
.login-wave { position: absolute; left: 0; top: -30px; width: calc(100% + 200px); height: 44px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 44'%3E%3Cpath d='M0 24 Q50 2 100 24 T200 24 V44 H0Z' fill='%235fb8f5'/%3E%3C/svg%3E") repeat-x 0 0 / 200px 44px; animation: wave 6s linear infinite; }
.login-wave.w2 { top: -18px; opacity: .6; animation-duration: 10s; animation-direction: reverse; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 44'%3E%3Cpath d='M0 24 Q50 2 100 24 T200 24 V44 H0Z' fill='%233d93e0'/%3E%3C/svg%3E"); }
.login-boat { position: absolute; left: 12%; top: -52px; font-size: 76px; animation: bob 3.6s ease-in-out infinite, sailacross 40s linear infinite alternate; }

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes drift { to { left: 110%; } }
@keyframes wave { to { transform: translateX(-200px); } }
@keyframes sailacross { from { left: 6%; } to { left: 82%; } }

.loading-screen { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 10px; color: var(--ink-soft); font-weight: 700; }
.loading-boat { font-size: 80px; animation: bob 2s ease-in-out infinite; }
.boot-error { min-height: 100vh; display: grid; place-content: center; gap: 14px; text-align: center; padding: 24px; }

/* ------------------------------------------------------------------ Dashboard */
.dash { min-height: 100vh; display: flex; flex-direction: column; }
.dash-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 28px;
  background: rgba(255, 255, 255, .8); backdrop-filter: blur(10px); border-bottom: 2px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-boat { font-size: 46px; animation: bob 3.6s ease-in-out infinite; }
.brand strong { display: block; font-size: 24px; }
.brand small { color: var(--ink-soft); font-weight: 700; font-size: 16px; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-body { flex: 1; display: grid; grid-template-columns: 290px 1fr; gap: 28px; padding: 26px 28px 60px; max-width: 1700px; width: 100%; margin: 0 auto; }
.rail { display: flex; flex-direction: column; gap: 8px; align-self: start; position: sticky; top: 110px; }
.rail-h { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin: 4px 8px 6px; }
.rail-row { display: flex; align-items: center; gap: 2px; }
.rail-row .rail-item { flex: 1; }
.rail-more { width: 44px; height: 44px; flex: none; }
.rail-item { --c: #cfe0f7; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 16px; border: 2px solid transparent; border-radius: 18px;
  background: rgba(255, 255, 255, .7); text-align: left; font-weight: 800; }
.rail-item:hover { background: #fff; }
.rail-item.active { background: #fff; border-color: var(--c); box-shadow: var(--shadow); }
.rail-emoji { font-size: 26px; }
.rail-label { flex: 1; }
.rail-count { min-width: 30px; text-align: center; padding: 2px 8px; border-radius: 99px; background: var(--sky); font-size: 14px; }
.rail-add { margin-top: 10px; }
.dash-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.dash-title { font-size: 34px; }
.search { max-width: 340px; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.lesson-card { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
  cursor: pointer; transition: transform .15s, box-shadow .15s; border: 0; text-align: left; }
.lesson-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.lesson-card:active { transform: scale(.98); }
.card-preview { position: relative; height: 150px; display: grid; place-items: center; }
.card-emoji { font-size: 64px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .2)); }
.card-folder { position: absolute; left: 12px; bottom: 12px; padding: 4px 12px; border-radius: 99px; font-size: 14px; font-weight: 800; }
.card-more { position: absolute; right: 8px; top: 8px; width: 46px; height: 46px; background: rgba(255, 255, 255, .85); }
.card-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.card-title { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-body small { color: var(--ink-soft); font-weight: 700; }
.lesson-new { min-height: 250px; align-items: center; justify-content: center; gap: 6px; background: repeating-linear-gradient(135deg, #f1f8ff 0 14px, #e7f3ff 14px 28px); border: 3px dashed #9cc4f5; box-shadow: none; text-align: center; color: var(--primary-dark); }
.lesson-new strong { font-size: 22px; }
.new-plus { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); }
.empty-hint { grid-column: 1 / -1; color: var(--ink-soft); font-weight: 700; text-align: center; padding: 30px 0; }

/* Hintergrund-Vorschauen (Karten, Vorlagen, Folien) */
[data-bg="meadow"] { background: linear-gradient(180deg, #a9dcff 0%, #d9f1ff 52%, transparent 52%), radial-gradient(ellipse 70% 40% at 20% 100%, #7ccf7a 0 98%, transparent 100%), radial-gradient(ellipse 80% 45% at 85% 100%, #5fb865 0 98%, transparent 100%), #8fd37f; }
[data-bg="chalkboard"] { background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .08), transparent 55%), #2f5d50; }
[data-bg="navy"] { background: radial-gradient(circle at 70% 10%, #2a4a8a, transparent 60%), #14233f; }
[data-bg="paper"] { background: #fff9e8; }
[data-bg="grid"] { background: linear-gradient(#8fb3e8 1.5px, transparent 1.5px) 0 0 / 40px 40px, linear-gradient(90deg, #8fb3e8 1.5px, transparent 1.5px) 0 0 / 40px 40px, #fffef9; }
[data-bg="lines"] { background: repeating-linear-gradient(180deg, #a9c4e4 0 2px, #fffdf6 2px 50px, #a9c4e4 50px 52px, #fff2bf 52px 98px, #5f86b8 98px 101px, #fffdf6 101px 150px, #a9c4e4 150px 152px, #fffdf6 152px 230px) 0 20px / 100% 230px; }
.card-preview[data-bg="grid"], .tpl-preview[data-bg="grid"] { background-size: 22px 22px, 22px 22px, auto; }
.card-preview[data-bg="lines"], .tpl-preview[data-bg="lines"] { background: repeating-linear-gradient(180deg, #a9c4e4 0 1px, #fffdf6 1px 18px, #a9c4e4 18px 19px, #fff2bf 19px 36px, #5f86b8 36px 38px, #fffdf6 38px 56px, #a9c4e4 56px 57px, #fffdf6 57px 84px) 0 6px / 100% 84px; }

/* ------------------------------------------------------------------ Modal, Toast, Menü */
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(28, 40, 66, .5); backdrop-filter: blur(4px); animation: fadein .15s; }
.modal-backdrop.out { opacity: 0; transition: opacity .15s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: #fff; border-radius: 30px; box-shadow: var(--shadow-lg); animation: pop .2s cubic-bezier(.2, .9, .3, 1.2); }
.modal-wide { width: min(980px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 8px 28px; }
.modal-head h2 { font-size: 26px; }
.modal-body { padding: 8px 28px 16px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 14px 28px 24px; }
.modal-text { margin: 4px 0; font-size: 19px; line-height: 1.5; }
.modal-hint { margin: 0 0 14px; color: var(--ink-soft); font-weight: 600; }
@keyframes fadein { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.92) translateY(10px); opacity: 0; } }

.toast-host { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 16px; padding: 14px 22px; border-radius: 18px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: var(--shadow-lg); animation: pop .2s; }
.toast.out { opacity: 0; transform: translateY(10px); transition: .25s; }
.toast-error { background: #b8343a; }
.toast-action { border: 0; background: rgba(255, 255, 255, .2); color: #fff; font-weight: 800; border-radius: 12px; padding: 8px 14px; min-height: 40px; }

.popmenu { position: fixed; z-index: 1500; min-width: 240px; padding: 8px; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); animation: pop .12s; }
.popmenu hr { border: 0; border-top: 2px solid var(--line); margin: 6px 4px; }
.popmenu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 14px; border: 0; border-radius: 14px; background: transparent; font-weight: 700; text-align: left; }
.popmenu-item:hover { background: var(--sky); }
.popmenu-item.danger { color: #c4383d; }

/* Auswahllisten, Vorlagenkarten, Swatches */
.choice-list, .class-list { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; border: 2px solid var(--line); border-radius: 16px; background: #fff; font-weight: 800; text-align: left; }
.choice small { margin-left: auto; color: var(--ink-soft); }
.choice.active { border-color: var(--primary); background: #eef4ff; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tpl-card { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 3px solid var(--line); border-radius: 22px; background: #fff; text-align: left; transition: transform .12s; }
.tpl-card:hover { transform: translateY(-2px); }
.tpl-card.active { border-color: var(--primary); background: #eef4ff; box-shadow: 0 0 0 4px rgba(61, 123, 255, .18); }
.tpl-card strong { font-size: 17px; margin-top: 6px; }
.tpl-card small { color: var(--ink-soft); font-weight: 600; line-height: 1.3; }
.tpl-preview { height: 100px; border-radius: 14px; display: grid; place-items: center; font-size: 46px; border: 1px solid rgba(0, 0, 0, .06); }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row .field { flex: 1 1 200px; margin-bottom: 4px; }
.form-row .grow { flex: 2 1 320px; }
.swatch-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.swatch { width: 54px; height: 54px; border-radius: 16px; border: 3px solid transparent; background: #f1f5fb; }
.swatch.emoji { font-size: 28px; }
.swatch.active { border-color: var(--ink); transform: scale(1.08); }
.class-mgr { display: grid; grid-template-columns: 260px 1fr; gap: 24px; min-height: 420px; }
.class-actions { display: flex; justify-content: space-between; margin-top: 12px; }
.names-count { color: var(--ink-soft); font-weight: 800; }

/* ------------------------------------------------------------------ Editor: Board & Bühne */
.board { position: fixed; inset: 0; background: #1d2b44; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.stage-wrap { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform-origin: center center; overflow: hidden; border-radius: 6px; box-shadow: 0 10px 60px rgba(0, 0, 0, .5); }
.stage-bg { position: absolute; inset: 0; }
.stage[data-bg="meadow"] .stage-bg { background: linear-gradient(180deg, #8fd3ff 0%, #cfeeff 46%, #eaf8ff 60%, transparent 60%),
  radial-gradient(ellipse 62% 30% at 12% 100%, #7ccf7a 0 98%, transparent 100%), radial-gradient(ellipse 70% 34% at 88% 100%, #5fb865 0 98%, transparent 100%),
  radial-gradient(ellipse 80% 22% at 50% 105%, #8fdc84 0 98%, transparent 100%), #9bda8d; }
.stage[data-bg="chalkboard"] .stage-bg { background: radial-gradient(circle at 25% 15%, rgba(255, 255, 255, .09), transparent 50%), radial-gradient(circle at 80% 85%, rgba(255, 255, 255, .06), transparent 45%), #2f5d50;
  box-shadow: inset 0 0 0 14px #b98a54, inset 0 0 0 18px #8a6234; }
.stage[data-bg="navy"] .stage-bg { background: radial-gradient(circle at 75% 8%, #2f5cae, transparent 55%), radial-gradient(circle at 10% 90%, #1f3a70, transparent 50%), #12213d; }
.stage[data-bg="paper"] .stage-bg { background: radial-gradient(circle at 50% 0, #fffdf4, #fff3d2); }
.stage[data-bg="grid"] .stage-bg { background: linear-gradient(#8fb3e8 2px, transparent 2px) 0 0 / 40px 40px, linear-gradient(90deg, #8fb3e8 2px, transparent 2px) 0 0 / 40px 40px, #fffef9; }
.stage[data-bg="lines"] .stage-bg { background: repeating-linear-gradient(180deg, #a9c4e4 0 2px, #fffdf6 2px 50px, #a9c4e4 50px 52px, #fff2bf 52px 98px, #5f86b8 98px 101px, #fffdf6 101px 150px, #a9c4e4 150px 152px, #fffdf6 152px 230px) 0 192px / 100% 230px; }
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer > * { pointer-events: auto; }
.layer-draw { pointer-events: none; }
.layer-draw > * { pointer-events: none; }
.slide-drawing { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }

/* Top-Bar (Master) */
.topbar { position: absolute; left: 0; right: 0; top: 0; height: 168px; z-index: 5000; display: flex; align-items: stretch; gap: 20px; padding: 8px 26px 0 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(236, 248, 255, .9)); backdrop-filter: blur(10px); border-bottom-left-radius: 36px; border-bottom-right-radius: 36px;
  box-shadow: 0 6px 24px rgba(20, 40, 80, .22); pointer-events: auto; }
.topbar > .route { flex: 1; min-width: 0; }
.clock { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; min-width: 300px; padding-right: 6px; }
.clock-time { font-size: 70px; line-height: 1; font-weight: 900; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.clock-date { margin-top: 6px; font-size: 24px; font-weight: 800; color: var(--ink-soft); }
.topbar-btn { align-self: center; width: 76px; height: 76px; border-radius: 22px; background: #fff; box-shadow: 0 3px 10px rgba(43, 58, 85, .18); }

/* Boot-Fahrplan */
.route { position: relative; display: flex; flex-direction: column; padding-left: 62px; }
.route-edit { position: absolute; left: 0; top: 14px; width: 54px; height: 54px; }
.route-islands { display: flex; height: 80px; align-items: flex-end; }
.route-labels { display: flex; height: 30px; }
.station { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; align-items: flex-end; border: 0; background: transparent; padding: 0 4px 6px; touch-action: manipulation; }
.island { position: relative; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 35% 30%, #fff6cf, #f6dc8c); box-shadow: 0 5px 0 #d9b95a, 0 8px 14px rgba(43, 58, 85, .2);
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), background .3s; }
.island-emoji { font-size: 36px; line-height: 1; }
.island-check { position: absolute; right: -8px; top: -8px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #2ebd6b; color: #fff; border: 3px solid #fff; transform: scale(0); transition: transform .3s cubic-bezier(.3, 1.8, .5, 1); }
.station.done .island { background: radial-gradient(circle at 35% 30%, #e3fbe9, #a9e8bd); box-shadow: 0 5px 0 #6cc78a, 0 8px 14px rgba(43, 58, 85, .2); }
.station.done .island-check { transform: scale(1); }
.station.current .island { transform: translateY(-4px) scale(1.1); }
.station-label { flex: 1 1 0; min-width: 0; border: 0; background: transparent; padding: 0 4px; font-size: 19px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); touch-action: manipulation; }
.station-label.current { color: var(--ink); }
.station-label.done { color: #2a9658; }
.route-empty { margin: auto; padding: 12px 22px; border: 3px dashed #9cc4f5; border-radius: 18px; background: #f2f8ff; font-weight: 800; font-size: 20px; }
.route-water { position: relative; height: 32px; border-radius: 16px; background: linear-gradient(180deg, #7cc4f7, #4ea3e8); box-shadow: inset 0 3px 6px rgba(0, 60, 120, .25); }
.water-waves { position: absolute; inset: 0; overflow: hidden; border-radius: 16px; pointer-events: none; }
.wave { position: absolute; left: 0; width: 200%; height: 18px; top: -4px; fill: #9bd3fb; animation: wave-run 7s linear infinite; }
.wave-back { opacity: .65; fill: #c3e6ff; top: -9px; animation-duration: 11s; animation-direction: reverse; }
.wave-front { top: 6px; fill: #6db8f2; opacity: .9; }
@keyframes wave-run { to { transform: translateX(-50%); } }
.boat { position: absolute; bottom: -2px; width: 66px; height: 57px; margin-left: -33px; padding: 0; border: 0; background: transparent; transition: left 1.4s cubic-bezier(.45, .05, .25, 1); animation: boat-bob 3s ease-in-out infinite; touch-action: manipulation; z-index: 2; filter: drop-shadow(0 4px 4px rgba(0, 40, 90, .3)); }
.boat.sailing { animation: boat-sail 1.4s ease-in-out; }
.boat svg { display: block; width: 100%; height: 100%; }
.route.hooray .boat { animation: boat-hooray .5s ease-in-out 3; }
@keyframes boat-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-3px) rotate(2deg); } }
@keyframes boat-sail { 0% { transform: rotate(0); } 25% { transform: rotate(-8deg) translateY(-3px); } 60% { transform: rotate(6deg) translateY(-2px); } 100% { transform: rotate(0); } }
@keyframes boat-hooray { 50% { transform: translateY(-22px) rotate(6deg); } }

.emoji-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 2px dashed var(--line); }
.emoji-btn { width: 52px; height: 52px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-size: 28px; }
.route-editor-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.route-row { display: flex; align-items: center; gap: 8px; }
.route-row-n { width: 28px; text-align: center; font-weight: 900; color: var(--ink-soft); }
.input-icon { width: 76px; flex: none; text-align: center; font-size: 26px; padding: 0; }
.input-slide { width: 260px; flex: none; }
.route-row .btn-icon { width: 46px; height: 46px; flex: none; }

/* Widget-Rahmen */
.wframe { position: absolute; display: flex; flex-direction: column; background: rgba(255, 255, 255, .96); border-radius: 30px; box-shadow: 0 8px 28px rgba(20, 40, 80, .25); border: 3px solid rgba(255, 255, 255, .9); touch-action: manipulation; }
.wframe.selected { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(61, 123, 255, .3), 0 14px 40px rgba(20, 40, 80, .35); }
.wframe.dragging, .wframe.resizing { box-shadow: 0 24px 60px rgba(20, 40, 80, .45); transition: none; }
.wframe.is-master { border-style: dashed; }
.wbar { flex: none; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 8px 0 12px; border-radius: 27px 27px 0 0; background: linear-gradient(180deg, #eef5ff, #e1edff); color: var(--ink-soft); cursor: grab; touch-action: none; }
.wbar:active { cursor: grabbing; }
.wgrip { display: grid; place-items: center; opacity: .6; }
.wtitle { font-weight: 800; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wmaster-badge { padding: 2px 10px; border-radius: 99px; background: #fff3c4; font-size: 14px; font-weight: 800; color: #8a6a00; white-space: nowrap; }
.wbar-actions { margin-left: auto; display: flex; gap: 4px; }
.wbtn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 14px; background: transparent; color: var(--ink-soft); touch-action: manipulation; }
.wbtn:hover { background: rgba(255, 255, 255, .9); color: var(--ink); }
.wbtn-del:hover { color: #c4383d; }
.is-master .wbtn-pin { background: #ffe9a8; color: #8a6a00; }
.wframe:not(.selected) .wbar-actions { display: none; }
.wbody { position: relative; flex: 1; min-height: 0; container-type: size; border-radius: 0 0 27px 27px; overflow: hidden; }
.wresize { position: absolute; right: -6px; bottom: -6px; width: 56px; height: 56px; display: grid; place-items: center; color: var(--ink-soft); touch-action: none; cursor: nwse-resize; opacity: 0; transition: opacity .15s; }
.wframe.selected .wresize { opacity: 1; }
.board.locked .wbar { height: 0; padding: 0; overflow: hidden; }
.board.locked .wresize, .board.locked .wbar-actions { display: none; }
.board.locked .wframe { border-radius: 30px; }
.board.locked .wbody { border-radius: 27px; }
.board.locked .wframe.selected { border-color: rgba(255, 255, 255, .9); box-shadow: 0 8px 28px rgba(20, 40, 80, .25); }
.board.locked .wmaster-badge { display: none; }
.wfallback { height: 100%; display: grid; place-content: center; text-align: center; gap: 6px; color: var(--ink-soft); padding: 16px; }
.wfallback-emoji { font-size: 64px; }
.wfallback p { margin: 0; font-weight: 700; font-size: 17px; }

/* Navigation, Toolbar, Folienleiste, Dock */
.nav-arrow { position: absolute; top: 50%; z-index: 30; width: 84px; height: 130px; margin-top: -40px; display: grid; place-items: center; border: 0; color: var(--ink); background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(6px); box-shadow: var(--shadow); touch-action: manipulation; transition: transform .12s, opacity .2s; }
.nav-prev { left: 0; border-radius: 0 40px 40px 0; }
.nav-next { right: 0; border-radius: 40px 0 0 40px; }
.nav-arrow:active:not(:disabled) { transform: scale(.94); }
.nav-arrow:disabled { opacity: 0; pointer-events: none; }
.slide-indicator { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 31; padding: 6px 18px; border-radius: 99px; background: rgba(255, 255, 255, .85); font-weight: 800; font-size: 16px; box-shadow: var(--shadow); pointer-events: none; transition: bottom .25s; }
.drawer-open .slide-indicator { bottom: 208px; }

.toolbar { position: absolute; left: 14px; bottom: 14px; z-index: 40; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 28px); flex-wrap: wrap; padding: 8px; border-radius: 28px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); box-shadow: var(--shadow-lg); transition: bottom .25s; }
.drawer-open .toolbar { bottom: 206px; }
.tb-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 76px; height: 68px; padding: 0 10px; border: 0; border-radius: 20px; background: transparent; color: var(--ink); font-weight: 800; touch-action: manipulation; }
.tb-btn:hover { background: var(--sky); }
.tb-btn.active { background: #dce9ff; color: var(--primary-dark); }
.tb-btn:active { transform: scale(.95); }
.tb-emoji { font-size: 28px; line-height: 28px; }
.tb-label { font-size: 14px; }
.tb-sep { width: 2px; align-self: stretch; margin: 8px 4px; background: var(--line); border-radius: 2px; }
.tb-title { max-width: 240px; min-height: 52px; padding: 0 14px; border: 0; border-radius: 14px; background: transparent; font-weight: 900; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title:hover { background: var(--sky); }
.save-status { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; height: 40px; border-radius: 99px; font-size: 14px; font-weight: 800; white-space: nowrap; }
.save-status.ok { background: #dff7e8; color: #1f8a4c; }
.save-status.busy { background: #fff3c4; color: #8a6a00; }
.save-status.warn { background: #ffe1c2; color: #a35a00; }
.save-status.err { background: #ffd9d9; color: #b8343a; }

.drawer { position: absolute; left: 0; right: 0; bottom: 0; height: 196px; z-index: 35; transform: translateY(100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(12px); border-top-left-radius: 28px; border-top-right-radius: 28px; box-shadow: 0 -8px 30px rgba(0, 0, 0, .25); }
.drawer-open .drawer { transform: none; }
.thumbs { position: relative; display: flex; gap: 16px; height: 100%; padding: 14px 24px 12px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; }
.thumb { position: relative; flex: none; width: 224px; display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: transparent; touch-action: pan-x; }
.thumb-preview { position: relative; width: 224px; height: 126px; border-radius: 14px; overflow: hidden; border: 4px solid transparent; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
.thumb.active .thumb-preview { border-color: var(--primary); }
.thumb-canvas { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform: scale(.1167); transform-origin: 0 0; }
.mini-top { position: absolute; left: 0; right: 0; top: 0; height: 168px; background: rgba(255, 255, 255, .85); border-radius: 0 0 36px 36px; }
.mini-w { position: absolute; display: grid; place-items: center; font-size: 150px; background: rgba(255, 255, 255, .92); border: 6px solid #b9cfee; border-radius: 40px; }
.mini-w.master { border-style: dashed; border-color: #e0b84a; }
.thumb-draw { position: absolute; inset: 0; width: 100%; height: 100%; }
.thumb-label { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; max-width: 224px; }
.thumb-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; flex: none; }
.thumb-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-actions { position: absolute; right: 6px; top: 6px; display: none; gap: 2px; padding: 2px; border-radius: 14px; background: rgba(255, 255, 255, .95); box-shadow: var(--shadow); }
.thumb.active .thumb-actions { display: flex; }
.thumb-actions .wbtn { width: 38px; height: 38px; }
.thumb.dragging { opacity: .85; z-index: 5; transition: none; }
.thumb.dragging .thumb-preview { box-shadow: 0 12px 28px rgba(0, 0, 0, .4); }
.drop-marker { position: absolute; top: 14px; width: 6px; height: 126px; border-radius: 3px; background: var(--primary); z-index: 6; pointer-events: none; }
.thumb-add { width: 140px; height: 126px; justify-content: center; align-items: center; border: 3px dashed #9cc4f5; border-radius: 16px; color: var(--primary-dark); font-weight: 800; gap: 4px; background: #f2f8ff; }

.dock { position: absolute; left: 14px; bottom: 112px; z-index: 39; width: min(720px, calc(100% - 28px)); padding: 14px 16px 16px; border-radius: 28px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(.97); opacity: 0; pointer-events: none; transition: .18s; transform-origin: bottom left; }
.drawer-open .dock { bottom: 304px; }
.dock.open { transform: none; opacity: 1; pointer-events: auto; }
.dock-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 8px; font-size: 20px; }
.dock-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dock-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border: 2px solid var(--line); border-radius: 20px; background: #fff; text-align: center; touch-action: manipulation; transition: transform .12s, border-color .15s; }
.dock-card:hover { border-color: var(--primary); }
.dock-card:active { transform: scale(.95); }
.dock-emoji { font-size: 42px; line-height: 1.1; }
.dock-label { font-weight: 800; font-size: 16px; }
.dock-desc { font-size: 13px; color: var(--ink-soft); font-weight: 600; line-height: 1.25; }

/* ------------------------------------------------------------------ Responsive */
@media (max-width: 900px) {
  .dash-body { grid-template-columns: 1fr; padding: 16px; }
  .rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .class-mgr { grid-template-columns: 1fr; }
  .tb-label { display: none; }
  .tb-btn { min-width: 56px; }
  .dock-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------------ Widgets (Teil 1) */
.w-seg-row { display: flex; gap: 6px; padding: 5px; border-radius: 18px; background: #e8f0fc; align-self: center; }
.w-seg { min-height: 46px; padding: 0 16px; border: 0; border-radius: 14px; background: transparent; font-weight: 800; font-size: 18px; color: var(--ink-soft); touch-action: manipulation; white-space: nowrap; }
.w-seg.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(43, 58, 85, .18); }
.w-btn { min-height: 64px; padding: 0 20px; border: 0; border-radius: 20px; background: #fff; font-weight: 900; font-size: 24px; color: var(--ink);
  box-shadow: 0 3px 0 #c9d6ea, 0 6px 12px rgba(43, 58, 85, .12); touch-action: manipulation; transition: transform .1s; }
.w-btn:active { transform: translateY(2px); box-shadow: none; }
.w-btn.active { background: #dce9ff; }
.w-btn-go { background: #2ebd6b; color: #fff; box-shadow: 0 3px 0 #1f8f50, 0 6px 12px rgba(46, 189, 107, .35); }
.w-btn-go.running { background: #ff9f1c; box-shadow: 0 3px 0 #c77600, 0 6px 12px rgba(255, 159, 28, .35); }
.w-btn-small { min-height: 48px; font-size: 18px; padding: 0 16px; border-radius: 16px; }

/* Timer */
.w-timer { height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 12px; }
.w-timer-dial { position: relative; flex: 1; min-height: 0; container-type: size; display: grid; place-items: center; }
.w-timer-svgwrap { width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); }
.w-timer-svg { width: 100%; height: 100%; display: block; touch-action: none; filter: drop-shadow(0 4px 8px rgba(43, 58, 85, .2)); }
.w-timer-svgwrap { touch-action: none; }
.w-timer-svgwrap.settable { cursor: pointer; }
.w-timer-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.w-timer-digits { font-size: min(17cqw, 17cqh); font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1; }
.w-timer-sub { min-height: 1.2em; font-size: min(5.6cqw, 5.6cqh); font-weight: 800; color: var(--ink-soft); }
.w-timer-row { display: grid; grid-template-columns: 1fr 1fr 2fr 64px; gap: 8px; }
.w-timer-row .w-btn { padding: 0 6px; }
.w-timer.ringing .w-timer-dial { animation: ring .45s ease-in-out infinite; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }

/* Tafel-Text */
.w-text { height: 100%; display: flex; flex-direction: column; }
.w-text-bar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 8px 10px; background: #f3f7fe; border-bottom: 2px solid #e1eaf8; }
.w-tb { min-width: 46px; height: 48px; padding: 0 8px; border: 2px solid #d5e1f4; border-radius: 14px; background: #fff; font-size: 24px; touch-action: manipulation; color: var(--ink); }
.w-tb:active { transform: scale(.94); }
.w-tb-text { font-weight: 900; font-size: 22px; }
.w-tb-bold { font-family: Georgia, serif; font-size: 26px; }
.w-tb-dot { width: 38px; min-width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #cdd9ee; }
.w-tb-mark { width: 44px; min-width: 44px; font-size: 22px; padding: 0; }
.w-tb-sep { width: 2px; height: 32px; background: #d5e1f4; margin: 0 3px; }
.w-text-ed { flex: 1; min-height: 0; overflow: auto; padding: 14px 24px 20px; outline: none; line-height: 1.3; user-select: text; -webkit-user-select: text; cursor: text; touch-action: pan-y; }
.w-text-ed h1 { font-size: 1.35em; margin: 0 0 .25em; } .w-text-ed h2 { font-size: 1.15em; margin: 0 0 .25em; } .w-text-ed p { margin: .25em 0; } .w-text-ed ul, .w-text-ed ol { margin: .3em 0; padding-left: 1.5em; }
.w-text-ed li { margin: .15em 0; }
.w-text-ed ul.ls-star { list-style-type: "⭐ "; } .w-text-ed ul.ls-check { list-style-type: "✔️ "; } .w-text-ed ul.ls-heart { list-style-type: "❤️ "; } .w-text-ed ul.ls-arrow { list-style-type: "👉 "; }
.board.locked .w-text-bar { display: none; }

/* Sozialformen */
.w-soz { height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.w-soz-big { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 26px; text-align: center; container-type: size; touch-action: manipulation; }
.w-soz-face { font-size: min(24cqh, 20cqw); line-height: 1.1; letter-spacing: -.05em; }
.w-soz-label { font-size: min(11cqh, 9cqw); font-weight: 900; line-height: 1.1; }
.w-soz-sub { font-size: min(6.5cqh, 5cqw); font-weight: 700; color: var(--ink-soft); }
.w-soz-face.face-gruppe, .w-soz-face.face-kreis { font-size: min(20cqh, 16cqw); }
.w-soz-chips { flex: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.w-soz-chip { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 2px; min-height: 66px; border: 3px solid transparent; border-radius: 16px; background: #eef3fb; touch-action: manipulation; }
.w-soz-chip.active { border-color: var(--primary); background: #fff; }
.w-soz-chip-face { font-size: 28px; line-height: 1.1; }
.w-soz-chip-label { font-size: 12px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Lärmampel */
.w-laerm { height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.w-laerm .w-seg { min-height: 38px; font-size: 16px; padding: 0 12px; }
.w-lamp { --d: min(29cqh, 80cqw); width: var(--d); height: var(--d); flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; filter: saturate(.3) brightness(.45); transition: filter .25s, box-shadow .25s, transform .2s; touch-action: manipulation; box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .35); }
.w-lamp.lamp-red { background: radial-gradient(circle at 35% 30%, #ff9a9a, #e5242b 65%); }
.w-lamp.lamp-yellow { background: radial-gradient(circle at 35% 30%, #fff0a0, #f4b400 65%); }
.w-lamp.lamp-green { background: radial-gradient(circle at 35% 30%, #b5f5c1, #22b25a 65%); }
.w-lamp.on { filter: none; transform: scale(1.04); }
.w-lamp.lamp-red.on { box-shadow: 0 0 40px 12px rgba(255, 70, 70, .7), inset 0 -6px 12px rgba(0, 0, 0, .25); }
.w-lamp.lamp-yellow.on { box-shadow: 0 0 40px 12px rgba(255, 200, 40, .7), inset 0 -6px 12px rgba(0, 0, 0, .2); }
.w-lamp.lamp-green.on { box-shadow: 0 0 40px 12px rgba(60, 220, 120, .65), inset 0 -6px 12px rgba(0, 0, 0, .2); }
.w-lamp-face { font-size: 13cqh; opacity: 0; transition: opacity .2s; line-height: 1; }
.w-lamp.on .w-lamp-face { opacity: 1; }
.w-lamp.readonly { cursor: default; }
.w-live { display: none; flex-direction: column; gap: 2px; }
.w-laerm.is-live .w-live { display: flex; }
.w-live-label { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.w-ampel-status { font-size: 15px; color: #1f8a4c; }
.w-slider { width: 100%; height: 34px; margin: 0; accent-color: var(--primary); touch-action: pan-y; }
.w-meter { position: relative; height: 16px; border-radius: 11px; background: #e3ebf7; overflow: hidden; }
.w-meter-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #2ebd6b, #f4b400 60%, #e5242b); transition: width .06s linear; }
.w-meter-mark { position: absolute; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: rgba(43, 58, 85, .8); }

/* Sternchentafel */
.w-stars { position: relative; height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 12px; overflow: hidden; }
.w-stars-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.w-stars-title { border: 0; background: transparent; font-size: 28px; font-weight: 900; color: var(--ink); text-align: left; min-height: 48px; padding: 0 4px; touch-action: manipulation; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-seg-inline .w-seg { min-height: 42px; font-size: 16px; padding: 0 12px; }
.w-gear { font-size: 22px; }
.w-chest-row { display: flex; align-items: center; gap: 12px; }
.w-chest { width: 112px; flex: none; }
.w-chest-svg { width: 100%; display: block; overflow: visible; }
.chest-lid { transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.chest-coins { transition: opacity .4s; }
.w-prog-col { flex: 1; min-width: 0; }
.w-prog-label { font-size: 20px; font-weight: 800; color: var(--ink-soft); margin-bottom: 4px; }
.w-prog-label b { font-size: 28px; color: var(--ink); }
.w-prog { height: 34px; border-radius: 17px; background: #e8eef8; box-shadow: inset 0 3px 6px rgba(43, 58, 85, .18); overflow: hidden; }
.w-prog-fill { position: relative; height: 100%; width: 0; border-radius: 17px; background: linear-gradient(180deg, #ffe27a, #f4b400); transition: width .6s cubic-bezier(.3, 1.2, .5, 1); overflow: hidden; }
.w-prog-shine { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%); animation: shine 2.6s linear infinite; }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.w-stars-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.w-stars-body.mode-class { flex-direction: row; align-items: stretch; }
.w-star-big { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 26px; background: linear-gradient(160deg, #fff6c9, #ffe27a); font-weight: 900; font-size: 24px; color: #8a6a00; box-shadow: 0 5px 0 #e0b83a, 0 10px 18px rgba(244, 180, 0, .3); touch-action: manipulation; transition: transform .1s; }
.w-star-big:active { transform: translateY(3px) scale(.98); box-shadow: 0 2px 0 #e0b83a; }
.w-star-big-icon { font-size: 76px; line-height: 1; }
.w-minus { align-self: flex-end; min-width: 84px; }
.w-kid-tools { display: flex; justify-content: flex-end; }
.w-kid-tools .active { background: #ffd9d9; }
.w-kids { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); grid-auto-rows: 74px; gap: 8px; align-content: start; padding: 2px; touch-action: pan-y; }
.w-kid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; border: 2px solid #e1eaf8; border-radius: 16px; background: #f6f9ff; padding: 2px 6px; touch-action: pan-y; }
.w-kid:active { transform: scale(.95); }
.w-kid.has { background: #fff8dc; border-color: #f4d35e; }
.w-kid.minus { border-color: #ffb3b3; background: #fff2f2; }
.w-kid-name { max-width: 100%; font-weight: 900; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-kid-stars { font-size: 17px; line-height: 1.2; }
.w-empty { margin: auto; text-align: center; color: var(--ink-soft); font-weight: 700; display: grid; gap: 10px; }
.w-banner { display: none; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 16px; background: #fff3bf; font-weight: 900; font-size: 20px; color: #8a6a00; }
.w-sparkles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.w-float-star { position: absolute; font-size: 44px; transform: translate(-50%, 0); animation: floatup 1.1s ease-out forwards; }
@keyframes floatup { from { opacity: 1; transform: translate(-50%, 0) scale(.6); } to { opacity: 0; transform: translate(-50%, -110px) scale(1.5); } }
.w-confetti { position: absolute; top: -40px; animation: fall 2.2s ease-in forwards; }
@keyframes fall { to { transform: translateY(560px) rotate(360deg); opacity: .9; } }
.w-settings { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(255, 255, 255, .92); backdrop-filter: blur(4px); }
.w-settings-card { width: min(520px, 92%); max-height: 96%; overflow: auto; display: grid; gap: 10px; }
.w-settings-card h3 { font-size: 24px; }
.w-field > span { display: block; font-weight: 800; font-size: 15px; color: var(--ink-soft); margin-bottom: 4px; }
.w-input { width: 100%; min-height: 52px; padding: 6px 14px; border: 2px solid var(--line); border-radius: 14px; font-size: 20px; background: #fff; }
.w-input-num { text-align: center; font-weight: 900; }
.w-stepper { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; }
.w-stepper .w-btn { padding: 0; min-height: 52px; }
.w-settings-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }

.toolbar.collapsed { padding: 0; border-radius: 50%; width: 68px; height: 68px; background: rgba(255, 255, 255, .9); }
.tb-handle { display: grid; place-items: center; width: 68px; height: 68px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); touch-action: manipulation; }


/* ------------------------------------------------------------------ Widgets (Teil 2) */
.w-chip { min-height: 46px; padding: 0 14px; border: 2px solid #d5e1f4; border-radius: 14px; background: #fff; font-weight: 800; font-size: 16px; touch-action: manipulation; }
.w-chip.on { background: #dff7e8; border-color: #8fd9ab; color: #1f8a4c; }

/* Namenszieher */
.w-slot { height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; }
.w-slot-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.w-slot-class { flex: 1; min-height: 46px; font-size: 16px; }
.w-slot-machine { flex: 1; min-height: 0; padding: 10px; border-radius: 26px; background: linear-gradient(180deg, #ffd45e, #f0a500); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), 0 6px 0 #c47f00; }
.w-slot-window { position: relative; height: 100%; container-type: size; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: inset 0 6px 14px rgba(0, 0, 0, .25); }
.w-slot-window::before, .w-slot-window::after { content: ""; position: absolute; left: 0; right: 0; height: 22%; z-index: 2; pointer-events: none; }
.w-slot-window::before { top: 0; background: linear-gradient(#0000002e, transparent); }
.w-slot-window::after { bottom: 0; background: linear-gradient(transparent, #0000002e); }
.w-slot-strip { will-change: transform; }
.w-slot-item { height: 100cqh; display: grid; place-items: center; text-align: center; padding: 0 12px; }
.w-slot-item span { font-weight: 900; line-height: 1; white-space: nowrap; }
.w-slot-window.won { animation: won .6s ease-out; }
@keyframes won { 0% { box-shadow: inset 0 0 0 0 #ffe27a; } 40% { box-shadow: inset 0 0 0 14px #ffe27a; } 100% { box-shadow: inset 0 6px 14px rgba(0, 0, 0, .25); } }
.w-slot-go { min-height: 70px; font-size: 28px; }
.w-slot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.w-drawn { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; max-height: 56px; overflow: hidden; }
.w-drawn-label { font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.w-drawn-chip { padding: 2px 10px; border-radius: 99px; background: #eef3fb; font-size: 14px; font-weight: 800; }

/* Würfel */
.w-dice-wrap { height: 100%; display: flex; flex-direction: column; padding: 8px 12px 12px; gap: 6px; }
.w-dice-area { flex: 1; min-height: 0; display: grid; place-items: center; }
.w-dice { --s: 120px; display: flex; gap: calc(var(--s) * .35); perspective: calc(var(--s) * 6); }
.w-die { width: var(--s); height: var(--s); padding: 0; border: 0; background: transparent; touch-action: manipulation; }
.w-cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.w-face { position: absolute; inset: 0; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 14%; border-radius: 20%; background: linear-gradient(145deg, #fff, #eef1f7); box-shadow: inset 0 0 0 2px #d4dbe8, inset 0 -6px 12px rgba(0, 0, 0, .08); }
.w-face.f1 { transform: translateZ(calc(var(--s) / 2)); }
.w-face.f6 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.w-face.f2 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.w-face.f5 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.w-face.f3 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.w-face.f4 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.w-pip { place-self: center; width: 78%; aspect-ratio: 1; border-radius: 50%; background: transparent; }
.w-pip.on { background: radial-gradient(circle at 35% 30%, #4a5670, #1d2638); }
.w-pip.on.red { background: radial-gradient(circle at 35% 30%, #ff8a8a, #d62b2b); }
.w-dice-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.w-dice-sum { font-size: 28px; font-weight: 900; min-width: 130px; text-align: center; }
.w-dice-roll { flex: 1; min-width: 170px; }

/* Arbeitsblatt */
.w-img { position: relative; height: 100%; background: #fff; }
.w-img.dragover { outline: 5px dashed var(--primary); outline-offset: -8px; }
.w-img-pic { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.w-img-tools { position: absolute; right: 8px; top: 8px; display: flex; gap: 6px; opacity: .85; }
.board.locked .w-img-tools { display: none; }
.w-img-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 16px; color: var(--ink-soft); }
.w-img-empty p { margin: 0; font-weight: 700; }
.w-img-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.w-img-btns .w-btn { min-height: 56px; font-size: 20px; }
.w-spinner { width: 54px; height: 54px; border: 6px solid #dbe6f5; border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.w-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.w-lib-item { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 2px solid var(--line); border-radius: 18px; background: #fff; cursor: pointer; font-weight: 800; font-size: 14px; }
.w-lib-item:hover { border-color: var(--primary); }
.w-lib-item img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; }
.w-lib-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-lib-del { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .92); color: #c4383d; }

/* Zeichen-Layer */
.layer-draw.pen-active, .layer-draw.pen-active > canvas { pointer-events: auto; }
.draw-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.pen-palette { position: absolute; right: 14px; bottom: 14px; z-index: 45; display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: calc(100% - 28px); padding: 8px 10px; border-radius: 28px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); box-shadow: var(--shadow-lg); }
.pen-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 72px; height: 68px; padding: 0 8px; border: 0; border-radius: 18px; background: transparent; font-weight: 800; touch-action: manipulation; color: var(--ink); }
.pen-btn span { font-size: 28px; line-height: 1.1; }
.pen-btn small { font-size: 13px; }
.pen-btn.active { background: #dce9ff; }
.pen-btn:disabled { opacity: .35; }
.pen-done { background: #2ebd6b; color: #fff; }
.pen-sep { width: 2px; height: 44px; background: var(--line); margin: 0 2px; }
.pen-colors, .pen-sizes { display: flex; gap: 6px; }
.pen-color { width: 50px; height: 50px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #c9d6ea; touch-action: manipulation; }
.pen-color.active { box-shadow: 0 0 0 4px var(--primary); transform: scale(1.1); }
.pen-palette.no-color .pen-color { opacity: .4; }
.pen-size { width: 52px; height: 52px; display: grid; place-items: center; border: 0; border-radius: 16px; background: transparent; touch-action: manipulation; }
.pen-size i { display: block; border-radius: 50%; background: var(--ink); }
.pen-size.active { background: #dce9ff; }
.pen-on .nav-arrow { opacity: .35; }

/* Hintergrund-Manager */
.bg-scope { margin: 0 0 16px; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.bg-tile { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 3px solid var(--line); border-radius: 22px; background: #fff; text-align: left; touch-action: manipulation; }
.bg-tile.active { border-color: var(--primary); background: #eef4ff; box-shadow: 0 0 0 4px rgba(61, 123, 255, .18); }
.bg-tile strong { font-size: 18px; }
.bg-tile small { color: var(--ink-soft); font-weight: 700; }
.bg-preview { height: 120px; border-radius: 14px; display: grid; place-items: center; font-size: 44px; border: 1px solid rgba(0, 0, 0, .08); }
.bg-preview[data-bg="grid"] { background-size: 26px 26px, 26px 26px, auto; }
.bg-preview[data-bg="lines"] { background: repeating-linear-gradient(180deg, #a9c4e4 0 1px, #fffdf6 1px 22px, #a9c4e4 22px 23px, #fff2bf 23px 44px, #5f86b8 44px 46px, #fffdf6 46px 68px, #a9c4e4 68px 69px, #fffdf6 69px 100px) 0 8px / 100% 100px; }

/* Ebenen-Reihenfolge der Bühne: Hintergrund < Folien-Widgets < Zeichnung < Master-Widgets < Top-Bar */
.stage-bg { z-index: 0; }
.layer-slide { z-index: 1; }
.layer-draw { z-index: 2; }
.layer-master { z-index: 3; }

/* Lärmampel: immer senkrecht – Gehäuse zentriert, Lampen passen sich der Höhe an */
.w-ampel { flex: 1; min-height: 64px; container-type: size; display: grid; place-items: center; }
.w-lamps { width: min(100cqw, 38cqh); height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly;
  padding: 2cqh 0; border-radius: min(14cqw, 9cqh); background: linear-gradient(160deg, #3f4b61, #212a3a);
  box-shadow: inset 0 3px 8px rgba(255, 255, 255, .16), inset 0 -6px 14px rgba(0, 0, 0, .3), 0 6px 14px rgba(0, 0, 0, .28); }
.w-laerm { overflow: hidden; }

/* Mappenfarben: im Ordner-Menü links, auf Karten und im Editor sofort erkennbar */
.rail-item { border-left: 14px solid var(--c); background: color-mix(in srgb, var(--c) 16%, #fff); }
.rail-item:hover { background: color-mix(in srgb, var(--c) 28%, #fff); }
.rail-item.active { background: color-mix(in srgb, var(--c) 34%, #fff); border-color: var(--c); box-shadow: var(--shadow); }
.emoji { display: inline-block; line-height: 1; }
.emoji-flag svg { display: inline-block; width: 1.45em; height: .78em; vertical-align: -.1em; border-radius: .12em; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); }
.swatch.emoji { display: inline-grid; place-items: center; }
.color-label { display: block; margin-top: 4px; font-weight: 800; color: var(--ink-soft); }
.card-folder { display: inline-flex; align-items: center; gap: 2px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.rail-item[style*="--c"] .rail-label { font-size: 19px; }

/* Mappen-Tab in der Top-Bar */
.subject-tab { position: relative; flex: none; width: 176px; margin: 12px 0 8px; padding: 12px 10px 8px; border-radius: 6px 22px 22px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; text-align: center;
  background: var(--c); box-shadow: 0 5px 0 rgba(0, 0, 0, .18), 0 8px 16px rgba(20, 40, 80, .25); border: 4px solid rgba(255, 255, 255, .55); }
.subject-tab::before { content: ""; position: absolute; left: -4px; top: -16px; width: 74px; height: 18px; border-radius: 10px 10px 0 0; background: var(--c); border: 4px solid rgba(255, 255, 255, .55); border-bottom: 0; }
.subject-emoji { font-size: 44px; line-height: 1.1; }
.subject-name { font-size: 24px; font-weight: 900; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subject-color { font-size: 17px; font-weight: 800; opacity: .92; }

/* Adventskalender */
.w-adv { position: relative; height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 10px 14px 14px; overflow: hidden; color: #fff;
  background: radial-gradient(circle at 20% 0, #2f7a4d, transparent 60%), linear-gradient(170deg, #14532d, #0b3a22 70%); }
.w-adv-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.w-adv-title { font-size: 30px; font-weight: 900; white-space: nowrap; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.w-adv-info { flex: 1; text-align: right; font-size: 17px; font-weight: 800; color: #d9f3df; }
.w-adv .w-gear { background: rgba(255, 255, 255, .92); }
.w-adv-grid { position: relative; z-index: 2; flex: 1; min-height: 0; container-type: size; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, 1fr); gap: 1.6cqh; }
.w-door { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 14px; background: linear-gradient(160deg, var(--dc), color-mix(in srgb, var(--dc) 70%, #000));
  box-shadow: inset 0 0 0 3px rgba(255, 215, 120, .85), 0 4px 0 rgba(0, 0, 0, .3); touch-action: manipulation; transition: transform .12s, filter .2s; color: #ffe9a8; overflow: hidden; }
.w-door:active:not(.locked) { transform: scale(.95); }
.w-door-n { font-size: min(9cqh, 5.6cqw); font-weight: 900; line-height: 1; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.w-door-n.small { position: absolute; left: 6px; top: 3px; font-size: min(4cqh, 2.4cqw); opacity: .8; }
.w-door-bow, .w-door-lock { font-size: min(4.4cqh, 2.6cqw); line-height: 1.1; }
.w-door.locked { filter: saturate(.55) brightness(.78); }
.w-door.today { animation: todaypulse 1.6s ease-in-out infinite; box-shadow: inset 0 0 0 4px #fff3b0, 0 0 22px 6px rgba(255, 225, 120, .75), 0 4px 0 rgba(0, 0, 0, .3); }
@keyframes todaypulse { 50% { transform: scale(1.06); } }
.w-door.open { background: linear-gradient(160deg, #fffbe8, #ffeeb0); color: #5a3a00; box-shadow: inset 0 0 0 3px #f4c542, 0 3px 0 rgba(0, 0, 0, .25); }
.w-door-name { font-weight: 900; font-size: min(4.6cqh, 2.7cqw); line-height: 1.05; text-align: center; padding: 0 4px; max-width: 100%; overflow-wrap: anywhere; }
.w-door-star { font-size: min(3.6cqh, 2.2cqw); }
.w-adv-snow { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.w-adv-snow i { position: absolute; top: -30px; font-style: normal; color: rgba(255, 255, 255, .55); animation: snowfall linear infinite; }
@keyframes snowfall { to { transform: translateY(700px) rotate(180deg); } }
.w-adv-reveal { position: absolute; inset: 0; z-index: 6; display: none; place-items: center; background: rgba(6, 40, 22, .86); backdrop-filter: blur(3px); }
.w-adv-reveal.show { display: grid; animation: fadein .2s; }
.w-adv-card { display: grid; justify-items: center; gap: 10px; padding: 24px 40px; max-width: 92%; text-align: center; border-radius: 30px; background: linear-gradient(160deg, #fffbe8, #ffeeb0); color: #5a3a00; box-shadow: 0 0 0 5px #f4c542, 0 18px 50px rgba(0, 0, 0, .5); }
.w-adv-day { font-size: 26px; font-weight: 900; color: #b03a2e; }
.w-adv-name { min-height: 1.2em; font-size: 70px; font-weight: 900; line-height: 1.1; max-width: 100%; overflow-wrap: anywhere; }
.w-adv-name.done { animation: won .6s ease-out, bounce .5s ease-out; color: #1e8449; }
@keyframes bounce { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.w-adv-sub { font-size: 24px; font-weight: 800; }
.w-adv-reveal .w-confetti { position: absolute; top: -40px; }

/* ------------------------------------------------------------------ Textfeld (kein Fenster) */
.wtype-text { background: transparent; box-shadow: none; border: 3px dashed transparent; border-radius: 14px; }
.wtype-text:hover { border-color: rgba(61, 123, 255, .35); }
.wtype-text.selected { border-color: var(--primary); box-shadow: none; }
.wtype-text .wbody { overflow: visible; border-radius: 12px; }
.wtype-text .w-text { position: relative; height: 100%; }
.wtype-text .w-text-card { background: rgba(255, 255, 255, .94); border-radius: 12px; box-shadow: 0 6px 20px rgba(20, 40, 80, .2); }
.wtype-text .w-text-ed { padding: 6px 12px; border-radius: 12px; }
.stage[data-bg="chalkboard"] .wtype-text .w-text:not(.w-text-card) .w-text-ed, .stage[data-bg="navy"] .wtype-text .w-text:not(.w-text-card) .w-text-ed { color: #fff; }
.stage[data-bg="chalkboard"] .wtype-text .w-text:not(.w-text-card) .w-text-ed { text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.wtype-text .wbar { position: absolute; left: 0; top: -62px; z-index: 6; width: max(100%, 330px); height: 52px; border-radius: 18px; box-shadow: 0 6px 18px rgba(20, 40, 80, .3); border: 2px solid #fff; }
.wtype-text:not(.selected) .wbar { display: none; }
.wtype-text .w-tb-title, .wtype-text .wtitle { font-size: 17px; }
.wtype-text.bar-below .wbar { top: auto; bottom: -62px; }
.wtype-text .w-text-bar { position: absolute; left: 0; top: calc(100% + 10px); z-index: 5; display: none; width: max-content; max-width: 940px; border-radius: 18px; border: 2px solid #fff; box-shadow: 0 8px 22px rgba(20, 40, 80, .3); }
.wtype-text.selected .w-text-bar { display: flex; }
.wtype-text.bar-below .w-text-bar { top: calc(100% + 72px); }
.wtype-text.tb-above .w-text-bar { top: auto; bottom: calc(100% + 72px); }
.wtype-text.tb-above.bar-below .w-text-bar { bottom: calc(100% + 10px); }
.wtype-text .wresize { right: -14px; bottom: -14px; background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); width: 40px; height: 40px; }
.board.locked .wtype-text { border-color: transparent; }
.board.locked .wtype-text .w-text-bar { display: none; }

/* Datei-Dialog */
.file-sec { margin-top: 14px; padding-top: 12px; border-top: 2px dashed var(--line); }
.file-sec h3 { font-size: 19px; margin-bottom: 4px; }
.file-sec .modal-hint { margin: 0 0 8px; }
.file-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.file-btn { flex: 1; min-width: 190px; }
.dash-bar-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* PDF / Drucken: je Folie eine Seite (ohne Kopfzeile), Hintergründe werden mitgedruckt */
#print-root { display: none; }
@media print {
  @page { size: 1280px 608px; margin: 0; }
  html, body { height: auto !important; background: #fff !important; overflow: visible !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
  .print-page { position: relative; width: 1280px; height: 608px; overflow: hidden; break-after: page; page-break-after: always; }
  #print-root .print-stage { position: absolute; left: 0; top: -168px; width: 1920px; height: 1080px; transform: none; zoom: .66667; box-shadow: none; border-radius: 0; }
  #print-root .wbar, #print-root .wresize, #print-root .w-text-bar { display: none !important; }
  #print-root .wtype-text { border-color: transparent !important; }
  #print-root .w-text-ed { overflow: hidden; }
}
.wtype-text.selected { z-index: 4000 !important; }

.version-tag { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; z-index: 3; font-size: 13px; font-weight: 800; color: rgba(43, 58, 85, .55); pointer-events: none; }
.version-tag.static { position: static; padding: 0 0 14px; }

/* ------------------------------------------------------------------ PDF-Betrachter & YouTube */
.w-pdf { position: relative; height: 100%; display: flex; flex-direction: column; background: #e6ecf6; outline: none; }
.w-pdf.dragover { outline: 5px dashed var(--primary); outline-offset: -8px; }
.w-pdf-view { flex: 1; min-height: 0; display: flex; overflow: auto; padding: 8px; touch-action: none; }
.w-pdf-view.zoomed { touch-action: pan-x pan-y; }
.w-pdf-canvas { margin: auto; flex: none; background: #fff; box-shadow: 0 4px 18px rgba(20, 40, 80, .3); }
.w-pdf-bar { flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; background: #fff; border-top: 2px solid #dbe6f5; flex-wrap: wrap; }
.w-pdf-btn { min-width: 56px; height: 56px; padding: 0 12px; border: 2px solid #d5e1f4; border-radius: 16px; background: #fff; font-size: 24px; font-weight: 900; color: var(--ink); touch-action: manipulation; }
.w-pdf-btn:active:not(:disabled) { transform: scale(.94); }
.w-pdf-nav { background: #dce9ff; border-color: #b9d0fb; }
.w-pdf-page { min-width: 150px; height: 56px; border: 0; background: transparent; font-size: 20px; font-weight: 900; color: var(--ink); touch-action: manipulation; }
.w-pdf-zoom { min-width: 62px; text-align: center; font-weight: 800; font-size: 16px; color: var(--ink-soft); }
.w-pdf-sep { width: 2px; height: 36px; background: var(--line); margin: 0 4px; }
.w-pdf-side, .w-pdf-exit { display: none; }
.w-pdf.is-fs { background: #1b2438; }
.w-pdf.is-fs .w-pdf-view { padding: 12px; }
.w-pdf.is-fs .w-pdf-bar { background: rgba(255, 255, 255, .95); }
.w-pdf.is-fs .w-pdf-side { position: absolute; top: 50%; z-index: 4; display: grid; place-items: center; width: 96px; height: 160px; margin-top: -100px; border: 0; background: rgba(255, 255, 255, .6); font-size: 44px; color: var(--ink); touch-action: manipulation; }
.w-pdf.is-fs .w-pdf-side.left { left: 0; border-radius: 0 40px 40px 0; }
.w-pdf.is-fs .w-pdf-side.right { right: 0; border-radius: 40px 0 0 40px; }
.w-pdf.is-fs .w-pdf-side:disabled { opacity: 0; pointer-events: none; }
.w-pdf.is-fs .w-pdf-exit { position: absolute; right: 14px; top: 14px; z-index: 5; display: block; height: 52px; padding: 0 18px; border: 0; border-radius: 16px; background: rgba(255, 255, 255, .92); font-weight: 900; font-size: 18px; touch-action: manipulation; }
.w-pdf.is-fs .w-pdf-fs, .w-pdf.is-fs .w-pdf-more { display: none; }
#print-root .w-pdf-bar, #print-root .w-pdf-side, #print-root .w-pdf-exit { display: none !important; }

.w-video { position: relative; height: 100%; background: #000; }
.w-video-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.w-video-tools { position: absolute; right: 8px; top: 8px; z-index: 2; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.w-video:hover .w-video-tools, .w-video:focus-within .w-video-tools, .wframe.selected .w-video-tools { opacity: .95; }
.w-tb-link { display: grid; place-items: center; text-decoration: none; }
.board.locked .w-video-tools { display: none; }
.w-video:has(.w-img-empty) { background: #fff; }
.w-video-form { display: flex; gap: 8px; width: min(560px, 92%); margin-top: 6px; }
.w-video-form .w-input { flex: 1; }
.w-video-print { position: relative; height: 100%; display: grid; place-items: center; background: #111; color: #fff; overflow: hidden; }
.w-video-print img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.w-video-play { position: relative; display: grid; place-items: center; width: 110px; height: 78px; border-radius: 22px; background: #f00; font-size: 44px; }
.w-video-url { position: absolute; left: 12px; right: 12px; bottom: 10px; font-size: 18px; font-weight: 800; text-shadow: 0 1px 3px #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-lib-file { align-items: center; text-align: center; }
.w-lib-icon { font-size: 56px; line-height: 1.2; }
.w-lib-pdf { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
