/* =========================================================
   桃瀬らびぃ — ギャルゲー風サイト
   ピンク × 白。フリル・リボン・ピンクのドット。
   画面はスクロールしない「ゲーム画面」。タイトル画面と会話画面を切り替える。
   ========================================================= */
:root {
  --pink: #ff7aa8;
  --pink-2: #ff9cc0;
  --pink-deep: #ee4c86;
  --crimson: #c8194f;
  --pale: #ffe4ef;
  --paler: #fff3f8;
  --white: #ffffff;
  --text: #6e3a50;
  --text-dim: #a36c84;

  --font-pop: "Mochiy Pop One", "M PLUS Rounded 1c", sans-serif;
  --font-round: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif;
  --font-en: "Fredoka", "M PLUS Rounded 1c", sans-serif;

  /* ピンクのドット */
  /* 主張しすぎないよう、小さく薄めに */
  --dots: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0 12%, transparent 14%) 0 0 / 26px 26px,
          radial-gradient(circle, rgba(255, 255, 255, 0.5) 0 12%, transparent 14%) 13px 13px / 26px 26px;
  --dots-pink: radial-gradient(circle, rgba(255, 122, 168, 0.08) 0 16%, transparent 18%) 0 0 / 18px 18px,
               radial-gradient(circle, rgba(255, 122, 168, 0.08) 0 16%, transparent 18%) 9px 9px / 18px 18px;
  /* レースのふち（半円の連続） */
  --lace: radial-gradient(circle at 50% 0, #fff 0 9px, transparent 9.5px) 0 0 / 22px 12px repeat-x;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: #ffd3e4;
  color: var(--text);
  font-family: var(--font-round);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* =========================================================
   ゲーム画面（ビューポートいっぱい・スクロールなし）
   ========================================================= */
.screen {
  container-type: size;
  position: relative;
  overflow: hidden;
  background:
    var(--dots),
    radial-gradient(ellipse at 70% 30%, #ffeaf2 0%, rgba(255, 234, 242, 0) 60%),
    linear-gradient(160deg, #ffd9e8 0%, #ffc2d9 100%);
}
/* 画面の下のレース */
.screen::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 20px;
  z-index: 1;
  pointer-events: none;
  /* 上のカーテン（.valance）と同じ大きさの波を上下反対に */
  background:
    radial-gradient(circle at 50% 100%, #fff 0 10.4px, var(--pink-2) 11px 12.4px, transparent 13px) 0 calc(100% - 5px) / 25px 14px repeat-x,
    linear-gradient(#fff, #fff) 0 100% / 100% 5px no-repeat;
}
.float-hearts {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ドット柄のハート（参考画像のハート） */
.big-heart {
  position: absolute;
  aspect-ratio: 400 / 360;
  background: url("../img/heart-dots.svg?v=4") center / contain no-repeat;
  filter: drop-shadow(0 8px 0 rgba(238, 76, 134, 0.18));
  pointer-events: none;
}

/* =========================================================
   タイトル画面
   ========================================================= */
.title-screen {
  position: absolute;
  inset: 0;
}
.title-screen .big-heart {
  right: 3cqw;
  top: 6cqh;
  width: min(48cqw, 680px);
  transform: rotate(8deg);
  animation: beat 3.2s ease-in-out infinite;
}
.title-screen .big-heart.small {
  left: 2cqw;
  right: auto;
  top: auto;
  bottom: 6cqh;
  width: min(18cqw, 220px);
  transform: rotate(-14deg);
  opacity: 0.8;
  animation-delay: 0.8s;
}
@keyframes beat {
  0%, 100% { scale: 1; }
  12% { scale: 1.04; }
  24% { scale: 1; }
  36% { scale: 1.03; }
}

.title-chara {
  position: absolute;
  left: max(0px, 6cqw);
  top: 3cqh;
  height: 165cqh;
  width: auto;
  max-width: none;
  filter:
    drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff)
    drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff)
    drop-shadow(0 12px 20px rgba(200, 25, 79, 0.25));
  animation: charaIn 0.9s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes charaIn {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: none; }
}

.title-side {
  position: absolute;
  right: 6cqw;
  top: 50%;
  transform: translateY(-50%);
  width: min(46cqw, 600px);
  text-align: right;
  z-index: 2;
}
.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  animation: logoIn 0.9s 0.2s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes logoIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.logo-jp {
  font-family: var(--font-pop);
  font-weight: 400;
  font-size: clamp(42px, 6.4cqw, 92px);
  line-height: 1.1;
  color: var(--pink);
  -webkit-text-stroke: 0.14em #fff;
  paint-order: stroke fill;
  text-shadow: 0 0.06em 0 var(--pink-deep), 0 0.12em 0.2em rgba(200, 25, 79, 0.25);
  letter-spacing: 0.02em;
}
.logo-en {
  margin-top: 0.15em;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: clamp(18px, 2.2cqw, 30px);
  letter-spacing: 0.08em;
  color: var(--pink-deep);
  -webkit-text-stroke: 0.18em #fff;
  paint-order: stroke fill;
}
.logo-sub {
  margin-top: 0.3em;
  font-family: var(--font-en);
  font-weight: 500;
  font-size: clamp(11px, 1cqw, 14px);
  letter-spacing: 0.12em;
  color: var(--pink-deep);
}

.menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15em;
  margin-top: clamp(18px, 4cqh, 40px);
}
.menu a {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.9em;
  min-width: 15em;
  padding: 0.25em 1em 0.3em;
  border-radius: 999px;
  border: 2px solid transparent;
  font-size: clamp(15px, 1.6cqw, 21px);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  animation: menuIn 0.5s cubic-bezier(.2,.8,.2,1) both;
}
.menu a:nth-child(1) { animation-delay: 0.45s; }
.menu a:nth-child(2) { animation-delay: 0.52s; }
.menu a:nth-child(3) { animation-delay: 0.59s; }
.menu a:nth-child(4) { animation-delay: 0.66s; }
.menu a:nth-child(5) { animation-delay: 0.73s; }
.menu a:nth-child(6) { animation-delay: 0.8s; }
@keyframes menuIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: none; }
}
.menu .jp {
  font-family: var(--font-pop);
  color: #fff;
  -webkit-text-stroke: 0.2em var(--pink);
  paint-order: stroke fill;
  letter-spacing: 0.04em;
}
.menu .en {
  min-width: 6.5em;
  text-align: left;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 0.66em;
  letter-spacing: 0.1em;
  color: var(--pink-deep);
  -webkit-text-stroke: 0.25em #fff;
  paint-order: stroke fill;
}
/* 選択中はリボン風のピンクの帯 */
.menu a:hover,
.menu a:focus-visible {
  outline: none;
  background:
    var(--dots-pink),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 233, 242, 0.95));
  border-color: var(--pink);
  box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(238, 76, 134, 0.25);
  transform: translateX(-6px);
}

