/*
   * css/mobile-patches.css
   * Mobile-only Overrides — verschoben aus player-patches.css (Phase 2b)
   * Heimat fuer alle @media(max-width:760px) Korrekturen
   */

  /* ── PATCH: v98SafeResyncCss (orig L51–155) ── */
@media (max-width:760px){
  html, body{
    width:100vw!important;
    max-width:100vw!important;
    min-width:0!important;
    height:100dvh!important;
    max-height:100dvh!important;
    overflow:hidden!important;
    overscroll-behavior:none!important;
    touch-action:manipulation!important;
  }
  body[data-smfp-active="1"]{
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100dvh!important;
    max-width:100vw!important;
    max-height:100dvh!important;
    overflow:hidden!important;
    padding:0!important;
  }
  #mffApp{
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100dvh!important;
    min-height:0!important;
    max-width:100vw!important;
    max-height:100dvh!important;
    overflow:hidden!important;
    padding:calc(3px + env(safe-area-inset-top)) 0 calc(5px + env(safe-area-inset-bottom)) 0!important;
    box-sizing:border-box!important;
  }
  #mffApp .mff-shell,
  .mff-shell{
    width:calc(100vw - 54px)!important;
    max-width:430px!important;
    min-width:0!important;
    height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 8px)!important;
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 8px)!important;
    margin:0 auto!important;
    padding:27px 0 5px 0!important;
    gap:5px!important;
    overflow:hidden!important;
    justify-content:flex-start!important;
    transform:none!important;
  }
  #mffApp .mff-side,
  .mff-side{
    width:16px!important;
    top:calc(82px + env(safe-area-inset-top))!important;
    bottom:calc(72px + env(safe-area-inset-bottom))!important;
    border-radius:12px!important;
  }
  #mffApp .mff-left,.mff-left{left:5px!important;}
  #mffApp .mff-right,.mff-right{right:5px!important;}
  #mffApp .mff-now{min-height:92px!important;height:92px!important;padding:8px!important;border-radius:20px!important;grid-template-columns:62px minmax(0,1fr) 58px!important;gap:7px!important;}
  #mffApp .mff-symbol{width:62px!important;height:62px!important;border-radius:15px!important;overflow:hidden!important;}
  #mffApp .mff-title small{font-size:10px!important;margin-bottom:5px!important;}
  #mffApp .mff-title h1{font-size:15px!important;margin-bottom:5px!important;}
  #mffApp .mff-title h2{font-size:11px!important;}
  #mffApp .mff-history{min-width:58px!important;width:58px!important;height:36px!important;font-size:10px!important;border-radius:14px!important;padding:0 4px!important;}
  #mffApp .mff-panel-led-panel{min-height:30px!important;height:30px!important;padding:4px 7px!important;gap:6px!important;}
  #mffApp .mff-panel-led{height:21px!important;min-width:32px!important;padding:0 5px!important;font-size:9px!important;}
  #mffApp .mff-discord-slot{min-height:29px!important;height:29px!important;overflow:hidden!important;display:flex!important;align-items:center!important;justify-content:center!important;}
  #mffApp .s666-discord-panel{max-width:174px!important;min-height:26px!important;height:26px!important;margin:0!important;padding:3px 5px!important;gap:4px!important;overflow:hidden!important;}
  #mffApp .s666-discord-button{min-width:31px!important;min-height:22px!important;height:22px!important;font-size:8px!important;padding:2px 6px!important;}
  #mffApp .s666-discord-status{font-size:8px!important;gap:3px!important;}
  #mffApp .s666-discord-led{width:7px!important;height:7px!important;}
  #mffApp .mff-cards{height:66px!important;min-height:66px!important;gap:6px!important;grid-template-columns:1fr 1fr 1.28fr!important;}
  #mffApp .mff-card{height:66px!important;min-height:66px!important;padding:7px 5px!important;border-radius:15px!important;grid-template-rows:18px 24px 6px!important;}
  #mffApp .mff-card small{font-size:8.5px!important;letter-spacing:.08em!important;}
  #mffApp .mff-card strong{font-size:14px!important;margin-top:4px!important;}
  #mffApp .mff-card:nth-child(3) strong{font-size:12px!important;}
  #mffApp .mff-eq{height:138px!important;min-height:138px!important;padding:9px!important;border-radius:18px!important;}
  #mffApp .mff-eq header{margin-bottom:6px!important;}
  #mffApp .mff-eq header span{font-size:12px!important;}
  #mffApp .mff-eq header b{font-size:9px!important;}
  #mffApp .mff-eq-bars{height:88px!important;gap:4px!important;padding:7px 6px!important;border-radius:14px!important;}
  #mffApp .mff-eq footer{margin-top:5px!important;font-size:9px!important;}
  #mffApp .mff-controls{height:58px!important;min-height:58px!important;padding:6px!important;border-radius:18px!important;gap:4px!important;}
  #mffApp .mff-controls button{height:42px!important;min-height:42px!important;border-radius:13px!important;font-size:15px!important;}
  #mffApp #mffBoost{font-size:10px!important;}
  #mffApp .mff-boost-row-panel{height:34px!important;min-height:34px!important;padding:5px 7px!important;border-radius:17px!important;}
  #mffApp .mff-boost-led-row{height:24px!important;min-height:24px!important;gap:6px!important;padding:0 8px!important;}
  #mffApp .mff-boost-led-label{font-size:8.5px!important;}
  #mffApp .mff-boost-gain{font-size:9px!important;}
  #mffApp .mff-bottom{height:48px!important;min-height:48px!important;padding:8px 10px!important;border-radius:17px!important;}
  #mffApp .mff-bottom-bars{height:30px!important;gap:2px!important;}
  #mffApp .mff-bottom-bars i{height:22px!important;min-height:22px!important;max-height:22px!important;border-radius:4px!important;}
  #mffApp .smfp-version-badge{top:calc(5px + env(safe-area-inset-top))!important;right:8px!important;font-size:9px!important;padding:4px 7px!important;}
  #mffApp .mff-history-overlay{top:calc(52px + env(safe-area-inset-top))!important;width:calc(100vw - 34px)!important;max-height:calc(100dvh - 90px - env(safe-area-inset-bottom))!important;}
  #mffApp .mff-history-list{max-height:calc(100dvh - 155px - env(safe-area-inset-bottom))!important;}
}
@media (max-width:380px) and (max-height:740px){
  #mffApp .mff-shell{width:calc(100vw - 46px)!important;padding-top:34px!important;gap:5px!important;}
  #mffApp .mff-side{width:14px!important;left:auto!important;}
  #mffApp .mff-left{left:4px!important;} #mffApp .mff-right{right:4px!important;}
  #mffApp .mff-eq{height:130px!important;min-height:130px!important;}
  #mffApp .mff-eq-bars{height:80px!important;}
  #mffApp .mff-now{height:88px!important;min-height:88px!important;}
  #mffApp .mff-symbol{width:50px!important;height:50px!important;}
}


