html,
body,
button {
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Zen Kaku Gothic Antique", sans-serif;
}

body.is-legal-open { overflow: hidden; }
.c-legal[hidden] { display: none; }

.c-legal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.c-legal__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 236, 161, .22), transparent 28%),
    linear-gradient(rgba(45, 9, 20, .82), rgba(45, 9, 20, .94));
  backdrop-filter: blur(7px);
}

.c-legal__panel {
  position: relative;
  width: min(560px, 100%);
  padding: clamp(28px, 6vw, 48px);
  color: #3e1c1c;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(132, 25, 36, .04) 50%, transparent 50%) 0 0 / 34px 34px,
    linear-gradient(rgba(132, 25, 36, .04) 50%, transparent 50%) 0 0 / 34px 34px,
    #fff9e9;
  border: 4px solid #f4c974;
  border-radius: 22px;
  box-shadow: 0 0 0 7px #7a1520, 0 22px 70px rgba(0, 0, 0, .45);
}

.c-legal__panel::before,
.c-legal__panel::after {
  position: absolute;
  top: 14px;
  color: #c93e4f;
  font-size: 24px;
  content: "◆";
}
.c-legal__panel::before { left: 18px; }
.c-legal__panel::after { right: 18px; }

.c-legal__eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: #a32837;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .22em;
}

.c-legal__title {
  margin: 0 0 22px;
  color: #6f1721;
  font-size: clamp(27px, 6vw, 38px);
  font-weight: 700;
  line-height: 1.2;
}

.c-legal__notice {
  margin: 0;
  padding: 18px;
  font-size: clamp(15px, 3.6vw, 18px);
  line-height: 1.85;
  text-align: left;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(122, 21, 32, .18);
  border-radius: 12px;
}

.c-legal__detail {
  margin: 16px 0 22px;
  color: #6f5550;
  font-size: 13px;
  line-height: 1.7;
  text-align: left;
}

.c-legal__accept {
  width: min(340px, 100%);
  min-height: 58px;
  padding: 12px 24px;
  color: #fffaf0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .04em;
  background:
    linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.06) 75%) 0 0 / 24px 24px,
    #c93245;
  border: 3px solid #f3b9a1;
  border-radius: 999px;
  box-shadow: 0 0 0 3px #8a1928, 0 8px 18px rgba(82, 12, 24, .24);
  cursor: pointer;
}

.c-legal__accept:hover,
.c-legal__accept:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.p-home__localized-title {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 6px auto 16px;
  padding: 5px 18px 7px;
  color: #fff8dc;
  font-size: clamp(20px, 5vw, 32px);
  font-weight: 700;
  letter-spacing: .12em;
  text-shadow: 0 2px 0 #7b1825, 0 0 8px rgba(85, 11, 26, .7);
  background: rgba(109, 17, 30, .72);
  border: 2px solid rgba(255, 226, 144, .78);
  border-radius: 999px;
}

.p-home__content-start-button {
  position: relative;
  display: grid;
  width: calc(688 * var(--vw-scale));
  aspect-ratio: 1032 / 248;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(45deg, rgba(255,255,255,.055) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.055) 75%) 0 0 / 46px 46px,
    linear-gradient(45deg, rgba(255,255,255,.055) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.055) 75%) 23px 23px / 46px 46px,
    #d93c51;
  border: clamp(3px, .55vw, 6px) solid #f7b8aa;
  border-radius: 999px;
  box-shadow: inset 0 0 0 3px rgba(130, 17, 35, .52), 0 5px 0 #8d1b2c;
  filter: none;
}

.p-home__content-start-button > img,
.p-home__share-button > img,
.c-clear__title > img,
.c-clear__content-post > img,
.c-clear__content-catch > img,
.c-ending__content-title > img { display: none; }

.p-localized-action {
  font-size: calc(52 * var(--vw-scale));
  font-weight: 700;
  letter-spacing: .08em;
  text-shadow: 0 3px 0 rgba(114, 15, 32, .45);
}

.p-home__share-button {
  display: grid;
  min-height: calc(112 * var(--vw-scale));
  color: #fff;
  background: #151515;
  border: calc(3 * var(--vw-scale)) solid rgba(255,255,255,.72);
  border-radius: calc(18 * var(--vw-scale));
  place-items: center;
}

.p-localized-share {
  font-size: calc(30 * var(--vw-scale));
  font-weight: 700;
  letter-spacing: .08em;
}

.l-footer__legal-link {
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  background: none;
  border: 0;
  cursor: pointer;
}

.c-localized-clear-title,
.c-localized-ending-title {
  display: block;
  color: #fff8df;
  font-size: calc(48 * var(--vw-scale));
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
  text-shadow: 0 3px 0 #831828, 0 0 10px rgba(86, 12, 28, .48);
}

.c-localized-post {
  display: grid;
  min-height: calc(92 * var(--vw-scale));
  padding: calc(10 * var(--vw-scale)) calc(24 * var(--vw-scale));
  color: #fff;
  font-size: calc(27 * var(--vw-scale));
  font-weight: 700;
  background: #151515;
  border-radius: calc(14 * var(--vw-scale));
  place-items: center;
}

.c-localized-catch {
  display: block;
  color: #76202c;
  font-size: calc(28 * var(--vw-scale));
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

.c-ending__content-title { min-height: calc(72 * var(--vw-scale)); }
.c-content__content-dialogue-text { line-height: 1.65; }

/* GalGame-style fast-forward toggle: always available below the utility buttons. */
.c-content__ui .c-content__ui-fastforward {
  display: grid;
}

@media (max-width: 600px) {
  .c-legal { padding: 18px; }
  .c-legal__panel { padding: 30px 22px 26px; border-radius: 16px; }
  .c-legal__notice { padding: 14px; line-height: 1.75; }
  .p-home__localized-title { margin-bottom: 12px; }
}