.copy {
  position: absolute;
  right: 2cqw;
  bottom: 22px;
  z-index: 2;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--pink-deep);
}

/* =========================================================
   会話（ADV）画面
   ========================================================= */
.adv-screen {
  --win-h: clamp(140px, 27cqh, 220px);
  position: absolute;
  inset: 0;
}
/* 上のレースのカーテン */
.valance {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 20px;
  z-index: 1;
  /* 白い帯から白い波が1段たれさがる（ふちはピンクの線） */
  background:
    radial-gradient(circle at 50% 0, #fff 0 10.4px, var(--pink-2) 11px 12.4px, transparent 13px) 0 5px / 25px 14px repeat-x,
    linear-gradient(#fff, #fff) 0 0 / 100% 5px no-repeat;
}
.big-heart.adv {
  left: 4%;
  top: 14%;
  width: min(38cqw, 520px);
  opacity: 0.55;
  transform: rotate(-8deg);
}

.chapter {
  position: absolute;
  left: 3%;
  top: 40px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.35em 1.2em 0.35em 0.5em;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--pink);
  box-shadow: 0 4px 0 rgba(238, 76, 134, 0.2);
  font-family: var(--font-pop);
  font-size: clamp(13px, 1.3cqw, 16px);
  color: var(--pink-deep);
}
.chapter-no {
  display: grid;
  place-items: center;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 0.85em;
}

/* 立ち絵 */
.sprite {
  position: absolute;
  left: 4%;
  bottom: 0;
  z-index: 2;
  height: 90cqh;
  aspect-ratio: 957 / 1080;
  overflow: hidden;
}
.sprite img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 -2px 0 #fff);
}
/* 全身の絵は上半身だけ切り出して、バストアップの差分と大きさをそろえる */
.sprite img.full {
  position: absolute;
  left: 52%;
  /* 顔の大きさと位置がバストアップの絵とそろう倍率（両目の間隔と目の高さの比から算出） */
  top: -1.5%;
  width: auto;
  height: 272%;
  max-width: none;
  object-fit: initial;
  transform: translateX(-50%);
}
.sprite.hop { animation: hop 0.35s ease; }
@keyframes hop {
  30% { transform: translateY(-14px); }
  60% { transform: translateY(0); }
  80% { transform: translateY(-4px); }
}
.sprite.fade { animation: spriteFade 0.3s ease; }
@keyframes spriteFade { from { opacity: 0.4; } to { opacity: 1; } }

/* 右の情報カード（フリル＋リボン） */
.info {
  position: absolute;
  right: 3%;
  top: 46px;
  bottom: calc(var(--win-h) + 6cqh);
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: min(46%, 600px);
  padding: 28px 24px 18px;
  border-radius: 22px;
  background:
    var(--dots-pink),
    #fff;
  border: 3px solid var(--pink);
  box-shadow:
    0 0 0 5px #fff,
    0 0 0 7px var(--pink-2),
    0 14px 30px rgba(200, 25, 79, 0.2);
  animation: popIn 0.4s cubic-bezier(.2,.8,.2,1);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.info-ribbon {
  position: absolute;
  left: 50%;
  top: -30px;
  width: 78px;
  height: 52px;
  transform: translateX(-50%);
  background: url("../img/ribbon.svg") center / contain no-repeat;
  filter: drop-shadow(0 3px 2px rgba(150, 10, 50, 0.3));
  z-index: 2;
}
.info-title {
  flex: none;
  margin-bottom: 10px;
  text-align: center;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: clamp(22px, 2.4cqw, 30px);
  letter-spacing: 0.08em;
  color: var(--pink-deep);
  -webkit-text-stroke: 0.16em #fff;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--pale);
}
.info-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  font-size: clamp(13px, 1.15cqw, 15px);
  line-height: 1.7;
  scrollbar-width: thin;
  scrollbar-color: var(--pink-2) transparent;
}
.info-body::-webkit-scrollbar { width: 6px; }
.info-body::-webkit-scrollbar-thumb { background: var(--pink-2); border-radius: 3px; }