/* ── PATCH: smfpPlayerAlertV152Style (orig L159–181) ── */
  .now-playing{position:relative!important;}
  .player-alert-pc-box{position:absolute!important;right:102px!important;bottom:16px!important;z-index:22!important;display:flex!important;align-items:center!important;gap:7px!important;max-width:360px!important;pointer-events:auto!important;}
  .player-alert-pc-text{width:245px!important;height:38px!important;min-height:38px!important;max-height:38px!important;resize:none!important;overflow:hidden!important;border-radius:11px!important;border:1px solid rgba(255,61,187,.55)!important;background:rgba(4,8,20,.72)!important;color:#29fff4!important;font-size:11px!important;line-height:14px!important;font-weight:800!important;padding:5px 8px!important;box-shadow:inset 0 0 14px rgba(22,255,243,.06),0 0 10px rgba(255,61,187,.12)!important;outline:none!important;}
  .player-alert-pc-text::placeholder{color:rgba(247,248,255,.46)!important;}
  .player-alert-send-btn,.mff-alert-send-btn,.mff-alert-open{height:38px!important;min-width:58px!important;border-radius:13px!important;border:1px solid rgba(22,255,243,.55)!important;background:rgba(4,8,20,.82)!important;color:#29fff4!important;font-size:11px!important;font-weight:950!important;letter-spacing:.08em!important;box-shadow:0 0 12px rgba(22,255,243,.16),inset 0 0 12px rgba(255,61,187,.06)!important;}
  .player-alert-send-btn[disabled],.mff-alert-send-btn[disabled]{opacity:.5!important;filter:grayscale(.35)!important;}
  .player-alert-backdrop{position:fixed!important;inset:0!important;z-index:2147483400!important;background:rgba(0,0,0,.62)!important;display:none!important;align-items:center!important;justify-content:center!important;backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important;}
  .player-alert-backdrop.is-open{display:flex!important;}
  .player-alert-modal{width:min(520px,calc(100vw - 42px))!important;border-radius:22px!important;border:1px solid rgba(255,61,187,.72)!important;background:radial-gradient(circle at 20% 0%,rgba(255,61,187,.16),transparent 34%),radial-gradient(circle at 80% 10%,rgba(22,255,243,.13),transparent 36%),rgba(3,7,18,.98)!important;color:#f7f8ff!important;box-shadow:0 0 34px rgba(255,61,187,.32),0 0 28px rgba(22,255,243,.18)!important;padding:18px!important;text-align:left!important;}
  .player-alert-modal h3{margin:0 0 10px!important;color:#29fff4!important;font-size:15px!important;letter-spacing:.14em!important;font-weight:950!important;}
  .player-alert-message{font-size:16px!important;line-height:1.35!important;color:#fff!important;white-space:pre-wrap!important;word-break:break-word!important;margin:10px 0 16px!important;}
  .player-alert-close{height:40px!important;min-width:92px!important;border-radius:14px!important;border:1px solid rgba(22,255,243,.56)!important;background:rgba(4,8,20,.82)!important;color:#29fff4!important;font-weight:950!important;letter-spacing:.1em!important;}
  .mff-alert-open{position:absolute!important;right:78px!important;bottom:8px!important;height:30px!important;min-width:50px!important;font-size:10px!important;border-radius:12px!important;z-index:9!important;}
  .mff-alert-editor-backdrop{position:fixed!important;inset:0!important;z-index:2147483350!important;background:rgba(0,0,0,.62)!important;display:none!important;align-items:center!important;justify-content:center!important;backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important;}
  .mff-alert-editor-backdrop.is-open{display:flex!important;}
  .mff-alert-editor{width:min(460px,calc(100vw - 38px))!important;border-radius:22px!important;border:1px solid rgba(255,61,187,.72)!important;background:rgba(3,7,18,.98)!important;box-shadow:0 0 34px rgba(255,61,187,.32),0 0 28px rgba(22,255,243,.18)!important;padding:16px!important;}
  .mff-alert-editor h3{margin:0 0 10px!important;color:#29fff4!important;font-size:13px!important;letter-spacing:.14em!important;font-weight:950!important;}
  .mff-alert-editor textarea{width:100%!important;height:110px!important;border-radius:15px!important;border:1px solid rgba(255,61,187,.55)!important;background:rgba(4,8,20,.72)!important;color:#29fff4!important;font-size:14px!important;font-weight:800!important;padding:10px!important;resize:none!important;outline:none!important;box-sizing:border-box!important;}
  .mff-alert-editor-actions{display:flex!important;justify-content:flex-end!important;gap:8px!important;margin-top:12px!important;}
  .mff-alert-cancel{height:38px!important;min-width:74px!important;border-radius:13px!important;border:1px solid rgba(247,248,255,.25)!important;background:rgba(4,8,20,.72)!important;color:#f7f8ff!important;font-weight:900!important;}
  @media(max-width:760px){.player-alert-pc-box{display:none!important;}}


/* ── PATCH: v162IphoneSendBoostRootFix (orig L441–574) ── */
/*
  666SOUNDsDESIGn — v162 iPHONE SEND + BOOST ROOT FIX
  Erstellt: 2026-05-18
  Geändert: 2026-05-18
  Zweck: Nur Mobile-Struktur reparieren: SEND klickbar, Topbar-Reihenfolge [Discord][SEND][V160], Boost-4-Confirm-Overlay vor die Radio-App legen.
  Regeln: Keine neue Topbar, keine neuen Buttons, keine neue Boost-Engine, keine PC-Geometrieänderung.
*/
@media(max-width:760px){
  #mffApp .mff-discord-slot{
    position:relative!important;
    z-index:2147482500!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    flex-wrap:nowrap!important;
    min-height:34px!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
    isolation:isolate!important;
  }
  #mffApp .mff-discord-slot [data-discord-addon-panel],
  #mffApp .mff-discord-slot .s666-discord-panel{
    order:1!important;
    max-width:132px!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
    z-index:3!important;
  }
  #mffApp #mffAlertOpen.mff-alert-open{
    position:static!important;
    inset:auto!important;
    right:auto!important;
    bottom:auto!important;
    order:2!important;
    height:30px!important;
    min-width:58px!important;
    max-width:68px!important;
    padding:0 9px!important;
    margin:0!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
    cursor:pointer!important;
    z-index:4!important;
    -webkit-user-select:none!important;
    user-select:none!important;
  }
  #mffApp .mff-discord-slot .smfp-version-badge.mff-version-inline{
    order:3!important;
    position:static!important;
    inset:auto!important;
    right:auto!important;
    top:auto!important;
    z-index:2!important;
    min-width:54px!important;
    min-height:30px!important;
    padding:0 8px!important;
    margin-left:0!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    font-size:10px!important;
    pointer-events:none!important;
    white-space:nowrap!important;
  }
  #mffApp .mff-history-backdrop,
  #mffApp .mff-history-overlay,
  #mffApp .mff-led-tip,
  #mffApp .mff-side,
  #mffApp .mff-bottom,
  #mffApp .mff-eq{
    touch-action:manipulation!important;
  }
  body[data-smfp-active="1"] > #mffAlertEditorBackdrop,
  body[data-smfp-active="1"] > #mffExtremeBoostBackdrop,
  body[data-smfp-active="1"] > #playerAlertReceiveBackdrop{
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    width:auto!important;
    height:auto!important;
    min-width:0!important;
    min-height:0!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }
  body[data-smfp-active="1"] > #mffAlertEditorBackdrop.is-open{
    display:flex!important;
    z-index:2147483600!important;
  }
  body[data-smfp-active="1"] > #mffExtremeBoostBackdrop{
    display:flex!important;
    z-index:2147483700!important;
  }
  #mffExtremeBoostBackdrop,
  #mffExtremeBoostBackdrop *,
  #mffAlertEditorBackdrop,
  #mffAlertEditorBackdrop *{
    pointer-events:auto!important;
    touch-action:manipulation!important;
  }
  #mffApp[data-mff-boost-stage="4"] .mff-boost-led[data-led="1"],
  #mffApp[data-mff-boost-stage="4"] .mff-boost-led[data-led="2"],
  #mffApp[data-mff-boost-stage="4"] .mff-boost-led[data-led="3"]{
    background:linear-gradient(135deg,var(--mff-cyan),var(--mff-pink))!important;
    border-color:rgba(22,255,243,.85)!important;
    box-shadow:0 0 10px rgba(22,255,243,.58),0 0 16px rgba(255,61,187,.26)!important;
  }
  #mffApp[data-mff-boost-stage="4"] .mff-boost-led[data-led="4"]{
    background:#ff1744!important;
    border-color:rgba(255,45,72,.98)!important;
    box-shadow:0 0 12px rgba(255,23,68,.95),0 0 24px rgba(255,23,68,.55)!important;
  }
  #mffApp[data-mff-boost-stage="4"] #mffBoost{
    border-color:rgba(255,23,68,.90)!important;
    color:#fff!important;
    box-shadow:0 0 16px rgba(255,23,68,.42),inset 0 0 12px rgba(255,23,68,.18)!important;
  }
}
.mff-extreme-boost-backdrop{position:fixed!important;inset:0!important;z-index:2147483700!important;display:flex!important;align-items:center!important;justify-content:center!important;background:rgba(0,0,0,.68)!important;backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important;}
.mff-extreme-boost-modal{width:min(440px,calc(100vw - 42px))!important;border-radius:22px!important;border:1px solid rgba(255,23,68,.82)!important;background:radial-gradient(circle at 18% 0%,rgba(255,23,68,.22),transparent 36%),rgba(3,7,18,.98)!important;color:#f7f8ff!important;padding:18px!important;box-shadow:0 0 34px rgba(255,23,68,.34),0 0 24px rgba(22,255,243,.14)!important;}
.mff-extreme-boost-modal h3{margin:0 0 10px!important;color:#ff3d6e!important;letter-spacing:.12em!important;font-size:15px!important;font-weight:950!important;}
.mff-extreme-boost-modal p{margin:0 0 16px!important;line-height:1.35!important;font-size:14px!important;}
.mff-extreme-boost-actions{display:flex!important;justify-content:flex-end!important;gap:10px!important;}
.mff-extreme-boost-actions button{height:38px!important;min-width:84px!important;border-radius:13px!important;border:1px solid rgba(22,255,243,.55)!important;background:rgba(4,8,20,.82)!important;color:#29fff4!important;font-weight:950!important;pointer-events:auto!important;touch-action:manipulation!important;}
.mff-extreme-boost-actions [data-extreme="ok"]{border-color:rgba(255,23,68,.78)!important;color:#fff!important;background:rgba(255,23,68,.25)!important;}


/* ── PATCH: smfpV185TickerMeterBoostOverlayFix (orig L576–586) ── */
@media(max-width:760px){
  #mffApp .mff-title h1{position:relative!important;display:block!important;overflow:hidden!important;white-space:nowrap!important;animation:none!important;padding-left:0!important;}
  #mffApp .mff-title h1 span{display:inline-block!important;min-width:max-content!important;padding-left:100%!important;animation:smfpV185Marquee 22s linear infinite!important;will-change:transform!important;}
  @keyframes smfpV185Marquee{0%{transform:translateX(0)}100%{transform:translateX(-100%)}}
  #mffApp .mff-history-backdrop{z-index:2147483400!important;pointer-events:none!important;}
  #mffApp[data-history-open="1"] .mff-history-backdrop{pointer-events:auto!important;display:block!important;opacity:1!important;}
  #mffApp .mff-history-overlay{z-index:2147483500!important;}
  #mffApp .mff-side:before{height:calc(88% * var(--mff-level))!important;transition:height 120ms linear, filter 120ms linear!important;}
}


/* ── PATCH: ledStripV108Css (orig L589–605) ── */
  /* ── LED STRIP v108 — 17-Chip Systempanel ──────────────── */
  .led-strip-v108{display:inline-flex!important;flex-wrap:wrap!important;align-items:center!important;gap:4px!important;min-width:0!important;}
  .led-strip-v108 .status-chip.led-state{min-height:26px!important;padding:0 7px!important;font-size:9.5px!important;gap:5px!important;min-width:auto!important;}
  .led-strip-v108 .status-chip.led-state .status-dot{width:7px!important;height:7px!important;flex:0 0 7px!important;}
  /* Mobile: stack strips, centered, wrap */
  @media(max-width:760px){
    .led-strip-v108{justify-content:center!important;gap:3px!important;}
    .led-strip-v108 .status-chip.led-state{min-height:22px!important;padding:0 5px!important;font-size:8.5px!important;gap:4px!important;}
    .led-strip-v108 .status-chip.led-state .status-dot{width:6px!important;height:6px!important;flex:0 0 6px!important;}
  }
  /* State colors for new chips */
  .status-chip.led-state.state-empty .status-dot{background:rgba(255,255,255,.06)!important;border:1px solid rgba(255,255,255,.30)!important;box-shadow:none!important;}
  .status-chip.led-state.state-ok .status-dot,.status-chip.led-state.state-main .status-dot{background:#28fff4!important;border-color:rgba(40,255,244,.96)!important;box-shadow:0 0 9px rgba(22,255,243,.95),0 0 16px rgba(22,255,243,.35)!important;}
  .status-chip.led-state.state-warn .status-dot{background:var(--color-pink)!important;border-color:rgba(255,61,187,.95)!important;box-shadow:0 0 9px rgba(255,61,187,.90)!important;}
  .status-chip.led-state.state-error .status-dot{background:#ff2244!important;border-color:rgba(255,34,68,.95)!important;box-shadow:0 0 9px rgba(255,34,68,.90)!important;}


/* ── PATCH: meterStaircaseV108 (orig L607–629) ── */
  /* ── STAIRCASE LEVELMETER v108 ────────────────────────────────────────────── */
  /* Left side: outer(A)=widest+tallest → inner(C)=narrowest+shortest */
  .side-meter.left  .side-meter-track               { width:18px!important; max-height:100%!important; align-self:flex-end!important; }
  .side-meter.left  .side-meter-track.secondary     { width:12px!important; max-height:76%!important;  align-self:flex-end!important; }
  .side-meter.left  .side-meter-track.tertiary      { width: 8px!important; max-height:55%!important;  align-self:flex-end!important; }
  /* Right side: mirror — inner(A)=narrowest+shortest, outer(C)=widest+tallest */
  .side-meter.right .side-meter-track               { width: 8px!important; max-height:55%!important;  align-self:flex-end!important; }
  .side-meter.right .side-meter-track.secondary     { width:12px!important; max-height:76%!important;  align-self:flex-end!important; }
  .side-meter.right .side-meter-track.tertiary      { width:18px!important; max-height:100%!important; align-self:flex-end!important; }
  /* Stack direction: bars side by side, growing from bottom */
  .side-meter-stack { display:flex!important; flex-direction:row!important; align-items:flex-end!important; gap:2px!important; height:100%!important; }
  .side-meter-track { display:flex!important; flex-direction:column!important; justify-content:flex-end!important; height:100%!important; border-radius:2px 2px 0 0!important; overflow:hidden!important; background:rgba(255,255,255,.04)!important; }
  .side-meter-fill  { width:100%!important; border-radius:2px 2px 0 0!important; transition:height 60ms linear!important; }
  @media(max-width:760px){
    .side-meter.left  .side-meter-track               { width:14px!important; }
    .side-meter.left  .side-meter-track.secondary     { width: 9px!important; }
    .side-meter.left  .side-meter-track.tertiary      { width: 6px!important; }
    .side-meter.right .side-meter-track               { width: 6px!important; }
    .side-meter.right .side-meter-track.secondary     { width: 9px!important; }
    .side-meter.right .side-meter-track.tertiary      { width:14px!important; }
  }


/* ── PATCH: v116TickerIdlePlayStateCss (orig L3834–3922) ── */
@media (max-width:760px){
  /* Do not rebuild the mobile player grid. Keep v96 geometry intact and only move the complete HUD slightly upward. */
  #mffApp .mff-shell{
    transform:translateY(-28px)!important;
    overflow:hidden!important;
  }
  #mffApp .mff-side{
    transform:translateY(-20px)!important;
  }
  /* Protect cards/EQ/control spacing from v97-style forced grid rows. */
  #mffApp .mff-cards{
    margin-bottom:0!important;
    align-items:stretch!important;
  }
  #mffApp .mff-eq{
    margin-top:0!important;
    overflow:hidden!important;
  }
  #mffApp .mff-controls{
    margin-top:0!important;
  }
  /* Keep track title inside the card instead of bleeding out of the viewport. */
  #mffApp .mff-title h1,
  #mffApp .mff-title h1 span{
    display:block!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
}
@media (max-width:380px) and (max-height:740px){
  #mffApp .mff-shell{transform:translateY(-18px)!important;}
  #mffApp .mff-side{transform:translateY(-12px)!important;}
}

  /* v111: Version badge belongs in the Discord/control row, not as a loose corner badge on mobile. */
  #mffApp .mff-discord-slot{display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;flex-wrap:nowrap!important;}
  #mffApp .mff-discord-slot .smfp-version-badge.mff-version-inline{
    position:static!important;inset:auto!important;right:auto!important;top:auto!important;z-index:auto!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    min-height:30px!important;padding:0 10px!important;border-radius:14px!important;
    border:1px solid rgba(255,61,187,.72)!important;background:rgba(255,61,187,.14)!important;
    color:#fff!important;font-size:11px!important;font-weight:950!important;letter-spacing:.09em!important;
    box-shadow:0 0 12px rgba(255,61,187,.24)!important;pointer-events:none!important;
  }
  /* v111: hard guard against stacked EQ canvases/morph layers. */
  #mffApp .mff-eq canvas,
  #mffApp .mff-eq .mff-morph,
  #mffApp .mff-eq .mff-circular,
  #mffApp .mff-eq .circular-morph,
  #mffApp .mff-eq .morph-reactor,
  #mffApp .mff-eq [data-morph],
  #mffApp .mff-eq [data-visualizer-extra]{display:none!important;}



