/* ==========================================================================
   1. Base Styles & Variables
   ========================================================================== */
:root {
  --primary-color: #333;
  --accent-color: #c5a059;
  --bg-gradient-top: #a6c1ee;
  --bg-gradient-bottom: #fdfbf7;
  --font-serif: "Noto Serif JP", serif;
}

body {
  position: relative;
  margin: 0;
  padding: 0;
  background-color: #fdfbf7;
  color: var(--primary-color);
  font-family: var(--font-serif);
  line-height: 1.8;
  line-break: strict;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
  pointer-events: none;
  -webkit-user-drag: none;
  user-drag: none;
}

.illustration__grid img,
.modal__image-container img {
  cursor: zoom-in;
  pointer-events: auto;
}

figure {
  margin: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}


/* ==========================================================================
   2. Opening Animation
   ========================================================================== */
#opening-animation {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  transition: opacity 0.5s ease-out;
  overflow: hidden;
}

#opening-animation.hidden {
  opacity: 0;
  pointer-events: none;
}

.opening-bg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 120%;
  background: url("img/background.png") no-repeat center top;
  background-size: cover;
  animation: bgTiltDown 3s ease-out forwards;
}

.flying-leaves-layer {
  position: absolute;
  bottom: -100%;
  left: -100%;
  opacity: 0;
  width: 150%;
  max-width: none;
  height: auto;
  animation: windBlowUp 2.5s ease-in-out 0.2s forwards;
}

#main-content {
  opacity: 0;
  transition: opacity 1s ease-in;
}

#main-content.visible {
  opacity: 1;
}

@keyframes bgTiltDown {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-16.6%);
  }
}

@keyframes windBlowUp {
  0% {
    transform: translate(0, 0) rotate(-20deg) scale(0.8);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  100% {
    transform: translate(150vw, -150vh) rotate(30deg) scale(1.2);
    opacity: 0;
  }
}


/* ==========================================================================
   3. Background Effects
   ========================================================================== */
.background-lights {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: multiply;
}

.light {
  position: absolute;
  opacity: 0;
  border-radius: 50%;
  filter: blur(80px);
  animation:
    fadeInLight 3s ease-out forwards,
    floatLight 10s ease-in-out infinite alternate;
}

.light-purple {
  top: -10%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(230, 230, 250, 0.6) 0%, transparent 70%);
  animation-duration: 3s, 18s;
}

.light-pink {
  bottom: -5%;
  left: -5%;
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, rgba(255, 209, 220, 0.6) 0%, transparent 70%);
  animation-duration: 4s, 15s;
  animation-delay: 0.5s, 0s;
}

.light-teal {
  top: 20%;
  left: -10%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(173, 230, 216, 0.5) 0%, transparent 70%);
  animation-duration: 5s, 20s;
  animation-delay: 1s, 0s;
}

.particle {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.particle span {
  position: absolute;
  bottom: -10px;
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffd70099;
  box-shadow: 0 0 10px #ffd700cc;
  animation: floatUp 15s linear infinite;
}

.cursor-effect {
  position: fixed;
  z-index: 9999;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffd700;
  box-shadow:
    0 0 6px #ffd700,
    0 0 10px #ffffff;
  animation: fadeOutFall 1s ease-out forwards;
  pointer-events: none;
}

@keyframes fadeInLight {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatLight {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  100% {
    transform: translate(20px, 40px) rotate(5deg);
  }
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }

  20% {
    opacity: 0.8;
  }

  80% {
    opacity: 0.8;
  }

  100% {
    opacity: 0;
    transform: translateY(-100vh) rotate(360deg);
  }
}

@keyframes fadeOutFall {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0);
  }
}


/* ==========================================================================
   4. Hero Section (Base & PC Layout)
   ========================================================================== */
.hero {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh;
  min-height: 600px;
  background: url("img/background.png") no-repeat center center;
  background-size: cover;
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 1000px;
  height: 100%;
  text-align: center;
}