/* プロフィール */
.pf-name {
  margin-bottom: 8px;
  text-align: center;
  font-family: var(--font-pop);
  font-size: 1.5em;
  color: var(--pink-deep);
}
.pf-name small {
  display: block;
  font-family: var(--font-round);
  font-size: 0.5em;
  font-weight: 700;
  color: var(--text-dim);
}
.pf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.pf div {
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--paler);
  border: 1.5px dashed var(--pink-2);
}
.pf dt {
  font-size: 0.78em;
  font-weight: 800;
  color: var(--pink-deep);
}
.pf dd { font-weight: 700; }
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.tags li {
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-weight: 700;
  font-size: 0.9em;
}

/* お知らせ */
.news li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 6px;
  border-bottom: 2px dotted var(--pink-2);
  font-weight: 700;
}
.news time { font-family: var(--font-en); font-weight: 500; color: var(--text-dim); }
.cat {
  padding: 0 10px;
  border-radius: 999px;
  background: var(--pale);
  color: var(--pink-deep);
  font-family: var(--font-en);
  font-size: 0.8em;
  letter-spacing: 0.06em;
}

/* 動画 */
.videos { display: grid; gap: 12px; }
.yt {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--pink-2);
  background: var(--pale);
}
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-thumb { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.yt-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 4px #fff;
}
.yt-play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -9px 0 0 -5px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}
.yt-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  background: var(--dots-pink), var(--paler);
  color: var(--text-dim);
  font-weight: 700;
}
.yt-empty b { font-family: var(--font-en); font-size: 1.3em; color: var(--pink); }

/* リンク */
.link-list { display: grid; gap: 10px; }
.link-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--paler);
  border: 2px solid var(--pink-2);
  font-weight: 700;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.link-list b { font-family: var(--font-en); font-weight: 600; font-size: 1.15em; color: var(--pink-deep); }
.link-list span { color: var(--text-dim); font-size: 0.9em; }
.link-list a:hover { background: var(--pink); transform: translateX(4px); }
.link-list a:hover b, .link-list a:hover span { color: #fff; }

/* ルール・おたより */
.rule {
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--paler);
  border: 1.5px dashed var(--pink-2);
}
.rule h3 {
  margin-bottom: 4px;
  font-family: var(--font-pop);
  font-weight: 400;
  font-size: 1em;
  color: var(--pink-deep);
}
.rule li {
  position: relative;
  padding-left: 1.1em;
  font-weight: 700;
}
.rule li::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 0.65em;
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  background: var(--pink);
}
.lead { text-align: center; font-weight: 700; color: var(--text-dim); }
.mail {
  display: block;
  width: fit-content;
  margin: 6px auto 14px;
  padding: 6px 22px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 1.15em;
  letter-spacing: 0.04em;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--pink-2);
  word-break: break-all;
}
.mail:hover { background: var(--pink-deep); }

/* メッセージウィンドウ */
.msg-window {
  position: absolute;
  left: 3%;
  right: 3%;
  bottom: 3cqh;
  z-index: 5;
  height: var(--win-h);
  padding: 34px clamp(20px, 3cqw, 40px) 20px;
  border-radius: 24px;
  background:
    var(--dots-pink),
    rgba(255, 255, 255, 0.92);
  border: 3px solid var(--pink);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.9),
    0 0 0 7px var(--pink-2),
    0 16px 30px rgba(200, 25, 79, 0.22);
  transition: opacity 0.25s;
}
.name-plate {
  position: absolute;
  left: 32px;
  top: -20px;
  padding: 4px 26px 4px 44px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pink-2), var(--pink));
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--pink), 0 4px 8px rgba(200, 25, 79, 0.25);
  font-family: var(--font-pop);
  font-size: clamp(15px, 1.5cqw, 19px);
  color: #fff;
  letter-spacing: 0.08em;
}
.name-plate::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 54px;
  height: 36px;
  transform: translateY(-50%) rotate(-12deg);
  background: url("../img/ribbon.svg") center / contain no-repeat;
  filter: drop-shadow(0 2px 2px rgba(150, 10, 50, 0.3));
}
.msg-text {
  height: 100%;
  overflow-y: auto;
  font-weight: 700;
  font-size: clamp(15px, 1.6cqw, 20px);
  line-height: 1.85;
  color: var(--text);
  scrollbar-width: none;
}
/* =========================================================
   追加：タイトル画面のボタン・お知らせ・ひとこと
   ========================================================= */
