/* The existing content views and commands adapt to touch-sized workspaces.
   Desktop artwork, double-click navigation and mutation ownership stay intact. */
@media (max-width: 760px) {
    /* Artwork is the primary tap target. Actions remain in detail or its
       explicit footer menu, rather than covering two-column grid images. */
    #app .pin .pin-save-controls,
    #app .pin .pin-download { display: none; }
    #app .pin-caption > .icon-button,
    #app .discover-back,
    #app #discover-view .discover-download { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
    #app #discover-view .pin-caption { align-items: center; }
    #app #discover-view .discover-pin-actions { flex-wrap: wrap; }
    #app .pin-save-controls-detail > :is(.pin-board-choice,.pin-save) { min-height: 44px; }
    #app #board-assets .world-item-menu {
        display: grid; place-items: center; width: 44px; height: 44px;
        min-width: 44px; min-height: 44px; padding: 0; clip-path: none;
        overflow: visible; border-radius: 8px; background: var(--surface); font-size: 22px;
    }
    #app #board-nav-list .world-item-menu,
    #app #board-nav-list .shelf-tree-toggle { width: 44px; height: 44px; min-width: 44px; min-height: 44px; flex-basis: 44px; }
    #app #board-nav-list :is(.shelf-tree-root,.shelf-tree-section) { min-height: 44px; }
    #app .world-context-menu .world-context-menu-item { min-height: 44px; padding-block: 9px; }

    #app .board-save-picker.is-mobile { border-radius: 18px; }
    #app .board-save-picker.is-mobile .board-save-heading { min-height: 56px; padding: 14px 56px; }
    #app .board-save-picker.is-mobile .board-save-heading > .icon-button { width: 44px; height: 44px; top: 6px; right: 6px; }
    #app .board-save-picker.is-mobile .board-save-search { height: 44px; min-height: 44px; max-height: 44px; flex-shrink: 0; font-size: 16px; }
    #app .board-save-picker.is-mobile .board-save-search input { height: 42px; min-height: 42px; max-height: 42px; font-size: 16px; }
    #app .board-save-picker.is-mobile .board-save-list { min-height: 0; max-height: none; overflow-y: auto; }
    #app .board-save-picker.is-mobile .board-save-row-save { min-height: 44px; min-width: 64px; opacity: 1; pointer-events: auto; }
    #app .board-save-picker.is-mobile .board-save-select { min-height: 60px; }
    #app .board-save-picker.is-mobile .board-save-footer { padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
    #app .board-save-picker.is-mobile .board-save-footer > button,
    #app .board-save-picker.is-mobile .board-save-footer form :is(input,button) { min-height: 44px; font-size: 16px; }
}

/* One destination chooser stages an exact image in the existing message draft. */
.pin-share-list { min-width: 0; max-height: 50dvh; margin: 0; padding: 0; border: 0; overflow-y: auto; overscroll-behavior: contain; }
.pin-share-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px; border-radius: 8px; cursor: pointer; }
.pin-share-row:has(input:checked) { background: var(--inset); }
.pin-share-row > input { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; }
.pin-share-row > span { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.pin-share-row strong { font-size: 13px; overflow-wrap: anywhere; }
.pin-share-row small { color: var(--muted); font-size: 11px; }
@media (max-width: 760px) {
    #app .pin-share-sheet { position: fixed; inset: auto 8px max(8px, env(safe-area-inset-bottom, 0px)); width: auto; max-height: calc(100dvh - 16px); margin: 0; border-radius: 18px; }
    #app .pin-share-sheet .dialog-heading > .icon-button { width: 44px; height: 44px; }
    #app .pin-share-sheet .form-actions > button { min-height: 44px; }
    #app .pin-share-row { min-height: 60px; }
}
