/* ==========================================================
   RESPONSIVE – Tablet & Smartphone
   ========================================================== */
.only-mobile { display: none !important; }
.mobile-scrim { display: none; }

@media (max-width: 1360px) {
  :root { --sidebar-l: 256px; --sidebar-r: 268px; }
  .act-btn { padding: 0 14px; }
  .topbar-center { display: none; }
}

/* Tablet & Smartphone: Seitenleisten werden zu Schubladen */
@media (max-width: 1080px) {
  .only-mobile { display: inline-flex !important; }
  .legal-links.only-mobile { display: flex !important; }
  .app {
    z-index: auto; /* keine Stacking-Context-Falle für die Schubladen */
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "top" "stage";
    gap: 10px; padding: 10px;
  }
  .sidebar {
    position: fixed; top: 10px; bottom: 10px; z-index: 40; width: min(330px, 88vw);
    background: rgba(14,14,22,.94);
    transition: transform .4s var(--ease), visibility .4s;
    visibility: hidden;
  }
  .sidebar-left { left: 10px; transform: translateX(calc(-100% - 20px)); }
  .sidebar-right { right: 10px; transform: translateX(calc(100% + 20px)); }
  .sidebar.open { transform: none; visibility: visible; }
  .mobile-scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.5); backdrop-filter: blur(3px); }
  .ghost-btn span { display: none; }
  .ghost-btn { padding: 0 10px; }
  .site-footer { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 13px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 14px; }
  .brand-logo { width: 34px; height: 34px; }
  .topbar { gap: 8px; }
  .stage { gap: 8px; }
  .info-strip { padding: 8px; gap: 8px; }
  .meta-list { gap: 14px; width: 100%; justify-content: space-between; }
  .seed-input { width: 112px !important; }
  .action-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 6px; }
  .act-btn { flex-direction: column; gap: 3px; height: 54px; padding: 0 4px; font-size: 10.5px; }
  .act-btn.primary { padding: 0 4px; }
  .act-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .canvas-tools { opacity: 1; transform: none; }
  .tool-btn span { display: none; }
  .toast-host { bottom: 140px; }
  .drawer-body { grid-template-columns: repeat(2, 1fr); }
}

@media (max-height: 640px) and (min-width: 1081px) {
  .act-btn { height: 40px; }
  .info-strip { padding: 6px 10px; }
}

@media (hover: none) {
  .canvas-tools { opacity: 1; transform: none; }
  .coll-remove { opacity: 1; }
}
