/* hn overlays — mobile + SEO helpers + ABABSEO */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body,
#root,
.app-shell {
  width: 100%;
  max-width: 100%;
}

body {
  overflow-x: clip;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-shell > main {
  flex: 1;
  width: 100%;
  min-width: 0;
}

img,
video {
  max-width: 100%;
}

.player-box video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #020617;
}

.cover-wrap img,
.detail-poster img,
.detail-backdrop img,
.hero-slide img,
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-links > a.active {
  color: #2563eb;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  text-align: center;
}

.search-empty {
  color: #64748b;
  font-weight: 700;
  padding: 28px 8px;
  text-align: center;
}

/* ABABSEO */
.ababseo-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  pointer-events: none;
  user-select: none;
}

.ababseo-mark__sky {
  position: relative;
  width: 2rem;
  height: 1.35rem;
}

.ababseo-mark__plane {
  position: absolute;
  left: 0;
  top: 50%;
  color: #60a5fa;
  animation: ababseo-fly 4.2s ease-in-out infinite;
}

.ababseo-mark__trail {
  position: absolute;
  right: calc(100% + 2px);
  top: 52%;
  width: 18px;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(to left, rgba(96, 165, 250, 0.9), transparent);
}

.ababseo-mark__spark {
  position: absolute;
  right: calc(100% + 16px);
  top: 40%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #bfdbfe;
}

.ababseo-mark__text {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  background: linear-gradient(100deg, #e5e7eb, #60a5fa, #94a3b8);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: ababseo-shimmer 5s linear infinite;
}

@keyframes ababseo-fly {
  0% {
    transform: translate(-2px, 3px) rotate(8deg);
  }
  50% {
    transform: translate(10px, -3px) rotate(-6deg);
  }
  100% {
    transform: translate(-2px, 3px) rotate(8deg);
  }
}

@keyframes ababseo-shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    width: 100%;
    box-sizing: border-box;
  }

  .brand {
    min-width: 0;
  }

  .brand > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(46vw, 180px);
  }

  .menu-btn {
    min-width: 44px;
    min-height: 44px;
    line-height: 1;
    touch-action: manipulation;
  }

  .hero {
    height: min(72vh, 560px);
    min-height: 420px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: clamp(28px, 8vw, 40px) !important;
    word-break: break-word;
  }

  .hero-content p {
    font-size: 15px !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .primary-btn,
  .hero-actions .ghost-btn {
    width: 100%;
  }

  .filter-panel {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-panel::-webkit-scrollbar {
    display: none;
  }

  .filter-panel button {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 40px;
    touch-action: manipulation;
  }

  .page-hero h1 {
    font-size: clamp(30px, 9vw, 48px);
    word-break: break-word;
  }

  .detail-poster {
    margin: 0 auto;
  }

  .detail-head .primary-btn {
    width: 100%;
    text-align: center;
  }

  .primary-btn,
  .ghost-btn,
  .header-search button,
  .wide-search button {
    touch-action: manipulation;
  }

  .section-head h2 {
    font-size: 28px;
  }

  .footer-bottom {
    padding-bottom: max(22px, env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .hero {
    height: 68vh;
    min-height: 380px;
  }

  .hero-tags span {
    font-size: 12px;
    padding: 6px 10px;
  }

  .intro-band h2 {
    font-size: 26px;
  }

  .card-body h3 {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ababseo-mark__plane,
  .ababseo-mark__text,
  .hero-slide {
    animation: none;
    transition: none;
  }
}
