/* V28 — eigenständige Smartphone-Vollbildansicht nur für Extra und Extra 4. 
   Desktop und Tablet bleiben unverändert. */
.mobile-tree-exit { display:none; }

@media (max-width: 699px) {
  html:has(body.theme-extra:not(.mobile-tree-exited)),
  body.theme-extra:not(.mobile-tree-exited) { height:100%; overflow-x:hidden; }
  body.theme-extra:not(.mobile-tree-exited) { background:#071c16; overscroll-behavior:none; }

  body.theme-extra:not(.mobile-tree-exited) .advent-shell {
    width:100%; max-width:none; min-height:100vh; min-height:100dvh;
    height:100vh; height:100dvh;
    padding: max(52px, env(safe-area-inset-top, 0px) + 42px) 0
             max(6px, env(safe-area-inset-bottom, 0px));
    margin:0; overflow:hidden;
    display:flex; align-items:center; justify-content:center;
    background:radial-gradient(ellipse at 50% 42%, #224d3a 0%, #0a271e 62%, #031810 100%);
  }
  body.theme-extra:not(.mobile-tree-exited) .advent-shell::before{display:none!important;}
  body.theme-extra:not(.mobile-tree-exited) .advent-shell > .hero,
  body.theme-extra:not(.mobile-tree-exited) .advent-shell > .countdown,
  body.theme-extra:not(.mobile-tree-exited) .advent-shell > .site-footer,
  body.theme-extra:not(.mobile-tree-exited) .advent-shell > .notice { display:none!important; }

  body.theme-extra:not(.mobile-tree-exited) .calendar-wrap-tree {
    width:100%; height:100%; max-width:none;
    min-width:0; min-height:0; margin:0!important; padding:0!important;
    display:flex; align-items:center; justify-content:center;
    overflow:visible;
  }
  body.theme-extra:not(.mobile-tree-exited) .tree-layout {
    width:100%; height:100%; max-width:none; min-width:0;
    display:flex!important; align-items:center; justify-content:center;
    gap:0!important;
  }
  body.theme-extra:not(.mobile-tree-exited) .tree-stage {
    /* Baum inkl. Zug im vollständigen Originalseitenverhältnis, ohne Abschneiden. */
    width:min(100vw, calc((100dvh - 62px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 1122 / 1402))!important;
    max-width:100vw!important; height:auto!important;
    max-height:calc(100dvh - 62px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    aspect-ratio:1122 / 1402!important;
    margin:0 auto!important;
    border-radius:0!important;
    box-shadow:0 0 0 1px rgba(250,220,154,.4), 0 15px 65px rgba(0,0,0,.36)!important;
  }
  body.theme-extra:not(.mobile-tree-exited) .mobile-tree-exit {
    position:fixed; display:grid; place-items:center;
    top:max(9px, env(safe-area-inset-top, 0px) + 6px);
    right:max(12px, env(safe-area-inset-right, 0px) + 10px);
    width:40px; height:40px; padding:0; z-index:100;
    border:1px solid rgba(245,224,167,.7); border-radius:50%;
    background:rgba(255,251,240,.96); color:#12382c;
    font:400 29px/1 RobotoLocal,system-ui,sans-serif;
    box-shadow:0 4px 17px #0008; cursor:pointer;
  }
  body.theme-extra:not(.mobile-tree-exited) .mobile-tree-exit:focus-visible {
    outline:3px solid #f5c65a; outline-offset:3px;
  }
  body.theme-extra:not(.mobile-tree-exited) .mobile-tree-exit:hover { background:#fff5d8; }
  /* Keine fliegenden Schneeflocken außerhalb des Baumes im Mobil-Vollbild. */
  body.theme-extra:not(.mobile-tree-exited) > .snow-layer { display:none!important; }

  /* X-Fallback bei direktem Aufruf: normale Seite anzeigen, falls kein Einbettungsrahmen existiert. */
  body.theme-extra.mobile-tree-exited .mobile-tree-exit { display:none; }
}
