/**
 * TRN ERP — app shell for phone / tablet (Skrashevskyi OS → full-screen app).
 *
 * Loaded LAST in layouts/app.blade.php (after trn-touch.css + trn-voice-dock.css).
 * Every rule lives inside one of two gates; outside them this file changes nothing
 * (desktop mouse ≥961 keeps window / titlebar / 48px taskbar / meta plaque):
 *
 *   Gate A  @media (max-width: 960px)                         body.sd-app …        (any pointer)
 *   Gate B  @media (min-width: 961px) and (max-width: 1366px)  html.trn-touch body.sd-app …
 *
 * Grids inside the gates: phone ≤720 · tablet portrait 721–960 · touch landscape 961–1366.
 * Fundraising keeps its drawer + .sd-fund-chrome and never gets the bottom bar.
 * JS companion: public/js/trn-app-shell.js (tab packing, one sheet at a time, field scroll).
 */

/* Content-first top strip: invisible on desktop, shown only inside the gates. */
.sd-app-top {
  display: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   GATE A — any pointer, width ≤960
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  /* ── Tokens ── */
  body.sd-app {
    --app-top-core: 56px;
    --app-top-h: calc(var(--app-top-core) + var(--sd-safe-top, 0px));
    --app-bar-core: 64px;
    --app-bar-h: calc(var(--app-bar-core) + var(--sd-safe-bottom, 0px));
    --app-gutter: 20px;
    --sd-titlebar-h: var(--app-top-h);
  }

  body.sd-app:not([data-sd-module="fundraising"]) {
    --sd-taskbar-h: var(--app-bar-core);
    --sd-chrome-bottom: calc(var(--app-bar-h) + var(--trn-pwa-banner-stack-h, 0px));
  }

  /* Fund: no bar → bottom chrome is the home indicator only */
  body.sd-app[data-sd-module="fundraising"][data-sd-mode="windowed"] {
    --sd-taskbar-h: 0px;
    --sd-chrome-bottom: calc(var(--sd-safe-bottom, 0px) + var(--trn-pwa-banner-stack-h, 0px));
  }

  /* ── Window: full viewport, solid surface, single scroller ── */
  body.sd-app .sd-desktop--windowed {
    background: var(--sd-bg);
    overflow: clip;
  }

  body.sd-app .sd-desktop--windowed::before {
    display: none;
  }

  body.sd-app .sd-window,
  body.sd-app .sd-window.maximized {
    inset: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: none;
  }

  body.sd-app .sd-window-body {
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0;
  }

  body.sd-app .sd-window-body > * {
    min-width: 0;
    max-width: 100%;
  }

  /* :where keeps base specificity so page-specific gutters (org, fund, talk) still win.
     Bottom pad MUST clear the overlay taskbar (--sd-chrome-bottom) so last cards aren't trapped. */
  :where(body.sd-app) .sd-window-body > .trn-page,
  :where(body.sd-app) .sd-window-body .trn-page {
    padding: var(--app-gutter);
    padding-bottom: calc(var(--app-gutter) + 12px + var(--sd-chrome-bottom, var(--app-bar-h, 64px)));
  }

  :where(body.sd-app .sd-window-body .trn-page) > .sd-module-toolbar {
    margin: calc(-1 * var(--app-gutter)) calc(-1 * var(--app-gutter)) var(--app-gutter);
    padding-inline: var(--app-gutter);
  }

  body.sd-app .trn-page img,
  body.sd-app .fund-work img,
  body.sd-app .trn-prose img {
    max-width: 100%;
  }

  body.sd-app .trn-prose img,
  body.sd-app .trn-page img:not([class]) {
    height: auto;
  }

  body.sd-app .sd-window-flashes:not([data-trn-toast-host]),
  body.sd-app .sd-window-body > .alert {
    margin: 12px var(--app-gutter) 0;
  }

  body.sd-app .sd-window-flashes[data-trn-toast-host] {
    margin: 0 !important;
  }

  /* ── Top strip (OS titlebar markup) ── */
  body.sd-app .sd-window-titlebar {
    flex-shrink: 0;
    height: var(--app-top-h);
    min-height: var(--app-top-h);
    padding-top: var(--sd-safe-top, 0px);
    padding-left: max(8px, var(--sd-safe-left, 0px));
    padding-right: max(4px, var(--sd-safe-right, 0px));
    gap: 8px;
  }

  body.sd-app .sd-window-titlebar__icon {
    width: 28px;
    height: 28px;
    font-size: 1.25rem;
  }

  body.sd-app .sd-window-titlebar__icon.has-module-icon img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  body.sd-app .sd-window-titlebar__title,
  body.sd-app .sd-space-switcher__label {
    min-width: 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
  }

  body.sd-app .sd-window-titlebar__crumb {
    min-width: 0;
    flex: 0 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.sd-app .sd-window-titlebar .sd-win-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    font-size: 1.05rem;
  }

  body.sd-app .sd-window-titlebar .sd-win-btn--help span {
    display: none;
  }

  body.sd-app .sd-win-btn:focus-visible,
  body.sd-app .sd-tray-btn:focus-visible,
  body.sd-app .sd-taskbar-start:focus-visible,
  body.sd-app .sd-taskbar-more > summary:focus-visible {
    outline: 2px solid var(--sd-accent);
    outline-offset: -2px;
  }

  /* ── Content-first: compact strip instead of the absent titlebar ── */
  body.sd-app .sd-window--content-first,
  body.sd-app .sd-window--org-no-titlebar {
    --sd-titlebar-h: var(--app-top-h);
  }

  body.sd-app .sd-app-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    height: var(--app-top-h);
    padding: var(--sd-safe-top, 0px) max(4px, var(--sd-safe-right, 0px)) 0 max(12px, var(--sd-safe-left, 0px));
    background: var(--sd-bg-elevated, var(--sd-bg));
    border-bottom: 1px solid var(--sd-border);
    color: var(--sd-text);
    position: relative;
    z-index: 20;
  }

  body.sd-app .sd-app-top__icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: var(--sd-accent);
    font-size: 1.25rem;
  }

  body.sd-app .sd-app-top__title {
    min-width: 0;
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
  }

  body.sd-app .sd-app-top__crumb {
    min-width: 0;
    flex: 1 1 auto;
    color: var(--sd-text-secondary);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.sd-app .sd-app-top .sd-win-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin-left: auto;
    flex-shrink: 0;
    color: inherit;
    text-decoration: none;
    font-size: 1.05rem;
  }

  /* ── Fund: same top height + safe-area; drawer stays the navigation ── */
  body.sd-app[data-sd-module="fundraising"] .sd-desktop--fund-glass > .sd-window,
  body.sd-app[data-sd-module="fundraising"] .sd-desktop--fund-glass > .sd-window.maximized {
    --sd-titlebar-h: var(--app-top-h);
  }

  body.sd-app[data-sd-module="fundraising"] .sd-fund-chrome {
    display: flex;
    height: var(--app-top-h);
    padding-top: var(--sd-safe-top, 0px);
    padding-left: max(0.55rem, var(--sd-safe-left, 0px));
    padding-right: max(0.55rem, var(--sd-safe-right, 0px));
  }

  body.sd-app[data-sd-module="fundraising"] .sd-fund-sidebar-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  /* ── Bottom app bar (existing #sd-taskbar markup; never on Fund) ──
     `html` prefix ties trn-touch.css (min-height: --sd-taskbar-h) so this file wins by order.
     Cabinet keeps the bar (Пуск exit); dock-ios restyles to floating capsule. */
  html body.sd-app:not([data-sd-module="fundraising"]) .sd-taskbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    min-height: var(--app-bar-h);
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0 max(4px, var(--sd-safe-right, 0px)) var(--sd-safe-bottom, 0px) max(4px, var(--sd-safe-left, 0px));
    z-index: 9000;
    background: var(--sd-bg-elevated, var(--sd-bg));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-top: 1px solid var(--sd-border-strong, var(--sd-border));
  }

  body.sd-app .sd-taskbar-sep,
  body.sd-app .sd-taskbar-meta-sep,
  body.sd-app .sd-taskbar-meta,
  body.sd-app .sd-tray-clock,
  body.sd-app .sd-taskbar .trn-theme-btn {
    display: none;
  }

  /* trn-touch.css hides it with !important; keep it hidden for narrow mouse too */
  body.sd-app #sd-search-btn {
    display: none !important;
  }

  body.sd-app .sd-taskbar-start {
    align-self: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    flex-shrink: 0;
  }

  body.sd-app .sd-taskbar-start:hover,
  body.sd-app .sd-taskbar-start.is-active {
    transform: none;
  }

  /* trn-skrashevskyi.css forces the wordmark only at ≤720; the bar shows the mark at ≤960 */
  body.sd-app .sd-taskbar-start__wordmark {
    display: none !important;
  }

  html[data-theme="dark"] body.sd-app .sd-taskbar-start__mark--on-dark,
  html:not([data-theme="dark"]) body.sd-app .sd-taskbar-start__mark--on-light {
    display: block;
  }

  body.sd-app .sd-taskbar-apps {
    flex: 1;
    min-width: 0;
    align-self: stretch;
    align-items: stretch;
    gap: 0;
  }

  body.sd-app .sd-taskbar-apps__scroll {
    display: flex;
    width: 100%;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
  }

  /* No-JS / before trn-app-shell.js packs the row: plain horizontal scroll */
  body.sd-app .sd-taskbar:not(.is-app-ready) .sd-taskbar-apps__scroll,
  body.sd-app .sd-taskbar.is-tab-fallback .sd-taskbar-apps__scroll {
    overflow-x: auto;
  }

  body.sd-app .sd-taskbar:not(.is-app-ready) .sd-taskbar-tab,
  body.sd-app .sd-taskbar.is-tab-fallback .sd-taskbar-tab {
    flex: 0 0 auto;
    min-width: 72px;
  }

  body.sd-app .sd-taskbar-tab {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    min-height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 12px;
    line-height: 1.2;
  }

  body.sd-app .sd-taskbar-tab > i {
    font-size: 22px;
    line-height: 1;
  }

  body.sd-app .sd-taskbar-tab__icon,
  body.sd-app .sd-taskbar-tab__icon img {
    width: 22px;
    height: 22px;
  }

  body.sd-app .sd-taskbar-tab span.sd-tab-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.sd-app .sd-taskbar-tab:hover {
    background: transparent;
  }

  body.sd-app .sd-taskbar-tab.is-active {
    background: transparent;
    border-color: transparent;
    color: var(--sd-accent);
    font-weight: 600;
  }

  /* Accent dash on top: the home indicator sits under the bottom edge */
  body.sd-app .sd-taskbar-tab.is-active::after {
    top: 0;
    bottom: auto;
    left: 22%;
    right: 22%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    box-shadow: none;
  }

  body.sd-app .sd-taskbar-tab:focus-visible {
    outline: 2px solid var(--sd-accent);
    outline-offset: -2px;
  }

  /* «⋯» → bottom sheet above the bar */
  body.sd-app .sd-taskbar-more {
    position: static;
    align-self: center;
    flex-shrink: 0;
  }

  body.sd-app .sd-taskbar-more > summary {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  body.sd-app .sd-taskbar-more[open]::before {
    content: '';
    position: fixed;
    inset: 0 0 var(--app-bar-h) 0;
    background: rgba(4, 8, 14, 0.45);
  }

  body.sd-app .sd-taskbar-more__menu {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: var(--app-bar-h);
    min-width: 0;
    max-height: 70dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px max(8px, var(--sd-safe-right, 0px)) 12px max(8px, var(--sd-safe-left, 0px));
    border-radius: 16px 16px 0 0;
    border: 1px solid var(--sd-border);
    border-bottom: 0;
    background: var(--sd-surface-solid, var(--sd-bg));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.28);
    z-index: 9100;
  }

  body.sd-app .sd-taskbar-more__menu a {
    min-height: 48px;
    gap: 12px;
    padding: 10px 14px;
    font-size: 1rem;
    border-radius: var(--sd-radius-md);
  }

  body.sd-app .sd-taskbar-more__menu a > i,
  body.sd-app .sd-taskbar-more__menu .sd-taskbar-tab__icon {
    width: 22px;
    font-size: 20px;
    flex-shrink: 0;
  }

  /* Tray: assistant, notifications, profile */
  body.sd-app .sd-taskbar-tray {
    align-self: center;
    margin-left: 0;
    gap: 0;
  }

  body.sd-app .sd-tray-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  /* ── Sheets: Start = compact bottom card (not fullscreen); NC/help unchanged ── */
  body.sd-app .sd-start-menu {
    left: max(10px, var(--sd-safe-left, 0px));
    right: max(10px, var(--sd-safe-right, 0px));
    top: auto;
    bottom: calc(var(--sd-chrome-bottom) + 8px);
    width: auto;
    max-width: min(var(--sd-start-w, 400px), calc(100vw - 20px));
    max-height: min(var(--sd-start-max-h, 680px), calc(100dvh - var(--sd-chrome-bottom) - 20px));
    height: auto;
    padding-top: 0;
    border-radius: 28px;
    transform: translateY(12px) scale(0.97);
    transform-origin: bottom center;
    margin-inline: auto;
  }

  body.sd-app .sd-start-menu.open {
    transform: none;
  }

  body.sd-app .sd-start-body {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.sd-app .sd-start-pinned-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  }

  body.sd-app .sd-start-tile {
    min-height: 88px;
  }

  body.sd-app .sd-start-link,
  body.sd-app .sd-start-footer .btn,
  body.sd-app .sd-start-footer button {
    min-height: 48px;
  }

  /* NC = iOS top sheet (layout locked in trn-skrashevskyi / dock-ios); keep touch targets */
  body.sd-app .sd-nc-card {
    min-height: 64px;
  }

  body.sd-app .sd-nc-footer__all,
  body.sd-app .sd-nc-text-btn {
    min-height: 44px;
  }

  /* ── Modals / menus ── */
  body.sd-app .modal-header .btn-close {
    min-width: 44px;
    min-height: 44px;
  }

  body.sd-app .btn,
  body.sd-app .sd-tray-btn,
  body.sd-app .dropdown-item {
    min-height: 44px;
  }

  body.sd-app .dropdown-item {
    display: flex;
    align-items: center;
  }

  body.sd-app .dropdown-menu {
    max-width: calc(100vw - 16px);
  }

  /* ── L2 form: ≥48px / 16px for narrow mouse too (touch already in trn-touch.css) ── */
  body.sd-app .form-control,
  body.sd-app .form-select,
  body.sd-app .form-control-sm,
  body.sd-app .form-select-sm,
  body.sd-app input[type="text"],
  body.sd-app input[type="search"],
  body.sd-app input[type="email"],
  body.sd-app input[type="tel"],
  body.sd-app input[type="url"],
  body.sd-app input[type="number"],
  body.sd-app input[type="password"],
  body.sd-app input[type="date"],
  body.sd-app input[type="datetime-local"],
  body.sd-app input[type="time"],
  body.sd-app select,
  body.sd-app textarea {
    min-height: 48px;
    font-size: 16px;
  }

  body.sd-app textarea.form-control {
    min-height: 96px;
  }

  body.sd-app .sd-window-body .form-control,
  body.sd-app .sd-window-body .form-select,
  body.sd-app .sd-window-body textarea {
    scroll-margin-bottom: calc(var(--sd-chrome-bottom) + 24px);
  }

  body.sd-app .invalid-feedback {
    font-size: 14px;
  }

  body.sd-app input[type="file"].form-control::file-selector-button {
    min-height: 44px;
  }

  /* .sd-desktop already ends above the bar, so the window-body scrollport does too:
     offsetting by --sd-chrome-bottom here would float the actions one bar too high. */
  :root body.sd-app .sd-window-body .trn-form-actions--sticky {
    position: sticky;
    bottom: 0.5rem;
    z-index: 26;
  }

  body.sd-app:not([data-sd-module="fundraising"]) .trn-form-actions--sticky {
    margin: 1rem 0 0;
    padding: 0.65rem 0.75rem;
    background: color-mix(in srgb, var(--trn-surface, var(--sd-surface-solid)) 94%, transparent);
    border: 1px solid var(--trn-line, var(--sd-border));
    border-radius: var(--trn-radius, 14px);
    box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.3);
  }

  body.sd-app .trn-form-actions--sticky .btn {
    min-height: 48px;
  }

  /* ── L1 list ── */
  body.sd-app .trn-mobile-card {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body.sd-app .trn-mobile-card .trn-actions-cell .btn,
  body.sd-app .trn-mobile-card .trn-actions-trigger {
    min-width: 44px;
    min-height: 44px;
  }

  body.sd-app .pagination {
    flex-wrap: wrap;
    gap: 4px;
  }

  body.sd-app .page-link {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* U06: wrappers never force the table over the cards */
  body.sd-app .table-responsive {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ── L3 entity card ── */
  body.sd-app .trn-dl dd {
    overflow-wrap: anywhere;
  }

  body.sd-app .sd-window-body .nav-tabs,
  body.sd-app .sd-window-body .nav-pills,
  body.sd-app .js-app-tabstrip {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body.sd-app .sd-window-body .nav-tabs::-webkit-scrollbar,
  body.sd-app .sd-window-body .nav-pills::-webkit-scrollbar,
  body.sd-app .js-app-tabstrip::-webkit-scrollbar {
    display: none;
  }

  body.sd-app .sd-window-body .nav-tabs .nav-link,
  body.sd-app .sd-window-body .nav-pills .nav-link {
    min-height: 44px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Section tabstrip (ЦВС project / community, Press, Club): one row, edge fade = "є ще".
     The fade is a sticky trailing flex item, so it never covers a tap target. */
  body.sd-app .js-app-tabstrip:not(.fund-work-segment) {
    position: relative;
  }

  body.sd-app .js-app-tabstrip:not(.fund-work-segment) > * {
    flex-shrink: 0;
  }

  body.sd-app .js-app-tabstrip:not(.fund-work-segment)::after {
    content: '';
    position: sticky;
    right: 0;
    flex: 0 0 28px;
    align-self: stretch;
    background: linear-gradient(to left, var(--trn-surface, var(--sd-bg)) 15%, transparent);
    pointer-events: none;
  }

  body.sd-app .trn-detail__tabs.js-app-tabstrip {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--trn-surface, var(--sd-bg));
  }

  body.sd-app .page-title {
    font-size: 1.5rem;
    overflow-wrap: anywhere;
  }

  body.sd-app .trn-detail__title,
  body.sd-app .detail-hero-title {
    overflow-wrap: anywhere;
  }

  /* ── Hub: bar + optional native voice dock, no double clearance ── */
  :root body.sd-app .sd-desktop--hub .sd-hub-stage {
    padding-bottom: calc(16px + var(--trn-pwa-banner-stack-h, 0px));
  }

  :root.trn-app:not(.trn-pwa-standalone) body.sd-app .sd-desktop--hub .sd-hub-stage {
    padding-bottom: calc(var(--sd-voice-dock-size, 68px) + 28px);
  }

  /* Hub iOS SpringBoard: pad via --sd-chrome-bottom inside .ios-home (Dock awareness) */
  :root body.sd-app .sd-desktop--hub-ios .ios-home {
    padding-bottom: calc(var(--sd-chrome-bottom, 48px) + 16px + var(--trn-pwa-banner-stack-h, 0px));
  }

  :root.trn-app:not(.trn-pwa-standalone) body.sd-app .sd-desktop--hub-ios .ios-home {
    padding-bottom: calc(var(--sd-chrome-bottom, 48px) + var(--sd-voice-dock-size, 68px) + 12px);
  }

  /* ── Content-first + Org board flex (O01–O04; cabinet/talk/press/club/cimic chrome) ── */
  body.sd-app .sd-window--content-first,
  body.sd-app .sd-window--org-no-titlebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
  }

  body.sd-app .sd-window--content-first > .sd-window-body,
  body.sd-app .sd-window--org-no-titlebar > .sd-window-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  /* Org Dock overlay: full-bleed under capsule; pad content via --sd-chrome-bottom */
  body.sd-app[data-sd-module="org"][data-sd-mode="windowed"] {
    --sd-taskbar-h: var(--sd-dock-h, 56px);
    --sd-chrome-bottom: calc(
      var(--sd-dock-h, 56px)
      + var(--sd-dock-inset-b, 12px)
      + var(--sd-safe-bottom, 0px)
      + var(--trn-pwa-banner-stack-h, 0px)
    );
  }

  body.sd-app[data-sd-module="org"] .sd-window-body > .trn-page.trn-os-page--board {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: var(--app-gutter);
    padding-bottom: calc(var(--app-gutter) + var(--sd-chrome-bottom, 72px));
  }

  body.sd-app[data-sd-module="org"] .sd-window-body > .trn-page:not(.trn-os-page--board) {
    padding-bottom: calc(var(--app-gutter, 16px) + var(--sd-chrome-bottom, 72px));
  }

  body.sd-app[data-sd-module="org"] .trn-os-board-shell {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }

  body.sd-app[data-sd-module="org"] .trn-os-page--board .trn-org {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0;
    max-height: none;
  }

  body.sd-app[data-sd-module="org"] .trn-os-sheet__panel {
    max-height: 92dvh;
  }

  body.sd-app[data-sd-module="org"] .trn-os-sheet__icon-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  body.sd-app[data-sd-module="cabinet"] .sd-window-body > .trn-page {
    padding-bottom: calc(var(--app-gutter) + var(--sd-chrome-bottom, var(--app-bar-h, 64px)));
  }

  body.sd-app .sd-window-body:has(> .trn-page.trn-talk),
  body.sd-app .sd-window-body:has(> .trn-talk-iframe-page) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 !important;
    flex: 1 1 auto;
    min-height: 0;
  }

  body.sd-app .trn-page.trn-talk,
  body.sd-app .trn-talk-iframe-page {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    padding: 0 !important;
    margin: 0;
    display: flex;
    flex-direction: column;
  }

  body.sd-app .trn-talk {
    min-height: 0;
    flex: 1 1 auto;
  }

  body.sd-app .trn-talk__layout {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }

  body.sd-app .trn-talk__thread {
    min-height: 0;
  }

  body.sd-app .trn-talk__composer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 6;
    padding-bottom: calc(0.65rem + var(--trn-pwa-banner-stack-h, 0px));
  }

  body.sd-app .trn-talk__room {
    min-height: 64px;
  }

  body.sd-app .trn-talk-call {
    position: fixed;
    inset: 0;
    z-index: 10050;
    padding-bottom: calc(1.25rem + var(--sd-chrome-bottom));
  }
}