/* メニューはスマホ版と同じ、白地にピンクのふちのボタンを2列で */
.menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 460px);
  margin-left: auto;
}
.menu a {
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 7px 8px 6px;
  border: 2.5px solid var(--pink-2);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.7), 0 4px 10px rgba(238, 76, 134, 0.15);
  font-size: clamp(15px, 1.35cqw, 19px);
}
.menu .jp { -webkit-text-stroke: 0.18em var(--pink); }
.menu .en { min-width: 0; text-align: center; -webkit-text-stroke: 0; }
.menu a:hover,
.menu a:focus-visible {
  background: var(--pink);
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--pink-2), 0 6px 14px rgba(238, 76, 134, 0.3);
  transform: translateY(-2px);
}
.menu a:hover .en, .menu a:focus-visible .en { color: #fff; }
.menu a:hover .jp, .menu a:focus-visible .jp { -webkit-text-stroke-color: var(--pink-deep); }

/* INFORMATION（次の配信・お知らせ・SNS） */
.title-info {
  position: relative;
  width: min(100%, 460px);
  margin: 16px 0 0 auto;
  padding: 22px 16px 12px;
  border-radius: 18px;
  background: var(--dots-pink), rgba(255, 255, 255, 0.92);
  border: 2.5px solid var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85), 0 8px 18px rgba(200, 25, 79, 0.15);
  text-align: left;
  font-size: clamp(12px, 1cqw, 14px);
  animation: menuIn 0.5s 0.9s cubic-bezier(.2,.8,.2,1) both;
}
.ti-head {
  position: absolute;
  left: 16px;
  top: -13px;
  padding: 1px 14px;
  border-radius: 999px;
  background: var(--pink);
  border: 2px solid #fff;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #fff;
}
.ti-next {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  padding-bottom: 8px;
  border-bottom: 2px dotted var(--pink-2);
}
.ti-label {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 0.8em;
  letter-spacing: 0.1em;
  color: var(--pink-deep);
}
.ti-next b { font-family: var(--font-pop); font-weight: 400; font-size: 1.15em; color: var(--pink-deep); }
.ti-what { color: var(--text-dim); font-weight: 700; }
.ti-news { margin-top: 6px; }
.ti-news li {
  display: flex;
  gap: 10px;
  padding: 2px 0;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ti-news time { flex: none; font-family: var(--font-en); font-weight: 500; color: var(--text-dim); }
/* 持ち主が編集できるよう文を span で包んだので、はみ出しの省略はここで */
.ti-news li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ti-sns {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.ti-sns a {
  padding: 1px 14px;
  border-radius: 999px;
  background: var(--pale);
  border: 1.5px solid var(--pink-2);
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 0.9em;
  color: var(--pink-deep);
  transition: background 0.2s, color 0.2s;
}
.ti-sns a:hover { background: var(--pink); color: #fff; }

/* キャラクターのひとこと（吹き出し） */
.title-bubble {
  position: absolute;
  left: clamp(260px, 30cqw, 560px);
  top: 13cqh;
  z-index: 2;
  padding: 10px 18px;
  border-radius: 20px;
  background: #fff;
  border: 2.5px solid var(--pink);
  box-shadow: 0 6px 14px rgba(200, 25, 79, 0.2);
  font-family: var(--font-pop);
  font-size: clamp(13px, 1.25cqw, 17px);
  line-height: 1.5;
  color: var(--pink-deep);
  animation: bubbleIn 0.6s 1.1s cubic-bezier(.2,.8,.2,1) both, bob 3s 1.7s ease-in-out infinite;
}
.title-bubble::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 60%;
  border-style: solid;
  border-width: 8px 14px 8px 0;
  border-color: transparent var(--pink) transparent transparent;
}
.title-bubble::after {
  content: "";
  position: absolute;
  left: -8px;
  top: calc(60% + 2px);
  border-style: solid;
  border-width: 6px 10px 6px 0;
  border-color: transparent #fff transparent transparent;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: none; }
}
@keyframes bob {
  50% { translate: 0 -5px; }
}
.version {
  position: absolute;
  left: 2cqw;
  bottom: 22px;
  z-index: 2;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--pink-deep);
}

/* キャラクターをもっと近くに */
.title-chara {
  left: -2cqw;
  top: -8cqh;
  height: 225cqh;
}
/* 会話画面の立ち絵：顔が画面の高さの4割あたりに来るよう大きく */
.sprite {
  left: 0;
  top: -12cqh;
  bottom: auto;
  height: 122cqh;
}

/* セリフの進み具合（ドット） */
.line-dots {
  position: absolute;
  right: 24px;
  bottom: 14px;
  display: flex;
  gap: 6px;
}
.line-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pale);
  border: 1.5px solid var(--pink-2);
  transition: background 0.3s;
}
.line-dots i.on { background: var(--pink); border-color: var(--pink); }

/* =========================================================
   追加２：ゲーム画面の枠・HUD・LOAD・CGモード・読み込み画面
   ========================================================= */
/* 画面の外側（ゲーム機の外側のイメージ） */
.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, rgba(255, 143, 184, 0.22) 0 2.5px, transparent 3px) 0 0 / 26px 26px,
    radial-gradient(circle, rgba(255, 143, 184, 0.22) 0 2.5px, transparent 3px) 13px 13px / 26px 26px,
    radial-gradient(ellipse at 50% 40%, #4a1f36 0%, #2a1020 75%);
}
/* 16:9のゲーム画面。画面いっぱいに収まる最大サイズ */
.screen {
  width: min(calc(100vw - 56px), calc((100vh - 56px) * 16 / 9));
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  box-shadow:
    0 0 0 5px #fff,
    0 0 0 9px var(--pink),
    0 0 0 13px #fff,
    0 30px 70px rgba(0, 0, 0, 0.55);
}