/* Sparkles */
.hero__sparkles {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__sparkles i {
  position: absolute;
  opacity: 0;
  border-radius: 50%;
  background: white;
  box-shadow:
    0 0 10px #fff,
    0 0 20px #ffd700;
  animation: sparkleFloat 5s ease-in-out infinite;
}

.hero__sparkles i:nth-child(1) {
  top: 20%;
  left: 20%;
  width: 3px;
  height: 3px;
  animation-delay: 0s;
}

.hero__sparkles i:nth-child(2) {
  top: 30%;
  right: 25%;
  width: 5px;
  height: 5px;
  animation-delay: 1.5s;
}

.hero__sparkles i:nth-child(3) {
  top: 60%;
  left: 15%;
  width: 4px;
  height: 4px;
  animation-delay: 2.5s;
}

.hero__sparkles i:nth-child(4) {
  top: 15%;
  right: 10%;
  width: 6px;
  height: 6px;
  animation-delay: 0.5s;
}

.hero__sparkles i:nth-child(5) {
  top: 50%;
  left: 50%;
  width: 2px;
  height: 2px;
  animation-delay: 3s;
}

/* PC Title Layout */
.hero__title {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 90%;
  max-width: 1400px;
  height: 60vh;
  max-height: 650px;
  transform: translateX(-50%);
  pointer-events: none;
}

/* Logos & Credits */
.hero__logos-pc {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  height: 100%;
}

/* SP Logos */
.hero__logo-sp {
  display: none;
}

.hero__credits-sp {
  display: none;
}

.logo-left {
  width: auto;
  height: 100%;
  object-fit: contain;
}

.logo-right-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}

.logo-right {
  width: auto;
  height: 85%;
  object-fit: contain;
}

.hero__credits-svg {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-top: -50px;
  padding-right: 10px;
}

.hero__credits-svg img {
  width: 26px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.8));
}

/* Character */
.hero__character {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero__character img {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 28%, black 88%, transparent 100%);
}

/* Info */
.hero__info {
  position: absolute;
  bottom: 5%;
  z-index: 20;
  width: 100%;
  text-align: center;
}

.hero__date {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 0;
  padding: 25px 60px;
  border-radius: 0;
  background-color: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  color: var(--primary-color);
  line-height: 1;
  letter-spacing: 0.05em;
  cursor: default;

  /* 枠のサイズ変数を定義（Storyより小さく調整） */
  --corner-size: 60px;
  --border-size: 60px;
}

.hero__date::before {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;

  background:
    url("img/decoration/frame-01.svg") top left / var(--corner-size) var(--corner-size) no-repeat,
    url("img/decoration/frame-03.svg") top right / var(--corner-size) var(--corner-size) no-repeat,
    url("img/decoration/frame-09.svg") bottom right / var(--corner-size) var(--corner-size) no-repeat,
    url("img/decoration/frame-07.svg") bottom left / var(--corner-size) var(--corner-size) no-repeat,
    url("img/decoration/frame-02.svg") top center / calc(100% - var(--corner-size) * 2 + 1px) var(--border-size) no-repeat,
    url("img/decoration/frame-08.svg") bottom center / calc(100% - var(--corner-size) * 2 + 1px) var(--border-size) no-repeat,
    url("img/decoration/frame-04.svg") left center / var(--border-size) calc(100% - var(--corner-size) * 2 + 1px) no-repeat,
    url("img/decoration/frame-06.svg") right center / var(--border-size) calc(100% - var(--corner-size) * 2 + 1px) no-repeat;
  filter: invert(72%) sepia(33%) saturate(765%) hue-rotate(356deg) brightness(91%) contrast(86%);
  content: "";
  pointer-events: none;
}

.hero__date .label {
  position: relative;
  z-index: 2;
  margin-right: 5px;
  color: #d1568e;
  font-size: 1.1rem;
  font-weight: 700;
}

.hero__date .date-text {
  position: relative;
  z-index: 2;
  font-family: "Times New Roman", var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  text-shadow: none;
}


/* ==========================================================================
   5. Hero Animations (Safe Trigger)
   ========================================================================== */

/* 1. 初期状態は「定義なし」かつ「透明」 */
[class*="anim-"] {
  opacity: 0;
}

