/* 提供素材の配置・衣装切り替え / 制作：みろん
 * 立ち絵は体の中心と拡大率を共通化。左右の尻尾も含めて表示する。
 */
.hero-visual { height: 630px; padding-bottom: 52px; }
.hero-visual .hero-signature { position: absolute; width: 125px; height: auto; right: 0; bottom: 0; opacity: .9; transform: rotate(-7deg); z-index: 3; }
.hero-art {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 32px #0006);
}
.hero-visual .sonar { opacity: .4; }
.hero-visual .visual-tag { bottom: 0; font-size: 8px; }

/* 立ち絵側を広く取り、文章は読みやすい幅に保つ。 */
.profile-grid { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); }
.character-viewer { min-width: 0; }
.portrait-stage {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 916 / 963;
  background: radial-gradient(ellipse at 50% 40%, #30383b66, transparent 70%);
}
.portrait-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.portrait-stage .frame-corner { display: none; }
.portrait-controls { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.portrait-controls button {
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 10px Arial, sans-serif;
  letter-spacing: .12em;
  cursor: pointer;
}
.portrait-controls button[aria-pressed="true"] { border-color: var(--yellow); color: #15191b; background: var(--yellow); }

/* 縦構図を切らずに見せ、準備中の案内は小さくまとめる。 */
.visual-previews { display: block; margin-top: 88px; }
.visual-previews .keyvisual-preview {
  display: block;
  padding-block: 40px;
}
.visual-caption { width: 100%; max-width: 760px; margin: 0 auto 28px; }
.visual-caption h3 { font-size: 20px; margin-top: 14px; }
.visual-caption p { color: var(--muted); font-size: 11px; margin: 22px 0 0; }
.artwork-open { display: block; width: 100%; max-width: 390px; margin-inline: auto; padding: 0; border: 1px solid var(--line); background: #11141a; color: var(--text); cursor: pointer; text-align: left; }
.artwork-open > img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: contain; }
.artwork-open > span { display: flex; justify-content: space-between; padding: 16px 18px; font: 9px Arial, sans-serif; letter-spacing: .13em; }
.artwork-open:hover > span { color: var(--yellow); }
.keyvisual-work { width: 100%; max-width: 390px; margin-inline: auto; }
.keyvisual-work .artwork-open { max-width: none; }
.artwork-open > .artwork-stack { display: block; position: relative; padding: 0; aspect-ratio: 2 / 3; overflow: hidden; background: #11141a; }
.artwork-stack > .artwork-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .55s ease; }
.artwork-stack > .artwork-layer.is-current { opacity: 1; }
.artwork-open[aria-disabled="true"] { cursor: progress; }
.artwork-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; }
.artwork-progress > span { height: 2px; background: #ffffff24; transition: background .3s; }
.artwork-progress > .is-done { background: var(--yellow); }
.artwork-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 48px; }
.artwork-actions > p { font-size: 10px; color: var(--muted); margin: 10px 0; }
.artwork-reset { padding: 10px 0; min-height: 44px; border: 0; background: transparent; color: var(--yellow); font-size: 10px; cursor: pointer; }
.artwork-reset[hidden] { display: none; }
.artwork-fallback { font-size: 12px; }
.visual-previews .design-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 25px 0 0; }
.design-preview h3 { margin: 0; }
.design-soon { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.design-soon p { color: var(--muted); font-size: 11px; margin: 0; }
.stream-intro img { width: 120px; height: 135px; object-fit: contain; margin: 0 16px; }
.contact-heading { padding: 0; }

/* SDは案内の役割に合わせて配置。文章や操作領域とは重ねない。 */
.movie-placeholder { padding: 32px 24px; min-height: 420px; }
.movie-placeholder > .movie-sd { position: relative; width: auto; height: 150px; object-fit: contain; margin-bottom: 18px; }
.has-mascot { display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.has-mascot .heading-copy { min-width: 0; }
.links-mascot { width: 170px; height: 175px; flex: 0 0 auto; object-fit: contain; }
.footer .back-top { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.back-top-mascot { position: relative; display: block; width: 108px; height: 140px; }
.footer .back-top-mascot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .2s, transform .2s; }
.mascot-cheer { opacity: 0; }
.back-top:hover .mascot-normal, .back-top:focus-visible .mascot-normal { opacity: 0; }
.back-top:hover .mascot-cheer, .back-top:focus-visible .mascot-cheer { opacity: 1; transform: translateY(-4px); }

/* 各SDをゆっくり浮遊。表情切替は内側の画像、浮遊は外側で分離する。 */
.stream-intro > img,
.movie-placeholder > .movie-sd,
.links-mascot,
.back-top-mascot {
  animation: sd-float 7s ease-in-out infinite;
  transform-origin: 50% 55%;
}
.stream-intro > img { animation-duration: 6.8s; animation-delay: -1.8s; }
.movie-placeholder > .movie-sd { animation-duration: 8s; animation-delay: -4s; }
.links-mascot { animation-duration: 7.4s; animation-delay: -2.6s; }
.back-top-mascot { animation-duration: 6.4s; animation-delay: -3.2s; }
@keyframes sd-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-.7deg); }
  50% { transform: translate3d(0, -12px, 0) rotate(.7deg); }
}
@media (prefers-reduced-motion: reduce) {
  .stream-intro > img,
  .movie-placeholder > .movie-sd,
  .links-mascot,
  .back-top-mascot { animation: none; transform: none; }
}

