/* 首页体验优化：首屏顺序、触控面积与键盘可访问性。 */

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 100000;
  padding: 10px 14px;
  color: #001b0e;
  background: #69f0ae;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid #69f0ae;
  outline-offset: 3px;
}

.hero-new-title {
  text-wrap: balance;
}

.hero-desc-new {
  text-wrap: pretty;
}

.hero-left,
.hero-right,
.ai-hero-title,
.ai-quick-tag,
.ai-quick-tag > span:last-child,
.hero-cta-main,
.hero-cta-sub,
.hero-cta-calc,
.identity-card,
.identity-card .name,
.identity-card .sub {
  min-width: 0;
}

.ai-hero-title,
.ai-quick-tag > span:last-child,
.hero-cta-main,
.hero-cta-sub,
.hero-cta-calc,
.identity-card .name,
.identity-card .sub {
  overflow-wrap: anywhere;
}

.hero-cta-main,
.hero-cta-sub,
.hero-cta-calc {
  height: auto;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
}

.news-dot {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px !important;
  height: 44px !important;
  background: transparent !important;
}

.news-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 230, 118, 0.22);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.news-dot:hover::before {
  background: rgba(0, 230, 118, 0.48);
}

.news-dot.active::before {
  width: 22px;
  background: #00e676;
}

@media (min-width: 769px) {
  .nav-brand,
  .nav-brand span,
  .nav-links a,
  .nav-actions .btn {
    white-space: nowrap;
  }

  .nav-links {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
  }

  .nav-links a {
    padding-right: clamp(6px, 0.65vw, 10px);
    padding-left: clamp(6px, 0.65vw, 10px);
    font-size: clamp(12px, 0.9vw, 14px);
  }

  html:lang(ja) .nav-brand span,
  html:lang(en) .nav-brand span {
    font-size: 14px;
  }
}


@media (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hero-right {
    order: -1;
  }

  .hero-left,
  .hero-right {
    width: 100%;
  }

  .hero h1.hero-new-title,
  .hero-desc-new {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 768px) {
  .nav-brand {
    min-height: 44px;
  }

  .nav-inner > #mobileMenuBtn,
  .nav-actions .btn-login,
  .nav-actions .btn-register {
    min-height: 44px !important;
    height: 44px !important;
  }

  .nav-inner > #mobileMenuBtn {
    flex-basis: 44px !important;
    width: 44px !important;
    min-width: 44px !important;
  }

  .hero {
    gap: 22px !important;
  }

  #mobileNavMenu .mobile-lang-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-right {
    padding-top: 2px;
  }

  .ai-hero-panel {
    box-shadow: inset 0 1px 0 rgba(105, 240, 174, 0.06);
  }

  .ai-quick-tag,
  .hero-cta-sub,
  .hero-cta-calc,
  .cmd-action,
  .dc-btn {
    min-height: 44px;
  }

  .social-item {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .nav-brand > div {
    display: none !important;
  }

  .nav-brand {
    flex: 1 1 40px !important;
    overflow: visible !important;
  }

  .hero-badges-inline {
    justify-content: center;
  }

  .hero h1.hero-new-title {
    font-size: clamp(24px, 7vw, 29px) !important;
  }

  .hero-desc-new {
    font-size: 14px !important;
    line-height: 1.7 !important;
  }

  .hero-cta-main,
  .hero-cta-sub,
  .hero-cta-calc {
    min-height: 48px;
  }

  .ai-quick-tag {
    min-height: 44px !important;
  }

  html:lang(en) .ai-hero-title,
  html:lang(ja) .ai-hero-title {
    font-size: 13px;
    line-height: 1.35;
  }

  html:lang(en) .identity-card .name,
  html:lang(en) .identity-card .sub,
  html:lang(ja) .identity-card .name,
  html:lang(ja) .identity-card .sub {
    line-height: 1.25;
  }

  .identity-cards {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .identity-cards::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 360px) {
  .nav-inner {
    --mobile-auth-button-width: 82px !important;
  }

  html:lang(en) .nav-inner,
  html:lang(ja) .nav-inner {
    --mobile-auth-button-width: 88px !important;
  }

  html:lang(en) .nav-actions .btn-login,
  html:lang(en) .nav-actions .btn-register,
  html:lang(ja) .nav-actions .btn-login,
  html:lang(ja) .nav-actions .btn-register {
    font-size: 11px !important;
    line-height: 1.05 !important;
    padding-right: 5px !important;
    padding-left: 5px !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
}

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