/* v116 TICKER IDLE/PLAY STATE
   Zweck: iPhone-Header-Ticker aus Referenz wiederherstellen: EIN Span, eine Animation, kein Ellipsis-Abbruch. */
@media(max-width:760px){
  #mffApp .mff-title{min-width:0!important;overflow:hidden!important;}
  #mffApp .mff-title h1{
    position:relative!important;
    display:block!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-overflow:clip!important;
    max-width:100%!important;
  }
  #mffApp .mff-title h1 span{
    display:inline-block!important;
    width:max-content!important;
    max-width:none!important;
    min-width:100%!important;
    padding-left:100%!important;
    padding-right:100%!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
    will-change:transform!important;
    animation:mffCanonicalTickerV113 42s linear infinite!important;
  }
}
@keyframes mffCanonicalTickerV113{
  0%{transform:translateX(0);}
  100%{transform:translateX(-100%);}
}


/* ── PATCH: smfpV181IphoneUiCss (orig L4839–4885) ── */
@media (max-width:760px){
  html,body{touch-action:manipulation!important;-webkit-text-size-adjust:100%!important;overscroll-behavior:none!important;}
  #mffApp .mff-now{grid-template-columns:58px minmax(0,1fr)!important;}
  #mffApp .mff-now .mff-history{display:none!important;}
  #mffApp .mff-title h1,#mffApp .mff-title h2{min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;}
  #mffApp .mff-title h1{display:block!important;position:relative!important;overflow:hidden!important;white-space:nowrap!important;padding-left:0!important;animation:none!important;}
  #mffApp .mff-title h1 span{display:inline-block!important;min-width:max-content!important;padding-left:100%!important;animation:smfpV185Marquee 22s linear infinite!important;will-change:transform!important;}
  @keyframes smfpV185Marquee{0%{transform:translateX(0)}100%{transform:translateX(-100%)}}
  #mffApp .mff-discord-slot{justify-content:flex-start!important;gap:5px!important;padding-left:2px!important;overflow:visible!important;}
  #mffApp .mff-discord-slot [data-discord-addon-panel],
  #mffApp .mff-discord-slot .s666-discord-panel{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;margin:0!important;min-width:0!important;width:auto!important;max-width:none!important;height:26px!important;}
  #mffApp .mff-discord-slot .s666-discord-actions{gap:4px!important;}
  #mffApp .mff-discord-slot .s666-discord-button{height:24px!important;min-height:24px!important;min-width:43px!important;border-radius:12px!important;}
  #mffApp .mff-discord-slot .s666-discord-text{display:none!important;}
  #mffApp .smfp-version-badge,
  #mffApp .mff-version-inline{position:static!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;margin:0!important;color:#29fff4!important;font-weight:950!important;letter-spacing:.10em!important;}
  #mffApp .smfp-v181-footer-version{display:block!important;text-align:center!important;margin:-4px 0 0!important;color:#29fff4!important;font-size:10px!important;font-weight:950!important;letter-spacing:.12em!important;text-shadow:0 0 10px rgba(22,255,243,.42)!important;}
  #mffApp .smfp-v181-history-lane{display:flex!important;align-items:center!important;gap:6px!important;margin-left:auto!important;}
  #mffApp .smfp-v181-history-lane .mff-history{display:flex!important;align-items:center!important;justify-content:center!important;width:62px!important;min-width:62px!important;height:28px!important;border-radius:13px!important;font-size:10px!important;padding:0 5px!important;}
  #mffApp .smfp-v181-send-leds{display:inline-flex!important;align-items:center!important;gap:4px!important;margin-left:5px!important;vertical-align:middle!important;}
  #mffApp .smfp-v181-send-led{width:8px!important;height:8px!important;border-radius:50%!important;border:1px solid rgba(247,248,255,.34)!important;background:rgba(247,248,255,.16)!important;box-shadow:inset 0 0 5px rgba(255,255,255,.08)!important;}
  #mffApp[data-send-state="sending"] .smfp-v181-send-led[data-led="request"]{background:#29fff4!important;box-shadow:0 0 10px rgba(22,255,243,.9)!important;}
  #mffApp[data-send-state="ok"] .smfp-v181-send-led[data-led="request"],
  #mffApp[data-send-state="ok"] .smfp-v181-send-led[data-led="confirm"]{background:#29fff4!important;box-shadow:0 0 10px rgba(22,255,243,.9)!important;}
  #mffApp[data-send-state="fail"] .smfp-v181-send-led[data-led="confirm"]{background:#ff315d!important;box-shadow:0 0 10px rgba(255,49,93,.9)!important;}
  #mffApp .mff-boost-led-wrap .mff-boost-led[data-led="5"]{display:block!important;}
  #mffApp .mff-boost-led{background:rgba(247,248,255,.14)!important;border-color:rgba(247,248,255,.28)!important;box-shadow:none!important;}
  #mffApp[data-mff-boost-stage="1"] .mff-boost-led[data-led="1"],
  #mffApp[data-mff-boost-stage="2"] .mff-boost-led[data-led="1"],
  #mffApp[data-mff-boost-stage="2"] .mff-boost-led[data-led="2"],
  #mffApp[data-mff-boost-stage="3"] .mff-boost-led[data-led="1"],
  #mffApp[data-mff-boost-stage="3"] .mff-boost-led[data-led="2"],
  #mffApp[data-mff-boost-stage="4"] .mff-boost-led[data-led="1"],
  #mffApp[data-mff-boost-stage="4"] .mff-boost-led[data-led="2"],
  #mffApp[data-mff-boost-stage="5"] .mff-boost-led[data-led="1"],
  #mffApp[data-mff-boost-stage="5"] .mff-boost-led[data-led="2"]{background:#29fff4!important;border-color:#29fff4!important;box-shadow:0 0 10px rgba(41,255,244,.82)!important;}
  #mffApp[data-mff-boost-stage="3"] .mff-boost-led[data-led="3"],
  #mffApp[data-mff-boost-stage="4"] .mff-boost-led[data-led="3"],
  #mffApp[data-mff-boost-stage="5"] .mff-boost-led[data-led="3"]{background:var(--color-pink)!important;border-color:var(--color-pink)!important;box-shadow:0 0 10px rgba(255,61,187,.86)!important;}
  #mffApp[data-mff-boost-stage="4"] .mff-boost-led[data-led="4"],
  #mffApp[data-mff-boost-stage="5"] .mff-boost-led[data-led="4"],
  #mffApp[data-mff-boost-stage="5"] .mff-boost-led[data-led="5"]{background:#ff315d!important;border-color:#ff315d!important;box-shadow:0 0 12px rgba(255,49,93,.92),0 0 20px rgba(255,49,93,.42)!important;}
  #mffApp input,#mffApp textarea,#mffApp select{font-size:16px!important;transform:translateZ(0)!important;}
  body.smfp-v181-overlay-lock{position:fixed!important;inset:0!important;width:100%!important;overflow:hidden!important;}
}