/* 2. クラスがついた時だけアニメーション定義を読み込む */
body.start-hero-anim [class*="anim-"] {
  animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
  animation-fill-mode: forwards;
}

/* アニメーション定義の適用（クラスがついた時だけ発動） */
body.start-hero-anim .anim-divine-rise {
  animation-name: divineRise;
  animation-duration: 2s;
  animation-delay: 0.2s;
}

body.start-hero-anim .anim-holy-fade {
  animation-name: holyFade;
  animation-duration: 1.5s;
  animation-delay: 0.5s;
}

body.start-hero-anim .anim-royal-reveal {
  animation-name: royalReveal;
  animation-duration: 1.8s;
  animation-delay: 0.8s;
}

body.start-hero-anim .anim-fade-in-up-delayed {
  animation-name: fadeInUpSimple;
  animation-duration: 1s;
  animation-delay: 1.2s;
}

body.start-hero-anim .anim-fade-in-up-delayed-more {
  animation-name: fadeInUpSimple;
  animation-duration: 1s;
  animation-delay: 1.6s;
}

/* Keyframes */
@keyframes sparkleFloat {
  0% {
    opacity: 0;
    transform: scale(0) translateY(0);
  }

  50% {
    opacity: 1;
    transform: scale(1) translateY(-20px);
  }

  100% {
    opacity: 0;
    transform: scale(0) translateY(-40px);
  }
}

@keyframes divineRise {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.98);
    filter: brightness(1.5) blur(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1) blur(0);
  }
}

@keyframes holyFade {
  from {
    opacity: 0;
    transform: translateX(-20px);
    filter: drop-shadow(0 0 50px rgba(255, 255, 255, 1));
  }

  to {
    opacity: 1;
    transform: translateX(0);
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }
}

@keyframes royalReveal {
  0% {
    opacity: 0;
    transform: scale(1.15) translateY(10px);
    filter: drop-shadow(0 0 30px rgba(218, 165, 32, 0.8));
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
  }
}