/* キャラクターのひとこと：口元の右横に置き、しっぽを口元に向ける */
.title-bubble {
  left: calc(-2cqw + 69cqh);
  top: 23cqh;
}
/* 枠の幅が狭いとメニューに重なるので、頭の横（メニューより上）へ */
@container (max-width: 1100px) {
  .title-bubble { left: calc(-2cqw + 62cqh); top: 7cqh; }
}

/* お知らせ／おすすめ動画のタブ */
.ti-tabs {
  position: absolute;
  left: 14px;
  top: -15px;
  display: flex;
  gap: 4px;
}
.ti-tabs button {
  padding: 1px 12px;
  border-radius: 999px;
  border: 2px solid var(--pink);
  background: #fff;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--pink-deep);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.ti-tabs button[aria-selected="true"] {
  background: var(--pink);
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--pink);
}
.ti-panel .videos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ti-panel .yt { border-width: 2px; border-radius: 10px; }
.ti-panel .yt-play { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.ti-panel .yt-play::before { margin: -7px 0 0 -4px; border-width: 7px 0 7px 12px; }
.ti-panel .yt-empty { font-size: 11px; }
.ti-panel .yt-empty b { font-size: 1.2em; }

/* 左上：ページ名＋好感度 */
.hud {
  position: absolute;
  left: 3%;
  top: 5.5cqh;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.hud .chapter {
  position: static;
  cursor: pointer;
  transition: background 0.2s;
}
.hud .chapter:hover { background: var(--paler); }
.caret {
  width: 0.5em;
  height: 0.5em;
  margin-left: 0.2em;
  border-right: 2.5px solid var(--pink);
  border-bottom: 2.5px solid var(--pink);
  transform: translateY(-25%) rotate(45deg);
}
.love {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--pink-2);
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 12px;
  color: var(--pink-deep);
  letter-spacing: 0.06em;
}
.love-bar {
  width: 110px;
  height: 10px;
  border-radius: 999px;
  background: var(--pale);
  border: 1.5px solid var(--pink-2);
  overflow: hidden;
}
.love-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(45deg, var(--pink) 0 5px, var(--pink-2) 5px 10px);
  transition: width 0.9s cubic-bezier(.2,.8,.2,1);
}
.love.is-max .love-lv { color: var(--crimson); }

/* 好感度アップ */
.love-toast {
  position: absolute;
  left: 50%;
  top: 14%;
  z-index: 15;
  padding: 10px 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pink-2), var(--pink));
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--pink), 0 10px 22px rgba(200, 25, 79, 0.3);
  font-family: var(--font-pop);
  font-size: clamp(13px, 2.4cqh, 18px);
  color: #fff;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
  animation: toast 2.8s ease forwards;
}
@keyframes toast {
  0% { opacity: 0; translate: 0 12px; }
  12% { opacity: 1; translate: 0 0; }
  80% { opacity: 1; translate: 0 0; }
  100% { opacity: 0; translate: 0 -12px; }
}

/* LOAD画面 */
.load {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(255, 214, 230, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.load-box {
  width: min(92%, 780px);
  max-height: 92%;
  overflow-y: auto;
  padding: 18px 20px 20px;
  border-radius: 22px;
  background: var(--dots-pink), #fff;
  border: 3px solid var(--pink);
  box-shadow: 0 0 0 5px #fff, 0 0 0 7px var(--pink-2), 0 20px 40px rgba(200, 25, 79, 0.25);
  animation: popIn 0.3s cubic-bezier(.2,.8,.2,1);
}
.load-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.load-title {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: clamp(22px, 4.4cqh, 34px);
  letter-spacing: 0.24em;
  color: var(--pink-deep);
  -webkit-text-stroke: 0.14em #fff;
  paint-order: stroke fill;
}
.load-close,
.cg-close {
  padding: 3px 16px;
  border-radius: 999px;
  border: 2px solid var(--pink);
  background: #fff;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--pink-deep);
  cursor: pointer;
}
.load-close:hover, .cg-close:hover { background: var(--pink); color: #fff; }
.slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.slots button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 12px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border-radius: 16px;
  border: 2px solid var(--pink-2);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.slots button:hover { background: var(--paler); border-color: var(--pink); transform: translateY(-2px); }
.slots button[aria-current="page"] { border-color: var(--pink); box-shadow: 0 0 0 3px var(--pale); }
.thumb {
  grid-row: 1 / 4;
  width: clamp(52px, 10cqh, 76px);
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--dots-pink), var(--pale);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--pink-2);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.thumb.full img { object-position: 50% 0; transform: scale(2.3); transform-origin: 52% 9%; }
.slot-no { font-family: var(--font-en); font-weight: 600; font-size: 12px; letter-spacing: 0.1em; color: var(--pink); }
.slot-name { font-family: var(--font-pop); font-size: clamp(14px, 2.4cqh, 17px); color: var(--pink-deep); line-height: 1.3; }
.slot-date { font-family: var(--font-en); font-size: 11px; color: var(--text-dim); letter-spacing: 0.06em; }
.to-title {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  border-radius: 999px;
  border: 3px solid #fff;
  background: linear-gradient(180deg, var(--pink-2), var(--pink));
  box-shadow: 0 0 0 2px var(--pink);
  font-family: var(--font-pop);
  font-size: 16px;
  color: #fff;
  cursor: pointer;
}
.to-title:hover { background: var(--pink-deep); }

/* CGモード（プロフィールのCGタブ） */
.cg-count {
  margin-bottom: 10px;
  text-align: center;
  font-family: var(--font-en);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--pink-deep);
}
.cg-count b { font-size: 1.3em; }
.cg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 6px 6px 10px;
}
.cg-grid button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border-radius: 14px;
  border: 2.5px solid var(--pink);
  background: var(--dots-pink), #fff;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--pink-2), 0 8px 16px rgba(200, 25, 79, 0.15);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.25s;
}
.cg-grid button:hover { transform: translateY(-3px) rotate(-1deg); }
/* CGの一部を切り取ったサムネイル（全身の絵は顔のあたり） */
.cg-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}
.cg-grid img[src*="stand-"] {
  object-position: 50% 0;
  transform: scale(1.9);
  transform-origin: 52% 40%;
}
.cg-no {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--pink);
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 12px;
  color: #fff;
}
.cg-viewer {
  position: absolute;
  inset: 0;
  z-index: 18;
  display: grid;
  place-items: center;
  /* 絵が見やすいよう背景は白 */
  background: #fff;
  animation: popIn 0.25s ease;
}
.cg-viewer img {
  max-width: 86cqw;
  max-height: 78cqh;
  object-fit: contain;
  filter: none;
}
.cg-cap {
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 18px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--pink);
  font-family: var(--font-pop);
  font-size: 14px;
  color: var(--pink-deep);
  white-space: nowrap;
}
.cg-close { position: absolute; right: 3%; top: 5%; }
.cg-btn {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--pink);
  box-shadow: 0 0 0 2px var(--pink);
  cursor: pointer;
}
.cg-btn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
}
.cg-btn.prev { left: 4%; }
.cg-btn.next { right: 4%; }
.cg-btn.prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.cg-btn.next::before { transform: translate(-70%, -50%) rotate(45deg); }
.cg-btn:hover { background: var(--pink-deep); }