/* ── PATCH: smfpV181MobileVisibleRootfixCss (orig L5017–5044) ── */
@media (max-width:760px){
  #mffApp .mff-now .mff-history{display:none!important;visibility:hidden!important;pointer-events:none!important;}
  #mffApp .mff-discord-slot{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;padding-left:0!important;overflow:visible!important;}
  #mffApp .mff-discord-slot [data-discord-addon-panel],
  #mffApp .mff-discord-slot .s666-discord-panel{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;margin:0!important;min-width:0!important;width:auto!important;max-width:none!important;height:28px!important;display:flex!important;align-items:center!important;gap:5px!important;}
  #mffApp .mff-discord-slot .s666-discord-status{display:inline-flex!important;min-width:10px!important;width:10px!important;gap:0!important;overflow:visible!important;}
  #mffApp .mff-discord-slot .s666-discord-text{display:none!important;}
  #mffApp .mff-discord-slot .s666-discord-actions{display:inline-flex!important;align-items:center!important;gap:4px!important;}
  #mffApp .mff-discord-slot .s666-discord-button{height:25px!important;min-height:25px!important;min-width:44px!important;border-radius:13px!important;font-size:10px!important;padding:0 8px!important;}
  #mffApp .smfp-version-badge,
  #mffApp .mff-version-inline,
  #mffApp .smfp-v181-hidden-version{display:none!important;visibility:hidden!important;pointer-events:none!important;}
  #mffApp .smfp-v181-history-lane{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;margin-left:auto!important;}
  #mffApp .smfp-v181-history-lane .mff-history{display:flex!important;visibility:visible!important;pointer-events:auto!important;align-items:center!important;justify-content:center!important;width:66px!important;min-width:66px!important;height:30px!important;border-radius:14px!important;font-size:10px!important;font-weight:900!important;padding:0 6px!important;background:rgba(4,8,20,.72)!important;border:1px solid rgba(255,61,187,.58)!important;box-shadow:0 0 10px rgba(255,61,187,.18),inset 0 0 10px rgba(255,255,255,.025)!important;color:#fff!important;}
  #mffApp .smfp-v181-footer-version{display:block!important;text-align:center!important;margin:4px 0 0!important;color:#29fff4!important;font-size:10px!important;font-weight:950!important;letter-spacing:.12em!important;text-shadow:0 0 10px rgba(22,255,243,.48)!important;background:transparent!important;border:0!important;box-shadow:none!important;}
  #mffApp .smfp-v181-send-leds{display:inline-flex!important;align-items:center!important;gap:4px!important;margin-left:4px!important;}
  #mffApp .smfp-v181-send-led{width:8px!important;height:8px!important;border-radius:50%!important;border:1px solid rgba(247,248,255,.38)!important;background:rgba(247,248,255,.14)!important;box-shadow:inset 0 0 5px rgba(255,255,255,.08)!important;}
  #mffApp[data-send-state="sending"] .smfp-v181-send-led[data-led="request"]{background:#ffaa26!important;border-color:#ffaa26!important;box-shadow:0 0 11px rgba(255,170,38,.95)!important;}
  #mffApp[data-send-state="ok"] .smfp-v181-send-led[data-led="request"],
  #mffApp[data-send-state="ok"] .smfp-v181-send-led[data-led="confirm"]{background:#29fff4!important;border-color:#29fff4!important;box-shadow:0 0 11px rgba(22,255,243,.95)!important;}
  #mffApp[data-send-state="fail"] .smfp-v181-send-led[data-led="confirm"]{background:#ff315d!important;border-color:#ff315d!important;box-shadow:0 0 11px rgba(255,49,93,.95)!important;}
  #mffApp .mff-title h1{display:block!important;position:relative!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;min-width:0!important;padding-left:0!important;animation:none!important;}
  #mffApp .mff-title h1 span{display:inline-block!important;min-width:max-content!important;padding-left:100%!important;animation:smfpV185Marquee 22s linear infinite!important;}
  #mffApp input,#mffApp textarea,#mffApp select{font-size:16px!important;}
  body.smfp-v181-nozoom{position:fixed!important;inset:0!important;width:100%!important;overflow:hidden!important;}
}



