/* v560 HOME HERO
   Transparent trimmed heroine artwork, face-safe across breakpoints, and tighter fit without visible white matte gaps. */

#homeView .home-first-view {
  background: transparent;
}

#homeView .hero-stage {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
}

#homeView .hero-main-layer {
  position: absolute;
  inset: 0;
}

#homeView .hero-main-visual {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

#homeView .hero-main-visual > img {
  position: absolute;
  left: 50%;
  bottom: -8px;
  display: block;
  width: auto;
  height: calc(100% + 14px);
  max-width: none;
  max-height: none;
  transform: translateX(-50%);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

#homeView .hero-main-speech {
  position: absolute;
  z-index: 7;
  left: 4%;
  top: 28%;
  max-width: min(250px, 28vw);
  padding: 9px 13px;
  border: 2px solid #88bde9;
  border-radius: 9px;
  color: #526cae;
  background: rgba(255,255,255,.96);
  box-shadow: 3px 3px 0 rgba(128,164,219,.22), inset 0 0 0 1px rgba(225,240,255,.96);
  font-family: "DotGothic16", "MS Gothic", monospace;
  font-size: clamp(10px, 1.05vw, 13px);
  line-height: 1.65;
  letter-spacing: .03em;
  text-align: center;
  white-space: pre-line;
  pointer-events: none;
}

#homeView .hero-main-speech::after {
  content: "";
  position: absolute;
  right: 18%;
  bottom: -8px;
  width: 13px;
  height: 13px;
  border-right: 2px solid #88bde9;
  border-bottom: 2px solid #88bde9;
  background: #fff;
  transform: rotate(45deg);
}

#homeView .hero-main-speech.is-speaking {
  animation: hero-main-speech-pop .28s steps(2,end);
}

@keyframes hero-main-speech-pop {
  from { transform: translateY(2px) scale(.96); opacity: .45; }
  to   { transform: none; opacity: 1; }
}

#homeView .image-game-menu {
  position: absolute;
  z-index: 12;
  left: 67%;
  bottom: 8%;
  width: min(38%, 470px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  transform: translateX(-50%);
}

#homeView .image-game-menu-button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform-origin: center;
  transition: transform 70ms steps(2,end), filter 70ms linear, opacity 70ms linear;
  text-decoration: none;
}

#homeView .image-game-menu-button img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

#homeView .image-game-menu-button:focus-visible {
  outline: 2px dashed #8c7de0;
  outline-offset: -4px;
}

#homeView .image-game-menu-button:active,
#homeView .image-game-menu-button.is-pressed {
  transform: translateY(4px) scale(.965);
  filter: brightness(.86) saturate(.92);
  opacity: .92;
}

#homeView .image-game-menu-button--continue,
#homeView .image-game-menu-button--special {
  margin-top: -2px;
}

@media (min-width: 761px) and (max-width: 1120px) {
  #homeView .hero-main-visual > img {
    height: calc(100% + 10px);
  }
  #homeView .hero-main-speech {
    left: 3.5%;
    top: 27%;
    max-width: min(220px, 27vw);
  }
  #homeView .image-game-menu {
    left: 68%;
    bottom: 7%;
    width: min(41%, 420px);
  }
}

@media (max-width: 760px) {
  #homeView .hero-main-visual > img {
    height: calc(100% + 26px);
    bottom: -14px;
    left: 49%;
  }

  #homeView .hero-main-speech {
    left: 4%;
    top: 31%;
    max-width: min(190px, 45vw);
    padding: 7px 10px;
    font-size: 10px;
    line-height: 1.55;
  }

  #homeView .image-game-menu {
    left: 51%;
    bottom: 6%;
    width: min(72%, 410px);
  }
}

@media (max-width: 420px) {
  #homeView .hero-main-visual > img {
    height: calc(100% + 34px);
    bottom: -18px;
    left: 48.6%;
  }

  #homeView .hero-main-speech {
    top: 30%;
    max-width: 43vw;
    padding: 6px 8px;
    font-size: 9px;
  }

  #homeView .image-game-menu {
    bottom: 5.2%;
    width: 73%;
  }
}

@media (max-width: 760px) and (max-height: 700px) {
  #homeView .hero-main-visual > img {
    height: calc(100% + 18px);
    bottom: -10px;
  }
  #homeView .hero-main-speech { top: 27%; }
  #homeView .image-game-menu { bottom: 4%; width: 65%; }
}

@media (orientation: landscape) and (max-width: 950px) {
  #homeView .hero-main-visual > img {
    height: calc(100% + 6px);
    bottom: -4px;
  }
  #homeView .hero-main-speech { top: 21%; }
  #homeView .image-game-menu {
    left: 71%;
    bottom: 5%;
    width: min(40%, 320px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #homeView .hero-main-speech.is-speaking { animation: none; }
}

/* v563 canonical mobile header/hero sizing. Old stacked FIX blocks were removed from style.css. */
@media (max-width:760px) {
  #homeView .home-first-view {
    height:100%;
    min-height:0;
    overflow:hidden;
  }
  #homeView .logo-zone {
    position:relative;
    width:100%;
    height:clamp(120px,17dvh,150px);
    min-height:0;
    overflow:visible;
  }
  #homeView .official-logo {
    width:92%;
    height:100%;
    margin:0 auto;
  }
  #homeView .official-logo img {
    object-fit:contain;
    object-position:center top;
  }
  #homeView .mail-notice-button {
    left:7px;
    top:clamp(86px,12dvh,105px);
    width:112px;
    min-height:48px;
  }
  #homeView .mail-window-bar {
    min-height:15px;
    font-size:5.5px;
    line-height:15px;
  }
  #homeView .mail-notice-button strong {
    margin:4px 4px 1px;
    font-size:8.5px;
  }
  #homeView .mail-notice-button small {
    margin-bottom:4px;
    font-size:5px;
  }
}
@media (max-width:420px) {
  #homeView .logo-zone { height:clamp(114px,16.5dvh,138px); }
  #homeView .official-logo { width:94%; }
  #homeView .mail-notice-button {
    top:clamp(80px,11.4dvh,96px);
    width:106px;
    min-height:46px;
  }
}
@media (max-width:760px) and (max-height:700px) {
  #homeView .logo-zone { height:110px; }
  #homeView .mail-notice-button { top:76px; }
}
@media (prefers-reduced-motion: reduce) {
  #homeView .mail-notice-button,
  #homeView .mail-notice-button strong { animation:none!important; }
}
