  /* ===== SHELL ===== */
  .shell{display:flex;flex-direction:row;flex:1;min-height:0;background:var(--color-bg);}
  .sidebar{width:240px;display:flex;flex-direction:column;background:var(--color-bg-deep);
    border-right:1px solid var(--color-border);padding:22px 14px 18px;overflow-y:auto;}
  .brand{margin-bottom:28px;padding-left:6px;flex-shrink:0;}
  .brand__title{font-size:16px;font-weight:800;color:var(--color-accent);letter-spacing:.5px;}
  .brand__subtitle{font-size:11px;font-weight:800;color:var(--color-text-muted);margin-top:2px;letter-spacing:.5px;}
  .brand-logo{display:flex;align-items:center;gap:8px;}
  .brand-logo__img{width:22px;height:22px;flex:0 0 auto;display:block;}
  /* P-264 — blinkendes BETA-Abzeichen neben dem Schriftzug + Glaskasten-Fenster (stkBetaModal).
     --color-beta steht NUR auf :root und in KEINEM Themenblock: [data-theme="dark"] setzt nur
     --t-*, die .modal-overlay-Regel nur --color-*-Namen der Palette — das Gelb bleibt damit in
     Tag UND Dunkel #E8AC48. Bewusst NICHT --color-warning: im Tagthema ist das #c4186d (Magenta). */
  :root{ --color-beta:#E8AC48; }
  .beta-badge{ background:var(--color-beta); color:#2A1C04; font-size:9px; font-weight:800; letter-spacing:.5px; padding:2px 6px; border-radius:6px; border:none; cursor:pointer; line-height:1.4; flex:0 0 auto; font-family:inherit; margin:0; height:auto; min-height:0; animation:stk-beta-blink 1.6s ease-in-out infinite; }
  @keyframes stk-beta-blink{0%,100%{opacity:1}50%{opacity:.35}}
  .beta-badge:hover{ opacity:1; animation-play-state:paused; }
  @media (prefers-reduced-motion: reduce){ .beta-badge{animation:none;} }
  /* P-264 — Unschaerfe am HINTERGRUND (backdrop-filter), nie filter auf #shell: das wuerde jede
     position:fixed-Ebene darin zerlegen. Erste background-Zeile = Rueckfall vor color-mix.
     Zwei Klassen, weil die spaeter stehende .modal-overlay-Regel sonst den Hintergrund ueberschreibt. */
  .modal-overlay.stk-bm{ background:rgba(6,8,14,.45); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); padding:24px; }
  .stk-bm__box{ position:relative; width:min(520px,94vw); margin-top:26px; padding:34px 26px 22px; border-radius:18px; border:1px solid var(--color-border-strong); box-shadow:0 30px 80px rgba(0,0,0,.45); background:var(--color-surface); background:color-mix(in srgb, var(--color-surface) 76%, transparent); backdrop-filter:blur(14px) saturate(1.1); -webkit-backdrop-filter:blur(14px) saturate(1.1); }
  .stk-bm__warn{ position:absolute; top:-26px; left:50%; transform:translateX(-50%); width:52px; height:52px; display:flex; align-items:center; justify-content:center; border-radius:16px; border:1px solid rgba(232,172,72,.60); background:rgba(232,172,72,.14); background:color-mix(in srgb, var(--color-beta) 22%, transparent); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
  .stk-bm__warn svg{ width:26px; height:26px; display:block; fill:var(--color-beta); }
  .stk-bm__title{ font-size:20px; font-weight:800; color:var(--color-beta); text-align:center; margin:4px 30px 10px; }
  .stk-bm__text{ font-size:13px; line-height:1.5; color:var(--color-text-muted); white-space:pre-line; }
  .stk-bm__row{ display:flex; gap:10px; justify-content:space-between; margin-top:22px; }
  .modal__cancel.stk-bm__report{ height:40px; border:1px solid var(--color-border-strong); border-radius:10px; }
  .stk-bm__ok{ height:40px; padding:0 18px; border:none; border-radius:10px; font-size:14px; font-weight:700; cursor:pointer; background:var(--color-primary); color:var(--color-on-primary); }
  .acct-badge{margin:0 0 20px 6px;padding:7px 10px;border-radius:9px;background:var(--color-surface);border:1px solid var(--color-border);font-size:12px;font-weight:700;color:var(--color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default;user-select:none;flex-shrink:0;}
  .acct-badge--set{color:var(--color-accent);border-color:var(--color-border-strong);}
  .acct-badge__lbl{display:block;font-size:9px;font-weight:800;letter-spacing:.6px;color:var(--color-text-muted);opacity:.7;margin-bottom:2px;}
  .acct-badge__row{display:flex;align-items:baseline;gap:8px;min-width:0;}
  .acct-badge__name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;}
  .acct-badge__btn{flex:0 0 auto;}
  .nav{display:flex;flex-direction:column;flex-shrink:0;}
  .nav-item{height:44px;margin-bottom:6px;padding:0 14px;border-radius:10px;background:transparent;
    color:var(--color-text-muted);font-size:14px;text-align:left;transition:all .12s;}
  .nav-item:hover{background:var(--color-surface);color:var(--color-text);}
  .nav-item--active{background:var(--color-primary);color:var(--color-on-primary);}
  .nav-item--active:hover{background:var(--color-primary-hover);color:var(--color-on-primary);}
  /* APP-287: red NEW badge (list + dates: STK_NEW_WIDGETS in js/verbindung/03). Small pill; --corner = top right of a card / catalog tile preview, --nav = inline after the sidebar label. */
  .stk-new{display:inline-block;box-sizing:border-box;background:var(--color-danger,#e5484d);color:#fff;font-size:10px;font-weight:800;line-height:1;letter-spacing:.06em;text-transform:uppercase;padding:4px 7px;border-radius:999px;pointer-events:none;box-shadow:0 1px 4px rgba(0,0,0,.35);}
  .stk-new--corner{position:absolute;top:8px;right:8px;z-index:5;}
  .stk-new--nav{margin-left:8px;padding:3px 6px;font-size:9px;vertical-align:middle;box-shadow:none;}
  .nav-active{display:none;flex-direction:column;align-items:flex-start;gap:3px;width:100%;text-align:left;margin:-2px 0 8px;padding:6px 14px 7px 22px;background:transparent;border:0;border-radius:9px;cursor:pointer;color:var(--color-text-muted);font-size:12px;}
  .nav-active:hover{background:var(--color-surface);color:var(--color-text);}
  .nav-active__cap{font-size:9px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;opacity:.7;}
  .nav-active__row{display:flex;align-items:center;gap:7px;max-width:100%;}
  .nav-active__dot{color:var(--color-state);font-size:9px;flex:none;}
  .nav-active__name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .nav-active--none .nav-active__dot{color:var(--color-text-muted);}
  .nav-active--none .nav-active__name{font-weight:400;}
  .nav-active__open{font-size:11px;color:var(--color-text-muted);opacity:.85;padding-left:16px;cursor:pointer;}
  .nav-active__open:hover{color:var(--color-accent);text-decoration:underline;}
  /* quick profile switcher popover (anchored to the nav pill; reuses the .pop-shell frame) */
  .nav-prof-pop{min-width:210px;padding:10px;}
  .napo-row{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;height:32px;padding:0 9px;border:0;border-radius:8px;background:transparent;color:var(--color-text);font-size:13px;text-align:left;cursor:pointer;}
  .napo-row:hover{background:var(--color-bg-deep);}
  .napo-row--on{background:var(--color-state-soft);}
  .napo-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .napo-badge{flex:none;font-size:10px;font-weight:700;color:var(--color-state);}
  .napo-empty{font-size:12px;color:var(--color-text-muted);padding:4px 9px 8px;}
  .napo-foot{margin-top:8px;padding-top:8px;border-top:1px solid var(--color-border);}
  .napo-open{width:100%;height:30px;padding:0 9px;border:0;border-radius:8px;background:transparent;color:var(--color-text-muted);font-size:12px;text-align:left;cursor:pointer;}
  .napo-open:hover{background:var(--color-bg-deep);color:var(--color-text);}
  .napo-open:disabled{opacity:.45;cursor:default;}

  /* ===== Alerts module (al-) ===== */
  .al-top{display:flex;align-items:center;gap:10px;margin:0 0 18px;flex-wrap:wrap;}
  .al-url{flex:1;min-width:280px;background:var(--color-bg-deep);border:1px solid var(--color-border);
    border-radius:8px;padding:9px 12px;color:var(--color-text-muted);font-size:12px;}
  .al-cols{display:flex;gap:20px;align-items:flex-start;}
  .al-list{width:230px;flex:0 0 230px;display:flex;flex-direction:column;gap:6px;}
  .al-detail{flex:1;min-width:0;}
  .al-li{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:10px;cursor:pointer;
    background:var(--color-surface);border:1px solid var(--color-border);transition:all .12s;}
  .al-li:hover{background:var(--color-elevated);}
  .al-li--active{background:var(--color-primary);border-color:var(--color-primary);}
  .al-li--active .al-li-sub{color:var(--color-on-primary);opacity:.8;}
  .al-li-main{flex:1;min-width:0;}
  .al-li-title{font-weight:700;font-size:14px;}
  .al-li-sub{font-size:11px;color:var(--color-text-muted);margin-top:2px;}
  /* B-05 — DER Ein/Aus-Schalter am Einzelobjekt, einmal fuer den ganzen Editor.
     Herkunft: AL2 hatte den Punkt vor einer Alerts-Zeile vom Laempchen zum Schalter gemacht
     (.al-dot / .al-dotbtn). B-05 gibt JEDEM Einzelobjekt denselben Schalter, also ist dieser
     Block ab jetzt der gemeinsame Baustein und heisst .obj-* statt .al-*; Alerts benutzt ihn
     ueber objToggleHtml() weiter wie zuvor. Es gibt genau EINE Optik und EIN Markup.
     Der negative Rand (--row) haelt den Text einer Listenzeile auf seiner alten optischen Linie. */
  .obj-dot{width:9px;height:9px;border-radius:50%;background:var(--color-border-strong);flex:0 0 9px;}
  .obj-dot--on{background:var(--color-state);}
  .obj-tgl{display:flex;align-items:center;justify-content:center;flex:0 0 22px;width:22px;height:22px;
    padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;}
  .obj-tgl--row{margin:-6px;}
  .obj-tgl:hover{background:rgba(127,127,127,.18);}
  .obj-tgl:focus-visible{outline:2px solid var(--color-primary);outline-offset:1px;}
  /* P-163/TP7: der Ein/Aus-Schalter ist ueberall der Schieberegler des Game-Control-Moduls.
     Frueher stand diese Regel INLINE im JS-String des GC-Moduls; jetzt EINE globale Regel, die
     die GC-Zeile (.gc-sw div) UND objToggleHtml() nutzen. Theme-Tokens adaptieren Dark selbst;
     die AN-Farbe ist damit --color-primary (Schieberegler-Look) statt des alten gruenen Punkts.
     padding/appearance sind Knopf-Hygiene fuer objToggleHtml (No-Op fuer das GC-<div>). */
  .gc-sw{position:relative;width:36px;height:21px;border-radius:99px;border:1px solid var(--color-border);background:var(--color-elevated);flex-shrink:0;cursor:pointer;padding:0;appearance:none;-webkit-appearance:none;}
  .gc-sw.on{background:var(--color-primary);border-color:var(--color-primary);}
  .gc-sw i{position:absolute;top:2px;left:2px;width:15px;height:15px;border-radius:50%;background:var(--color-text-muted);transition:transform .16s ease,background .16s;}
  .gc-sw.on i{transform:translateX(15px);background:#fff;}
  /* AUS muss auf den ersten Blick zu sehen sein: die Karte/Zeile wird gedimmt UND traegt ein
     "Off"-Abzeichen. Dimmung allein liest sich als "laedt noch", Abzeichen allein uebersieht man. */
  .obj-off{opacity:.55;}
  /* Das Abzeichen wird IMMER mitgerendert und allein von der Off-Klasse der Zeile/Karte
     sichtbar gemacht. Grund: mehrere Module (Sounds, A&E) tauschen beim Umschalten NUR diese
     Klasse und zeichnen die Zeile nicht neu — ein Abzeichen, das an einem zweiten Datenpfad
     haengt, waere dort erst nach dem naechsten Neuaufbau erschienen. So koennen Dimmung und
     Abzeichen nicht auseinanderlaufen, weil beide an derselben einen Klasse haengen.
     .ae-off / .snd-off / [data-off='1'] sind die modul-eigenen Namen derselben Aussage. */
  .obj-badge-off{display:none;padding:2px 7px;border-radius:6px;font-size:9.5px;font-weight:800;
    letter-spacing:.06em;text-transform:uppercase;background:var(--color-surface);
    border:1px solid var(--color-border-strong);color:var(--color-text-muted);}
  .obj-off .obj-badge-off,
  .snd-off .obj-badge-off,
  .ae-off .obj-badge-off,
  [data-off="1"] .obj-badge-off{display:inline-block;}
  .al-sep{height:1px;background:var(--color-border);margin:4px 2px;}
  .al-sec{background:var(--color-surface);border:1px solid var(--color-border);border-radius:12px;
    padding:18px 20px;margin:0 0 16px;}
  .al-sec h3{margin:0 0 14px;font-size:15px;font-weight:800;}
  .al-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 22px;}
  .al-field{display:flex;flex-direction:column;gap:5px;}
  .al-field label{font-size:12px;color:var(--color-text-muted);}
  .al-field input[type=text],.al-field input[type=number],.al-field select,.snd-sc input[type=text],.lb-inline-field select,.snd-kw,.snd-q,.snd-num input[type=number],.snd-num select{
    background:var(--color-bg-deep);border:1px solid var(--color-border);border-radius:8px;
    padding:8px 10px;color:var(--color-text);font-size:13px;}
  .al-inline{display:flex;align-items:center;gap:8px;}
  .al-check{display:flex;align-items:center;gap:8px;font-size:13px;cursor:pointer;}
  .al-texts{display:flex;flex-direction:column;gap:6px;margin:8px 0;}
  .al-text-row{display:flex;align-items:center;gap:8px;background:var(--color-bg-deep);
    border:1px solid var(--color-border);border-radius:8px;padding:7px 10px;}
  .al-text-row span{flex:1;font-size:13px;word-break:break-word;}
  .al-btn{background:var(--color-elevated);border:1px solid var(--color-border);border-radius:8px;
    padding:7px 13px;font-size:13px;font-weight:600;cursor:pointer;color:var(--color-text);}
  .al-btn:hover{background:var(--color-elevated-hover);}
  .al-btn--primary{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-on-primary);}
  .al-btn--primary:hover{background:var(--color-primary-hover);}
  .al-btn--danger{background:var(--color-danger-soft);border-color:transparent;color:var(--color-danger);}
  /* P-152/P12: der GELBE Testknopf der Ereignis-Uebersicht. Tokenpaar und Farbwerte sind aus
     .gc-ib--delay uebernommen (Game Control), damit beide Knoepfe in beiden Modi gleich aussehen:
     der Tag-Modus legt --color-warning und --color-danger auf dieselbe Magenta-Farbe, ein
     eigener Gelbton ist deshalb Pflicht. */
  .al-btn--delay{--al-delay:#8a5a00;--al-delay-soft:rgba(232,172,72,.20);
    background:var(--al-delay-soft);border-color:transparent;color:var(--al-delay);}
  :root[data-theme="dark"] .al-btn--delay{--al-delay:#E8AC48;--al-delay-soft:rgba(232,172,72,.18);}
  .al-btn--delay:disabled{opacity:.6;cursor:default;}
  .al-btn--mini{padding:5px 9px;font-size:12px;}
  /* APP-318: Sound Cutter announcement. The button keeps its normal face (background, text, size); only a 2 px red ring around it pulses until the first click (stkNewMarkSeen("soundcutter") removes the class). The ring is a box-shadow, so the button size never changes. Placed after all .al-btn rules + higher specificity so it wins (also over :hover). */
  .al-btn.stk-new-blink, .al-btn.stk-new-blink:hover{ box-shadow:0 0 0 2px var(--color-danger,#e5484d); animation:stk-new-blink 1.6s ease-in-out infinite; }
  @keyframes stk-new-blink{0%,100%{box-shadow:0 0 0 2px var(--color-danger,#e5484d)}50%{box-shadow:0 0 0 2px color-mix(in srgb,var(--color-danger,#e5484d) 40%,transparent)}}
  @media (prefers-reduced-motion: reduce){ .al-btn.stk-new-blink, .al-btn.stk-new-blink:hover{animation:none;} }
  .stk-add-btn{background:linear-gradient(135deg,var(--color-primary,#6366f1),#8b5cf6);color:#fff;border:none;border-radius:9px;padding:9px 18px;font-weight:800;font-size:13px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 14px rgba(99,102,241,.35);transition:transform .1s,box-shadow .15s,filter .15s;}
  .stk-add-btn svg{width:16px;height:16px;flex:0 0 auto;}
  .stk-add-btn:hover{filter:brightness(1.08);transform:translateY(-1px);box-shadow:0 6px 18px rgba(99,102,241,.5);}
  .stk-add-btn:active{transform:translateY(0);}
  /* #27.3/#29.1: the per-row "quick assign an action" Blitz button (Lucky Wheel prizes, Bingo
     lines) reuses this same class instead of a copied gradient, so both stay in lock-step with
     the "Add action" look. --icon is the compact square variant for a lone bolt glyph; the small
     dot on .on marks "already has an action" now that colour alone no longer carries that signal
     (the button is always the accent gradient, matching A&E). */
  .stk-add-btn--icon{width:29px;height:29px;padding:0;border-radius:7px;position:relative;flex:0 0 auto;}
  .stk-add-btn--icon svg{width:14px;height:14px;}
  .stk-add-btn--icon.on::after{content:"";position:absolute;top:2px;right:2px;width:6px;height:6px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 1.5px rgba(0,0,0,.5);}
  .al-prev{display:flex;align-items:center;justify-content:center;min-height:200px;border-radius:12px;
    background:#15151a;background-image:
      linear-gradient(45deg,#20202a 25%,transparent 25%),linear-gradient(-45deg,#20202a 25%,transparent 25%),
      linear-gradient(45deg,transparent 75%,#20202a 75%),linear-gradient(-45deg,transparent 75%,#20202a 75%);
    background-size:36px 36px;background-position:0 0,0 18px,18px -18px,-18px 0;margin-top:6px;}
  .al-prev-card{display:flex;flex-direction:column;align-items:center;gap:12px;padding:20px 26px;border-radius:16px;max-width:80%;}
  .al-prev-avatar{position:relative;width:104px;height:104px;border-radius:24px;
    background:#2a2a35 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237a7f95'><path d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-5 0-9 2.5-9 6v2h18v-2c0-3.5-4-6-9-6Z'/></svg>") center/58% no-repeat;
    border:2px solid rgba(255,255,255,.14);box-shadow:0 10px 26px rgba(0,0,0,.45);}
  .al-prev-badge{position:absolute;bottom:-8px;right:-8px;width:36px;height:36px;border-radius:12px;
    background:var(--color-surface);border:1px solid var(--color-border);display:flex;align-items:center;justify-content:center;font-size:18px;}
  .al-prev-text{text-align:center;line-height:1.25;}
  .al-rainbow{background:linear-gradient(90deg,#ff5d5d,#ffd35d,#5dff8f,#5dc8ff,#b45dff);
    -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}
  .al-fx-float{animation:al-float 2.2s ease-in-out infinite;}
  .al-fx-wave{animation:al-wave 1.6s ease-in-out infinite;}
  @keyframes al-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}
  @keyframes al-wave{0%,100%{transform:rotate(0deg)}25%{transform:rotate(-2deg)}75%{transform:rotate(2deg)}}
  .al-li-ic{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--color-text-muted);}
  .al-li-tail{display:flex;align-items:center;gap:8px;flex:0 0 auto;margin-left:8px;}
  .al-li-snd{width:30px;display:flex;justify-content:flex-end;align-items:center;color:var(--color-text-muted);font-size:12px;}
  .al-li--active .al-li-snd{color:var(--color-on-primary);opacity:.85;}
  .al-li-grp{width:34px;text-align:center;font-size:10px;font-weight:800;color:var(--color-danger);border:1px solid var(--color-danger);border-radius:6px;padding:2px 0;box-sizing:border-box;}
  .al-li--active .al-li-ic{color:var(--color-on-primary);opacity:.85;}
  .al-toolbar{position:sticky;top:0;z-index:2;display:flex;gap:8px;align-items:center;flex-wrap:wrap;background:var(--color-surface);padding:10px 0;margin-bottom:6px;}
  .al-search{flex:1;min-width:200px;background:var(--color-bg-deep);border:1px solid var(--color-border);border-radius:8px;padding:8px 12px;color:var(--color-text);font-size:13px;}
  .al-chip{padding:6px 12px;border-radius:999px;border:1px solid var(--color-border);background:var(--color-bg-deep);color:var(--color-text-muted);font-size:12px;cursor:pointer;}
  .al-chip--on{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-on-primary);}
  .al-grp{margin-bottom:10px;border:1px solid var(--color-border);border-radius:10px;overflow:hidden;}
  .al-grp-h{display:flex;align-items:center;gap:8px;padding:10px 14px;background:var(--color-elevated);cursor:pointer;font-weight:700;font-size:13px;}
  .al-grp-h .al-count{margin-left:auto;color:var(--color-text-muted);font-weight:600;}
  .al-caret{transition:transform .12s;display:inline-block;}
  .al-grp--collapsed .al-caret{transform:rotate(-90deg);}
  .al-grp--collapsed .al-arow{display:none;}
  .al-arow{display:flex;align-items:center;gap:10px;padding:9px 14px;border-top:1px solid var(--color-border);}
  .al-arow:hover{background:var(--color-elevated);}
  .al-arow-main{flex:1;min-width:0;cursor:pointer;}
  .al-arow-name{font-size:13px;font-weight:600;}
  .al-arow-sub{font-size:11px;color:var(--color-text-muted);margin-top:1px;}
  .al-empty{color:var(--color-text-muted);font-size:13px;padding:18px;text-align:center;}
  .al-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(23,19,37,.42);}
  .al-modal-card{width:440px;max-width:92vw;background:var(--color-surface);border:1px solid var(--color-border);border-radius:14px;padding:22px;box-shadow:0 16px 48px rgba(23,19,37,.22);}
  .al-modal-card h3{margin:0 0 16px;font-size:16px;font-weight:800;}
  .al-modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:18px;}
  /* P-21/1a — DER HINWEISKASTEN fuer eine Webhook-Konfiguration, die der Worker nicht
     speichern kann. Er steht zweimal: einmal fest im Alerts-Modul ueber der Buehne (bleibt,
     bis der Verstoss weg ist), einmal im Aktions-Modal ueber dem Speichern-Knopf.
     NUR gemeinsame --color-*-Tokens (dieselbe Gefahrenfarbe wie jeder andere Fehlerzustand
     des Werkzeugs), also keine eigene [data-theme]-Regel und kein neuer Zahlenwert — Dark
     bleibt byte-identisch (Begruendung an den Paletten-Kommentaren :17 und :377).
     display wird von der Anzeige inline gesetzt (none/block), damit die Sichtbarkeit ueber
     getComputedStyle messbar ist und nicht an einem [hidden] haengt. */
  .al-whwarn{display:none;margin:10px 0 0;padding:10px 12px;border-radius:8px;border:1px solid var(--color-danger);background:var(--color-danger-soft);color:var(--color-text);font-size:12.5px;line-height:1.45;}
  .wgc>.al-whwarn{flex:0 0 auto;margin:10px 22px 0;}
  .al-whwarn-h{font-weight:800;color:var(--color-danger);margin-bottom:6px;}
  .al-whwarn-l{margin:0;padding-left:18px;}
  .al-whwarn-l li{margin:3px 0;overflow-wrap:anywhere;}
  .al-whwarn-f{margin-top:6px;color:var(--color-text-muted);}
  .al-snd{display:flex;align-items:center;gap:8px;}
  .al-snd-name{font-size:12px;color:var(--color-text-muted);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .al-lay-note{font-size:12px;color:var(--color-text-muted);margin-bottom:8px;}
  .al-lay-note b{color:var(--color-text);}
  .al-lay-csz{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--color-text-muted);margin-bottom:14px;}
  .al-csz{width:88px;background:var(--color-bg-deep);border:1px solid var(--color-border);border-radius:8px;padding:6px 8px;color:var(--color-text);font-size:13px;}
  .al-lay-row{display:flex;gap:18px;align-items:flex-start;}
  .al-lay-canvas-col{flex:1;min-width:0;display:flex;justify-content:center;align-items:flex-start;background:#0e0e12;border-radius:10px;padding:14px;min-height:320px;}
  .al-lay-side{width:280px;flex:0 0 280px;}
  .al-side-grp{background:var(--color-bg-deep);border:1px solid var(--color-border);border-radius:10px;padding:12px 14px;margin-bottom:12px;}
  .al-side-h{font-weight:800;font-size:13px;margin-bottom:8px;}
  .al-side-grp .al-field{margin-bottom:8px;}
  .al-canvas{position:relative;background:#15151a;touch-action:none;user-select:none;
    background-image:linear-gradient(45deg,#20202a 25%,transparent 25%),linear-gradient(-45deg,#20202a 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#20202a 75%),linear-gradient(-45deg,transparent 75%,#20202a 75%);
    background-size:30px 30px;background-position:0 0,0 15px,15px -15px,-15px 0;}
  .al-c-box{position:absolute;box-sizing:border-box;border:1px dashed rgba(255,255,255,.28);border-radius:14px;cursor:move;}
  .al-c-avatar{position:absolute;border-radius:22%;border:2px solid rgba(255,255,255,.14);box-shadow:0 6px 18px rgba(0,0,0,.45);cursor:move;
    background:#2a2a35 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237a7f95'><path d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-5 0-9 2.5-9 6v2h18v-2c0-3.5-4-6-9-6Z'/></svg>") center/58% no-repeat;}
  .al-c-text{position:absolute;line-height:1.2;cursor:move;}
  .al-c-box.sel,.al-c-avatar.sel,.al-c-text.sel{outline:2px solid var(--color-primary);outline-offset:1px;}
  .al-handle{position:absolute;width:14px;height:14px;background:var(--color-primary);border:2px solid #fff;border-radius:3px;box-sizing:border-box;z-index:5;}
  .al-handle--br{right:-7px;bottom:-7px;cursor:nwse-resize;}
  .al-handle--r{right:-7px;top:50%;transform:translateY(-50%);cursor:ew-resize;}
  /* alerts canvas editor (overlay-grade) */
  .al-trg-head{display:flex;align-items:center;gap:14px;margin:0 0 14px;flex-wrap:wrap;}
  .al-spacer{flex:1;}
  .al-li-ic{display:inline-flex;align-items:center;gap:4px;color:var(--color-text-muted);font-size:12px;}
  .al-ic{width:14px;height:14px;display:block;}
  .al-edit{display:flex;gap:16px;height:64vh;min-height:430px;margin-top:6px;}
  /* Alerts runs on the shared wgc-* stage-and-inspector shell. Only these four rules are its own:
     the rail width, the two panes inside #al-detail, and the checker sheet the canvas sits on —
     the same 16px pair the four overview stages use, so every preview surface matches. */
  .wgc-body.al-body{grid-template-columns:236px minmax(0,1fr);grid-template-rows:minmax(0,1fr);}
  .al-rail{min-height:0;overflow-y:auto;border-right:1px solid var(--color-border);background:var(--color-bg-deep);padding:8px;}
  .al-pane{min-height:0;height:100%;}
  .al-pane--trg{display:grid;grid-template-columns:minmax(0,1fr) 372px;grid-template-rows:minmax(0,1fr);min-height:0;}
  .al-pane--acts{overflow-y:auto;padding:24px 28px;}
  .al-stage{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;border-radius:6px;overflow:hidden;touch-action:none;user-select:none;
    background-color:#20232c;
    background-image:linear-gradient(45deg,#292d38 25%,transparent 25%),linear-gradient(-45deg,#292d38 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#292d38 75%),linear-gradient(-45deg,transparent 75%,#292d38 75%);
    background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0;
    box-shadow:0 0 0 1px var(--color-border),0 10px 30px -12px rgba(0,0,0,.55);}
  .al-field{position:relative;}
  /* the three swappable blocks keep their own markup; inside an accordion body they drop the box */
  .wgc-grpb .al-side-grp{background:transparent;border:0;border-radius:0;padding:0;margin:0 0 16px;}
  .wgc-grpb .al-side-grp:last-child{margin-bottom:0;}
  .wgc-grpb .al-side-h{font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-muted);margin-bottom:7px;}
  .wgc-pill[disabled]{opacity:.45;cursor:default;}
  .al-urlpop{position:fixed;z-index:1300;width:min(620px,92vw);background:var(--color-surface);
    border:1px solid var(--color-border);border-radius:12px;padding:12px 14px;box-shadow:0 18px 44px rgba(0,0,0,.45);}
  .al-urlpop-h{font-size:11.5px;color:var(--color-text-muted);margin-bottom:8px;}
  .al-urlrow{display:flex;align-items:center;gap:8px;margin-top:6px;}
  .al-urlname{display:inline-flex;align-items:center;gap:6px;width:150px;flex:0 0 150px;white-space:nowrap;
    overflow:hidden;text-overflow:ellipsis;
    font-size:12px;font-weight:700;color:var(--color-text-muted);}
  .al-urlname--on{color:var(--color-danger);}
  .al-urlname i{width:8px;height:8px;border-radius:50%;flex:0 0 auto;}
  .al-urlrow .al-url{flex:1;min-width:0;}
  /* P-4/T2: Verbindungs-Badge an EINER OBS-URL. Nur gemeinsame Tokens, keine eigene
     Dunkel-Regel: --color-state ist im ganzen Werkzeug die Farbe fuer "live/aktiv/
     verbunden" (dieselbe wie .ae-log-live). Damit stimmen Hell und Dunkel ohne
     Zusatzregel, und Dark bleibt byte-identisch.
     P-15/T3: es gibt nur noch EINEN Zustand — verbunden. Der Null-Zustand zeichnet kein
     Element mehr, also sind die Danger-Regeln des Badges und sein Kurzform-Span ersatzlos
     entfallen; beide waren badge-exklusiv und haben keinen zweiten Nutzer. Aus demselben
     Grund traegt die Grundregel jetzt SELBST den Verbunden-Look und es gibt gar keinen
     Modifikator mehr: die frueheren gedaempften Werte (muted / border-strong) wurden
     ausnahmslos vom Verbunden-Zweig ueberschrieben und waren damit ebenfalls tot. */
  .stk-conn{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;white-space:nowrap;
    font-size:11.5px;font-weight:700;color:var(--color-state);}
  .stk-conn i{width:7px;height:7px;border-radius:50%;flex:0 0 auto;background:var(--color-state);}
  /* Leerer Anker fuer Stellen ohne Eingabefeld (Kopierknopf-Sonderfaelle). */
  .stk-connslot{display:inline-flex;align-items:center;}
  .al-side{width:300px;flex:0 0 300px;display:flex;flex-direction:column;min-height:0;}
  .al-side-h{font-weight:800;font-size:13px;margin-bottom:8px;}
  .al-tabs{display:flex;gap:6px;margin-bottom:10px;}
  .al-tab{flex:1;padding:8px 6px;border-radius:8px;border:1px solid var(--color-border);background:var(--color-bg-deep);color:var(--color-text-muted);font-size:12px;font-weight:700;cursor:pointer;min-width:0;overflow-wrap:anywhere;}
  .al-tab--on{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-on-primary);}
  .al-tabbody{flex:1;overflow:auto;padding-right:2px;}
  .al-trow{display:flex;gap:6px;align-items:flex-start;margin-bottom:8px;}
  .al-exin{flex:1;min-width:0;background:var(--color-bg-deep);border:1px solid var(--color-border);border-radius:8px;padding:8px 10px;color:var(--color-text);font-size:14px;font-family:inherit;line-height:1.35;resize:vertical;box-sizing:border-box;}
  .al-exin::placeholder{color:var(--color-text-muted);}
  .al-exin:focus{outline:none;border-color:var(--color-primary);}
  .al-tin{flex:1;min-width:0;background:var(--color-bg-deep);border:1px solid var(--color-border);border-radius:8px;padding:7px 9px;color:var(--color-text);font-size:13px;resize:vertical;font-family:inherit;}
  .al-color{width:46px;height:30px;border-radius:6px;border:1px solid var(--color-border);cursor:pointer;padding:0;flex:none;}
  .al-cpop{position:fixed;z-index:1200;background:var(--color-elevated,#1c1c24);border:1px solid var(--color-border);border-radius:10px;padding:10px;box-shadow:0 14px 34px rgba(23,19,37,.24);}
  .al-cpop-grid{display:grid;grid-template-columns:repeat(6,22px);gap:6px;}
  .al-cpop-custom{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:12px;color:var(--color-text-muted);}
  .al-el{position:absolute;box-sizing:border-box;cursor:move;}
  .al-el--box{border-radius:14px;}
  .al-el--box.ghost{background:transparent !important;border:1px dashed rgba(255,255,255,.18);}
  .al-el--avatar{border-radius:22%;border:2px solid rgba(255,255,255,.14);box-shadow:0 8px 22px rgba(0,0,0,.45);background-repeat:no-repeat;background-position:center;background-size:58%;background-color:#2a2a35;}
  .al-el--text{font-weight:800;line-height:1.2;}
  .al-el.sel{outline:1.5px dashed var(--color-primary);outline-offset:2px;}
  .al-h{position:absolute;width:12px;height:12px;background:#fff;border:1.5px solid var(--color-primary);border-radius:2px;transform:translate(-50%,-50%);z-index:6;}
  .al-h.nw,.al-h.se{cursor:nwse-resize;}.al-h.ne,.al-h.sw{cursor:nesw-resize;}.al-h.n,.al-h.s{cursor:ns-resize;}.al-h.e,.al-h.w{cursor:ew-resize;}
  .al-rl{position:absolute;left:50%;top:-26px;width:1.5px;height:26px;background:var(--color-primary);transform:translateX(-50%);pointer-events:none;z-index:6;}
  .al-rh{position:absolute;left:50%;top:-30px;width:14px;height:14px;border-radius:50%;background:#fff;border:1.5px solid var(--color-primary);transform:translate(-50%,-50%);cursor:grab;z-index:7;}
  .al-rotbadge{position:absolute;transform:translate(-50%,-50%);background:var(--color-primary);color:#fff;font-size:11px;padding:2px 6px;border-radius:5px;pointer-events:none;z-index:8;}
  .al-guide{position:absolute;background:#ff3b8d;z-index:7;pointer-events:none;}
  .al-guide.v{width:1px;top:0;bottom:0;}.al-guide.h{height:1px;left:0;right:0;}
  /* ---- sidebar groups ------------------------------------------------------
     One treatment for both label kinds. Before this, GLOBAL/ACCOUNT (.nav-section) carried a rule
     and a stronger label while STREAM/INTERACTION/GAMES (.nav-heading) had neither — three of the
     four groups were separated by nothing but 20px of air, which is why the menu read as one list.
     Geometry is identical in both themes; only the rule colour differs, see the two blocks below. */
  .nav-sep{height:1px;background:var(--color-border);margin:10px 6px 14px;}
  .nav-heading{font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;
    color:var(--color-text-muted);padding:14px 12px 0;margin:20px 0 8px;
    border-top:1px solid var(--color-border);}
  /* The rule needs its own value per theme. In dark --color-border and --color-border-strong are
     the SAME colour (#232736), so reaching for the stronger token would have changed nothing; a
     white alpha line sits on top of the panel instead of beside it, which is what makes it read. */
  :root[data-theme="day"] .nav-section,
  :root[data-theme="day"] .nav-heading{border-top-color:#a9bdcc;}
  :root[data-theme="day"] .nav-sep{background:#a9bdcc;}
  :root[data-theme="dark"] .nav-section,
  :root[data-theme="dark"] .nav-heading{border-top-color:rgba(255,255,255,.10);}
  :root[data-theme="dark"] .nav-sep{background:rgba(255,255,255,.10);}
  .sidebar__footer{flex:1;display:flex;flex-direction:column;justify-content:flex-end;}
  .theme-seg{display:flex;gap:6px;margin-bottom:8px;}
  .theme-seg__btn{font-weight:700;}
  .status{font-size:12px;padding:6px 10px;border-radius:8px;text-align:center;}
  /* "Not live" is a state, not a problem: neutral, so the attention hue keeps its meaning. */
  .status--off{background:var(--color-elevated);color:var(--color-text-muted);}
  .status--live{background:var(--color-state-soft);color:var(--color-state);font-weight:700;}
  .status__beta{display:inline-block;margin-left:6px;padding:1px 5px;border-radius:6px;font-size:9px;font-weight:700;letter-spacing:.5px;vertical-align:middle;background:rgba(255,255,255,.14);color:var(--color-text-muted,#9aa);}

  .content{flex:1;min-width:0;padding:36px 44px;overflow:auto;scrollbar-gutter:stable;}
  .view{}
  .page-title{font-size:30px;font-weight:800;margin:0 0 6px;}
  /* A count is data, not an accent: neutral chip, per the website's own MetaChip rule. */
  .ovr-count{display:inline-block;vertical-align:middle;margin-left:10px;font-size:13px;font-weight:800;padding:3px 11px;border-radius:999px;background:var(--color-elevated);color:var(--color-text);border:1px solid var(--color-border);}
  .page-subtitle{font-size:14px;color:var(--color-text-muted);margin:0 0 28px;}
  /* Widgets hub (BUG-002): rich cards with a per-widget animated preview that mirrors the real
     renderer. Own .wg-* namespace on EVERY class AND keyframe — the raw co-/hf-/fw-/fg-/cb-/wt-/lu-/ct-
     prefixes collide with the fx_ modules' own CSS. Design tokens scoped to the hub. Team Heart uses the
     real R2 art (heart1-mask.png / heart1-frame.png). */
  .wg-grid, .wg-bar{ --card:#15151d; --card-hi:#1a1a24; --brd:#23232e; --radius:18px; --ease:cubic-bezier(.22,.7,.28,1); --muted:#8a8a98; }
  /* APP-225: Widgets search field - reuses .nav-search / .nav-search__input (sidebar search look), only layout tweaks here */
  .nav-search.wg-search{margin:0 0 20px 0;max-width:360px;}
  .nav-search__input.wg-search__input{cursor:text;}
  .wg-search__clear{flex:0 0 auto;border:none;background:transparent;color:var(--color-text-muted);cursor:pointer;font-size:12px;padding:2px 4px;}
  .wg-search__clear:hover{color:var(--color-text);}
  .wg-search__clear[hidden], .wg-card[hidden], .wg-nohit[hidden]{display:none;}
  .wg-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:20px; }
  @media (max-width:900px){ .wg-grid{ grid-template-columns:repeat(2,1fr); } }
  @media (max-width:600px){ .wg-grid{ grid-template-columns:1fr; } }

  .wg-card{
    position:relative; display:block; width:100%; text-align:left; font:inherit; color:inherit;
    background:var(--card); border:1px solid var(--brd); border-radius:var(--radius);
    overflow:hidden; cursor:pointer; padding:0;
    transition:transform .22s var(--ease), border-color .22s var(--ease), background .22s var(--ease), box-shadow .22s var(--ease);
  }
  .wg-card:hover{
    transform:translateY(-4px); background:var(--card-hi);
    border-color:color-mix(in srgb, var(--tint) 55%, var(--brd));
    box-shadow:0 18px 40px -20px rgba(0,0,0,.85), 0 0 0 1px color-mix(in srgb, var(--tint) 22%, transparent), 0 12px 34px -22px var(--tint);
  }
  .wg-card:focus-visible{ outline:2px solid var(--tint); outline-offset:2px; }
  .wg-card::before{
    content:""; position:absolute; top:0; left:0; right:0; height:2px; z-index:3;
    background:linear-gradient(90deg, transparent, var(--tint), transparent); opacity:.55; transition:opacity .22s var(--ease);
  }
  .wg-card:hover::before{ opacity:1; }
  /* W1: the per-widget on/off switch (H2A) is gone — a widget is always on, the layer eye
     on the canvas is the only way to take it off screen. Its CSS block lived here. */

  .wg-prev{
    position:relative; height:150px; overflow:hidden;
    background:radial-gradient(110% 120% at 50% 0%, color-mix(in srgb, var(--tint) 18%, transparent), transparent 62%), linear-gradient(180deg, #101018, #0f0f16);
    border-bottom:1px solid var(--brd);
  }
  .wg-prev::after{
    content:""; position:absolute; inset:0; pointer-events:none; opacity:.5;
    background:linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px) 0 0/22px 22px,
              linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px) 0 0/22px 22px;
    -webkit-mask-image:radial-gradient(90% 90% at 50% 40%, #000, transparent 78%);
            mask-image:radial-gradient(90% 90% at 50% 40%, #000, transparent 78%);
  }

  .wg-body{ display:flex; gap:13px; padding:15px 17px 17px; }
  .wg-ico{
    flex:0 0 auto; width:42px; height:42px; border-radius:12px; display:grid; place-items:center; font-size:21px; line-height:1;
    background:color-mix(in srgb, var(--tint) 16%, #17171f); border:1px solid color-mix(in srgb, var(--tint) 34%, transparent);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
  }
  .wg-meta{ min-width:0; }
  .wg-name{ font-size:15px; font-weight:640; letter-spacing:-.01em; margin:2px 0 3px; }
  .wg-desc{ font-size:12.5px; color:var(--muted); line-height:1.4; }

  /* ===========================================================================
     PREVIEW SCENES — each mirrors its real renderer (motion + easing matched)
     =========================================================================== */
  .wg-sc{ position:absolute; inset:0; }
  .wg-sc svg{ display:block; }

  /* --- Chat Overlay (chatoverlay.html): bottom-anchored feed, dark bubbles (rgba(0,0,0,.34), r16),
         avatar + light-blue name (#8fd3ff, 700) INLINE in front of the white message text — the
         renderer keeps .co-name and .co-text as two spans in one .co-body line. Every size is the
         renderer's 1080-canvas value scaled to the card. Rows slide up (co-in translateY 18→0, ease). --- */
  .wg-co-feed{ position:absolute; left:0; right:0; bottom:0; padding:9px 10px; display:flex; flex-direction:column; gap:5px; }
  .wg-co-msg{ display:flex; align-items:flex-start; gap:3px; align-self:flex-start; max-width:88%;
    background:rgba(0,0,0,.34); border-radius:5px; padding:4px 6px;
    text-shadow:0 2px 6px rgba(0,0,0,.85),0 0 2px rgba(0,0,0,.9);
    animation:wg-co-cycle 5.4s var(--ease) infinite; animation-delay:var(--d); }
  /* the renderer's demoAvatarUri: a diagonal two-colour circle with the first letter, never a photo */
  .wg-co-av{ width:15px; height:15px; border-radius:50%; flex:0 0 auto; display:grid; place-items:center;
    font-size:7px; font-weight:700; color:#fff; line-height:1;
    background:linear-gradient(135deg, var(--a0,#22e0ff), var(--a1,#ff2e9a)); }
  .wg-co-tx{ min-width:0; font-size:11px; line-height:1.25; color:#fff; }
  .wg-co-nm{ color:#8fd3ff; font-weight:700; font-size:10px; margin-right:.29em; }
  @keyframes wg-co-cycle{ /* the "slide up + settle" of co-in, then a calm hold, then recede */
    0%{ opacity:0; transform:translateY(16px); } 8%{ opacity:1; transform:translateY(0); }
    82%{ opacity:1; transform:translateY(0); } 92%,100%{ opacity:.5; transform:translateY(0); } }

  /* --- Heart Fountain (heartfountain.html): multicolor EMOJI hearts rise from the
         bottom with a sine sway (--sway) + fast-in/out opacity; linear rise. --- */
  .wg-hf-h{ position:absolute; bottom:-18px; left:50%; font-size:var(--s,20px); line-height:1; opacity:0;
    animation:wg-hf-rise 3.8s linear infinite; animation-delay:var(--d); will-change:transform,opacity; }
  @keyframes wg-hf-rise{
    0%{ transform:translateX(calc(-50% + 0px)) translateY(0); opacity:0; }
    10%{ transform:translateX(calc(-50% + calc(.31 * var(--sway)))) translateY(-14px); opacity:1; }
    50%{ transform:translateX(calc(-50% + var(--sway))) translateY(-74px); opacity:1; }
    90%{ transform:translateX(calc(-50% + calc(.31 * var(--sway)))) translateY(-138px); opacity:.4; }
    100%{ transform:translateX(-50%) translateY(-160px); opacity:0; } }

  /* --- Team Heart (teamheart.html): the REAL R2 art. heart1-mask.png masks the rising red
         fill (#ff2b3c) + a wave surface (the renderer's own waveSvg) that drifts sideways;
         heart1-frame.png sits on top. Fill height animates with the renderer's easing
         (cubic-bezier(.3,.7,.3,1)) — the exact composition of #th-fillwrap/#th-fill/#th-frame. --- */
  .wg-th{ position:absolute; inset:0; }
  .wg-th-fillwrap, .wg-th-frame{ position:absolute; left:50%; top:13px; width:122px; height:110px; transform:translateX(-50%); }
  .wg-th-fillwrap{
    -webkit-mask-image:url("https://app.streamtik.dev/teamheart/heart1-mask.png");
            mask-image:url("https://app.streamtik.dev/teamheart/heart1-mask.png");
    -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; -webkit-mask-position:center; mask-position:center;
    -webkit-mask-size:contain; mask-size:contain; }
  .wg-th-fill{ position:absolute; left:0; right:0; bottom:0; height:22%; background:#ff2b3c;
    animation:wg-th-fill 5s cubic-bezier(.3,.7,.3,1) infinite; will-change:height; }
  @keyframes wg-th-fill{ 0%{ height:22%; } 46%{ height:66%; } 66%{ height:66%; } 100%{ height:22%; } }
  .wg-th-wave{ position:absolute; left:0; top:-4px; width:200%; height:9px; background-repeat:repeat-x; background-size:50% 100%;
    animation:wg-th-wave 3.2s linear infinite; }
  @keyframes wg-th-wave{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }
  .wg-th-frame{ object-fit:contain; pointer-events:none; }
  .wg-th-num{ position:absolute; bottom:9px; left:50%; transform:translateX(-50%); font-size:12px; font-weight:800; color:#fff; text-shadow:0 2px 6px rgba(0,0,0,.6); }

  /* --- Fireworks (fireworks.html fireRocket): ONE rocket rises from the bottom (ease-out cubic)
         and explodes at its OWN zenith — the renderer bursts at (startX, H − risePx), so the burst
         sits on the rocket's tip, never beside it. Phase: wg-fw-rise peaks at 40% of 2.2s and
         wg-fw-burst ignites at 38–40% of the same 2.2s cycle, so an undelayed burst fires exactly
         when the rocket arrives. Sparks are white→gold with gravity, the gift particles are the
         real TikTok rose (APP-452: the renderer's drawn FW_ICON star is gone). --- */
  .wg-fw-rock{ position:absolute; left:50%; bottom:6px; width:9px; height:9px; border-radius:50%; transform:translate(-50%,0);
    background:radial-gradient(circle,#fff 0%,#ffe1a3 48%,rgba(255,150,60,0) 74%);
    box-shadow:0 6px 12px -2px rgba(255,205,130,.9);
    animation:wg-fw-rise 2.2s cubic-bezier(.2,.72,.32,1) infinite; will-change:transform,opacity; }
  .wg-fw-rock::after{ content:""; position:absolute; left:50%; top:55%; transform:translateX(-50%);   /* the renderer's tapering exhaust trail */
    width:38%; height:26px; border-radius:45%;
    background:linear-gradient(180deg,rgba(255,205,130,.9),rgba(255,205,130,0)); }
  @keyframes wg-fw-rise{ 0%{ transform:translate(-50%,0) scale(.85); opacity:0; } 6%{ opacity:1; } 40%{ transform:translate(-50%,-72px) scale(1); opacity:1; } 41%,100%{ opacity:0; } }
  .wg-fw-b{ position:absolute; left:var(--bx,50%); top:var(--by,46px); animation-delay:var(--bd,.85s); }
  .wg-fw-spark{ position:absolute; left:0; top:0; width:7px; height:7px; border-radius:50%; transform:translate(-50%,-50%);
    background:radial-gradient(circle,#fff 0%,#ffe9b0 45%,rgba(255,180,80,0) 72%); opacity:0;
    animation:wg-fw-burst 2.2s cubic-bezier(.15,.62,.32,1) infinite; animation-delay:inherit; will-change:transform,opacity; }
  .wg-fw-star{ position:absolute; left:0; top:0; width:15px; height:15px; transform:translate(-50%,-50%); opacity:0;
    filter:drop-shadow(0 0 4px rgba(255,211,107,.8));
    animation:wg-fw-burst 2.2s cubic-bezier(.15,.62,.32,1) infinite; animation-delay:inherit; will-change:transform,opacity; }
  .wg-fw-star svg, .wg-fw-star img{ width:100%; height:100%; object-fit:contain; display:block; }
  .wg-fw-flash{ position:absolute; left:0; top:0; width:38px; height:38px; border-radius:50%; transform:translate(-50%,-50%); opacity:0;
    background:radial-gradient(circle,rgba(255,255,255,.95) 0%,rgba(255,240,200,.6) 34%,rgba(255,200,120,0) 70%);
    animation:wg-fw-flash 2.2s ease-out infinite; animation-delay:inherit; }
  @keyframes wg-fw-burst{
    0%,38%{ transform:translate(-50%,-50%) translate(0,0) scale(.25); opacity:0; }
    40%{ opacity:1; }
    52%{ transform:translate(-50%,-50%) translate(calc(var(--px)*.45), calc(var(--py)*.45)) scale(1); opacity:1; }
    82%,100%{ transform:translate(-50%,-50%) translate(var(--px), calc(var(--py) + 30px)) scale(.55); opacity:0; } }
  @keyframes wg-fw-flash{ 0%,38%{ opacity:0; transform:translate(-50%,-50%) scale(.3); } 44%{ opacity:1; transform:translate(-50%,-50%) scale(1); } 62%,100%{ opacity:0; transform:translate(-50%,-50%) scale(1.3); } }

  /* --- Falling Gifts (fallinggifts.html): the REAL standard gift — the rose from
         demo-assets/gift-rose.png, the same artwork the renderer's own demo resolves — falls
         straight down (linear) while the icon sways (rotate ±, ease-in-out alternate). --- */
  .wg-fg-drop{ position:absolute; top:-26px; width:26px; height:26px; animation:wg-fg-fall 3.6s linear infinite; animation-delay:var(--d); will-change:transform; }
  .wg-fg-drop img{ width:100%; height:100%; object-fit:contain; animation:wg-fg-sway 1.5s ease-in-out infinite alternate; }
  @keyframes wg-fg-fall{ 0%{ transform:translate(var(--x0),-26px); } 100%{ transform:translate(var(--x1),176px); } }
  @keyframes wg-fg-sway{ 0%{ transform:rotate(calc(var(--rot) * -1)); } 100%{ transform:rotate(var(--rot)); } }

  /* --- Combo (combo.html): edge-filling neon border frame (hot-pink #ff2b7a = the renderer's
         fixedColor default), static glow, opacity pulse .5↔1 (ease-in-out alternate). The gift is
         the ROSE (demo-assets/gift-rose.png, the renderer's demo gift); spawnGift() sends each icon
         IN from a random edge to a point 10–32% inside, rotating, scale .65→1, opacity in at 18%
         and out at the end (cubic-bezier(.22,.61,.36,1)). --- */
  .wg-cb-frame{ position:absolute; inset:9px; border:5px solid #ff2b7a; border-radius:12px;
    box-shadow:inset 0 0 18px 2px #ff2b7a, inset 0 0 34px #ff2b7a, 0 0 12px #ff2b7a;
    animation:wg-cb-pulse 1.15s ease-in-out infinite alternate; will-change:opacity; }
  @keyframes wg-cb-pulse{ from{ opacity:.5; } to{ opacity:1; } }
  .wg-cb-g{ position:absolute; width:18px; height:18px; opacity:0; animation:wg-cb-drift 2.4s cubic-bezier(.22,.61,.36,1) infinite; animation-delay:var(--d); }
  .wg-cb-g img{ width:100%; height:100%; object-fit:contain; }
  @keyframes wg-cb-drift{
    0%{ opacity:0; transform:translate(var(--sx),var(--sy)) rotate(var(--r0)) scale(.65); }
    18%{ opacity:1; } 72%{ opacity:1; }
    100%{ opacity:0; transform:translate(var(--ex),var(--ey)) rotate(var(--r1)) scale(1); } }

  /* --- Win Tracker (wintracker.html): a single neon score/target block —
         label + big "score / target", cyan (#19f0ff) glow; number pops on change. --- */
  .wg-wt-wrap{ position:absolute; inset:0; display:grid; place-items:center; }
  .wg-wt-box{ text-align:center; padding:10px 20px; border-radius:12px; background:rgba(18,18,26,.72);
    border:1.5px solid #19f0ff; box-shadow:0 0 8px #19f0ff, 0 0 22px rgba(25,240,255,.5), inset 0 0 10px rgba(255,255,255,.05); }
  .wg-wt-label{ font-size:9px; font-weight:800; letter-spacing:.16em; text-transform:uppercase; color:#fff; opacity:.9; margin-bottom:3px; text-shadow:0 0 6px #19f0ff; }
  .wg-wt-score{ font-size:30px; font-weight:900; color:#fff; line-height:1; text-shadow:0 0 8px #19f0ff, 0 0 18px #19f0ff; }
  .wg-wt-score .sl{ opacity:.85; margin:0 2px; } .wg-wt-score .tg{ opacity:.85; }   /* wt-slash and wt-target share one opacity in the renderer */
  #wg-wt-n{ display:inline-block; }

  /* --- Level Up (levelup.html): notification card — avatar + orange "GIFTER LEVEL"
         kind + "from → to" (orange #ff9d2e arrow); card slides in + holds + out. --- */
  .wg-lu-wrap{ position:absolute; inset:0; display:grid; place-items:center; padding:0 16px; }
  .wg-lu-card{ display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:12px;
    background:rgba(16,16,22,.9); border:1px solid rgba(255,255,255,.14); border-left:4px solid #ff9d2e;
    animation:wg-lu-in 4.4s var(--ease) infinite; will-change:transform,opacity; }
  @keyframes wg-lu-in{ 0%{ opacity:0; transform:translateY(10px) scale(.96); } 12%{ opacity:1; transform:translateY(0) scale(1); } 82%{ opacity:1; transform:translateY(0) scale(1); } 94%,100%{ opacity:0; transform:translateY(-6px) scale(.98); } }
  .wg-lu-av{ width:34px; height:34px; border-radius:50%; flex:0 0 auto; border:2px solid #ff9d2e; background:radial-gradient(circle at 50% 38%, #6a6a78, #2a2a34); }
  .wg-lu-kind{ font-size:8.5px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; color:#ff9d2e; }
  .wg-lu-lvl{ font-size:20px; font-weight:900; color:#fff; line-height:1.05; }
  .wg-lu-lvl .ar{ color:#ff9d2e; margin:0 .12em; }

  /* --- 60-Second Game (sixtysec.html) RUNNING layout: the safe gift sits large and centred BEHIND
         at .92 opacity, the "Safe?" label is centred on its TOP edge and the countdown on its BOTTOM
         edge — each half outside the gift, so the artwork shows through between them. The two font
         sizes keep the renderer's ratios to the gift (label 6/40, counter 16/40 of its 40vmin box).
         The counter turns #ff5252 under ten seconds. --- */
  .wg-ct-wrap{ position:absolute; inset:0; display:grid; place-items:center; }
  .wg-ct-slot{ position:relative; width:84px; height:84px; }
  .wg-ct-gift{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:1;
    width:84px; height:84px; object-fit:contain; opacity:.92; }
  .wg-ct-label{ position:absolute; left:50%; top:0; transform:translate(-50%,-50%); z-index:2;
    font-size:13px; font-weight:900; line-height:1.05; color:#fff; white-space:nowrap;
    text-shadow:0 2px 10px rgba(0,0,0,.85),0 0 4px rgba(0,0,0,.85); }
  .wg-ct-num{ position:absolute; left:50%; bottom:0; transform:translate(-50%,50%); z-index:2;
    font-size:34px; font-weight:900; color:#fff; line-height:1;
    text-shadow:0 2px 12px rgba(0,0,0,.85),0 0 5px rgba(0,0,0,.85); transition:color .25s ease; }
  .wg-ct-num.urgent{ color:#ff5252; }
  /* APP-210: Countdown tile — dimmed video frame behind, the flying-in second centred on it */
  .wg-ct-slot > svg{ opacity:.35; }
  .wg-cd-num{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:2;
    font-size:40px; font-weight:900; color:#fff; line-height:1;
    text-shadow:0 2px 12px rgba(0,0,0,.85),0 0 5px rgba(0,0,0,.85); transition:color .25s ease; }
  .wg-cd-num.urgent{ color:#ff5252; }
  /* APP-219: Lucky Wheel tile (a wheel that spins, slows down, rests, spins again; 1080deg = three full turns, so the restart is seamless)
     and Bingo tile (nine cells fill one after another, hold, clear, start over). Pure CSS, no timers. */
  .wg-ct-slot > svg.wg-wh-disc, .wg-ct-slot > svg.wg-wh-ptr{ opacity:1; }   /* beats .wg-ct-slot > svg{opacity:.35} of the Countdown tile */
  .wg-wh-disc{ display:block; animation:wg-wh-spin 6.4s infinite; }
  .wg-wh-ptr{ position:absolute; left:0; top:0; pointer-events:none; }
  @keyframes wg-wh-spin{ 0%{ transform:rotate(0deg); animation-timing-function:cubic-bezier(.2,.7,.25,1); } 70%,100%{ transform:rotate(1080deg); } }
  .wg-bi-g{ display:grid; grid-template-columns:repeat(3,1fr); gap:4px; width:84px; height:84px; padding:4px; box-sizing:border-box;
    background:#15151d; border:2px solid var(--tint); border-radius:9px; }
  .wg-bi-g i{ position:relative; border-radius:4px; background:rgba(255,255,255,.07); overflow:hidden; }
  .wg-bi-g b{ position:absolute; inset:0; background:var(--tint); opacity:0; animation-duration:7s; animation-iteration-count:infinite; }
  @keyframes wg-bi-k0{0%,3%{opacity:0}6%,88%{opacity:1}94%,100%{opacity:0}}
  @keyframes wg-bi-k1{0%,11%{opacity:0}14%,88%{opacity:1}94%,100%{opacity:0}}
  @keyframes wg-bi-k2{0%,19%{opacity:0}22%,88%{opacity:1}94%,100%{opacity:0}}
  @keyframes wg-bi-k3{0%,27%{opacity:0}30%,88%{opacity:1}94%,100%{opacity:0}}
  @keyframes wg-bi-k4{0%,35%{opacity:0}38%,88%{opacity:1}94%,100%{opacity:0}}
  @keyframes wg-bi-k5{0%,43%{opacity:0}46%,88%{opacity:1}94%,100%{opacity:0}}
  @keyframes wg-bi-k6{0%,51%{opacity:0}54%,88%{opacity:1}94%,100%{opacity:0}}
  @keyframes wg-bi-k7{0%,59%{opacity:0}62%,88%{opacity:1}94%,100%{opacity:0}}
  @keyframes wg-bi-k8{0%,67%{opacity:0}70%,88%{opacity:1}94%,100%{opacity:0}}
  /* APP-224: Timer tile - the running "01:00:00" display (JS driver, see startDrivers) */
  .wg-tm-box{ padding:10px 14px; background:#15151d; border:2px solid var(--tint); border-radius:9px; }
  .wg-tm-num{ font-size:30px; font-weight:900; color:#22e0ff; line-height:1; font-variant-numeric:tabular-nums; letter-spacing:1px;
    text-shadow:0 2px 12px rgba(0,0,0,.85),0 0 5px rgba(0,0,0,.85); }
  .wg-ico svg{ width:22px; height:22px; color:var(--tint); }
  @media (prefers-reduced-motion:reduce){ .wg-bi-g i:nth-child(-n+5) b{ opacity:1; } }

  /* reduced motion: hold a tasteful, representative static frame */
  @media (prefers-reduced-motion:reduce){
    *{ animation:none !important; transition:none !important; }
    .wg-co-msg,.wg-hf-h,.wg-fg-drop,.wg-cb-g,.wg-lu-card{ opacity:1; }
    .wg-th-fill{ height:54%; } .wg-cb-frame{ opacity:.9; }
    .wg-fw-rock{ opacity:0; } .wg-fw-spark{ opacity:.7; transform:translate(-50%,-50%) translate(var(--px),var(--py)) scale(.7); }
  }
  .wg-bar{display:flex;align-items:center;gap:12px;margin-bottom:16px;}
  .wg-bar-title{font-size:20px;font-weight:800;}

  .card-grid{display:flex;flex-wrap:wrap;}
  .card{width:280px;display:flex;flex-direction:column;align-items:flex-start;text-align:left;
    background:var(--color-surface);border:1px solid var(--color-border);border-radius:14px;
    padding:20px;margin:0 16px 16px 0;transition:all .12s;}
  .card:hover{background:var(--color-elevated);border-color:var(--color-accent);}
  .card__title{font-size:17px;font-weight:800;margin-bottom:6px;}
  .card__desc{font-size:13px;color:var(--color-text-muted);}
  .editor-version{position:fixed;bottom:9px;right:13px;z-index:40;pointer-events:none;font-size:11px;font-weight:700;letter-spacing:.4px;color:var(--color-text-muted,#9aa);opacity:.55;font-family:ui-monospace,Menlo,Consolas,monospace;}
  /* APP-30: hidden until the app sets window.STK_APP_VERSION */
  #editorVersion{visibility:hidden}
  .tt-account{position:fixed;top:14px;right:18px;z-index:50;width:340px;max-width:calc(100vw - 36px);padding:16px;border:1px solid var(--color-border);border-radius:12px;background:var(--color-surface);box-shadow:0 10px 30px rgba(0,0,0,.35);}
  #shell:not([data-view="home"]) #tt-account{display:none;}
  .tt-account.tt-connected{width:auto;padding:10px 14px;}
  .tt-account.tt-connected .tt-account__desc,.tt-account.tt-connected .tt-account__row{display:none;}
  .tt-account__title{font-size:14px;font-weight:800;margin-bottom:4px;}
  .tt-account__desc{font-size:12.5px;color:var(--color-text-muted);margin-bottom:12px;}
  .tt-account__row{display:flex;align-items:center;gap:8px;}
  .tt-at{color:var(--color-text-muted);font-weight:700;font-size:15px;}
  .tt-input{flex:1;min-width:0;height:40px;padding:0 12px;border:1px solid var(--color-border);border-radius:10px;background:var(--color-elevated);color:var(--color-text);font-size:14px;}
  .tt-input:focus{outline:none;border-color:var(--color-accent);}
  .tt-status{margin-top:10px;font-size:13px;min-height:18px;color:var(--color-text-muted);}
  .tt-account.tt-connected .tt-status{margin-top:0;}
  .tt-status.ok{color:var(--color-state);}
  .tt-status.err{color:var(--color-danger);}

  .gallery-header{display:flex;justify-content:space-between;align-items:flex-start;}
  .gallery-header__text{flex:1;}
  .btn-primary{height:42px;padding:0 18px;background:var(--color-primary);color:var(--color-on-primary);border-radius:10px;
    font-size:14px;font-weight:800;transition:all .12s;}
  .btn-primary:hover{background:var(--color-primary-hover);}
  /* B-04/F4 — a disabled primary has to LOOK disabled. Without this it kept the full brand colour,
     brightened on hover and showed a pointer, so the B-04 duplicate dialog looked ready to go while
     it was still reading the profile (or while a module would not fit). Same shape as the dimmed
     buttons everywhere else in this file (.tb-btn:disabled, .scope-sec-add:disabled): keep the
     token colour, drop the opacity, kill the pointer. The :hover twin is the point of the rule —
     .btn-primary:hover alone would still repaint a disabled button on mouseover. */
  .btn-primary:disabled{background:var(--color-primary);opacity:.45;cursor:not-allowed;}
  .btn-primary:disabled:hover{background:var(--color-primary);}

  .tile-grid{display:flex;flex-wrap:wrap;align-items:flex-start;}
  .tile{width:240px;display:flex;flex-direction:column;background:var(--color-surface);
    border:1px solid var(--color-border);border-radius:14px;padding:12px;margin:0 18px 18px 0;
    transition:all .12s;cursor:pointer;position:relative;}
  .tile:hover{border-color:var(--color-accent);}
  .thumb{border-radius:10px;background:var(--color-bg-deep);display:flex;align-items:center;
    justify-content:center;margin-bottom:12px;overflow:hidden;padding:8px;}
  .thumb__frame{background:var(--color-elevated);border:1px solid var(--color-border);border-radius:3px;
    overflow:hidden;position:relative;}
  /* The frame carries the REAL canvas ratio and takes all the room it can get: a portrait fills the
     height of a fixed-tall area, a landscape fills the width and the tile shrinks to fit it. The
     preview is the point of this card, so it gets the space instead of the padding around it. */
  .thumb--portrait{height:250px;}
  .thumb--portrait .thumb__frame{height:100%;width:auto;aspect-ratio:9 / 16;}
  .thumb--landscape{height:auto;}
  .thumb--landscape .thumb__frame{width:100%;height:auto;aspect-ratio:16 / 9;}
  /* the format reads as a quiet label on the tile, not as a coloured flag competing with the art */
  .badge{position:absolute;top:9px;left:9px;padding:2px 7px;border-radius:6px;font-size:9.5px;font-weight:800;
    letter-spacing:.06em;text-transform:uppercase;background:var(--color-surface);
    border:1px solid var(--color-border);color:var(--color-text-muted);}
  .tile-row--acts{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:0;}
  /* #6 — an action button shows its WHOLE label, in every language. AO1 had given these buttons
     min-width:0 + text-overflow:ellipsis, which turned German "Bearbeiten" into "B…": a button
     whose text is unreadable is not a shrunk button, it is a broken one.
     Three parts, in this order of preference (no font-size trickery is needed at any point):
       1. min-width:max-content — the flex shrink stops at the label's own width, so the text is
          never clipped. This alone fixes the gallery tile.
       2. flex-wrap on the row — if a set of labels genuinely cannot share one line, the row
          breaks into two instead of clipping. Costs a few pixels of card height, nothing else.
       3. no overflow/text-overflow here at all — ellipsis on an ACTION is forbidden by the fix.
     The selector repeats .tile-row deliberately: the generic ".tile-row .tile-btn{flex:1;
     margin:0 3px}" a few lines below is written LATER at equal specificity and used to win, which
     is why these buttons carried flex:1 and 12px of spacing per gap on top of the 6px row gap —
     ~24px of the 216px card width went to margins nobody asked for. */
  .tile-row.tile-row--acts .tile-btn{flex:0 0 auto;margin:0;padding:0 11px;min-width:max-content;white-space:nowrap;}
  .tile-row.tile-row--acts .tile-btn--grow{flex:1 1 auto;}
  .tile-row.tile-row--acts .tile-btn--icon{flex:0 0 32px;min-width:32px;padding:0;}
  .tile-btn--icon{width:32px;padding:0;display:flex;align-items:center;justify-content:center;color:var(--color-text-muted);}
  .tile-btn--icon svg{width:15px;height:15px;display:block;}
  .thumb__frame{background-color:#20232c;
    background-image:
      linear-gradient(45deg,#292d38 25%,transparent 25%),linear-gradient(-45deg,#292d38 25%,transparent 25%),
      linear-gradient(45deg,transparent 75%,#292d38 75%),linear-gradient(-45deg,transparent 75%,#292d38 75%);
    background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0;}
  .tile__name{font-size:14px;font-weight:800;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .tile__meta{font-size:11px;color:var(--color-text-muted);margin:6px 0 12px;}
  .tile__actions{display:flex;flex-direction:column;margin-top:2px;}
  .tile-row{display:flex;margin-bottom:6px;}
  .tile-row .tile-btn{flex:1;margin:0 3px;}
  .tile-btn,.tile-action{height:32px;border-radius:8px;background:var(--color-elevated);color:var(--color-text);font-size:12px;transition:all .12s;}
  .tile-action:hover{background:var(--color-elevated-hover);}
  .tile-action--primary{background:var(--color-primary);color:var(--color-on-primary);}
  .tile-action--primary:hover{background:var(--color-primary-hover);}
  .tile-action--danger{background:var(--color-danger-soft);color:var(--color-danger);}
  .tile-action--danger:hover{background:var(--color-danger-soft-hover);}
  .gempty{color:var(--color-text-muted);}

  /* ===== create modal ===== */
  .modal-overlay{position:fixed;inset:0;z-index:80;background:rgba(23,19,37,.42);display:flex;align-items:center;justify-content:center;}
  /* P-42/TP1: nur noch der RUECKFALL. Die wirksame Stapelhoehe setzt showGiftPicker() beim
     Oeffnen ueber stkModalZ() inline — der Picker wird aus dem A&E-Ereignisformular heraus
     geoeffnet und muss deshalb ueber dem liegen, was gerade offen ist, nicht ueber einer
     festen Zahl von damals. */
  #gift-modal{z-index:100000;}
  .modal{width:460px;display:flex;flex-direction:column;align-items:center;background:var(--color-surface);
    border:1px solid var(--color-border);border-radius:16px;padding:26px;}
  .modal__title{font-size:20px;font-weight:800;margin-bottom:4px;}
  .modal__subtitle{font-size:13px;color:var(--color-text-muted);margin-bottom:22px;}
  /* P-7.5: die Kachelzeile ist schmaler als der Dialoginhalt (2x150px + 4x8px Rand = 332px in
     368px) und stand deshalb linksbuendig, mit ~36px Luecke rechts — als einzige Zeile des
     Dialogs. justify-content:center verteilt die Luecke auf 18/18. Nur die AUSRICHTUNG aendert
     sich; Kachelgroessen, Vorauswahl und die Format-/Orientierungslogik bleiben unberuehrt. */
  .modal__choices{display:flex;justify-content:center;margin-bottom:16px;flex-wrap:wrap;row-gap:10px;}
  .choice{width:150px;height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;
    background:var(--color-bg-deep);border:2px solid var(--color-border);border-radius:12px;margin:0 8px;transition:all .12s;}
  .choice:hover{border-color:var(--color-accent);}
  /* the tiles are a CHOICE now, not two buttons that each act on click, so the picked one has to show */
  .choice.is-on{border-color:var(--color-primary);box-shadow:0 0 0 1px var(--color-primary) inset;}
  .choice__frame{background:var(--color-elevated);border-radius:4px;margin-bottom:14px;}
  .choice--portrait .choice__frame{width:54px;height:96px;}
  .choice--landscape .choice__frame{width:96px;height:54px;}
  .choice__label{font-size:13px;font-weight:800;}
  .choice__dim{font-size:11px;color:var(--color-text-muted);margin-top:2px;}
  .modal__cancel{height:36px;padding:0 18px;background:transparent;color:var(--color-text-muted);font-size:13px;}
  .modal__cancel:hover{color:var(--color-text);}
  /* P-49 — der gelbe Akzent des Beta-Hinweises. REIN ADDITIV: die Klasse haengt am selben
     stkConfirm-Fenster, das der ganze Editor benutzt, und ohne sie ist der Dialog byte-gleich
     zu vorher (mehrere Tests pinnen sein Aussehen). Die Farbe ist KEIN neues Literal und KEIN
     neuer Token, sondern --color-warning — derselbe Ton, den die Warnstreifen der
     Aktionsgruppen tragen (.ae-legacy-warn/.ae-hkwarn, in der A&E-Stilvorlage). Im Dunkelthema
     ist das das Gelb #E8AC48; im Tagthema fuehrt die Palette Warnung und Gefahr bewusst auf
     dieselbe Aufmerksamkeitsfarbe (#c4186d, siehe Palettenblock) — der Hinweis spricht damit
     in beiden Themen dieselbe Sprache wie jede andere Warnung des Werkzeugs, statt eine
     zweite Alarmfarbe einzufuehren. */
  .modal-overlay.stk-beta .modal{border-left:4px solid var(--color-warning);}
  .modal-overlay.stk-beta .modal__title{color:var(--color-warning);}
  /* gift picker */
  .modal--gift{width:760px;max-width:94vw;align-items:stretch;position:relative;}
  .modal__close{position:absolute;top:14px;right:14px;width:32px;height:32px;display:flex;align-items:center;
    justify-content:center;border-radius:8px;background:transparent;color:var(--color-text-muted);
    font-size:20px;line-height:1;cursor:pointer;border:1px solid transparent;}
  .modal__close:hover{color:var(--color-text);background:var(--color-elevated);border-color:var(--color-border);}
  .gift-toolbar{display:flex;gap:10px;margin-bottom:14px;}
  .box-body{max-height:60vh;overflow-y:auto;padding-right:4px;}
  .box-section-title{font-size:13px;font-weight:800;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.5px;margin:16px 2px 8px;}
  .box-section-title:first-child{margin-top:2px;}
  .gift-search{flex:1;height:38px;padding:0 12px;background:var(--color-bg-deep);
    border:1px solid var(--color-border);border-radius:8px;color:var(--color-text);font-size:14px;}
  .gift-search:focus{outline:none;border-color:var(--color-accent);}
  .gift-sort{height:38px;padding:0 10px;background:var(--color-bg-deep);border:1px solid var(--color-border);
    border-radius:8px;color:var(--color-text);font-size:13px;cursor:pointer;}
  .gift-sort:focus{outline:none;border-color:var(--color-accent);}
  .gift-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;max-height:58vh;
    overflow-y:auto;overflow-x:hidden;padding:2px;margin-bottom:8px;}
  .gift-card{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 6px;cursor:pointer;
    background:var(--color-bg-deep);border:1px solid var(--color-border);border-radius:10px;transition:all .12s;min-width:0;}
  .gift-card:hover{border-color:var(--color-accent);background:var(--color-elevated);}
  .gift-card img{width:54px;height:54px;object-fit:contain;pointer-events:none;}
  .gift-card__name{font-size:11px;font-weight:700;text-align:center;line-height:1.2;max-width:100%;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .gift-card__dia{font-size:10px;color:var(--color-text-muted);}
  .gift-status{font-size:12px;color:var(--color-text-muted);text-align:center;min-height:16px;margin-bottom:6px;}
  /* loading progress shown before the grid is ready */
  .gift-loading{display:none;flex-direction:column;align-items:center;gap:12px;padding:48px 0 40px;}
  .gift-loading.show{display:flex;}
  .gift-loading__label{font-size:13px;color:var(--color-text-muted);}
  .gift-loading__track{width:60%;max-width:360px;height:8px;border-radius:6px;background:var(--color-bg-deep);
    border:1px solid var(--color-border);overflow:hidden;}
  .gift-loading__bar{height:100%;width:0;background:var(--color-accent);transition:width .15s ease;}

  /* Module search: compact sidebar box (between #acctBadge and #nav) + its popup. Both sides
     lean on --color-* tokens only, same as .gift-search above, so day/dark need no extra rules. */
  .nav-search{margin:0 6px 14px 6px;display:flex;align-items:center;gap:8px;height:36px;padding:0 10px;
    border-radius:9px;background:var(--color-surface);border:1px solid var(--color-border);flex-shrink:0;}
  .nav-search:focus-within{border-color:var(--color-accent);}
  .nav-search__icon{flex:0 0 auto;color:var(--color-text-muted);}
  .nav-search__input{flex:1;min-width:0;border:none;background:transparent;color:var(--color-text);
    font-size:12px;font-weight:600;cursor:pointer;}
  .nav-search__input:focus{outline:none;}
  .modal--modsearch{width:520px;max-width:92vw;align-items:stretch;position:relative;}
  .module-search__input{height:44px;padding:0 14px;background:var(--color-bg-deep);
    border:1px solid var(--color-border);border-radius:10px;color:var(--color-text);font-size:16px;margin-bottom:14px;}
  .module-search__input:focus{outline:none;border-color:var(--color-accent);}
  /* P-211: overflow-y:auto zwingt die x-Achse auf auto (CSS-Spezifikation) — hidden schliesst sie. */
  .module-search__results{max-height:50vh;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:4px;}
  .module-search__result{display:block;width:100%;text-align:left;padding:12px 14px;border-radius:9px;
    background:transparent;border:1px solid transparent;color:var(--color-text);font-size:15px;font-weight:600;cursor:pointer;}
  .module-search__result:hover{background:var(--color-elevated);border-color:var(--color-border);}
  .module-search__empty{padding:20px 4px;text-align:center;color:var(--color-text-muted);font-size:13px;}
  /* S8: hits carry a small kind badge so the source reads at a glance. R4: EVERY row uses this
     pair now — module, widget, overlay and module-object hits all render through addResultRow(),
     so the badge tells them apart. The plain .module-search__result above is still the base
     (padding, hover, colours); --widget only turns it into the name/badge flex row. */
  .module-search__result--widget{display:flex;align-items:center;justify-content:space-between;gap:10px;}
  .module-search__result-kind{flex:0 0 auto;font-size:11px;font-weight:700;text-transform:uppercase;
    letter-spacing:.04em;color:var(--color-text-muted);}

  /* ---- theme-specific leftovers ------------------------------------------------
     Everything that could become a token did: "live / active / connected" now runs through
     --color-state, which also keeps it correct inside the locked module views, where the badge
     resolves to the green those pages have always had. What stays here are the few rules whose
     dark value is a one-off, restored exactly so dark mode is unchanged down to the byte. */
  /* Four of the old greens were NOT the token's #37d67a but one-offs. Folding them into
     --d-state would have changed what an existing dark-mode user sees, so their dark branch is
     pinned back to the exact value each rule carried before. Day keeps --color-state. */
  :root[data-theme="dark"] .napo-row--on{background:rgba(55,214,122,.12);}
  :root[data-theme="dark"] .status--live{background:rgba(80,200,120,.16);color:#65d6a0;}
  :root[data-theme="dark"] .tt-status.ok{color:#65d6a0;}
  :root[data-theme="dark"] .obs-status--ok{color:#4ade80;}
  :root[data-theme="dark"] .status--off{background:var(--color-warning-soft);color:var(--color-warning);}
  :root[data-theme="dark"] .tt-status.err{color:#ffb4b4;}
  :root[data-theme="dark"] .ovr-count{background:rgba(59,130,246,.18);color:#3B82F6;border-color:rgba(59,130,246,.45);}
  :root[data-theme="dark"] .ctx-eff.is-on{background:rgba(59,130,246,.16);border-color:rgba(59,130,246,.55);color:#cfe0ff;}
  :root[data-theme="dark"] .ctx-eff.is-on .ctx-dot{background:#3B82F6;box-shadow:0 0 6px rgba(59,130,246,.85);}
  :root[data-theme="dark"] #zoomBadge{background:rgba(0,0,0,.6);color:#fff;border-color:transparent;}
  :root[data-theme="dark"] #toast.err{border-color:#7a2a2a;background:#3a1d1d;color:#ffb4b4;}
  :root[data-theme="dark"] .acct-badge--set{border-color:rgba(255,255,255,.12);}
  :root[data-theme="dark"] .palette__sw{border-color:rgba(255,255,255,.14);}
  :root[data-theme="dark"] .layer-group{background:rgba(255,255,255,.03);}
  :root[data-theme="dark"] .layer__act:hover{background:rgba(255,255,255,.12);}
  :root[data-theme="dark"] .page-tab__x:hover{background:rgba(255,255,255,.18);}
  /* Phase 0/1 of the module relighting: every value below carries its DAY value in the rule above
     and its exact previous value here, so dark is unchanged down to the byte. */
  :root[data-theme="dark"] .modal-overlay{background:rgba(8,9,14,.78);}
  :root[data-theme="dark"] .al-modal{background:rgba(0,0,0,.55);}
  :root[data-theme="dark"] .obj-dot{background:#5a5f72;}   /* B-05: aus .al-dot geworden, Wert unveraendert */
  :root[data-theme="dark"] .al-li--active .al-li-sub{color:rgba(255,255,255,.8);opacity:1;}
  :root[data-theme="dark"] .al-li--active .al-li-snd,
  :root[data-theme="dark"] .al-li--active .al-li-ic{color:rgba(255,255,255,.85);opacity:1;}
  :root[data-theme="dark"] .gl-prevhint{color:#94A3B8;}
  :root[data-theme="dark"] .gl-card-foot .al-btn--danger{color:#f87171;border-color:rgba(248,113,113,.4);}
  :root[data-theme="dark"] .tm-test-hint{color:#f8b64c;}
  :root[data-theme="dark"] .tm-test-hint strong{color:#ff6b6b;}
  :root[data-theme="dark"] .snd-tic{background:rgba(255,255,255,.05);}
  /* Phase 2 — Alerts. Same rule: the day value lives in the rule itself, the exact previous value
     comes back here. The three "white label on a primary fill" spots need no entry at all: in dark
     --color-on-primary resolves to #ffffff, which is the value they carried before. */
  :root[data-theme="dark"] .obj-dot--on{background:#65d6a0;}   /* B-05: aus .al-dot--on geworden, Wert unveraendert */
  :root[data-theme="dark"] .al-li-grp{color:#ff5a5a;border-color:#ff5a5a;}
  :root[data-theme="dark"] .al-modal-card{box-shadow:0 16px 48px rgba(0,0,0,.5);}
  :root[data-theme="dark"] .al-cpop{box-shadow:0 14px 34px rgba(0,0,0,.55);}

  /* ---- day only: the last module chrome ------------------------------------
     Phases 3-7 in one pass. These are written as DAY rules instead of the day-value-plus-override
     pair used earlier, because here the base rules are all still needed verbatim: dark is left
     untouched by construction, not by a restored copy. Only genuinely hard values are listed —
     the great majority of the dark hexes in the module stylesheets are var(--token,#fallback)
     fallbacks that never resolve, so they need nothing at all.
     Deliberately NOT here: preview internals (they are the OBS picture), and bright accents that
     already carry on a light ground. */
  :root[data-theme="day"] .ae-back{background:rgba(23,19,37,.42);}
  :root[data-theme="day"] .ae-card{box-shadow:0 24px 60px rgba(23,19,37,.22);}
  :root[data-theme="day"] .gg-lc-ic,
  :root[data-theme="day"] .gg-giftrow img,
  :root[data-theme="day"] .th-giftrow img,
  :root[data-theme="day"] .ss-giftrow img{background:var(--color-elevated);}
  :root[data-theme="day"] .bi-ce{background:var(--color-surface);}
  :root[data-theme="day"] .tg-ctxmenu,
  :root[data-theme="day"] .gs-ctxmenu{box-shadow:0 14px 34px rgba(23,19,37,.24);}
  :root[data-theme="day"] .gc-pill .g{background:var(--color-elevated);}
  :root[data-theme="day"] .gc-varpop{box-shadow:0 10px 26px rgba(23,19,37,.22);}
  :root[data-theme="day"] .gc-backdrop{background:rgba(23,19,37,.42);}
  :root[data-theme="day"] .gc-modal{box-shadow:0 24px 60px rgba(23,19,37,.22);}
  :root[data-theme="day"] .gc-chip.on{color:#ffffff;}
  /* the widgets hub styles its cards from three local variables, not from the palette */
  :root[data-theme="day"] .wg-grid,
  :root[data-theme="day"] .wg-bar{--card:var(--color-surface);--card-hi:var(--color-elevated);--brd:var(--color-border);--muted:var(--color-text-muted);}
  /* Day values for the four above, kept next to their overrides so the pair stays reviewable.
     They sit here rather than in the module stylesheets because those are built in JS strings. */
  :root[data-theme="day"] .gl-prevhint{color:var(--color-text-muted);}
  :root[data-theme="day"] .gl-card-foot .al-btn--danger{color:var(--color-danger);border-color:var(--color-danger);}
  :root[data-theme="day"] .tm-test-hint{color:var(--color-danger);}
  :root[data-theme="day"] .tm-test-hint strong{color:var(--color-danger);}
  :root[data-theme="day"] .snd-tic{background:var(--color-elevated);}

  /* ---- day only: elevation --------------------------------------------------
     On a dark ground a lighter fill is enough to say "this is its own surface". On a light one it
     is not: every panel is white on near-white, so the plane has to come from a shadow. These
     rules exist ONLY in the day branch — dark declares no shadow anywhere and stays as it was.
     Two steps: resting, and a slightly deeper one for the cards that already react to hover. */
  :root[data-theme="day"] .sidebar{box-shadow:var(--t-lift);}
  :root[data-theme="day"] .panel{box-shadow:var(--t-lift);}
  :root[data-theme="day"] .prof-card,
  :root[data-theme="day"] .tile,
  :root[data-theme="day"] .card,
  :root[data-theme="day"] .sc-slot{box-shadow:var(--t-lift);}
  :root[data-theme="day"] .prof-card:hover,
  :root[data-theme="day"] .tile:hover,
  :root[data-theme="day"] .card:hover,
  :root[data-theme="day"] .sc-slot:hover{box-shadow:var(--t-lift-hi);}
  /* the fixed account box carries a 35% black shadow for the dark theme; on light that reads as
     a smudge, so it gets the same tinted lift as everything else that floats */
  :root[data-theme="day"] .tt-account{box-shadow:var(--t-lift-hi);}

  /* ---- day only: the OBS connection block as one card -----------------------
     Host, port and password used to sit loose on the page ground with input fills taken from
     --color-bg, which on a light ground means invisible fields on an invisible block. Giving the
     group its own surface makes it one thing to read, and the inputs turn white so their edges
     do the work instead of their fill. */
  :root[data-theme="day"] .obs-conn{background:var(--color-surface);border:1px solid var(--color-border);
    border-radius:12px;padding:14px;box-shadow:var(--t-lift);}
  :root[data-theme="day"] .obs-inp{background:var(--color-surface);border-color:var(--color-border-strong);}

  /* ---- day only: the transparency checkerboard ------------------------------
     The checker means "nothing is painted here". It is editor furniture — OBS never renders it,
     and the customer's overlay sitting on top of it is not touched by any of this. On a light tool
     the dark version read as a hole punched through the page, so in day every checker uses ONE
     light pair while all fourteen original rules keep their own dark values untouched.
     Only the two colour properties are set: background-size and background-position stay with each
     instance, so every preview keeps the tile scale it was tuned for.
     The tile is a shade off the page ground, which makes a preview read as a hole in the page
     rather than as a second design competing with the artwork on top. */
  :root[data-theme="day"] #stage,
  :root[data-theme="day"] .thumb__frame,
  :root[data-theme="day"] .layer__thumb,
  :root[data-theme="day"] .al-prev,
  :root[data-theme="day"] .al-canvas,
  :root[data-theme="day"] .al-stage,
  :root[data-theme="day"] .gl-card-prev,
  :root[data-theme="day"] .gl-prevwrap,
  :root[data-theme="day"] .wh-gd-stage,
  :root[data-theme="day"] .tm-stage,
  :root[data-theme="day"] .tg-lc-prev,
  :root[data-theme="day"] .gs-lc-prev,
  :root[data-theme="day"] .gg-lc-prev,
  /* B-11: the overview tiles of Lucky Wheel, Timer and Bingo were the only checkered tiles left
     out of this list, so in day they stayed dark while Top Gift next to them went light. They
     carry the SAME dark base recipe as .tg-lc-prev (#20232c + four #292d38 gradients, 16px 16px),
     so naming them here is the whole fix — no dark rule is touched. The wheel's dark mini stage
     .wh-mini-frame is a CHILD of .wh-cb-prev and paints its own background, so it stays dark in
     both themes exactly as B-14 built it; only the surface around it follows the theme. */
  :root[data-theme="day"] .wh-cb-prev,
  :root[data-theme="day"] .tm-cb-prev,
  :root[data-theme="day"] .bi-card-prev,
  :root[data-theme="day"] .stk-ped__stage,
  /* GG-STAGE: .gg-pos-wrap absichtlich NICHT mehr hier — die Positionier-Buehne behaelt wie
     Top Gifts .tg-prevwrap in beiden Themes den dunklen Stream-Checker (gleiche Buehne,
     gleicher Hintergrund; die Uebersichtskarten .gg-lc-prev bleiben hell wie .tg-lc-prev). */
  :root[data-theme="day"] .wgc-canvas{
    background-color:#aab7c2;
    background-image:linear-gradient(45deg,#97a6b3 25%,transparent 25%),linear-gradient(-45deg,#97a6b3 25%,transparent 25%),
      linear-gradient(45deg,transparent 75%,#97a6b3 75%),linear-gradient(-45deg,transparent 75%,#97a6b3 75%);
  }
  /* B-11/Nachfix: die neun Vorschaukacheln des Widgets-Hubs (.wg-prev) waren die letzten
     Vorschauflaechen, die im hellen Design dunkel blieben — der Auftrag verlangt "alle Module
     UND Widgets". Anders als die Modul-Kacheln bringt .wg-prev (Zeile 464) KEIN Karo mit,
     sondern einen festen dunklen Verlauf; die Day-Regel muss deshalb das VOLLSTAENDIGE
     Top-Gift-Rezept tragen, also auch background-size/-position, die dort sonst aus der
     dunklen Basisregel kaemen. Werte woertlich wie .tg-lc-prev. Die dunkle Basisregel ist
     unangetastet — im dunklen Design aendert sich nichts. Ruecknahme = diese eine Regel loeschen. */
  :root[data-theme="day"] .wg-prev{
    background-color:#aab7c2;
    background-image:linear-gradient(45deg,#97a6b3 25%,transparent 25%),linear-gradient(-45deg,#97a6b3 25%,transparent 25%),
      linear-gradient(45deg,transparent 75%,#97a6b3 75%),linear-gradient(-45deg,transparent 75%,#97a6b3 75%);
    background-size:16px 16px;
    background-position:0 0,0 8px,8px -8px,-8px 0;
  }

  /* ---- APP-9 "Games" (js/game-control/21-game-control.js, Games module) ----
     Overview: EXACTLY five cards per row — narrower windows shrink the cards, the row never wraps to four.
     Game page: start area on top, Game Control below it filling the rest (its own two scrollers). */
  #module-view.gm-host[data-mv="games"]{height:100%;display:flex;flex-direction:column;}
  .gm-root{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;}
  .gm-root:not(.gm-root--page) .gm-top{flex:1 1 auto;min-height:0;overflow-y:auto;}
  .gm-root--page .gm-top{flex:0 0 auto;}
  .gm-gc{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;}
  .gm-grid{display:grid;grid-template-columns:repeat(5, minmax(0,1fr));gap:16px;}
  .gm-card{display:flex;flex-direction:column;gap:6px;min-width:0;padding:10px;border-radius:14px;cursor:pointer;text-align:left;
    background:var(--color-surface);border:1px solid var(--color-border);color:var(--color-text);font:inherit;transition:border-color .14s ease;}
  .gm-card:hover{border-color:var(--color-accent);}
  .gm-cover{position:relative;display:block;width:100%;aspect-ratio:3/4;border-radius:10px;overflow:hidden;background:var(--color-elevated);}
  .gm-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
  .gm-cover__mono{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:800;color:var(--color-text-muted);}
  .gm-card__t{font-size:14px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .gm-card__s{font-size:12px;font-weight:600;color:var(--color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .gm-card--update-available .gm-card__s,.gm-card--running .gm-card__s,.gm-card--busy .gm-card__s{color:var(--color-accent);}
  .gm-note{font-size:14px;color:var(--color-text-muted);margin:8px 0 16px;}
  .gm-pagehead{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:0 0 14px;}
  .gm-pagehead__t{font-size:24px;font-weight:800;}
  .gm-pagehead__s{font-size:13px;color:var(--color-text-muted);}
  .gm-start{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 6px;}
  .gm-startbtn{position:relative;overflow:hidden;min-width:180px;height:48px;padding:0 26px;border-radius:12px;border:none;cursor:pointer;
    background:var(--color-primary);color:var(--color-on-primary);font:inherit;font-size:16px;font-weight:800;}
  .gm-startbtn:hover:not(:disabled){background:var(--color-primary-hover);}
  .gm-startbtn:disabled{cursor:default;background:var(--color-elevated);color:var(--color-text);}
  .gm-startbtn span{position:relative;z-index:1;}
  .gm-bar{position:absolute;left:0;top:0;bottom:0;background:var(--color-primary);opacity:.35;}
  .gm-inp{background:var(--color-bg-deep);border:1px solid var(--color-border);border-radius:8px;padding:8px 10px;color:var(--color-text);font:inherit;font-size:13px;}
  /* APP-48: Knopfreihe - Spielen (48 px) / Kanal-Segment / Zahnrad gleich hoch, gleiche Rundung; kein Pillen-Label mehr. */
  .gm-start{align-items:center;}
  .gm-seg{display:inline-flex;align-items:stretch;height:48px;box-sizing:border-box;border:1px solid var(--color-border);border-radius:12px;background:var(--color-elevated);overflow:hidden;}
  .gm-seg__b{display:inline-flex;align-items:center;justify-content:center;min-width:76px;padding:0 16px;border:none;background:transparent;color:var(--color-text-muted);font:inherit;font-size:13px;font-weight:700;letter-spacing:.3px;cursor:pointer;white-space:nowrap;}
  .gm-seg__b+.gm-seg__b{border-left:1px solid var(--color-border);}
  .gm-seg__b:hover:not(.gm-seg__b--on){background:var(--color-elevated-hover);color:var(--color-text);}
  .gm-seg__b--on{background:var(--color-primary);color:var(--color-on-primary);cursor:default;}
  .gm-seg__b--on.gm-seg__b--beta{background:var(--color-beta);color:#2A1C04;}
  .gm-seg--static .gm-seg__b{background:var(--color-elevated);color:var(--color-text);cursor:default;}
  .gm-gearwrap{position:relative;display:flex;}
  .gm-gear{width:48px;height:48px;box-sizing:border-box;border-radius:12px;border:1px solid var(--color-border);background:var(--color-elevated);color:var(--color-text);font-size:19px;cursor:pointer;}
  .gm-gear:hover,.gm-gearwrap--open .gm-gear{background:var(--color-elevated-hover);}
  /* APP-50: Logo/Name/LIVE/Profil + Preset-Knoepfe (Game Control, .gc-hinl) stehen in der Kopfzeile neben dem Zahnrad, vertikal mittig, ohne Karte. */
  .gm-start .gc-hinl,.gm-pagehead .gc-hinl{margin-left:8px;align-self:center;}
  .gm-gcstat{margin-left:auto;display:inline-flex;align-items:center;gap:10px;font-size:12px;color:var(--color-text-muted);white-space:nowrap;align-self:center;}
  .gm-prog{display:flex;align-items:center;gap:12px;margin:10px 0 6px;font-size:13px;color:var(--color-text-muted);}
  .gm-prog__t{flex:0 0 auto;color:var(--color-text);font-weight:600;}
  .gm-prog__trk{position:relative;flex:1 1 auto;max-width:420px;height:8px;border-radius:999px;background:var(--color-elevated);border:1px solid var(--color-border);overflow:hidden;}
  .gm-prog__bar{position:absolute;left:0;top:0;bottom:0;border-radius:999px;background:var(--color-primary);transition:width .25s ease;}
  .gm-prog__bar--ind{width:35%;animation:gmProgInd 1.3s ease-in-out infinite;}
  @keyframes gmProgInd{0%{left:-35%;}100%{left:100%;}}
  .gm-prog__p{flex:0 0 auto;min-width:42px;text-align:right;font-variant-numeric:tabular-nums;}
  .gm-gearwrap--open .prof-menu{display:block;}
  .gm-menu{left:0;right:auto;min-width:260px;}
  .gm-menu .prof-mi:disabled{opacity:.45;cursor:default;background:transparent;}
  .gm-msec{padding:6px 10px;}
  .gm-msec__h{font-size:12px;font-weight:700;color:var(--color-text-muted);margin:0 0 6px;}
  .gm-msec__row{display:flex;align-items:center;gap:8px;}
  .gm-msec .gm-inp{flex:1 1 auto;min-width:0;width:100%;}
  .gm-errs{display:flex;flex-direction:column;gap:6px;margin:8px 0 12px;}
  .gm-err{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:8px 12px;border-radius:10px;
    background:var(--color-danger-soft);color:var(--color-danger);font-size:13px;}
  /* APP-11: Interactive Mods pages (md-*). Overview/cards reuse .gm-grid/.gm-card. */
  .gm-card--mods .gm-card__s{color:var(--color-accent);}
  .md-status{font-size:13px;font-weight:600;color:var(--color-text-muted);}
  .md-eula{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--color-text);}
  .md-eula a{color:var(--color-accent);}
  .md-sec{margin:14px 0 0;padding:12px 14px;border-radius:12px;background:var(--color-surface);border:1px solid var(--color-border);}
  .md-sec__h{font-size:15px;font-weight:800;margin:0 0 10px;}
  .md-sec__h2{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-muted);margin:14px 0 6px;}
  .md-note{font-size:13px;color:var(--color-text-muted);margin:4px 0;}
  .md-warn{color:var(--color-danger);}
  .md-pill{display:inline-block;padding:2px 8px;border-radius:99px;background:var(--color-elevated);color:var(--color-accent);font-size:12px;}
  .md-setup{display:flex;flex-direction:column;gap:8px;}
  .md-setup__row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;align-items:center;font-size:13px;min-width:0;}
  .md-setup__l{min-width:0;font-weight:700;overflow-wrap:anywhere;}
  .md-setup__s{justify-self:end;white-space:nowrap;padding:2px 10px;border-radius:99px;background:var(--color-elevated);color:var(--color-text-muted);font-size:12px;font-weight:700;}
  .md-setup__s--ready{color:var(--color-primary);}
  .md-setup__s--working{color:var(--color-accent);}
  .md-setup__s--failed{color:var(--color-danger,#e5484d);}
  .md-setup__d{grid-column:1 / -1;min-width:0;font-size:12px;color:var(--color-text-muted);overflow-wrap:anywhere;}
  .md-bar{grid-column:1 / -1;display:block;height:4px;border-radius:99px;background:var(--color-elevated);overflow:hidden;}
  .md-bar b{display:block;height:100%;background:var(--color-primary);}
  .md-console{height:240px;overflow-y:auto;padding:8px 10px;border-radius:8px;background:var(--color-bg-deep);border:1px solid var(--color-border);
    font-family:Consolas,"Courier New",monospace;font-size:12px;line-height:1.45;user-select:text;}
  .md-cl{white-space:pre-wrap;word-break:break-word;}
  .md-cmdrow{display:flex;gap:8px;margin-top:8px;}
  .md-cmd{flex:1 1 auto;min-width:0;}
  .md-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:6px 0;}
  .md-row__l{flex:0 0 190px;font-size:13px;font-weight:600;}
  .md-in{width:220px;max-width:100%;}
  .md-inline,.md-step,.md-presets{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;}
  .md-step__v{min-width:56px;text-align:center;font-weight:700;font-size:13px;}
  .md-on{border-color:var(--color-accent);color:var(--color-accent);}
  .md-pl{display:flex;align-items:center;gap:12px;padding:8px 0;border-top:1px solid var(--color-border);}
  .md-pl__ic{position:relative;flex:0 0 40px;width:40px;height:40px;border-radius:8px;overflow:hidden;background:var(--color-elevated);}
  .md-pl__ic img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
  .md-pl__mono{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--color-text-muted);}
  .md-pl__b{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px;}
  .md-pl__n{font-size:14px;font-weight:800;}
  .md-pl__d,.md-pl__s{font-size:12px;color:var(--color-text-muted);}
  /* APP-12: Minecraft page = Game Control left, narrow server card right (reference width: the editor's right column, .props 300px).
     .gm-top dissolves so page head, card and Game Control become grid items; under 1100px the card stacks ABOVE Game Control. */
  /* APP-56: row 1 (head) is content-sized, the rest goes to row 2. Before: rows "auto auto" inside the stretched .gm-root (flex:1) -> align-content:stretch
     grew BOTH rows, and the centred head floated in the middle of a tall row (gap above and below). */
  .gm-root--mc{display:grid;grid-template-columns:minmax(0,1fr) 320px;grid-template-rows:auto minmax(0,1fr);align-content:start;column-gap:18px;}
  .gm-root--mc .gm-top{display:contents;}
  .gm-root--mc .gm-top > *{grid-column:1 / -1;}
  .gm-root--mc .gm-top > .mdc-card-slot{grid-column:2;grid-row:2;align-self:start;}
  .gm-root--mc .gm-gc{grid-column:1;grid-row:2;min-width:0;}
  @media (max-width:1100px){
    .gm-root--mc{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);}
    .gm-root--mc .gm-top > .mdc-card-slot{grid-column:1;grid-row:2;}
    .gm-root--mc .gm-gc{grid-column:1;grid-row:3;}
  }
  /* APP-35: Minecraft mod list (column 1 of the .gm-root--mc grid, search on top, scrolls in its own box) */
  .gm-root--mc .gm-top > .mdl-wrap{grid-column:1;grid-row:2;min-width:0;align-self:start;}
  .mdl-search{width:100%;box-sizing:border-box;margin:0 0 10px;}
  .mdl-list{display:flex;flex-direction:column;gap:8px;max-height:calc(100vh - 210px);overflow-y:auto;padding-right:4px;}
  .mdl-row{display:flex;align-items:flex-start;gap:14px;padding:12px;border-radius:12px;background:var(--color-surface);border:1px solid var(--color-border);}
  .mdl-row--go{cursor:pointer;}
  .mdl-row--go:hover,.mdl-row--go:focus-visible{border-color:var(--color-accent);outline:none;}
  .mdl-ic{position:relative;flex:0 0 72px;width:72px;height:72px;border-radius:10px;overflow:hidden;background:var(--color-elevated);}
  .mdl-ic img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
  .mdl-ic__mono{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:800;color:var(--color-text-muted);}
  .mdl-b{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:3px;}
  .mdl-n{font-size:15px;font-weight:800;overflow-wrap:anywhere;}
  .mdl-k,.mdl-s{font-size:11px;color:var(--color-text-muted);}
  .mdl-d{font-size:12px;color:var(--color-text);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}
  .mdl-r{flex:0 1 auto;max-width:40%;display:flex;flex-direction:column;align-items:flex-end;gap:8px;}
  .mdl-st{font-size:12px;color:var(--color-text-muted);text-align:right;overflow-wrap:anywhere;}
  @media (max-width:1100px){ .gm-root--mc .gm-top > .mdl-wrap{grid-row:3;} }
  /* APP-13: Steam mod bar (cover, name, game folder, buttons, status) above Game Control */
  .mdw-bar{display:flex;align-items:flex-start;gap:16px;padding:14px;margin:0 0 14px;border-radius:14px;background:var(--color-surface);border:1px solid var(--color-border);}
  .mdw-cover{position:relative;flex:0 0 auto;width:72px;aspect-ratio:1;border-radius:10px;overflow:hidden;background:var(--color-elevated);}
  .mdw-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
  .mdw-cover__mono{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800;color:var(--color-text-muted);}
  .mdw-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:8px;}
  .mdw-name{font-size:16px;font-weight:800;}
  /* APP-431: beta note next to the game name. Real red on purpose: --color-danger is pink (#c4186d day / #E2557C dark). Day 5.6:1 on white; dark #f87171 = the red already used for .al-btn--danger */
  .mdw-beta{margin-left:8px;font-size:12px;font-weight:700;color:#c62828;white-space:nowrap;pointer-events:none;user-select:none;}
  :root[data-theme="dark"] .mdw-beta{color:#f87171;}
  .mdw-ver{display:flex;flex-wrap:wrap;gap:2px 14px;font-size:12px;color:var(--color-text-muted);}
  .mdw-ver__r{white-space:nowrap;}
  .mdw-upd{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;font-size:11px;font-weight:700;background:var(--color-elevated);border:1px solid var(--color-border);color:var(--color-text-muted);}
  .mdw-folder{display:flex;align-items:center;gap:10px;min-width:0;padding:8px 10px;border-radius:8px;background:var(--color-bg-deep);border:1px solid var(--color-border);font-size:13px;}
  .mdw-folder__l{flex:0 0 auto;font-weight:700;color:var(--color-text-muted);}
  .mdw-folder__v{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .mdw-folder__v--empty{color:var(--color-text-muted);font-style:italic;}
  .mdw-folder__src{flex:0 0 auto;font-size:11px;padding:1px 7px;border-radius:999px;background:var(--color-bg-elevated,var(--color-border));color:var(--color-text-muted);}
  .mdw-folder__b{flex:0 0 auto;margin-left:auto;display:flex;gap:6px;}
  .mdw-folder__b .al-btn{padding:3px 10px;font-size:12px;}
  .mdw-btns{display:flex;flex-wrap:wrap;gap:8px;}
  .mdw-prog{position:relative;overflow:hidden;min-width:160px;}
  .mdw-prog span{position:relative;z-index:1;}
  .mdw-prog i{position:absolute;left:0;top:0;bottom:0;background:var(--color-primary);opacity:.35;}
  .mdw-info .md-note{margin:2px 0;}
  .mdc-card{display:flex;flex-direction:column;gap:12px;padding:14px;border-radius:14px;background:var(--color-surface);border:1px solid var(--color-border);}
  .mdc-head{display:flex;align-items:center;gap:12px;}
  .mdc-cover{position:relative;flex:0 0 56px;width:56px;height:56px;border-radius:10px;overflow:hidden;background:var(--color-elevated);}
  .mdc-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
  .mdc-cover__mono{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:800;color:var(--color-text-muted);}
  .mdc-head__b{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:6px;}
  .mdc-title{font-size:17px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;}
  .mdc-pill{display:inline-block;padding:2px 10px;border-radius:99px;background:var(--color-elevated);color:var(--color-text-muted);font-size:12px;font-weight:700;}
  .mdc-pill--on{color:var(--color-primary);}
  .mdc-pill--busy{color:var(--color-accent);}
  .mdc-marks{display:flex;flex-wrap:wrap;gap:6px;}
  .mdc-mark{padding:2px 8px;border-radius:6px;background:var(--color-bg-deep);border:1px solid var(--color-border);font-size:12px;color:var(--color-text-muted);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .mdc-main{width:100%;min-width:0;}
  .mdc-card .md-sec{margin:0;padding:10px;min-width:0;}
  .mdc-card{min-width:0;overflow-wrap:anywhere;}
  .mdc-btns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .mdc-sbtn{position:relative;justify-content:center;min-width:0;padding:6px 6px;font-size:12px;text-align:center;white-space:normal;overflow-wrap:anywhere;line-height:1.2;}   /* APP-56: all four labels fully readable (wrap, never cut) */
  .mdc-badge{display:inline-block;min-width:16px;height:16px;line-height:16px;margin-left:6px;padding:0 4px;border-radius:99px;background:var(--color-primary);color:var(--color-on-primary);font-size:11px;font-style:normal;font-weight:800;text-align:center;vertical-align:middle;}
  /* APP-60: activation hint / restart row in the server card (tokens only: light + dark) */
  .mdc-mark--ok{color:var(--color-primary);border-color:var(--color-primary);}
  .mdc-warn{padding:8px 10px;border-radius:8px;border:1px solid var(--color-danger);background:var(--color-bg-deep);color:var(--color-danger);font-size:12px;font-weight:700;line-height:1.35;}
  .mdc-restart{display:flex;flex-wrap:wrap;align-items:center;gap:8px;}
  /* APP-61: set-up guide window (tokens only: light + dark) */
  /* APP-476: no margin-left:auto here - in the flex page head it pushed the guide button AND everything behind it (cover, profile, presets) to the right edge (gap after the title). The head wraps (flex-wrap) on narrow windows. */
  .mdc-guidebtn{margin-left:0;}
  .mdc-dlg--guide{width:820px;}
  .mdg-sec{margin:0 0 18px;}
  .mdg-h{margin:0 0 8px;font-size:15px;font-weight:800;color:var(--color-text);}
  .mdg-note{margin:0 0 8px;font-size:12px;color:var(--color-text-muted);line-height:1.4;}
  .mdg-list,.mdg-cmds{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;}
  .mdg-step{display:flex;gap:8px;align-items:flex-start;padding:6px 8px;border-radius:8px;border:1px solid transparent;font-size:12px;color:var(--color-text-muted);line-height:1.4;}
  .mdg-mk{flex:0 0 18px;width:18px;height:18px;line-height:18px;border-radius:99px;text-align:center;font-size:11px;font-weight:800;background:var(--color-bg-deep);border:1px solid var(--color-border);}
  .mdg-tx{display:flex;flex-direction:column;gap:6px;min-width:0;overflow-wrap:anywhere;}
  .mdg-step--done .mdg-mk{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-on-primary);}
  .mdg-step--next{border-color:var(--color-accent);background:var(--color-bg-deep);color:var(--color-text);font-weight:700;}
  .mdg-step--next .mdg-mk{border-color:var(--color-accent);color:var(--color-accent);}
  .mdg-cmd{display:flex;align-items:center;gap:8px;min-width:0;}
  .mdg-cmd code{flex:1 1 auto;min-width:0;padding:5px 8px;border-radius:8px;border:1px solid var(--color-border);background:var(--color-bg-deep);color:var(--color-text);font-size:12px;font-family:Consolas,monospace;overflow-wrap:anywhere;user-select:all;}
  .mdg-copy{flex:0 0 auto;}
  .mdg-c{display:flex;flex-direction:column;gap:4px;padding:6px 0;border-bottom:1px solid var(--color-border);}
  .mdg-d{font-size:12px;color:var(--color-text-muted);line-height:1.4;}
  .mdg-faq{margin:0;font-size:12px;line-height:1.4;}
  .mdg-faq dt{margin-top:8px;font-weight:800;color:var(--color-text);}
  .mdg-faq dd{margin:2px 0 0;color:var(--color-text-muted);overflow-wrap:anywhere;}
  .mdc-badge--dot{min-width:8px;width:8px;height:8px;padding:0;line-height:0;}
  .mdc-card .gm-errs{margin:0;}
  .mdc-back{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(23,19,37,.42);}
  :root[data-theme="dark"] .mdc-back{background:rgba(8,9,14,.78);}
  .mdc-dlg{display:flex;flex-direction:column;width:760px;max-width:100%;max-height:100%;border-radius:14px;background:var(--color-surface);border:1px solid var(--color-border);box-shadow:0 10px 30px rgba(0,0,0,.35);}
  .mdc-dlg--terminal{width:960px;height:min(640px,100%);}
  .mdc-dlg__h{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--color-border);}
  .mdc-dlg__t{font-size:16px;font-weight:800;}
  .mdc-sp{flex:1 1 auto;}
  .mdc-dlg__b{flex:1 1 auto;min-height:0;overflow-y:auto;padding:14px 16px;}
  .mdc-dlg__b .md-sec{margin:0;padding:0;border:0;background:none;}
  .mdc-dlg__b .md-sec__h{display:none;}
  .mdc-dlg--terminal .mdc-dlg__b{display:flex;flex-direction:column;}
  .mdc-dlg--terminal .mdc-dlg__b .md-sec{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;}
  .mdc-dlg--terminal .md-console{flex:1 1 auto;height:auto;min-height:0;}
  .mdc-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid var(--color-border);}
  .mdc-danger{color:var(--color-danger);}
  /* Game Control embedded for ONE game: no games rail, the events take the full width. */
  .gc-host.gc-single .gc-cols{grid-template-columns:minmax(0,1fr);}

  /* APP-72: Hinweisleiste Verbindungslimit - volle Breite ueber #shell; Warnfarbe aus --color-warning (hell Magenta, dunkel Amber) */
  .stk-limit-bar{display:flex;align-items:center;gap:10px;flex:0 0 auto;padding:9px 16px;background:var(--color-warning);color:#fff;font-size:13px;font-weight:600;line-height:1.35;}
  :root[data-theme="dark"] .stk-limit-bar{color:#1b1306;}
  .stk-limit-bar__ic{display:inline-flex;flex:0 0 auto;}
  .stk-limit-bar__tx{min-width:0;overflow-wrap:anywhere;}
  .stk-limit-bar a{color:inherit;text-decoration:underline;text-underline-offset:2px;font-weight:700;}
  .stk-limit-bar a:hover,.stk-limit-bar a:focus-visible{text-decoration-thickness:2px;}

  /* APP-273: gemeinsamer Lade-Platzhalter aller Bilder (js/core/49-bild-platzhalter.js setzt nur diese Klassen).
     Schimmer = Hintergrund des noch ladenden Bildes selbst: Groesse/Form/Rundung kommen vom Behaelter (.gm-cover, .gc-logo, .mdc-cover ...
     mit festem aspect-ratio bzw. fester Kantenlaenge), also kein Springen. Farben nur ueber die Tokens (hell/dunkel). */
  img.stk-img-loading{
    background-color:var(--color-elevated);
    background-image:linear-gradient(100deg, var(--color-elevated) 30%, var(--color-elevated-hover) 50%, var(--color-elevated) 70%);
    background-size:220% 100%; background-repeat:no-repeat;
    animation:stkImgShimmer 1.4s linear infinite;
    color:transparent;
    /* APP-301: das Bild selbst bleibt UNSICHTBAR, bis es geladen UND dekodiert ist (49-bild-platzhalter.js): die Bildflaeche wird aus dem Kasten
       geschoben (Ersatzinhalt wird am Kasten abgeschnitten), der Schimmer als Hintergrund bleibt in genau der Groesse des Bildes stehen.
       Kein halb gemaltes Bild, kein Groessen-Springen (die Kastengroesse aendert sich nicht). Beim Wegnehmen der Klasse greifen wieder die Werte des Behaelters. */
    object-fit:none !important; object-position:-100000px 0 !important;
  }
  /* APP-326: schon einmal gezeigtes Bild beim Wiederaufbau einer Ansicht: unsichtbar OHNE Schimmer, bis decode() fertig ist (meist ein Bild,
     danach sofort fertig ohne Einblenden). Dauert es laenger als 120 ms, setzt 49-bild-platzhalter.js stk-img-loading (Schimmer). */
  img.stk-img-wait{ color:transparent; object-fit:none !important; object-position:-100000px 0 !important; }
  @keyframes stkImgShimmer{ 0%{background-position:120% 0;} 100%{background-position:-20% 0;} }
  img.stk-img-in{ animation:stkImgIn .2s ease-out; }
  @keyframes stkImgIn{ from{opacity:0;} to{opacity:1;} }
  /* Fehlerfall: unsichtbar, ohne Groessenaenderung; die ruhige Flaeche liefert der Behaelter mit fester Groesse (background:var(--color-elevated)). */
  img.stk-img-failed{ visibility:hidden; }
  @media (prefers-reduced-motion: reduce){
    img.stk-img-loading{ animation:none; background-image:none; }
    img.stk-img-in{ animation:none; }
  }