/* 読み込み画面 */
.loading {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    var(--dots),
    linear-gradient(160deg, #ffd9e8 0%, #ffbcd5 100%);
  transition: opacity 0.6s ease, visibility 0.6s;
}
.loading.is-done { opacity: 0; visibility: hidden; }
.ld-title {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: clamp(22px, 5cqh, 40px);
  letter-spacing: 0.2em;
  color: #fff;
  -webkit-text-stroke: 0.2em var(--pink);
  paint-order: stroke fill;
}
.ld-dots { display: inline-block; width: 2.2em; text-align: left; }
.ld-bar {
  width: min(60%, 440px);
  height: 22px;
  border-radius: 999px;
  background: #fff;
  border: 3px solid var(--pink);
  box-shadow: 0 0 0 4px #fff, 0 8px 18px rgba(200, 25, 79, 0.2);
  overflow: hidden;
}
.ld-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(45deg, var(--pink) 0 10px, var(--pink-2) 10px 20px);
  background-size: 28px 28px;
  animation: stripe 0.6s linear infinite;
}
@keyframes stripe { to { background-position: 28px 0; } }
.ld-pct { font-family: var(--font-en); font-weight: 600; font-size: 18px; color: var(--pink-deep); }
.ld-tip { font-family: var(--font-pop); font-size: clamp(12px, 2.4cqh, 16px); color: var(--pink-deep); }

/* =========================================================
   スマホ（縦長の画面）
   ========================================================= */
@media (max-aspect-ratio: 4/5), (max-width: 640px) {
  /* タイトル */
  .title-chara {
    left: 50%;
    top: -4cqh;
    height: 200cqh;
    transform: translateX(-56%);
    animation: none;
  }
  .title-screen .big-heart {
    right: -14cqw;
    top: 4cqh;
    width: 80cqw;
  }
  .title-screen .big-heart.small { display: none; }
  .title-side {
    left: 4cqw;
    right: 4cqw;
    top: auto;
    bottom: 46px;
    width: auto;
    transform: none;
    padding: 18px 14px 14px;
    border-radius: 22px;
    background: var(--dots-pink), rgba(255, 255, 255, 0.86);
    border: 3px solid var(--pink);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 10px 24px rgba(200, 25, 79, 0.2);
    text-align: center;
  }
  .logo { align-items: center; }
  .logo-jp { font-size: clamp(34px, 11cqw, 52px); }
  .logo-sub { display: none; }
  .menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
  }
  .menu a {
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 6px 4px;
    border-color: var(--pink-2);
    background: rgba(255, 255, 255, 0.9);
    font-size: 15px;
  }
  .menu .en { min-width: 0; text-align: center; }
  .menu a:hover, .menu a:focus-visible { transform: none; }
  .copy { right: 0; left: 0; bottom: 24px; text-align: center; }
  .version { display: none; }
  .title-bubble { left: auto; right: 4cqw; top: 9cqh; font-size: 13px; }
  .title-bubble::before, .title-bubble::after { display: none; }
  .menu { width: 100%; }
  .title-info { width: 100%; margin-top: 12px; padding: 16px 12px 8px; font-size: 12px; }
  .ti-news li:nth-child(n+2) { display: none; }

  /* 会話 */
  .adv-screen { --win-h: clamp(120px, 24cqh, 190px); }
  .big-heart.adv { left: auto; right: -20cqw; top: 40%; width: 80cqw; }
  .info {
    left: 4%;
    right: 4%;
    width: auto;
    top: 82px;
    bottom: auto;
    height: 44cqh;
    padding: 24px 16px 14px;
  }
  /* 顔がカードとウィンドウの間（画面の高さの64%あたり）に来るよう配置 */
  .sprite {
    left: auto;
    right: 0;
    top: 39cqh;
    bottom: auto;
    height: 55cqh;
  }
  .msg-window { left: 3%; right: 3%; bottom: 2cqh; padding: 30px 18px 16px; }
  .name-plate { left: 22px; }
}
/* 背の低い横長の画面：立ち絵を小さく、カードを広く */
@media (max-height: 520px) and (min-aspect-ratio: 4/5) {
  .title-info, .title-bubble, .logo-sub { display: none; }
  .logo-jp { font-size: clamp(30px, 9cqh, 56px); }
  .menu { margin-top: 10px; gap: 6px; }
  .menu a { padding: 4px 8px; font-size: 14px; }
  .adv-screen { --win-h: 110px; }
  .sprite { top: -10cqh; height: 130cqh; }
  .info { top: 34px; bottom: calc(var(--win-h) + 4cqh + 14px); }
}