@keyframes fadeInUpSimple {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shine {
  0% {
    left: -100%;
  }

  15% {
    left: 200%;
  }

  100% {
    left: 200%;
  }
}

@keyframes borderGlow {

  0%,
  100% {
    box-shadow:
      0 10px 25px rgba(106, 90, 205, 0.4),
      inset 0 1px 1px rgba(255, 255, 255, 0.4);
  }

  50% {
    box-shadow:
      0 10px 35px rgba(255, 215, 0, 0.6),
      inset 0 0 10px rgba(255, 215, 0, 0.4);
  }
}


/* ==========================================================================
   6. Content Sections
   ========================================================================== */
.main-content {
  position: relative;
  z-index: 1;
  padding-bottom: 0;
}

/* section */
.section {
  position: relative;
  z-index: 1;
  padding: 56px 0;
  text-align: center;
}

.section__title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 32px 0;
  background: linear-gradient(to bottom, #b07bb3, #1d2088);
  background-clip: text;
  color: transparent;
  font-family: "Times New Roman", serif;
  font-size: 3rem;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.decorative-line {
  display: inline-block;
  width: 100%;
  height: 40px;
  background-color: transparent;
  background-image: url("img/decoration/decoration-01.svg");
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

.section__title .decorative-line:last-child {
  transform: scaleX(-1);
}

/* Story */
.story__box {
  position: relative;
  z-index: 0;
  margin: 0;
  padding: calc(var(--corner-size) - 40px);
  border: none;
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: none;
  --corner-size: 100px;
  --border-size: 100px;
}

.story__box::before {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background:
    url("img/decoration/frame-01.svg") top left / var(--corner-size) var(--corner-size) no-repeat,
    url("img/decoration/frame-03.svg") top right / var(--corner-size) var(--corner-size) no-repeat,
    url("img/decoration/frame-09.svg") bottom right / var(--corner-size) var(--corner-size) no-repeat,
    url("img/decoration/frame-07.svg") bottom left / var(--corner-size) var(--corner-size) no-repeat,
    url("img/decoration/frame-02.svg") top center / calc(100% - var(--corner-size) * 2 + 1px) var(--border-size) no-repeat,
    url("img/decoration/frame-08.svg") bottom center / calc(100% - var(--corner-size) * 2 + 1px) var(--border-size) no-repeat,
    url("img/decoration/frame-04.svg") left center / var(--border-size) calc(100% - var(--corner-size) * 2 + 1px) no-repeat,
    url("img/decoration/frame-06.svg") right center / var(--border-size) calc(100% - var(--corner-size) * 2 + 1px) no-repeat;
  filter: invert(72%) sepia(33%) saturate(765%) hue-rotate(356deg) brightness(91%) contrast(86%);
  content: "";
  pointer-events: none;
}

.story__content {
  position: relative;
  z-index: 2;
}

.story__content p {
  margin-bottom: 1.5em;
  font-size: 0.95rem;
  text-align: left;
}

/* Character */
.character__main {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  min-height: 350px;
  margin-bottom: 20px;
  padding: 40px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  text-align: left;
}

.character__img {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  width: 250px;
  height: 250px;
  margin: 0;
}

.character__img img {
  width: 100%;
  height: 100%;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

.character__info {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  height: 230px;
  overflow-y: auto;
}

.character__name {
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--accent-color);
  color: #333;
  font-size: 1.8rem;
  line-height: 1.2;
}

.character__desc {
  font-size: 1rem;
}

.character__gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 48px;
  width: 100%;
  max-width: 700px;
  margin: 40px auto;
}

.char-thumb-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 10px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.char-thumb-wrap img {
  display: block;
  opacity: 0.7;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.char-thumb-wrap::after {
  position: absolute;
  top: -8px;
  right: -8px;
  bottom: -8px;
  left: -8px;
  z-index: 2;
  background-image: url("img/decoration/decoration-02.svg");
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  content: "";
  pointer-events: none;
}

.char-thumb-wrap:hover {
  z-index: 5;
  transform: scale(1.1);
}

.char-thumb-wrap:hover img {
  opacity: 1;
}

.char-thumb-wrap.active {
  z-index: 5;
  transform: scale(1.15);
}

.char-thumb-wrap.active img {
  opacity: 1;
}

/* Illustration */
.illustration__grid {
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr 1fr;
  max-width: 900px;
  margin: 0 auto;
}

.ill-item {
  position: relative;
  border: 4px solid #fff;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
}

.ill-item::after {
  position: absolute;
  top: 5px;
  right: 5px;
  bottom: 5px;
  left: 5px;
  z-index: 2;
  opacity: 0.5;
  border: 1px solid var(--accent-color);
  content: "";
  pointer-events: none;
}

.ill-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  cursor: zoom-in;
}

.ill-item:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px);
}

.ill-item:hover img {
  transform: scale(1.05);
}

.landscape {
  grid-column: 1 / span 2;
}

/* Books */
.books {
  position: relative;
  border-top: 1px solid rgba(197, 160, 89, 0.3);
  border-bottom: 1px solid rgba(197, 160, 89, 0.3);
  background-color: #fff;
  background-image: repeating-linear-gradient(45deg,
      rgba(197, 160, 89, 0.15) 0px,
      rgba(197, 160, 89, 0.15) 1px,
      transparent 1px,
      transparent 40px);
}

.book__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 50px;
  padding: 24px 56px;
  padding-right: 60px;
  border: 1px solid #eee;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  color: inherit;
  text-align: left;
  text-decoration: none;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  overflow: hidden;
}

