/* 个人助手首页专用样式；独立文件避免影响现有登录和后台页面。 */
:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --page-blue: #318faa;
  --page-blue-dark: #265f72;
  --white: #ffffff;
  --white-soft: rgba(255, 255, 255, 0.9);
  --white-muted: rgba(255, 255, 255, 0.78);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--page-blue-dark);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--page-blue-dark);
  color: var(--white);
}

a {
  color: inherit;
}

.home {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  background-color: var(--page-blue);
  background-image: url("assets/home-mountain.png");
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: cover;
}

.home__shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 76, 97, 0.03) 0%, rgba(15, 76, 97, 0.02) 58%, rgba(16, 42, 53, 0.14) 100%),
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.06), transparent 48%);
  pointer-events: none;
}

.home__content {
  align-self: start;
  width: min(100% - 40px, 980px);
  margin-inline: auto;
  padding-top: clamp(72px, 13vh, 142px);
  padding-bottom: 132px;
  text-align: center;
}

.home__heading {
  display: grid;
  justify-items: center;
}

.home--maintenance .home__content {
  align-self: center;
  padding-top: 40px;
  padding-bottom: 120px;
}

.home--maintenance .home__heading h1 {
  margin-top: 0;
  font-size: clamp(42px, 6vw, 78px);
  letter-spacing: 0.04em;
}

.home__kicker,
.home__subtitle,
.home__heading h1 {
  margin: 0;
}

.home__kicker {
  color: var(--white-soft);
  font-size: clamp(15px, 1.4vw, 21px);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.home__heading h1 {
  margin-top: 10px;
  font-size: clamp(58px, 7.8vw, 102px);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1.05;
  text-shadow: 0 10px 30px rgba(0, 43, 58, 0.2);
}

.home__subtitle {
  margin-top: 13px;
  color: var(--white-soft);
  font-size: clamp(19px, 2.15vw, 28px);
  font-weight: 800;
  line-height: 1.3;
}

.home__entries {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  justify-content: center;
  gap: clamp(22px, 5vw, 64px);
  margin-top: clamp(45px, 8vh, 76px);
}

.entry {
  display: grid;
  width: 150px;
  min-height: 150px;
  place-items: start center;
  align-content: start;
  gap: 13px;
  border-radius: 28px;
  color: var(--white);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.entry__icon {
  display: inline-grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 34px rgba(0, 43, 58, 0.18);
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.entry__label {
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
  white-space: nowrap;
  text-shadow: 0 4px 14px rgba(0, 43, 58, 0.2);
}

.entry:hover .entry__icon {
  transform: translateY(-5px) scale(1.04);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 40px rgba(0, 43, 58, 0.26);
}

.entry:active .entry__icon {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.28);
}

.entry:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 5px;
}

.home__footer {
  position: absolute;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px));
  left: max(20px, env(safe-area-inset-left));
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 18px;
  color: var(--white-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.home__footer a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.home__footer a:hover,
.home__footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  .home {
    background-position: center bottom;
  }

  .home__content {
    width: min(100% - 24px, 572px);
    padding-top: max(72px, calc(13svh + env(safe-area-inset-top)));
    padding-bottom: max(110px, calc(90px + env(safe-area-inset-bottom)));
  }

  .home--maintenance .home__content {
    padding-top: max(32px, env(safe-area-inset-top));
    padding-bottom: max(100px, calc(80px + env(safe-area-inset-bottom)));
  }

  .home--maintenance .home__heading h1 {
    font-size: clamp(36px, 11vw, 58px);
    line-height: 1.25;
  }

  .home__kicker {
    font-size: clamp(15px, 4vw, 20px);
  }

  .home__heading h1 {
    margin-top: 14px;
    font-size: clamp(54px, 18vw, 88px);
    line-height: 1;
  }

  .home__subtitle {
    margin-top: 14px;
    font-size: clamp(19px, 6vw, 28px);
  }

  .home__entries {
    grid-template-columns: minmax(0, 150px);
    gap: clamp(6px, 3vw, 22px);
    margin-top: clamp(50px, 8svh, 86px);
  }

  .entry--desktop-only {
    display: none;
  }

  .entry {
    width: 100%;
    min-width: 0;
    min-height: 148px;
    gap: 14px;
  }

  .entry__icon {
    width: clamp(68px, 19vw, 100px);
    height: clamp(68px, 19vw, 100px);
    font-size: clamp(25px, 7vw, 36px);
  }

  .entry__label {
    font-size: clamp(14px, 4vw, 22px);
    white-space: normal;
  }

  .home__footer {
    font-size: clamp(12px, 3.5vw, 16px);
  }
}

@media (max-width: 360px) {
  .home__content {
    padding-top: max(54px, calc(10svh + env(safe-area-inset-top)));
  }

  .home__heading h1 {
    font-size: 52px;
  }

  .home__subtitle {
    font-size: 18px;
  }

  .home__entries {
    gap: 8px;
    margin-top: 42px;
  }

  .entry {
    min-width: 0;
  }

  .entry__label {
    font-size: 14px;
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .home {
    min-height: 520px;
  }

  .home__content {
    display: grid;
    grid-template-columns: minmax(250px, 0.8fr) minmax(390px, 1.2fr);
    align-items: center;
    gap: 28px;
    padding-top: max(36px, env(safe-area-inset-top));
    padding-bottom: 74px;
  }

  .home__heading h1 {
    font-size: clamp(48px, 9vw, 78px);
  }

  .home__entries {
    gap: 18px;
    margin-top: 0;
  }

  .entry {
    width: 100%;
  }

  .entry__icon {
    width: 76px;
    height: 76px;
    font-size: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry__icon {
    transition: none;
  }
}