/* ── Gate A · phone ≤720 ── */
@media (max-width: 720px) {
  body.sd-app {
    --app-top-core: 52px;
    --app-gutter: 16px;
  }

  body.sd-app .sd-taskbar-tab {
    font-size: 11px;
  }

  /* NC top-sheet: full-bleed width handled in trn-skrashevskyi ≤720 */

  /* Help: bottom sheet 85dvh */
  body.sd-app .sd-module-help.offcanvas-end {
    top: auto;
    left: 0;
    right: 0;
    bottom: var(--sd-chrome-bottom);
    width: 100%;
    height: 85dvh;
    max-height: calc(100dvh - var(--sd-chrome-bottom) - var(--sd-safe-top, 0px));
    border-left: 0;
    border-top: 1px solid color-mix(in srgb, var(--sd-accent) 35%, transparent);
    border-radius: 16px 16px 0 0;
    transform: translateY(calc(100% + var(--sd-chrome-bottom)));
  }

  body.sd-app .sd-module-help.offcanvas-end.showing,
  body.sd-app .sd-module-help.offcanvas-end.show:not(.hiding) {
    transform: none;
  }

  /* Modals: full screen, sticky header, stacked full-width footer
     (:root … .modal beats trn-touch.css max-width: min(640px, …)) */
  :root body.sd-app .modal .modal-dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
  }

  body.sd-app .modal-content {
    height: 100%;
    border: 0;
    border-radius: 0;
    overflow: hidden;
  }

  body.sd-app .modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  body.sd-app .modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    flex-shrink: 0;
    padding-top: max(0.75rem, var(--sd-safe-top, 0px));
  }

  body.sd-app .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.sd-app .modal-footer {
    flex-shrink: 0;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 8px;
    padding-bottom: max(0.75rem, var(--sd-safe-bottom, 0px));
  }

  body.sd-app .modal-footer > * {
    width: 100%;
    margin: 0;
  }

  /* Row actions (portaled to <body> by trn-actions-dropdown.js) → bottom sheet.
     !important: Popper writes inset/transform inline on every update. */
  body.sd-app > .trn-actions-menu.dropdown-menu.show {
    position: fixed !important;
    inset: auto 0 var(--sd-chrome-bottom) 0 !important;
    transform: none !important;
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: 70dvh;
    overflow-y: auto;
    padding: 8px 8px 12px;
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
    background: var(--sd-surface-solid, var(--trn-surface));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 0 0 100vmax rgba(4, 8, 14, 0.45), 0 -12px 32px rgba(0, 0, 0, 0.28);
    z-index: 9150;
  }

  body.sd-app > .trn-actions-menu .dropdown-item {
    min-height: 48px;
    font-size: 1rem;
  }

  /* L2: one column, primary full width on top, secondary under it */
  body.sd-app .trn-form-actions--sticky {
    flex-direction: column;
    align-items: stretch;
  }

  body.sd-app .trn-form-actions--sticky > .btn,
  body.sd-app .trn-form-actions--sticky > a.btn {
    width: 100%;
  }

  /* U02 / L3: title and action stacked */
  body.sd-app .page-header,
  body.sd-app .trn-detail__hero-inner,
  body.sd-app .detail-hero-top {
    flex-direction: column;
    align-items: stretch;
  }

  body.sd-app .page-header > .actions-row,
  body.sd-app .trn-detail__hero-actions,
  body.sd-app .detail-hero-actions {
    width: 100%;
  }

  body.sd-app .page-header > .actions-row > .btn,
  body.sd-app .trn-detail__hero-actions > .btn,
  body.sd-app .detail-hero-actions > .btn {
    flex: 1 1 auto;
  }

  body.sd-app .page-title {
    font-size: 1.25rem;
  }

  body.sd-app .trn-dl {
    grid-template-columns: 1fr;
  }

  /* U01 empty state: compact, CTA reachable above the bar */
  body.sd-app .sd-empty-state .empty-state__icon {
    max-height: 120px;
  }

  body.sd-app .sd-empty-state .btn {
    width: 100%;
  }
}