.artwork-dialog { max-width: min(94vw, 820px); max-height: 94svh; padding: 52px 12px 12px; border: 1px solid var(--line); background: #111416; color: var(--text); overscroll-behavior: contain; }
.artwork-dialog::backdrop { background: #05090de8; }
.artwork-dialog > img { width: auto; height: auto; max-height: calc(90svh - 64px); margin: auto; object-fit: contain; }
.artwork-close { position: absolute; top: 7px; right: 12px; min-height: 40px; border: 0; background: transparent; color: var(--text); font: 11px Arial, sans-serif; letter-spacing: .1em; cursor: pointer; }
.artwork-close span { font-size: 24px; vertical-align: middle; margin-left: 12px; }
html.artwork-opened { overflow: hidden; }
@media (max-width: 900px) {
  .hero-visual { height: 550px; }
  .profile-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .character-viewer { width: 100%; max-width: 580px; margin-inline: auto; }
  .profile-copy { max-width: 620px; margin-inline: auto; width: 100%; }
}
@media (max-width: 700px) {
  .hero-visual { width: 100%; height: clamp(450px, 140vw, 600px); margin: 24px 0 0; padding-bottom: 48px; }
  .hero-visual .hero-signature { width: 100px; right: 4px; bottom: 0; }
  .hero-art { width: 100%; height: 100%; }
  .portrait-controls { margin-top: 20px; }
  .visual-previews { margin-top: 56px; }
  .visual-previews .keyvisual-preview { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 28px; }
  .visual-caption p { margin-top: 10px; }
  .artwork-open { max-width: 340px; }
  .keyvisual-work { max-width: 340px; }
  .visual-caption h3 { font-size: 17px; }
  .visual-previews .design-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 24px; }
  .design-preview .eyebrow { grid-column: 1 / -1; }
  .design-soon { margin-left: 0; justify-self: end; }
  .design-soon p { display: none; }
  .stream-intro img { width: 90px; height: 105px; margin: 0; }
  .movie-placeholder { aspect-ratio: auto; min-height: 360px; padding: 26px 16px; }
  .movie-placeholder > .movie-sd { height: 120px; margin-bottom: 14px; }
  .has-mascot { gap: 16px; }
  .links-mascot { width: 96px; height: 115px; }
  .footer .back-top { flex-basis: auto; margin-left: auto; }
  .back-top-mascot { width: 88px; height: 118px; }
}