/* =========================================================
   追加２のスマホ・背の低い画面向け
   ========================================================= */
@media (max-aspect-ratio: 4/5), (max-width: 640px) {
  .stage { background: none; }
  .screen {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
  }
  .title-bubble { left: auto; right: 4cqw; top: 9cqh; }
  .hud {
    left: 4%;
    right: 4%;
    top: 26px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .love { padding: 2px 8px; gap: 5px; font-size: 11px; }
  .love-bar { width: 64px; }
  .slots { grid-template-columns: 1fr; gap: 8px; }
  .load-box { padding: 14px; }
  .cg-viewer img { max-width: 92cqw; max-height: 72cqh; }
}
@media (max-height: 520px) and (min-aspect-ratio: 4/5) {
  .screen {
    width: min(100vw, calc(100vh * 16 / 9));
    border-radius: 0;
    box-shadow: none;
  }
  .hud { top: 6px; gap: 4px; }
}

/* =========================================================
   追加３：お知らせ欄を大きく・情報カードを下まで・プロフィールのタブ
   ========================================================= */
/* タイトルのお知らせ／おすすめ動画を読みやすい大きさに */
.menu,
.title-info { width: min(100%, 520px); }
.title-info {
  margin-top: 26px;
  padding: 28px 20px 14px;
  font-size: clamp(13px, 1.2cqw, 16px);
}
.ti-tabs { left: 16px; top: -17px; gap: 6px; }
.ti-tabs button {
  padding: 3px 16px;
  font-size: clamp(12px, 1.05cqw, 14px);
}
.ti-news li { padding: 3px 0; }
.ti-sns a { padding: 2px 16px; }
.ti-panel .videos { gap: 12px; }
.ti-panel .yt-empty { font-size: 13px; }
.ti-panel .yt-play { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
/* 項目が奇数のとき、最後のボタンは横いっぱいに */
.menu a:last-child:nth-child(odd),
.slots li:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* 情報カードは下まで伸ばし、セリフウィンドウはその左に収める */
.info { bottom: max(24px, 3.5cqh); }
.msg-window {
  bottom: max(24px, 3.5cqh);
  right: calc(5% + min(46%, 600px));
}
/* ページ名の長さでボタンの幅が変わらないように */
.chapter-name { min-width: 6em; }
/* 中身の高さが変わってもスクロールバーの出入りで横にずれないように */
.info-body { scrollbar-gutter: stable; }

/* プロフィールの中のタブ */
.pf-tabs {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-bottom: 10px;
  background: linear-gradient(#fff 80%, rgba(255, 255, 255, 0));
}
.pf-tabs button {
  padding: 3px 18px;
  border-radius: 999px;
  border: 2px solid var(--pink);
  background: #fff;
  font-family: var(--font-pop);
  font-size: 0.95em;
  color: var(--pink-deep);
  cursor: pointer;
}
/* 選んだ瞬間に切り替える（色の変化の途中で文字が背景にとけて見えなくならないように） */
.ti-tabs button { transition: none; }
@media (hover: hover) {
  .pf-tabs button:hover { background: var(--paler); }
}
.pf-tabs button[aria-selected="true"] {
  background: var(--pink);
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--pink);
  color: #fff;
}
.tag-list { display: grid; gap: 8px; }
.tag-list div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--paler);
  border: 1.5px dashed var(--pink-2);
}
.tag-list dt {
  padding: 1px 14px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-weight: 800;
}
.tag-list dd { font-weight: 700; color: var(--text-dim); }