/* ── Gate A · tablet portrait 721–960 ── */
@media (min-width: 721px) and (max-width: 960px) {
  body.sd-app .sd-start-menu,
  body.sd-app .sd-start-menu.open {
    left: 50%;
    right: auto;
    width: min(420px, calc(100vw - 24px));
    max-width: min(420px, calc(100vw - 24px));
    transform: translateX(-50%) translateY(12px) scale(0.97);
    transform-origin: bottom center;
    margin-inline: 0;
  }

  body.sd-app .sd-start-menu.open {
    transform: translateX(-50%);
  }

  /* NC top-sheet: width/position from base NC styles */

  body.sd-app .modal-dialog {
    max-width: min(640px, calc(100vw - 48px));
  }

  /* L1 filters: one wrapping row, search field first and full width */
  body.sd-app .filters,
  body.sd-app .filters.trn-filter-bar {
    flex-wrap: wrap;
  }

  body.sd-app .filters > div:has(input[type="search"]),
  body.sd-app .filters > div:has(input[name="q"]) {
    flex: 1 1 100%;
    order: -1;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   GATE B — touch landscape 961–1366 (html.trn-touch). Same chrome as gate A;
   lists keep the desktop table (rows ≥56px live in trn-touch.css).
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 961px) and (max-width: 1366px) {
  html.trn-touch body.sd-app {
    --app-top-core: 56px;
    --app-top-h: calc(var(--app-top-core) + var(--sd-safe-top, 0px));
    --app-bar-core: 64px;
    --app-bar-h: calc(var(--app-bar-core) + var(--sd-safe-bottom, 0px));
    --app-gutter: 24px;
    --sd-titlebar-h: var(--app-top-h);
  }

  html.trn-touch body.sd-app:not([data-sd-module="fundraising"]) {
    --sd-taskbar-h: var(--app-bar-core);
    --sd-chrome-bottom: calc(var(--app-bar-h) + var(--trn-pwa-banner-stack-h, 0px));
  }

  html.trn-touch body.sd-app[data-sd-module="fundraising"][data-sd-mode="windowed"] {
    --sd-taskbar-h: 0px;
    --sd-chrome-bottom: calc(var(--sd-safe-bottom, 0px) + var(--trn-pwa-banner-stack-h, 0px));
  }

  /* Window */
  html.trn-touch body.sd-app .sd-desktop--windowed {
    background: var(--sd-bg);
    overflow: clip;
  }

  html.trn-touch body.sd-app .sd-desktop--windowed::before {
    display: none;
  }

  html.trn-touch body.sd-app .sd-window,
  html.trn-touch body.sd-app .sd-window.maximized {
    inset: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: none;
  }

  html.trn-touch body.sd-app .sd-window-body {
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding-bottom: 0;
  }

  html.trn-touch body.sd-app .sd-window-body > * {
    min-width: 0;
    max-width: 100%;
  }

  :where(html.trn-touch body.sd-app) .sd-window-body > .trn-page,
  :where(html.trn-touch body.sd-app) .sd-window-body .trn-page {
    padding: var(--app-gutter);
    padding-bottom: calc(var(--app-gutter) + 12px + var(--sd-chrome-bottom, var(--app-bar-h, 64px)));
  }

  html.trn-touch body.sd-app .trn-page img,
  html.trn-touch body.sd-app .fund-work img,
  html.trn-touch body.sd-app .trn-prose img {
    max-width: 100%;
  }

  /* Top strip */
  html.trn-touch body.sd-app .sd-window-titlebar {
    flex-shrink: 0;
    height: var(--app-top-h);
    min-height: var(--app-top-h);
    padding-top: var(--sd-safe-top, 0px);
    padding-left: max(12px, var(--sd-safe-left, 0px));
    padding-right: max(4px, var(--sd-safe-right, 0px));
    gap: 8px;
  }

  html.trn-touch body.sd-app .sd-window-titlebar__icon {
    width: 28px;
    height: 28px;
    font-size: 1.25rem;
  }

  html.trn-touch body.sd-app .sd-window-titlebar__icon.has-module-icon img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  html.trn-touch body.sd-app .sd-window-titlebar__title {
    min-width: 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html.trn-touch body.sd-app .sd-window-titlebar__crumb {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html.trn-touch body.sd-app .sd-window-titlebar .sd-win-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    font-size: 1.05rem;
  }

  /* Content-first strip */
  html.trn-touch body.sd-app .sd-window--content-first,
  html.trn-touch body.sd-app .sd-window--org-no-titlebar {
    --sd-titlebar-h: var(--app-top-h);
  }

  html.trn-touch body.sd-app .sd-app-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    height: var(--app-top-h);
    padding: var(--sd-safe-top, 0px) max(4px, var(--sd-safe-right, 0px)) 0 max(12px, var(--sd-safe-left, 0px));
    background: var(--sd-bg-elevated, var(--sd-bg));
    border-bottom: 1px solid var(--sd-border);
    color: var(--sd-text);
    position: relative;
    z-index: 20;
  }

  html.trn-touch body.sd-app .sd-app-top__icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: var(--sd-accent);
    font-size: 1.25rem;
  }

  html.trn-touch body.sd-app .sd-app-top__title {
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
  }

  html.trn-touch body.sd-app .sd-app-top__crumb {
    min-width: 0;
    flex: 1 1 auto;
    color: var(--sd-text-secondary);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html.trn-touch body.sd-app .sd-app-top .sd-win-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin-left: auto;
    flex-shrink: 0;
    color: inherit;
    text-decoration: none;
  }

  /* Fund chrome: same height + safe-area; rail stays (fund-tablet.css) */
  html.trn-touch body.sd-app[data-sd-module="fundraising"] .sd-fund-chrome {
    display: flex;
    height: var(--app-top-h);
    padding-top: var(--sd-safe-top, 0px);
  }

  /* Bottom bar (never on Fund; Cabinet keeps Dock for Пуск) */
  html.trn-touch body.sd-app:not([data-sd-module="fundraising"]) .sd-taskbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    min-height: var(--app-bar-h);
    display: flex;
    align-items: stretch;
    gap: 0;
    padding-bottom: var(--sd-safe-bottom, 0px);
    z-index: 9000;
    background: var(--sd-bg-elevated, var(--sd-bg));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-top: 1px solid var(--sd-border-strong, var(--sd-border));
  }

  html.trn-touch body.sd-app .sd-taskbar-sep,
  html.trn-touch body.sd-app .sd-taskbar-meta-sep,
  html.trn-touch body.sd-app .sd-taskbar-meta,
  html.trn-touch body.sd-app .sd-tray-clock,
  html.trn-touch body.sd-app .sd-taskbar .trn-theme-btn {
    display: none;
  }

  html.trn-touch body.sd-app .sd-taskbar-start {
    align-self: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    flex-shrink: 0;
  }

  /* trn-skrashevskyi.css shows the wordmark from 721px; the app bar uses the mark */
  html.trn-touch body.sd-app .sd-taskbar-start__wordmark {
    display: none !important;
  }

  html[data-theme="dark"].trn-touch body.sd-app .sd-taskbar-start__mark--on-dark,
  html:not([data-theme="dark"]).trn-touch body.sd-app .sd-taskbar-start__mark--on-light {
    display: block;
  }

  html.trn-touch body.sd-app .sd-taskbar-apps {
    flex: 1;
    min-width: 0;
    align-self: stretch;
    align-items: stretch;
    gap: 0;
  }

  html.trn-touch body.sd-app .sd-taskbar-apps__scroll {
    display: flex;
    width: 100%;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
  }

  html.trn-touch body.sd-app .sd-taskbar:not(.is-app-ready) .sd-taskbar-apps__scroll,
  html.trn-touch body.sd-app .sd-taskbar.is-tab-fallback .sd-taskbar-apps__scroll {
    overflow-x: auto;
  }

  html.trn-touch body.sd-app .sd-taskbar:not(.is-app-ready) .sd-taskbar-tab,
  html.trn-touch body.sd-app .sd-taskbar.is-tab-fallback .sd-taskbar-tab {
    flex: 0 0 auto;
    min-width: 96px;
  }

  html.trn-touch body.sd-app .sd-taskbar-tab {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    min-height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 12px;
    line-height: 1.2;
  }

  html.trn-touch body.sd-app .sd-taskbar-tab > i {
    font-size: 22px;
    line-height: 1;
  }

  html.trn-touch body.sd-app .sd-taskbar-tab__icon,
  html.trn-touch body.sd-app .sd-taskbar-tab__icon img {
    width: 22px;
    height: 22px;
  }

  html.trn-touch body.sd-app .sd-taskbar-tab span.sd-tab-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.trn-touch body.sd-app .sd-taskbar-tab.is-active {
    background: transparent;
    border-color: transparent;
    color: var(--sd-accent);
    font-weight: 600;
  }

  html.trn-touch body.sd-app .sd-taskbar-tab.is-active::after {
    top: 0;
    bottom: auto;
    left: 28%;
    right: 28%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    box-shadow: none;
  }

  html.trn-touch body.sd-app .sd-taskbar-more {
    position: static;
    align-self: center;
    flex-shrink: 0;
  }

  html.trn-touch body.sd-app .sd-taskbar-more > summary {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  html.trn-touch body.sd-app .sd-taskbar-more[open]::before {
    content: '';
    position: fixed;
    inset: 0 0 var(--app-bar-h) 0;
    background: rgba(4, 8, 14, 0.45);
  }

  html.trn-touch body.sd-app .sd-taskbar-more__menu {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: var(--app-bar-h);
    min-width: 0;
    max-height: 70dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 12px 12px;
    border-radius: 16px 16px 0 0;
    border: 1px solid var(--sd-border);
    border-bottom: 0;
    background: var(--sd-surface-solid, var(--sd-bg));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.28);
    z-index: 9100;
  }

  html.trn-touch body.sd-app .sd-taskbar-more__menu a {
    min-height: 48px;
    gap: 12px;
    padding: 10px 14px;
    font-size: 1rem;
  }

  html.trn-touch body.sd-app .sd-taskbar-tray {
    align-self: center;
    margin-left: 0;
  }

  /* Sheets: Start compact left card (iOS CC), not edge-to-edge column */
  html.trn-touch body.sd-app .sd-start-menu {
    left: 12px;
    right: auto;
    top: auto;
    bottom: calc(var(--sd-chrome-bottom) + 10px);
    width: min(420px, calc(100vw - 24px));
    max-width: min(420px, calc(100vw - 24px));
    max-height: min(var(--sd-start-max-h, 680px), calc(100dvh - var(--sd-chrome-bottom) - 24px));
    height: auto;
    padding-top: 0;
    border-radius: 28px;
    transform: translateY(14px) scale(0.97);
    transform-origin: bottom left;
    margin-inline: 0;
  }

  html.trn-touch body.sd-app .sd-start-menu.open {
    transform: none;
    box-shadow: 0 0 0 100vmax rgba(4, 8, 14, 0.45);
  }

  html.trn-touch body.sd-app .sd-start-body {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  html.trn-touch body.sd-app .sd-start-pinned-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  }

  html.trn-touch body.sd-app .sd-start-tile {
    min-height: 88px;
  }

  html.trn-touch body.sd-app .sd-start-link {
    min-height: 48px;
  }

  html.trn-touch body.sd-app .sd-nc-card {
    min-height: 64px;
  }

  html.trn-touch body.sd-app .modal-dialog {
    max-width: min(640px, calc(100vw - 48px));
  }

  :root.trn-touch body.sd-app .sd-window-body .trn-form-actions--sticky {
    position: sticky;
    bottom: 0.5rem;
    z-index: 26;
  }

  html.trn-touch body.sd-app:not([data-sd-module="fundraising"]) .trn-form-actions--sticky {
    padding: 0.65rem 0.75rem;
    background: color-mix(in srgb, var(--trn-surface, var(--sd-surface-solid)) 94%, transparent);
    border: 1px solid var(--trn-line, var(--sd-border));
    border-radius: var(--trn-radius, 14px);
  }

  html.trn-touch body.sd-app .sd-window-body .form-control,
  html.trn-touch body.sd-app .sd-window-body .form-select,
  html.trn-touch body.sd-app .sd-window-body textarea {
    scroll-margin-bottom: calc(var(--sd-chrome-bottom) + 24px);
  }

  html.trn-touch body.sd-app .sd-window-body .nav-tabs,
  html.trn-touch body.sd-app .js-app-tabstrip {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  html.trn-touch body.sd-app .js-app-tabstrip:not(.fund-work-segment) {
    position: relative;
  }

  html.trn-touch body.sd-app .js-app-tabstrip:not(.fund-work-segment) > * {
    flex-shrink: 0;
  }

  html.trn-touch body.sd-app .js-app-tabstrip:not(.fund-work-segment)::after {
    content: '';
    position: sticky;
    right: 0;
    flex: 0 0 28px;
    align-self: stretch;
    background: linear-gradient(to left, var(--trn-surface, var(--sd-bg)) 15%, transparent);
    pointer-events: none;
  }

  html.trn-touch body.sd-app .page-title {
    font-size: 1.5rem;
  }

  :root.trn-touch body.sd-app .sd-desktop--hub .sd-hub-stage {
    padding-bottom: calc(16px + var(--trn-pwa-banner-stack-h, 0px));
  }

  :root.trn-touch.trn-app:not(.trn-pwa-standalone) body.sd-app .sd-desktop--hub .sd-hub-stage {
    padding-bottom: calc(var(--sd-voice-dock-size, 68px) + 28px);
  }

  :root.trn-touch body.sd-app .sd-desktop--hub-ios .ios-home {
    padding-bottom: calc(var(--sd-chrome-bottom, 48px) + 16px + var(--trn-pwa-banner-stack-h, 0px));
  }

  :root.trn-touch.trn-app:not(.trn-pwa-standalone) body.sd-app .sd-desktop--hub-ios .ios-home {
    padding-bottom: calc(var(--sd-chrome-bottom, 48px) + var(--sd-voice-dock-size, 68px) + 12px);
  }

  /* Content-first + Org board flex (mirror gate A) */
  html.trn-touch body.sd-app .sd-window--content-first,
  html.trn-touch body.sd-app .sd-window--org-no-titlebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
  }

  html.trn-touch body.sd-app .sd-window--content-first > .sd-window-body,
  html.trn-touch body.sd-app .sd-window--org-no-titlebar > .sd-window-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  html.trn-touch body.sd-app[data-sd-module="org"] .trn-os-page--board .trn-org {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0;
    max-height: none;
  }

  html.trn-touch body.sd-app .sd-window-body:has(> .trn-page.trn-talk),
  html.trn-touch body.sd-app .sd-window-body:has(> .trn-talk-iframe-page) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 !important;
    flex: 1 1 auto;
    min-height: 0;
  }

  html.trn-touch body.sd-app .trn-talk {
    flex: 1 1 auto;
    min-height: 0;
  }

  html.trn-touch body.sd-app .trn-talk__layout {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }

  html.trn-touch body.sd-app .trn-talk-call {
    position: fixed;
    inset: 0;
    z-index: 10050;
    padding-bottom: calc(1.25rem + var(--sd-chrome-bottom));
  }
}

/* ── Reduced motion: sheets appear without slide (inside the gates only) ── */
@media (max-width: 960px) and (prefers-reduced-motion: reduce) {
  body.sd-app .sd-start-menu,
  body.sd-app .sd-nc,
  body.sd-app .sd-taskbar-more__menu,
  body.sd-app .sd-module-help {
    transition: none;
  }
}

@media (min-width: 961px) and (max-width: 1366px) and (prefers-reduced-motion: reduce) {
  html.trn-touch body.sd-app .sd-start-menu,
  html.trn-touch body.sd-app .sd-nc,
  html.trn-touch body.sd-app .sd-taskbar-more__menu,
  html.trn-touch body.sd-app .sd-module-help {
    transition: none;
  }
}
