/* ============================================================
   iyoahsOS — mobile / small screens
   ============================================================ */

@media (max-width: 760px) {
  :root {
    --taskbar-h: 58px;
    --topbar-h: 0px;
    --px: 2px;
  }

  body {
    font-size: 15px;
  }

  .desk-topbar {
    display: none;
  }

  .wallpaper::after {
    background:
      radial-gradient(ellipse at 50% 38%, transparent 40%, rgba(4, 14, 26, .28) 100%),
      linear-gradient(180deg, rgba(4, 14, 26, .18), transparent 20%, transparent 62%, rgba(4, 14, 26, .35));
  }

  .desk-icons {
    left: 6px;
    right: 6px;
    top: 10px;
    bottom: calc(var(--taskbar-h) + 10px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 2px;
    align-content: start;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 2px 22px;
    scrollbar-width: none;
  }

  .desk-icons::-webkit-scrollbar {
    display: none;
  }

  .desk-icon {
    width: auto;
    min-height: 98px;
    gap: 7px;
    padding: 6px 2px;
  }

  .desk-icon__tile {
    width: 58px;
    height: 58px;
  }

  .desk-icon__tile svg {
    width: 36px;
    height: 36px;
  }

  .desk-icon__label {
    font-size: 8px;
  }

  .desk-icon__zh {
    font-size: 12px;
  }

  .desk-brand,
  .desk-note,
  .sun-spot {
    display: none;
  }

  /* home-screen style: a small greeting strip at the top */
  .desk-icons::before {
    content: "IYOAHS OS · TAP AN ICON";
    grid-column: 1 / -1;
    display: block;
    margin: 2px 4px 8px;
    padding: 6px 8px;
    background: rgba(6, 10, 22, .42);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    font-family: var(--font-en);
    font-size: 7px;
    letter-spacing: .08em;
    text-align: center;
  }

  .taskbar {
    height: var(--taskbar-h);
    padding: 5px 6px;
    gap: 5px;
  }

  .start-btn {
    width: 46px;
    height: 44px;
    padding: 0;
    justify-content: center;
    font-size: 0;
    gap: 0;
  }

  .start-btn svg {
    width: 20px;
    height: 20px;
  }

  .tasks {
    gap: 4px;
    padding: 0;
  }

  .task {
    min-width: 44px;
    max-width: 48px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }

  .task span {
    display: none;
  }

  .task svg {
    width: 21px;
    height: 21px;
  }

  .tray {
    gap: 4px;
  }

  .tray-btn {
    min-width: 34px;
    height: 40px;
    padding: 0 5px;
  }

  .tray-btn .tray-label {
    display: none;
  }

  .clock {
    font-size: 8px;
    padding: 0 2px;
    min-width: 44px;
  }

  .clock small {
    display: none;
  }

  .start-menu {
    left: 0;
    right: 0;
    bottom: var(--taskbar-h);
    width: 100%;
    height: calc(100% - var(--taskbar-h));
    grid-template-columns: 1fr;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: none;
    overflow-y: auto;
    animation: menu-in-mobile .18s var(--ease);
  }

  @keyframes menu-in-mobile {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .start-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 13px 15px;
  }

  .start-progress {
    width: 96px;
  }

  .start-apps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 14px;
    gap: 6px;
  }

  .start-app {
    padding: 14px 4px;
  }

  .start-app svg {
    width: 30px;
    height: 30px;
  }

  .start-side {
    border-left: 0;
    border-top: 2px solid var(--line);
    padding: 14px;
  }

  .start-actions {
    margin-top: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }

  .start-action {
    border: 2px solid var(--line);
    background: var(--paper);
  }

  .start-quote {
    font-size: 12px;
  }

  .toasts {
    left: 10px;
    right: 10px;
    bottom: calc(var(--taskbar-h) + 10px);
    width: auto;
  }

  .ctx-menu {
    min-width: 180px;
  }

  .crt {
    opacity: .32;
  }

  .boot__inner {
    width: 88vw;
    padding: 4vh 0;
  }

  .boot__lines {
    min-height: 156px;
    font-size: 9px;
  }

  .boot__logo {
    font-size: 40px;
    text-shadow: 4px 4px 0 #1058c5;
  }

  .boot__meta {
    font-size: 7px;
  }

  .lock__title {
    font-size: 15px;
  }
}

@media (max-width: 380px) {
  .desk-icon__tile {
    width: 52px;
    height: 52px;
  }

  .desk-icon__tile svg {
    width: 32px;
    height: 32px;
  }

  .desk-icon {
    min-height: 90px;
  }

  .desk-icons {
    gap: 8px 0;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .desk-icons {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    bottom: calc(var(--taskbar-h) + 6px);
  }

  .desk-icon {
    min-height: 82px;
  }

  .desk-icon__tile {
    width: 44px;
    height: 44px;
  }

  .desk-icon__tile svg {
    width: 28px;
    height: 28px;
  }

  .desk-icon__zh {
    display: none;
  }
}
/* mobile start menu: compact header, natural row heights */
@media (max-width: 760px) {
  .start-menu {
    align-content: start;
    overflow-x: hidden;
  }

  .start-head {
    gap: 8px;
    padding: 12px;
  }

  .start-id {
    min-width: 0;
  }

  .start-progress {
    width: 68px;
  }

  .start-progress small {
    font-size: 6px;
    justify-content: flex-end;
  }

  .start-progress small span:first-child {
    display: none;
  }

  .start-apps {
    align-content: start;
    grid-auto-rows: min-content;
  }

  .start-side {
    min-width: 0;
  }

  .start-quote {
    overflow-wrap: anywhere;
  }

  .start-action {
    min-width: 0;
  }

  .start-action span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
