/* GONZOWIRE OS - mobile responsive
   Точка излома 820px. Ниже - всё перестраивается под палец.
*/
@media (max-width: 820px) {
  html, body { font-size: 16px; }

  /* Boot */
  #boot { padding: 20px; font-size: 16px; }
  #boot h1 { font-size: 30px; }
  #boot .sub { font-size: 12px; }

  /* Menubar - горизонтальный скролл, чтобы все пункты помещались */
  .menubar {
    height: auto;
    min-height: 36px;
    padding: 4px 8px;
    flex-wrap: wrap;
    font-size: 13px;
  }
  .menubar .brand { display: none; }
  .menubar .item { padding: 2px 6px; height: 28px; font-size: 13px; }
  .menubar .item .dropdown { font-size: 14px; min-width: 200px; max-width: 80vw; }
  .menubar .right {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    padding-top: 4px;
    border-top: 1px dashed var(--ink);
    flex-wrap: wrap;
  }
  .menubar .ticker { display: none; }
  .menubar .clock { font-size: 14px; }
  .menubar .vibe { font-size: 11px; padding: 2px 6px; }

  /* Иконки - сетка по 3, поменьше */
  .icons {
    top: auto;
    bottom: 70px;
    left: 0; right: 0;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 10px;
    max-height: none;
    overflow-y: auto;
    z-index: 5;
  }
  .icon { width: 100%; font-size: 12px; }
  .icon .glyph { width: 56px; height: 56px; font-size: 28px; }

  /* LSD кнопка - снизу по центру, не перекрывает иконки */
  .lsd-toggle {
    bottom: 8px; right: 8px;
    font-size: 12px;
    padding: 6px 10px;
  }

  /* Окна - всегда на весь экран на мобильном */
  .window {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 70px !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 70px) !important;
    min-width: 0;
    min-height: 0;
    border-width: 2px 0 0 0;
    box-shadow: none;
  }
  .window.maxed { top: 70px !important; }
  .window .titlebar { font-size: 14px; padding: 8px 6px; }
  .window .titlebar .btn { width: 26px; height: 26px; font-size: 16px; line-height: 22px; }
  .window .body { padding: 12px; max-height: none; }
  .window .rs { display: none !important; }

  /* Article reader */
  .article h1 { font-size: 22px; }
  .article p { font-size: 15px; line-height: 1.55; }
  .article .meta { font-size: 13px; }
  .article .share { flex-direction: column; }
  .article .share input { width: 100%; }

  /* Posts list */
  .postlist .ttl { font-size: 16px; }
  .postlist .ex { font-size: 13px; }

  /* Quiz */
  .quiz .opt { font-size: 14px; padding: 12px; }

  /* Inventory */
  .inv { grid-template-columns: repeat(2, 1fr); }

  /* Slot */
  .slot-reels .reel { width: 60px; height: 60px; font-size: 36px; }

  /* Pills */
  .pills { grid-template-columns: repeat(4, 1fr); }

  /* TV */
  .tv-screen { font-size: 13px; padding: 12px; }

  /* Phone keypad */
  .phone-pad .key { padding: 18px; font-size: 22px; }

  /* Mint 400 canvas - fit width */
  .mint canvas { max-width: 100%; height: auto; }

  /* Toast */
  .toast { font-size: 14px; padding: 8px 14px; max-width: 90vw; }

  /* Trip banner */
  .trip-banner { font-size: 16px; padding: 6px 14px; top: 80px; }

  /* Десктоп фон не такой яркий чтоб меньше глаза резало */
  #desktop::before { opacity: .55; }

  /* Wall в окне ужать */
  .wall { min-height: 220px; }
  .wall .tag { font-size: 14px; }
}

/* Очень узкие экраны (iPhone SE и т.п.) */
@media (max-width: 380px) {
  .icons { grid-template-columns: repeat(2, 1fr); }
  .menubar .item { font-size: 11px; padding: 2px 4px; }
  .pills { grid-template-columns: repeat(3, 1fr); }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .window { top: 40px !important; height: calc(100vh - 40px) !important; }
  .icons {
    bottom: 8px;
    grid-template-columns: repeat(6, 1fr);
  }
  .icon .glyph { width: 44px; height: 44px; font-size: 22px; }
}