.book__item:hover {
  border-color: var(--accent-color);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.book__item::before {
  position: absolute;
  top: 15px;
  right: 60px;
  bottom: 15px;
  width: 1px;
  border-right: 1px dashed #ccc;
  content: "";
  transition: border-color 0.3s ease;
}

.book__item:hover::before {
  border-right-color: var(--accent-color);
}

.book__item::after {
  position: absolute;
  top: 50%;
  right: 25px;
  color: #ccc;
  font-family: serif;
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1;
  content: "›";
  transform: translateY(-50%);
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

.book__item:hover::after {
  color: var(--accent-color);
  transform: translateY(-50%) translateX(5px);
}

.book__cover {
  flex-shrink: 0;
  width: 140px;
  transition: transform 0.3s ease;
  margin: 0;
}

.book__cover img {
  width: 100%;
  height: auto;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
  display: block;
}

.book__item:hover .book__cover {
  transform: scale(1.02);
}

.book__title {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: border-color 0.3s ease;
}

.book__item:hover .book__title {
  border-bottom-color: var(--accent-color);
}

.book__note {
  display: block;
  margin-top: 8px;
  color: #888;
  font-size: 0.65rem;
  line-height: 1.3;
  text-align: center;
}

.book__meta {
  margin-top: 15px;
  color: #666;
  font-size: 0.9rem;
}

.book__date {
  background: linear-gradient(to top, #ffe4e1 40%, transparent 40%);
  font-size: 1rem;
}

.book__tap-hint {
  display: none;
}

.pub-cerise-novels {
  color: #f5a5ac;
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.pub-kadokawa {
  color: #050268;
  font-size: 1rem;
  font-weight: 700;
}

.pub-overlap {
  color: #facf00;
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

/* --- Books heading --- */
.ribbon {
  --s: 2.8em;
  --d: .6em;
  --c: .6em;

  font-family: var(--font-serif);
  font-weight: 700;
  color: #fff;

  /* フォントサイズを基準に全体サイズが決まります */
  font-size: 1.5rem;
  line-height: 1.6;

  /* 余白計算 */
  padding: 0 calc(var(--s) + .5em) var(--d);

  /* 背景と影の描画 (conic-gradient) */
  background:
    /* レイヤー1: 左側の折り返し影 (conic-gradient) */
    conic-gradient(at left var(--s) bottom var(--d),
      #0000 25%, #0008 0 37.5%, #0004 0) 0 /50% 100% no-repeat,
    /* レイヤー2: 右側の折り返し影 (conic-gradient) */
    conic-gradient(at right var(--s) bottom var(--d),
      #0004 62.5%, #0008 0 75%, #0000 0) 100%/50% 100% no-repeat,
    /* レイヤー3: メインの背景グラデーション (ここを追加) */
    linear-gradient(135deg, #c5a059 0%, #daa520 100%);

  /* 形の切り抜き (polygon) */
  clip-path: polygon(0 var(--d), var(--s) var(--d), var(--s) 0,
      calc(100% - var(--s)) 0, calc(100% - var(--s)) var(--d),
      100% var(--d), calc(100% - var(--c)) calc(50% + var(--d)/2),
      100% 100%, calc(100% - var(--s) - var(--d)) 100%,
      calc(100% - var(--s) - var(--d)) calc(100% - var(--d)),
      calc(var(--s) + var(--d)) calc(100% - var(--d)),
      calc(var(--s) + var(--d)) 100%,
      0 100%, var(--c) calc(50% + var(--d)/2));

  /* レイアウト調整 */
  width: fit-content;
  margin: 0 auto 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  z-index: 1;
  position: relative;
}

/* --- 中身のテキスト調整 --- */
.news-text {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  padding: 1rem;
}

/* 装飾記号 (✦) */
.news-deco-left,
.news-deco-right {
  font-size: 1em;
  opacity: 0.9;
  color: #fff;
  animation: floatDeco 3s ease-in-out infinite;
}

.news-deco-right {
  animation-delay: 1.5s;
}

/* --- Animations --- */
@keyframes floatDeco {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.3) rotate(20deg);
    opacity: 1;
  }
}

/* Buttons */
.section-cta {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 32px 0;
  text-align: center;
}

.btn {
  display: inline-block;
  width: 280px;
  padding: 15px 0;
  border: none;
  border-radius: 50px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
}

.btn-sample {
  border: 2px solid #d1568e;
  background: #fff;
  color: #d1568e;
}

.btn-sample:hover {
  background: #d1568e;
  color: #fff;
}

.btn-purchase {
  background: linear-gradient(135deg, #c5a059 0%, #daa520 100%);
  box-shadow: 0 4px 10px rgba(197, 160, 89, 0.3);
  color: #fff;
}

.btn-purchase:hover {
  opacity: 0.9;
}

/* Utilities */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.text-emphasis {
  display: inline;
  margin: 0;
  padding: 0 2px;
  border-radius: 2px;
  background: linear-gradient(to top, #ffe4e1 40%, transparent 40%);
  color: #d1568e;
  font-weight: 700;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.sp-only {
  display: none;
}

/* ==========================================================================
   7. Modals & EPUB
   ========================================================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.modal.active {
  display: flex;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
}

.modal__container {
  position: relative;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  width: 95%;
  max-width: 1400px;
  height: 90vh;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal__close {
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 50;
  border: none;
  background: none;
  color: #333;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal__content {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  padding: 0;
  background: #fff;
}

.epub-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.epub-wrapper {
  position: relative;
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  width: 100%;
  overflow: hidden;
}

#viewer {
  width: calc(100% - 140px);
  max-width: 800px;
  height: 100%;
  margin: 0 auto;
  background-color: #fff;
}

.arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.arrow-btn img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.arrow-left {
  left: 20px;
}

.arrow-left img {
  transform: scaleX(-1);
}

.arrow-right {
  right: 20px;
}

.arrow-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.loading-msg {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #999;
  transform: translate(-50%, -50%);
}

.modal__image-container {
  position: relative;
  z-index: 10002;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.modal__image-container img {
  max-width: 90vw;
  max-height: 90vh;
  border: 4px solid #fff;
  object-fit: contain;
  pointer-events: auto;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 50px 0;
  border-top: 1px solid #eee;
  background: none;
  text-align: center;
}

.footer__logo a {
  display: inline-block;
  transition: opacity 0.3s ease;
}

.footer__logo a:hover {
  opacity: 0.7;
}

.footer__logo img {
  width: 120px;
  margin-bottom: 20px;
  border: none;
}

.copyright {
  color: #999;
  font-size: 0.8rem;
}


/* ==========================================================================
   8. Responsive Design (Mobile) - Layout Fix (Final)
   ========================================================================== */
@media (max-width: 768px) {

  /* --- Hero Layout Adjustment --- */
  .hero {
    height: 80vh;
  }

  .hero__content {
    position: relative;
    width: 100%;
    height: 100%;
  }

  .hero__title {
    position: absolute;
    top: 8%;
    left: 5%;
    z-index: 10;
    display: block;
    width: auto;
    height: 68vh;
    padding: 0;
    transform: none;
  }

  .hero__logos-pc {
    display: none;
  }

  .hero__logo-sp {
    display: block;
    width: auto;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.6));
    object-fit: contain;
  }

  .hero__character {
    position: absolute;
    right: auto;
    bottom: 0;
    left: 50%;
    z-index: 1;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    height: 90%;
    transform: translateX(-50%);
  }

  .hero__character img {
    width: auto;
    max-height: 100%;
    object-position: bottom center;
  }

  .hero__info {
    position: absolute;
    bottom: 5%;
    z-index: 20;
    width: 100%;
    text-align: center;
  }

  .hero__date {
    display: inline-flex;
    gap: 5px;
    width: auto;
    padding: 12px 30px;
    border: 3px solid #fff;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
  }

  .hero__date::before {
    position: absolute;
    top: 4px;
    right: 4px;
    bottom: 4px;
    left: 4px;
    z-index: 1;
    opacity: 0.6;
    width: auto;
    height: auto;
    border: 1px solid var(--accent-color);
    background: none;
    filter: none;
    content: "";
  }

  .hero__date .label {
    font-size: 0.9rem;
  }

  .hero__date .date-text {
    font-size: 1.4rem;
  }

  .hero__credits-sp {
    position: absolute;
    right: 8%;
    bottom: 90px;
    z-index: 15;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
  }

  .hero__credits-sp img {
    width: 20px;
    height: auto;
    filter: drop-shadow(0 1px 3px rgba(255, 255, 255, 0.9));
  }

  /* --- section --- */
  .section {
    padding: 40px 0;
  }

  .section__title {
    margin: 24px 0;
    font-size: 2.2rem;
  }

  .story__box {
    padding: 48px;
    --corner-size: 100px;
    --border-size: 100px;
  }

  /* Character Switcher */
  .character .container {
    display: flex;
    flex-direction: column;
    padding: 0 15px;
  }

  .character .section__title {
    order: 1;
    margin-bottom: 20px;
  }

  .character__gallery {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 4px;
    order: 2;
    width: 100%;
    margin: 0 0 20px 0;
    padding: 0;
    overflow: visible;
  }

  .char-thumb-wrap {
    flex: 1;
    box-sizing: border-box;
    width: auto;
    height: 100px;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: flex-grow 0.3s ease;
  }

  .char-thumb-wrap::after {
    display: none;
  }

  .char-thumb-wrap img {
    opacity: 0.6;
    border-radius: 4px;
    object-fit: cover;
    object-position: center center;
  }

  .char-thumb-wrap:hover {
    transform: none;
  }

  .char-thumb-wrap.active {
    z-index: 2;
    opacity: 1;
    flex: 1.2;
    border-color: var(--accent-color);
    transform: none;
  }

  .char-thumb-wrap.active img {
    opacity: 1;
  }

  .character__main {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    order: 3;
    margin: 0;
    padding: 20px;
    text-align: left;
  }

  .character__img {
    width: 140px;
    height: 140px;
    margin: 0;
  }

  .character__name {
    margin-bottom: 10px;
    font-size: 1.5rem;
  }

  .character .section-cta {
    order: 4;
    width: 100%;
  }

  /* Illustration */
  .illustration__grid {
    gap: 20px;
    grid-template-columns: 1fr;
  }

  .ill-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: none;
  }

  .ill-item:hover img {
    transform: none;
  }

  .ill-item:last-child {
    order: -1;
  }

  .landscape {
    grid-column: auto;
  }

  /* Books */
  .book__item {
    position: relative;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 30px 20px 70px;
    text-align: center;
  }

  .book__item::before {
    top: auto;
    right: 5%;
    bottom: 60px;
    left: 5%;
    width: 90%;
    height: 1px;
    border-top: 1px dashed #ccc;
    border-right: none;
    content: "";
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .book__item:hover::before {
    border-top-color: var(--accent-color);
  }

  .book__item::after {
    top: auto;
    right: 20px;
    bottom: 30px;
    left: auto;
    display: inline-block;
    width: auto;
    height: auto;
    padding: 6px 20px;
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    background-color: var(--bg-color);
    color: var(--accent-color);
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 700;
    content: "View more ›";
    transform: translateY(50%);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .book__item:hover::after {
    padding: 8px 24px;
    background-color: var(--accent-color);
    color: #fff;
    transform: translateY(50%) translateX(0%);
  }

  .book__tap-hint {
    display: none;
  }

  .book__meta {
    font-size: 0.75rem;
  }

  .book__date {
    font-size: 0.8rem;
  }

  .pub-cerise-novels,
  .pub-kadokawa,
  .pub-overlap {
    font-size: 0.8rem;
  }

  /* Books heading */
  .books .section__title {
    display: none;
  }

  .ribbon {
    font-size: 0.95rem;
    --s: 2.9em;
    --c: 0.9em;
    margin-top: 24px;
    margin-bottom: 56px;
    width: 95%;
    box-sizing: border-box;
    justify-content: space-evenly;
    line-height: 1.5;
  }

  .news-text {
    padding: 0.8rem;
  }

  /* Viewer Mobile */
  .modal__container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 92dvh;
    margin: auto;
    border-radius: 8px;
    overflow: hidden;
  }

  .modal__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
  }

  .modal__close {
    position: relative;
    z-index: 300;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
    width: 100%;
    height: 50px;
    padding-right: 15px;
    background-color: transparent;
    font-size: 2rem;
  }

  .epub-wrapper {
    position: relative;
    flex: 1;
    box-sizing: border-box;
    width: 100%;
    padding-bottom: 20px;
  }

  #viewer {
    width: calc(100% - 100px);
    max-width: 100%;
    height: 100%;
  }

  .arrow-btn {
    width: 44px;
    height: 44px;
  }

  .arrow-left {
    left: 5px;
  }

  .arrow-right {
    right: 5px;
  }

  /* Buttons */
  .btn {
    font-size: 1rem;
  }

  /* Utilities */
  .sp-only {
    display: inline;
  }
}