/* ══ Phase 2 Migration from player-patches.css ══ */

/* ── migrated: v116SafeLayoutBoundsFix (mobile) ── */
/* ── PATCH: v116SafeLayoutBoundsFix (orig L3927–4023) ── */

@media (max-width:760px){
  /* iPhone: separate status cards, EQ and controls so panels no longer overlap. */
  #mffApp .mff-cards{
    min-height:78px!important;
    height:78px!important;
    margin-bottom:8px!important;
    gap:8px!important;
    overflow:visible!important;
  }
  #mffApp .mff-card{
    min-height:78px!important;
    height:78px!important;
    padding:8px 6px!important;
    overflow:hidden!important;
  }
  #mffApp .mff-eq{
    margin-top:8px!important;
    margin-bottom:8px!important;
    min-height:138px!important;
    height:138px!important;
    overflow:hidden!important;
    position:relative!important;
    z-index:1!important;
  }
  #mffApp .mff-eq-bars{
    height:84px!important;
    max-height:84px!important;
    overflow:hidden!important;
  }
  #mffApp .mff-controls{
    margin-top:0!important;
    position:relative!important;
    z-index:2!important;
  }
}

@media (max-width:380px) and (max-height:740px){
  #mffApp .mff-cards{min-height:72px!important;height:72px!important;margin-bottom:6px!important;}
  #mffApp .mff-card{min-height:72px!important;height:72px!important;}
  #mffApp .mff-eq{min-height:126px!important;height:126px!important;margin-top:6px!important;margin-bottom:6px!important;}
  #mffApp .mff-eq-bars{height:74px!important;max-height:74px!important;}
}

