/* V58: ECHTES Smartphone-Vollbild (Extra / Extra 4).
   Wichtig: :not(.mobile-tree-exited) ist nötig, um ältere hochspezifische
   mobile Layoutregeln aus v28/v45 zu überstimmen. Keine Letterbox-Streifen. */
@media (max-width:699px) {
  html:has(body.theme-extra),
  html:has(body.theme-extra:not(.mobile-tree-exited)),
  body.theme-extra,
  body.theme-extra:not(.mobile-tree-exited) {
    box-sizing:border-box !important;
    width:100% !important;
    height:100% !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
  }
  body.theme-extra:not(.mobile-tree-exited) > .advent-shell,
  body.theme-extra > .advent-shell {
    position:fixed !important;
    inset:0 !important;
    display:block !important;
    box-sizing:border-box !important;
    width:100vw !important;
    width:100dvw !important;
    height:100vh !important;
    height:100dvh !important;
    min-width:0 !important;
    min-height:0 !important;
    max-width:none !important;
    max-height:none !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
    background:transparent !important;
  }
  body.theme-extra:not(.mobile-tree-exited) > .advent-shell > .calendar-wrap-tree,
  body.theme-extra > .advent-shell > .calendar-wrap-tree,
  body.theme-extra:not(.mobile-tree-exited) .calendar-wrap-tree > .tree-layout,
  body.theme-extra .calendar-wrap-tree > .tree-layout {
    position:absolute !important;
    inset:0 !important;
    display:block !important;
    box-sizing:border-box !important;
    width:100% !important;
    height:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    max-width:none !important;
    max-height:none !important;
    margin:0 !important;
    padding:0 !important;
    flex:none !important;
    overflow:hidden !important;
    background:none !important;
  }
  body.theme-extra:not(.mobile-tree-exited) .calendar-wrap-tree .tree-stage,
  body.theme-extra .calendar-wrap-tree .tree-stage {
    position:absolute !important;
    inset:0 !important;
    display:block !important;
    box-sizing:border-box !important;
    width:100% !important;
    height:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    max-width:none !important;
    max-height:none !important;
    aspect-ratio:auto !important;
    margin:0 !important;
    padding:0 !important;
    flex:none !important;
    align-self:stretch !important;
    transform:none !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    overflow:hidden !important;
    background:#082319 !important;
  }
  body.theme-extra:not(.mobile-tree-exited) .tree-stage .tree-background-v22,
  body.theme-extra .tree-stage .tree-background-v22,
  body.theme-extra .tree-stage.tree-ready .tree-background-v22 {
    position:absolute !important;
    inset:0 !important;
    display:block !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    max-width:none !important;
    max-height:none !important;
    object-fit:fill !important;
    object-position:center !important;
    visibility:visible !important;
    opacity:1 !important;
    pointer-events:none !important;
  }
  /* Keine alten Hintergrundkopien / Rahmen */
  body.theme-extra > .advent-shell::before,
  body.theme-extra > .advent-shell::after,
  body.theme-extra .mobile-tree-scene-extension,
  body.theme-extra .calendar-wrap-tree::before,
  body.theme-extra .tree-layout::before,
  body.theme-extra .tree-stage::after {
    display:none !important;
    content:none !important;
  }
  body.theme-extra > .advent-shell > .hero,
  body.theme-extra > .advent-shell > .notice,
  body.theme-extra > .advent-shell > .countdown,
  body.theme-extra > .advent-shell > .site-footer,
  body.theme-extra .mobile-tree-title,
  body.theme-extra .mobile-tree-exit,
  body.theme-extra .tree-desktop-info,
  body.theme-extra .tree-copy { display:none !important; }
  body.theme-extra:not(.mobile-tree-exited) > .snow-layer,
  body.theme-extra > .snow-layer {
    display:block !important;
    visibility:visible !important;
    pointer-events:none !important;
    z-index:80 !important;
  }
  body.theme-extra dialog[open] { z-index:200 !important; }
}
@media (max-width:699px) {
  body.theme-extra dialog[open] {
    max-height:calc(100dvh - 20px);
    max-width:calc(100vw - 16px);
    overflow-y:auto;
    overscroll-behavior:contain;
  }
}
