/* Life launcher v5.90 */
#page-home {
  min-height: calc(100dvh - 86px);
  padding: clamp(10px, 2vh, 24px) 0;
  overflow: hidden;
}

.life-home-grid {
  width: min(100%, 1180px);
  height: min(820px, calc(100dvh - 126px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.7vw, 22px);
  direction: rtl;
}

.life-home-tile {
  position: relative;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 22px);
  padding: clamp(12px, 2vw, 26px);
  border: 0;
  border-radius: clamp(18px, 2vw, 30px);
  color: #fff;
  text-align: right;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(42, 54, 72, .16);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  isolation: isolate;
}

.life-home-tile::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: -12%;
  bottom: -54%;
  width: 125%;
  height: 85%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
  transform: rotate(-5deg);
}

.life-home-tile:hover,
.life-home-tile:focus-visible {
  transform: translateY(-4px);
  filter: saturate(1.08);
  box-shadow: 0 17px 36px rgba(42, 54, 72, .23);
}

.life-home-tile:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .9);
  outline-offset: -6px;
}

.life-home-tile svg {
  width: clamp(42px, 4.6vw, 72px);
  height: clamp(42px, 4.6vw, 72px);
  flex: none;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.life-home-tile strong {
  min-width: 0;
  font-size: clamp(16px, 1.75vw, 27px);
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
}

.life-home-profile { background: linear-gradient(135deg, #ffbe0b, #fb8500); }
.life-home-dashboard { background: linear-gradient(135deg, #00a6fb, #0066e6); }
.life-home-planning { background: linear-gradient(135deg, #50d940, #149c37); }
.life-home-tasks { background: linear-gradient(135deg, #ff8a18, #f0440b); }
.life-home-shopping { background: linear-gradient(135deg, #ffd60a, #f59e0b); }
.life-home-habits { background: linear-gradient(135deg, #23c96b, #008f66); }
.life-home-finance { background: linear-gradient(135deg, #44b83c, #087f3d); }
.life-home-remember { background: linear-gradient(135deg, #8b5cf6, #5b21b6); }

.life-home-empty {
  border: 2px dashed color-mix(in srgb, var(--primary) 25%, var(--line));
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.life-home-empty::after { display: none; }

.brand,
.mobile-brand {
  cursor: pointer;
}

@media (max-width: 720px) {
  #page-home {
    box-sizing: border-box;
    min-height: 0;
    height: calc(100dvh - 70px - env(safe-area-inset-bottom));
    padding: 7px 0 78px;
  }

  .life-home-grid {
    width: 100%;
    height: 100%;
    min-height: 0;
    gap: clamp(6px, 1.7vw, 9px);
  }

  .life-home-tile {
    flex-direction: column;
    gap: 4px;
    padding: 7px 4px;
    border-radius: clamp(13px, 4vw, 19px);
    box-shadow: 0 6px 14px rgba(42, 54, 72, .14);
    text-align: center;
  }

  .life-home-tile svg {
    width: clamp(27px, 8vw, 38px);
    height: clamp(27px, 8vw, 38px);
  }

  .life-home-tile strong {
    max-width: 100%;
    font-size: clamp(9px, 3vw, 13px);
    line-height: 1.25;
    white-space: normal;
  }

  .life-home-empty {
    border-width: 1.5px;
  }

  .mobile-nav button small {
    font-size: 8px;
  }

  .mobile-nav {
    display: flex !important;
    align-items: center;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    padding-right: 7px !important;
    padding-left: 7px !important;
  }

  .mobile-nav::-webkit-scrollbar { display: none; }

  .mobile-nav > button:not(.capture-fab) {
    min-width: 58px;
    flex: 0 0 58px;
  }

  .mobile-nav [data-page="planning"] {
    margin-left: 66px;
  }

  .mobile-nav .capture-fab {
    position: fixed !important;
    z-index: 50;
    right: auto !important;
    left: 50% !important;
    bottom: calc(13px + env(safe-area-inset-bottom));
    width: 54px;
    min-width: 54px;
    height: 54px;
    margin: 0 !important;
    transform: translateX(-50%) !important;
  }
}

@media (max-width: 370px) {
  .life-home-tile strong { font-size: 9px; }
  .life-home-tile svg { width: 25px; height: 25px; }
}

@media (max-height: 650px) and (max-width: 720px) {
  #page-home { padding-top: 4px; }
  .life-home-grid { gap: 5px; }
  .life-home-tile svg { width: 23px; height: 23px; }
  .life-home-tile strong { font-size: 8.5px; }
}