/* ── migrated: smfpRealEqPanelV154Style (mobile) ── */
/* ── PATCH: smfpRealEqPanelV154Style (orig L4525–4553) ── */

@media (max-width:760px){#pcRealEqPanel{display:none!important;}}

/* ── migrated: smfpV164RescueCleanCss (mobile) ── */
/* ── PATCH: smfpV164RescueCleanCss (orig L4661–4703) ── */

  @media (max-width:760px){
    #mffBroadcastDisplay,#mffInlineBroadcastPanel{display:none!important;visibility:hidden!important;pointer-events:none!important;}
    #mffApp .mff-alert-editor-backdrop{z-index:2147483500!important;pointer-events:auto!important;}
    #mffApp .mff-alert-editor-backdrop.is-open{display:flex!important;}
    #mffApp .mff-alert-editor{pointer-events:auto!important;}
    #mffApp #mffAlertOpen,.mff-alert-open{pointer-events:auto!important;touch-action:manipulation!important;z-index:2147482000!important;}
    #mffApp .mff-alert-editor .smfp-send-status-v164{
      min-height:18px!important;margin:8px 0 0!important;padding:5px 8px!important;border-radius:10px!important;
      border:1px solid rgba(22,255,243,.38)!important;background:rgba(2,8,18,.74)!important;
      color:#20fff4!important;font-size:10px!important;font-weight:900!important;letter-spacing:.06em!important;text-align:center!important;
      box-shadow:inset 0 0 10px rgba(22,255,243,.06)!important;
    }
    #mffApp .mff-alert-editor .smfp-send-status-v164.is-ok{color:#20fff4!important;border-color:rgba(22,255,243,.72)!important;box-shadow:0 0 12px rgba(22,255,243,.18)!important;}
    #mffApp .mff-alert-editor .smfp-send-status-v164.is-error{color:#ff3d68!important;border-color:rgba(255,61,104,.78)!important;box-shadow:0 0 12px rgba(255,61,104,.18)!important;}
    /* Unteres Levelmeter: keine künstlichen Sinus-Ausreißer mehr; ruhiger, audioabhängiger Hub. */
    #mffApp .mff-bottom{height:52px!important;min-height:52px!important;padding:8px 10px!important;}
    #mffApp .mff-bottom-bars{height:32px!important;max-height:32px!important;gap:2px!important;align-items:center!important;overflow:hidden!important;}
    #mffApp .mff-bottom-bars i{
      height:24px!important;min-height:24px!important;max-height:24px!important;border-radius:4px!important;
      transform:scaleY(var(--smfp-v164-bottom-scale,.62))!important;
      opacity:var(--smfp-v164-bottom-opacity,.72)!important;
      transition:transform 150ms ease-out,opacity 150ms ease-out,filter 150ms ease-out!important;
      animation:none!important;
    }
    #mffApp .mff-bottom-bars i.mff-seg-on{filter:brightness(1.04) saturate(1.08)!important;}
  }