/* スマホ */
@media (max-aspect-ratio: 4/5), (max-width: 640px) {
  .title-info { margin-top: 28px; padding: 24px 14px 10px; font-size: 13px; }
  .ti-tabs { left: 12px; top: -16px; }
  .ti-tabs button { padding: 3px 12px; font-size: 12px; }
  .ti-panel .videos { gap: 8px; }
  .ti-panel .yt-empty { font-size: 12px; }
  /* メニューは上段3つ・下段2つにして、顔が隠れないよう高さを抑える */
  .menu { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .menu a { grid-column: span 2; padding: 6px 2px; }
  .menu a:nth-child(n+4),
  .menu a:last-child:nth-child(odd) { grid-column: span 3; }

  /* セリフウィンドウは小さめに */
  .adv-screen { --win-h: clamp(92px, 16cqh, 128px); }
  .info { bottom: auto; }
  .msg-window {
    right: 3%;
    bottom: max(24px, 2cqh); /* 画面の下のフリルに重ならないように */
    padding: 24px 16px 12px;
    border-radius: 20px;
  }
  .msg-text { font-size: 14px; line-height: 1.7; }
  .name-plate { top: -17px; padding: 2px 20px 2px 38px; font-size: 14px; }
  .name-plate::before { width: 44px; height: 30px; left: -12px; }
  .line-dots { right: 16px; bottom: 8px; }
  .line-dots i { width: 7px; height: 7px; }
  .pf-tabs button { padding: 2px 12px; }
  .cg-grid { gap: 8px; padding: 4px 4px 8px; }
}
/* 背の低い横長の画面：幅の狭くなったセリフウィンドウに文字を収める */
@media (max-height: 520px) and (min-aspect-ratio: 4/5) {
  .info, .msg-window { bottom: 24px; }
  .hud { top: 22px; } /* 上のフリルに重ならないように */
  .msg-window { padding: 24px 16px 12px; }
  .msg-text { font-size: 13px; line-height: 1.6; }
  .name-plate { top: -17px; padding: 2px 20px 2px 38px; font-size: 14px; }
  .name-plate::before { width: 44px; height: 30px; left: -12px; }
  .line-dots { right: 16px; bottom: 8px; }
  .cg-grid { gap: 8px; }
}

/* =========================================================
   追加４：タブの大きさをそろえる・フリルを増やす・LOAD画面
   ========================================================= */
/* INFORMATION と PICKUP MOVIE は同じ場所に重ね、大きい方の高さにそろえる（切り替えても枠の大きさが変わらない） */
.title-info { display: grid; }
.ti-panel { grid-area: 1 / 1; min-width: 0; }
.title-info .ti-panel[hidden] { display: block !important; visibility: hidden; }
#ti-movie,
#ti-info { display: flex; flex-direction: column; justify-content: center; }
#ti-info .ti-sns { margin-top: auto; padding-top: 8px; }
#ti-info .ti-news { margin-bottom: 4px; }

/* ゲーム画面の高さが低いとき（小さめのPCの窓など）は、タイトルの右側を詰めて枠内に収める */
@container (max-height: 620px) and (min-width: 641px) {
  .logo-sub { display: none; }
  .logo-jp { font-size: clamp(34px, 10cqh, 64px); }
  .logo-en { font-size: clamp(15px, 3.6cqh, 24px); }
  .menu { margin-top: 10px; gap: 6px; }
  .menu a { padding: 4px 8px 3px; font-size: clamp(14px, 3cqh, 17px); }
  .title-info { margin-top: 22px; padding: 22px 16px 10px; font-size: 13px; }
  .ti-news li:nth-child(3) { display: none; }
  /* 右下はお知らせ欄とかぶるので、コピーライトは左下のバージョン表記の下へ */
  .version { bottom: 38px; }
  .copy { left: 2cqw; right: auto; }
}

/* プロフィールのタブ：選択中のふちが上で切れないよう余白をとる */
.pf-tabs { padding: 4px 4px 10px; }
.pf-tabs button {
  flex: 0 1 auto;
  min-width: 0;
  padding-left: clamp(8px, 1.5cqw, 18px);
  padding-right: clamp(8px, 1.5cqw, 18px);
  white-space: nowrap;
}

/* LOAD画面：背景のぼかし（重い）と拡大のアニメーションをやめ、ふわっと出すだけに */
.load {
  background: rgba(255, 214, 230, 0.86);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: fadeIn 0.18s ease;
}
.load-box { animation: none; }
/* 小さく作り直したサムネイルはそのまま表示 */
.thumb.is-baked img { object-fit: fill; object-position: 0 0; transform: none; }
@keyframes fadeIn { from { opacity: 0; } }

@media (max-aspect-ratio: 4/5), (max-width: 640px) {
  /* 動画の枠と高さをそろえたぶん空いた場所に、お知らせを2件まで */
  .ti-news li:nth-child(2) { display: flex; }
}
/* 背の低い横長の画面では、お知らせ欄は今まで通り出さない */
@media (max-height: 520px) and (min-aspect-ratio: 4/5) {
  .title-info { display: none; }
  .version { display: none; }
}

/* クリックしたところから出るハート */
.pop-heart {
  position: absolute;
  z-index: 40;
  width: var(--size);
  aspect-ratio: 40 / 36;
  margin: calc(var(--size) * -0.45) 0 0 calc(var(--size) * -0.5);
  background: var(--c);
  -webkit-mask: url("../img/heart.svg") center / contain no-repeat;
  mask: url("../img/heart.svg") center / contain no-repeat;
  pointer-events: none;
  animation: popHeart 1s ease-out both;
}
/* ぽんと膨らんでから、ふわっと上へ昇りながら消える */
@keyframes popHeart {
  0% { opacity: 0; transform: translate(0, 0) scale(0.2) rotate(0deg); }
  15% { opacity: 1; transform: translate(calc(var(--dx) * 0.3), -10px) scale(1.25) rotate(var(--rot)); }
  30% { opacity: 1; transform: translate(calc(var(--dx) * 0.6), -28px) scale(1) rotate(var(--rot)); }
  65% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), -84px) scale(0.9) rotate(var(--rot)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
