@charset "UTF-8";

/*
 * SHIMA NAVIGATION SLIM v2.0.1
 * Only factual mobile views remain. START DECK and production routes are
 * deliberately retired because their labels did not map 1:1 to real shelves.
 */

#shima-start-deck,
#shima-route-navigation,
#shima-reforge-breadcrumb {
  display: none !important;
}

@media (max-width: 700px) {
  #zero-mobile-view-switch {
    position: relative;
    z-index: 1;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    pointer-events: auto;
    isolation: isolate;
  }

  #zero-mobile-view-switch button {
    position: relative;
    z-index: 1;
    gap: 4px !important;
    min-width: 0;
    padding-inline: 5px !important;
    font-size: 0.72rem !important;
    pointer-events: auto;
    touch-action: manipulation;
    white-space: nowrap;
  }

  #shima-mobile-selected-count {
    min-width: 1.65em !important;
    height: 1.65em !important;
    padding-inline: 4px !important;
    font-size: 0.68rem !important;
  }

  /* Keep #sections alive because the selection tray is mounted inside it. */
  body[data-shima-mobile-view="selected"] .container > :not(#sections),
  body[data-shima-mobile-view="selected"] #sections > :not(#zero-selection-tray) {
    display: none !important;
  }

  body[data-shima-mobile-view="selected"] #sections {
    display: block !important;
  }

  body[data-shima-mobile-view="selected"] #zero-selection-tray,
  body[data-shima-mobile-view="selected"] #zero-selection-tray[hidden] {
    display: block !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    border-color: rgba(200, 238, 250, 0.3) !important;
    border-top-color: rgba(235, 251, 255, 0.5) !important;
    box-shadow: 0 18px 46px rgba(0, 5, 14, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
  }

  body[data-shima-mobile-view="selected"] #zero-selection-tray .zero-selection-chips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    max-height: calc(100svh - 255px);
    padding: 9px;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: none;
  }

  body[data-shima-mobile-view="selected"] #zero-selection-tray .zero-selection-chip {
    width: 100%;
    box-sizing: border-box;
  }

  body[data-shima-mobile-view="selected"] #zero-selection-tray .zero-selection-chip__jump {
    flex: 1 1 auto !important;
    max-width: none;
  }

  body[data-shima-mobile-view="selected"] #zero-selection-chips:empty::after {
    content: "まだ項目を選んでいません。\A『作る』へ戻って項目を選ぶと、ここに一覧表示されます。";
    display: block;
    padding: 28px 16px;
    border: 1px dashed rgba(195, 233, 246, 0.22);
    border-radius: 13px;
    background: rgba(6, 23, 38, 0.62);
    color: #8ba8b8;
    font-size: 0.74rem;
    line-height: 1.65;
    text-align: center;
    white-space: pre-line;
  }

  body[data-shima-mobile-view="selected"] #mini-ui-fixed {
    max-height: none !important;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)) !important;
    overflow: visible !important;
  }

  body[data-shima-mobile-view="selected"] #mini-ui-fixed > :not(#zero-mobile-view-switch) {
    display: none !important;
  }

  body[data-shima-mobile-view="selected"] #zero-mobile-view-switch {
    margin-bottom: 0 !important;
  }

  body[data-shima-mobile-view="selected"] #floater-btn,
  body[data-shima-mobile-view="selected"] #floater-list {
    display: none !important;
  }
}