/* ── migrated: smfpV187MobileCyberHeaderCss (mobile) ── */
/* ── PATCH: smfpV187MobileCyberHeaderCss (orig L4962–5007) ── */

@media (max-width:760px){
  #mffApp .mff-brand-row,
  #mffApp #mffBrandRow{
    display:none!important;
    visibility:hidden!important;
    height:0!important;
    min-height:0!important;
    max-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    overflow:hidden!important;
    pointer-events:none!important;
  }
  #mffApp .mff-cyber-header{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin:0 0 4px 0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    pointer-events:none!important;
    overflow:visible!important;
  }
  #mffApp .mff-cyber-header img{
    display:block!important;
    width:auto!important;
    max-width:76%!important;
    height:32px!important;
    max-height:32px!important;
    object-fit:contain!important;
    filter:drop-shadow(0 0 10px rgba(22,255,243,.45)) drop-shadow(0 0 11px rgba(255,61,187,.34));
    pointer-events:none!important;
  }
}

/* VELUNA v1.2.14 — iPhone control geometry repair */
@media (max-width:760px){
  #mffApp .mff-discord-slot{height:auto!important;min-height:96px!important;overflow:visible!important;display:block!important;padding:0!important;margin:0!important}
  #mffApp #s666StageMobileActions{width:100%!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding:0!important;margin:0!important}
  #mffApp #s666StageMobileActions>button{width:100%!important;min-width:0!important;height:42px!important;min-height:42px!important;padding:0 8px!important;margin:0!important;font-size:12px!important;line-height:1.1!important;letter-spacing:.02em!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  #mffApp .mff-stream-switch{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;padding:0!important;height:38px!important;min-height:38px!important}
  #mffApp .mff-stream-btn{min-width:0!important;width:100%!important;padding:0 5px!important;font-size:9px!important;letter-spacing:.025em!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  #mffApp .mff-brand-row span{font-size:10px!important;letter-spacing:.025em!important}
}
