/* The original desktop design lives unchanged in index.html.
   These additions only handle mobile sizing, loading safety and input access. */
.intro picture { display: block; }
.loading_out { pointer-events: none; }
[role="link"]:focus-visible { outline: 3px solid #17f700; outline-offset: 4px; }
@media (max-width: 900px) {
  html { font-size: 16px; }
  body { min-width: 280px; overflow-x: hidden; }
  .intro { height: 100dvh; min-height: 0; }
  .intro .title, .intro picture { width: 100%; height: 100%; }
  .intro picture img { width: 100%; height: 100%; object-fit: contain; }
  .container { width: calc(100% - 2rem); margin: .75rem auto; flex-wrap: wrap; row-gap: .4rem; }
  .brand { font-size: clamp(1.1rem, 4.8vw, 1.7rem); }
  .nav-links { width: 100%; gap: 0; justify-content: space-between; }
  .nav-link { display: flex; align-items: center; min-height: 44px; padding: .25rem; font-size: 1rem; }
  .rainbow { height: 15rem; }
  .rainbow_text { width: calc(100% - 2rem); font-size: clamp(1.6rem, 6.5vw, 2.6rem); text-align: center; }
  .my_self { width: calc(100% - 2rem); height: auto; aspect-ratio: 16 / 9; margin-bottom: 4rem; border-radius: 1rem; }
  .my_self-1 { height: 100%; border-radius: 1rem; object-fit: contain; }
  .subject { font-size: clamp(1.8rem, 7.8vw, 3.5rem); max-width: calc(100% - 1rem); }
  .subject1 { margin-left: .4em; font-size: inherit; }
  .subject-skill { font-size: inherit; }
  .emptybox { width: calc(100% - 2rem); height: auto; aspect-ratio: 16 / 9; border-radius: 1rem; margin-bottom: 4rem; }
  .emptybox-1 { height: 100%; object-fit: contain; border-radius: 1rem; }
  .emptybox p, .scrollbox_container_card p { font-size: clamp(1.5rem, 8vw, 3rem); }
  .scrollbox { padding: 2rem 0 4rem; }
  .scrollbox_container_card { width: 84vw; height: auto; aspect-ratio: 52 / 32; margin-inline: 1rem; border-radius: 1rem; }
  .scrollbox_container_card img, .scrollbox_container_card video { width: 100%; height: 100%; object-fit: cover; }
  .skill { width: calc(100% - 2rem); height: auto; min-height: 0; align-items: flex-start; margin-bottom: 4rem; border-radius: 1rem; padding: 1.2rem .6rem 1.8rem; }
  .skill main { width: calc(50% - 1rem); height: auto; margin: .5rem; }
  .skill li { font-size: clamp(.85rem, 3.2vw, 1.2rem); line-height: 1.6; margin-bottom: 3rem; overflow-wrap: anywhere; }
  .skill li::before, .skill li::after { height: 1.25rem; bottom: -1.5rem; }
  .skill li:last-child { margin-bottom: 1.5rem; }
  .footing { height: auto; }
  .footing div { width: 100%; }
  .footing img { width: 100%; height: auto; }
  .loading { min-height: 100dvh; }
}
@media (max-width: 900px) and (orientation: landscape) {
  .container { flex-wrap: nowrap; }
  .nav-links { width: auto; gap: .75rem; }
  .brand { font-size: 1.1rem; }
  .rainbow { height: 11rem; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .rainbow_text { width: calc(100% - 2rem); font-size: min(3.8rem, 4vw); text-align: center; }
  .subject { max-width: calc(100% - 2rem); font-size: min(8rem, 7.5vw); }
  .subject1, .subject-skill { font-size: inherit; }
  .skill li { font-size: min(2.1rem, 2.5vw); }
}
@media (hover: none) {
  .my_self-1:hover, .emptybox:hover, .scrollbox_container_card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .intro, .drop { display: none; }
}
