/*
 * Yukirepo BASE v0.0.1 - compatibility refinement layer
 *
 * Purpose:
 * - Preserve the established Yukirepo visual identity and navigation.
 * - Keep only non-destructive accessibility/mobile-safety improvements.
 * - Do not hide existing content, change brand colors, or replace base layouts.
 *
 * The primary design remains in assets/css/styles.css and page-specific CSS.
 */

/* Keyboard accessibility without changing normal mouse/touch appearance. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #0988da;
  outline-offset: 3px;
}

/* Make interactive controls feel immediate on touch devices. */
a,
button,
input,
select,
textarea {
  touch-action: manipulation;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

/* Prevent oversized media from creating horizontal overflow. */
img,
video,
canvas,
svg {
  max-width: 100%;
}

/* Respect the native hidden attribute even if component CSS is added later. */
[hidden] {
  display: none !important;
}

/* Long user-supplied strings should not force the viewport wider. */
.report-card,
.live-report-card,
.consultation-card,
.article-grid article,
.resort-card,
.content-card {
  overflow-wrap: anywhere;
}

/* Preserve the existing mobile bottom navigation while accounting for iPhone safe areas. */
@media (max-width: 900px) {
  .mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(62px + env(safe-area-inset-bottom));
  }

  body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
  }
}

/* Respect OS accessibility preferences. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
