/* ========================================
   History Tokens
======================================== */

:root {
  --history-accent: #dcdf7c;
  --history-text: #666666;
  --history-gray: #9e9e9f;
  --history-line: #ebe7cb;
  --history-bar: #9e9e9f;
  --history-rule: #7f8080;

  --history-radius-s: 6px;
  --history-radius-m: 8px;

  --t-fade: 0.8s;
  --t-fade-long: 1s;
  --t-reveal: 0.6s;

  --e-ease: ease;
  --e-smooth: cubic-bezier(0.645, 0.045, 0.355, 1);
  --e-zoom: cubic-bezier(0.16, 1, 0.3, 1);

  --mt-50: 50px;
  --mb-46: 46px;

  --tree-line-w: 10px;
  --tree-bar-w: 46px;
  --tree-side-gap: 60px;

  --mv-logo-w: 320px;
  --mv-rule-w: 76px;
  --mv-rule-h: 2px;
  --mv-spacer-h: 410px;
  --mv-img-scale: 1;
}

/* ========================================
   Section Spacing
======================================== */

.p-history .l-section {
  margin-top: var(--section-gap);
}

.p-history-tree {
  margin-top: 140px !important;
}

/* ========================================
   Section Head
======================================== */

.c-sectionhead {
  text-align: center;
}

.c-sectionhead__en {
  margin: 0;
  color: var(--history-accent);
  font-family: var(--font-en);
  font-size: 80px;
  font-weight: var(--fw-en-bold);
  line-height: 1;
  letter-spacing: 0.04em;
}

.c-sectionhead__jp {
  margin: 14px 0 0;
  color: var(--history-text);
  font-size: 14px;
}

.c-sectionhead--quiz .c-sectionhead__en {
  color: #ffffff;
}

/* ========================================
   History MV
======================================== */

.p-history-mv {
  position: relative;
  width: 100%;
  overflow-x: clip;
}

.p-history-mv__stage {
  position: relative;
  min-height: clamp(980px, 100vh, 1200px);
  min-height: clamp(980px, 100svh, 1200px);
}

@supports (height: 100dvh) {
  .p-history-mv__stage {
    min-height: clamp(980px, 100dvh, 1200px);
  }
}

.p-history-mv__spacer {
  height: var(--mv-spacer-h);
}

/* PCは高さに余裕を持たせつつ、画面高にも少し追従 */
@media (min-width: 768px) {
  .p-history-mv__spacer {
    height: calc(var(--mv-spacer-h) + clamp(200px, 24vh, 320px));
  }
}

.p-history-mv__imgs {
  position: sticky;
  top: var(--page-top-padding, 0px);
  right: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  max-width: 1200px;
  height: clamp(980px, calc(100vh - var(--page-top-padding, 0px)), 1200px);
  height: clamp(980px, calc(100svh - var(--page-top-padding, 0px)), 1200px);
  margin: auto;
  overflow: visible;
  pointer-events: none;
}

@supports (height: 100dvh) {
  .p-history-mv__imgs {
    height: clamp(980px, calc(100dvh - var(--page-top-padding, 0px)), 1200px);
  }
}

.p-history-mv__content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 80px var(--gutter) 0;
  text-align: center;
  pointer-events: none;
}

.p-history-mv__logo,
.p-history-mv__rule,
.p-history-mv__title,
.p-history-mv__lead {
  opacity: 0;
  transition: opacity var(--t-fade) var(--e-ease);
}

.p-history-mv__logo.is-show,
.p-history-mv__rule.is-show,
.p-history-mv__title.is-show,
.p-history-mv__lead.is-show {
  opacity: 1;
}

.p-history-mv__logo {
  width: var(--mv-logo-w);
  height: auto;
}

.p-history-mv__rule {
  width: var(--mv-rule-w);
  height: var(--mv-rule-h);
  margin-top: 80px;
  background: var(--history-rule);
}

.p-history-mv__title {
  margin-top: 80px;
  font-size: 32px;
  color: var(--history-rule);
}

.p-history-mv__lead {
  margin-top: 50px;
  font-size: 18px;
  line-height: 2;
  color: var(--history-rule);

  width: 100%;
  max-width: 32em;
  margin-left: auto;
  margin-right: auto;
}

.p-history-mv__img {
  position: absolute;
  max-width: none;
  overflow: hidden;
  opacity: 0;
  border-radius: var(--history-radius-m);
  transition: opacity var(--t-fade-long) var(--e-ease);
}

.p-history-mv__img.is-show {
  opacity: 1;
}

.p-history-mv__img:nth-of-type(1) {
  width: calc(247px * var(--mv-img-scale));
  top: 0%;
  left: 5%;
}

.p-history-mv__img:nth-of-type(2) {
  width: calc(186px * var(--mv-img-scale));
  top: 20%;
  left: -1%;
}

.p-history-mv__img:nth-of-type(3) {
  width: calc(133px * var(--mv-img-scale));
  top: 27%;
  left: 19%;
}

.p-history-mv__img:nth-of-type(4) {
  width: calc(167px * var(--mv-img-scale));
  top: 43%;
  left: 7%;
}

.p-history-mv__img:nth-of-type(5) {
  width: calc(133px * var(--mv-img-scale));
  top: 57%;
  left: 2%;
}

.p-history-mv__img:nth-of-type(6) {
  width: calc(109px * var(--mv-img-scale));
  top: 60%;
  left: 16%;
}

.p-history-mv__img:nth-of-type(7) {
  width: calc(200px * var(--mv-img-scale));
  top: 0%;
  left: 80%;
}

.p-history-mv__img:nth-of-type(8) {
  width: calc(133px * var(--mv-img-scale));
  top: 15%;
  left: 74%;
}

.p-history-mv__img:nth-of-type(9) {
  width: calc(277px * var(--mv-img-scale));
  top: 27%;
  left: 78%;
}

.p-history-mv__img:nth-of-type(10) {
  width: calc(97px * var(--mv-img-scale));
  top: 47%;
  left: 87%;
}

.p-history-mv__img:nth-of-type(11) {
  width: calc(211px * var(--mv-img-scale));
  top: 59%;
  left: 75%;
}

.p-history-mv__sp-top,
.p-history-mv__sp-inline {
  display: none;
}

/* ========================================
   Intro
======================================== */

.p-history-intro {
  position: relative;
  z-index: 2;
  margin-top: 0 !important;
}

.p-history-intro__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 40px;
  margin-top: var(--mt-50);
  color: var(--history-text);
}

.p-history-intro__media img {
  display: block;
  width: 100%;
  height: auto;
}

.p-history-intro__text > * + * {
  margin-top: var(--mb-46);
}

/* ========================================
   Message
======================================== */

.p-history-message--bg {
  position: relative;
  margin-top: var(--section-gap);
  padding: var(--section-gap) 0;
  overflow: hidden;
  background-color: #f7f7f5;
}

.p-history-message__bg {
  position: absolute;
  top: 280px;
  left: 50%;
  z-index: 0;
  width: 740px;
  height: 330px;
  pointer-events: none;
  transform: translateX(-220px);
}

.p-history-message__bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.p-history-message--bg .l-content {
  position: relative;
  z-index: 1;
}

.p-history-message__body {
  margin-top: var(--mt-50);
  color: var(--history-rule);
}

.p-history-message__body .c-linkbtn {
  color: var(--history-text);
  background: #fff;
  border: 1px solid var(--history-text);
}

.p-history-message__title {
  margin: 0;
  font-size: 28px;
  line-height: 1.6;
}

.p-history-message__text {
  width: 400px;
  margin: 40px 0 0;
  font-size: 18px;
  line-height: 2;
  text-align: justify;
  text-justify: inter-character;
}

.p-history-message__button {
  display: flex;
  justify-content: flex-start;
  margin-top: var(--mt-50);
}

/* ========================================
   History Tree
======================================== */

.p-history-tree {
  position: relative;
}

.p-history-tree__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--tree-line-w) minmax(0, 1fr);
  column-gap: 0;
  overflow: visible;
}

.p-history-tree__line {
  position: absolute;
  top: 270px;
  bottom: 0;
  left: 50%;
  z-index: 0;
  width: var(--tree-line-w);
  background: var(--history-line);
  transform: translateX(-50%);
}

.p-history-tree__line::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  z-index: 1;
  width: 20px;
  height: 40px;
  background: url("/wp-content/themes/kawasakishokuhin2026/assets/img/history/history-tree__line-top.svg")
    no-repeat;
  background-size: 100%;
  transform: translateX(-15px);
}

.p-history-tree__decade {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  width: 100%;
  margin: 30px 0;
  margin-right: auto;
  margin-left: auto;
  padding: 0 20px;
  color: var(--history-gray);
  background: #fff;
  font-family: var(--font-en);
  font-size: 92px;
  font-weight: var(--fw-en-bold);
  text-align: center;
  letter-spacing: 0.01em;
}

.p-history-event {
  position: relative;
  z-index: 1;
  overflow: visible;
}

.p-history-event--left {
  grid-column: 1;
  justify-self: end;
  width: 100%;
  max-width: 420px;
  text-align: left;
}

.p-history-event--right {
  grid-column: 3;
  justify-self: start;
  width: 100%;
  max-width: 420px;
  text-align: left;
}

.p-history-event__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.p-history-event__year {
  opacity: 0;
  color: var(--history-accent);
  font-family: var(--font-en);
  font-size: 44px;
  font-weight: var(--fw-en-bold);
  letter-spacing: 0.01em;
  transition: opacity var(--t-reveal) var(--e-ease);
}

.p-history-event__year-suffix {
  margin-left: 6px;
  font-family: var(--font-ja);
  font-size: 22px;
}

.p-history-event__bar {
  flex: 1;
  height: 2px;
  background: var(--history-bar);
  transform: scaleX(0);
  transition: transform var(--t-reveal) var(--e-ease);
}

.p-history-event--left .p-history-event__bar {
  transform-origin: right;
}

.p-history-event--right .p-history-event__bar {
  flex: 0 0 var(--tree-bar-w);
  width: var(--tree-bar-w);
  transform-origin: left;
}

.p-history-event--mb46 {
  margin-bottom: var(--mb-46);
}

.p-history-event__media--mb46 {
  margin-bottom: var(--mb-46);
}

.p-history-event__label {
  opacity: 0;
  color: var(--history-text);
  font-size: 16px;
  line-height: 2;
  transition: opacity var(--t-reveal) var(--e-ease);
}

.p-history-event__text {
  margin-top: 0;
  opacity: 0;
  color: var(--history-text);
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.05em;
  transition: opacity var(--t-reveal) var(--e-ease);
}

.p-history-event__media {
  width: var(--media-w, auto);
  max-width: none;
  margin-top: 18px;
  opacity: 0;
  filter: blur(1.2px);
  transition:
    opacity 0.8s var(--e-smooth),
    filter 0.8s var(--e-smooth);
  will-change: opacity, filter;
}

.p-history-event__media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--history-radius-s);
}

.p-history-event__caption {
  margin-top: 10px;
  color: var(--history-text);
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: 0.1em;
}

.p-history-event__media.is-w336 {
  width: 336px;
}

.p-history-event__media.is-w280 {
  width: 280px;
}

.p-history-event__media.is-w183 {
  width: 183px;
}

.p-history-event--left .p-history-event__text,
.p-history-event--left .p-history-event__media {
  margin-right: var(--tree-side-gap);
}

.p-history-event--left .p-history-event__media {
  margin-left: auto;
  transform: translateX(calc(var(--media-bleed, 0px) * -1));
}

.p-history-event--right .p-history-event__text,
.p-history-event--right .p-history-event__media,
.p-history-event--right.p-history-event--nohead .p-history-event__year {
  margin-left: var(--tree-side-gap);
}

.p-history-event--right .p-history-event__media {
  margin-right: auto;
  transform: translateX(var(--media-bleed, 0px));
}

.p-history-event__media.is-gap60 {
  --media-gap: 60px;
}

.p-history-event__media.is-gap168 {
  --media-gap: 168px;
}

.p-history-event__media.is-gap200 {
  --media-gap: 200px;
}

.p-history-event--left .p-history-event__media {
  margin-right: var(--media-gap, var(--tree-side-gap));
}

.p-history-event--right .p-history-event__media {
  margin-left: var(--media-gap, var(--tree-side-gap));
}

.p-history-event--left .p-history-event__media.is-bleed80,
.p-history-event--right .p-history-event__media.is-bleed80 {
  --media-bleed: 80px;
}

.p-history-event--left .p-history-event__media.is-bleed160,
.p-history-event--right .p-history-event__media.is-bleed160 {
  --media-bleed: 160px;
}

.p-history-event.is-offset-50 {
  margin-top: 50px;
}

.p-history-event.is-offset-minus-50 {
  margin-top: -50px;
}

.p-history-event.is-offset-70 {
  margin-top: 70px;
}

.p-history-event.is-offset-100 {
  margin-top: 100px;
}

.p-history-event.is-offset-120 {
  margin-top: 120px;
}

.p-history-event.is-offset-minus-170 {
  margin-top: -170px;
}

.p-history-event.is-offset-220 {
  margin-top: 220px;
}

.p-history-event.is-offset-290 {
  margin-top: 290px;
}

.p-history-event.is-offset-330 {
  margin-top: 330px;
}

.p-history-event.is-offset-minus-370 {
  margin-top: -370px;
}

/* 1950 左 */
.p-history-event.is-offset-minus-400 {
  margin-top: -400px;
}

/* 1973 右 */
.p-history-event.is-offset-200 {
  margin-top: 200px;
}

/* 1979 左 */
.p-history-event.is-offset-minus-100 {
  margin-top: -100px;
}

/* 2014 左 */
.p-history-event.is-offset-40 {
  margin-top: 40px;
}

/* 2020 右 */
.p-history-event.is-offset-140 {
  margin-top: 140px;
}

.p-history-event__media.is-overlap-20 {
  position: relative;
  z-index: 2;
  margin-top: -20px;
}

.p-history-event.is-in .p-history-event__bar {
  transform: scaleX(1);
}

.p-history-event.is-in .p-history-event__year,
.p-history-event.is-in .p-history-event__label {
  opacity: 1;
  transition-delay: 0.25s;
}

.p-history-event.is-in .p-history-event__text {
  opacity: 1;
  transition-delay: 0.45s;
}

.p-history-event.is-in .p-history-event__media {
  opacity: 1;
  filter: blur(0);
  transition-delay: 0.65s;
}

.p-history-event.is-noanim .p-history-event__bar,
.p-history-event.is-noanim .p-history-event__year,
.p-history-event.is-noanim .p-history-event__label,
.p-history-event.is-noanim .p-history-event__text,
.p-history-event.is-noanim .p-history-event__media {
  transition-delay: 0s !important;
  transition-duration: 0s !important;
}

.p-history-event--nohead .p-history-event__bar {
  display: none;
}

.p-history-pair {
  display: contents;
}

/* ========================================
   Anniversary
======================================== */

.p-history-anniversary {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  justify-self: center;
  width: 1000px;
  max-width: 100%;
  padding: 70px;
  background: #fff;
  border: 4px solid var(--history-accent);
  border-radius: var(--history-radius-s);
}

.p-history-anniversary__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--tree-line-w) minmax(0, 1fr);
}

.p-history-anniversary__head {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: -40px;
}

.p-history-anniversary__head .p-history-event__bar {
  transform-origin: right;
}

.p-history-anniversary__line {
  position: absolute;
  top: -70px;
  bottom: 310px;
  left: 50%;
  z-index: 0;
  width: var(--tree-line-w);
  background: var(--history-accent);
  transform: translateX(-50%);
}

.p-history-anniversary__spacer {
  grid-column: 3;
}

.p-history-anniversary__logo {
  grid-column: 1 / -1;
  justify-self: center;
  width: 600px;
  margin-top: 40px;
}

.p-history-anniversary__logo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.p-history-anniversary__text {
  grid-column: 1 / -1;
  color: var(--history-text);
  font-size: 24px;
  line-height: 2;
  text-align: center;
}

.p-history-anniversary .p-history-event__year,
.p-history-anniversary .p-history-event__bar,
.p-history-anniversary__logo,
.p-history-anniversary__text {
  opacity: 0;
  transition: opacity var(--t-reveal) var(--e-ease);
}

.p-history-anniversary .p-history-event__bar {
  transform: scaleX(0);
  transition: transform var(--t-reveal) var(--e-ease);
}

.p-history-anniversary.is-in .p-history-event__bar {
  opacity: 1;
  transform: scaleX(1);
}

.p-history-anniversary.is-in .p-history-event__year {
  opacity: 1;
  transition-delay: 0.25s;
}

.p-history-anniversary.is-in .p-history-anniversary__logo {
  opacity: 1;
  transition-delay: 0.65s;
}

.p-history-anniversary.is-in .p-history-anniversary__text {
  opacity: 1;
  transition-delay: 0.85s;
}

/* ========================================
   Tree More
======================================== */

.p-history-tree__more {
  display: contents;
}

.p-history-tree__more[hidden] {
  display: none;
}

.p-history-tree__more-trigger {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin: 48px 0 56px;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.p-history-tree__more-trigger::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 300%;
  left: 0;
  z-index: 0;
  height: 450px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.72) 42%,
    rgba(255, 255, 255, 0.94) 72%,
    #fff 100%
  );
  transform: translateY(50%);
}

.p-history-tree__more-trigger.is-hidden {
  opacity: 0;
  height: 0;
  margin: 0;
}

.p-history-tree__more-btn {
  position: relative;
  z-index: 1;
  width: 180px;
  height: 40px;
  padding: 0 24px;
  color: var(--history-text);
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.08em;
  background: #fff;
  border: 1px solid var(--history-text);
  transition: opacity 0.5s ease;
}

.p-history-tree__more-btn:hover {
  opacity: 0.8;
}

.p-history-tree__more > * {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.p-history-tree__more.is-open > * {
  opacity: 1;
}

/* ========================================
   Topics
======================================== */

.p-history-topics__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: var(--mt-50);
}

.p-history-topics__grid[data-count="1"],
.p-history-topics__grid[data-count="2"] {
  justify-content: start;
}

.c-topic-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.c-topic-card__media {
  overflow: hidden;
  border-radius: var(--history-radius-s);
}

.c-topic-card__img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1);
  transition:
    transform 0.8s var(--e-zoom),
    filter 0.8s var(--e-zoom);
  will-change: transform;
}

.c-topic-card__link:hover .c-topic-card__img {
  filter: brightness(1.04);
  transform: scale(1.06);
}

.c-topic-card__date {
  display: block;
  margin-top: 12px;
  color: var(--history-text);
  font-size: 14px;
}

.c-topic-card__title {
  margin: 8px 0 0;
  color: var(--history-rule);
  font-size: 16px;
  line-height: 1.6;
}

.p-history-topics__button {
  display: flex;
  justify-content: center;
  margin-top: var(--mt-50);
}

.p-history-topics__button .c-linkbtn {
  color: var(--history-text);
  background: #fff;
  border: 1px solid var(--history-text);
}

/* ========================================
   Quiz
======================================== */

.p-history-quiz {
  overflow-x: clip;
}

.p-history-quiz--bg {
  margin-top: var(--section-gap);
  padding: var(--section-gap) 0;
  background: var(--history-accent);
}

.p-history-quiz__lead {
  max-width: 42em;
  margin: var(--mt-50) auto 0;
  color: var(--history-text);
  font-size: 20px;
  text-align: center;
}

.p-history-quiz__carousel {
  width: 100%;
  margin-top: var(--mt-50);
  overflow: visible;
}

#historyQuiz .splide__track {
  overflow: visible;
}

#historyQuiz .splide__slide {
  width: 616px;
  flex-shrink: 0;
}

.p-quiz-card {
  position: relative;
  min-height: 610px;
  padding: var(--mt-50);
  overflow: hidden;
  isolation: isolate;
  background: #f4f4f2;
  border-radius: var(--history-radius-s);
  transform: translateZ(0);
}

.p-quiz-card__head {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: start;
  justify-content: space-between;
  column-gap: 40px;
}

.p-quiz-card__dots {
  position: absolute;
  top: 50px;
  left: 50px;
  z-index: 3;
  display: flex;
  gap: 12px;
}

.p-quiz-card__dot {
  width: 12px;
  height: 12px;
  background: #cccccc;
  border-radius: 50%;
}

.p-quiz-card__dot--active {
  background: var(--history-accent);
}

.p-quiz-card__qno {
  margin-top: 40px;
  color: var(--history-text);
  font-size: 85px;
  font-weight: var(--font-weight-bold);
  line-height: 1;
}

.p-quiz-card__question {
  color: var(--history-text);
  font-size: 20px;
  line-height: 1.8;
}

.p-quiz-card__choices {
  display: grid;
  row-gap: 10px;
  margin-top: var(--mt-50);
}

.p-quiz-choice {
  display: grid;
  grid-template-columns: 66px 1fr;
  height: 66px;
}

.p-quiz-choice__key {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--history-text);
  font-size: 24px;
  background: var(--history-accent);
}

.p-quiz-choice__text {
  display: flex;
  align-items: center;
  height: 66px;
  padding-left: 20px;
  overflow: hidden;
  color: var(--history-text);
  font-size: 17px;
  line-height: 1.6;
  background: #fff;
}

.js-quiz-open {
  display: block;
  margin: var(--mt-50) auto 0;
}

.p-quiz-face {
  position: absolute;
  inset: 0;
  padding: var(--mt-50);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: #f4f4f2;
  border-radius: var(--history-radius-s);
  backface-visibility: hidden;
  transform: translateZ(0);
  transition:
    opacity 0.4s var(--e-ease),
    visibility 0.4s var(--e-ease);
  will-change: opacity;
}

.p-quiz-face .c-linkbtn {
  color: var(--history-text);
  background: #fff;
  border: 1px solid var(--history-text);
}

.p-quiz-face--question {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.p-quiz-answer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 69px;
}

.p-quiz-answer__label {
  font-size: 46px;
}

.p-quiz-answer__key {
  color: var(--history-accent);
  font-size: 85px;
  font-weight: var(--fw-bold);
  line-height: 1;
}

.p-quiz-answer__rule {
  height: 0;
  margin-top: 35px;
  border-top: 2px solid var(--history-rule);
}

.p-quiz-answer__grid {
  display: grid;
  grid-template-columns: 1fr 234px;
  align-items: start;
  gap: 40px;
  margin-top: var(--mb-46);
}

.p-quiz-answer__text {
  color: var(--history-text);
  font-size: 18px;
  line-height: 2;
}

.p-quiz-answer__media img {
  display: block;
  width: 234px;
  height: auto;
}

.p-quiz-answer__button {
  display: flex;
  justify-content: center;
  margin-top: 41px;
}

.c-linkbtn--quiz {
  height: 68px;
}

.c-linkbtn--quiz .c-linkbtn__label {
  font-size: 20px;
}

#historyQuiz .splide__arrow {
  width: 48px;
  height: 48px;
  opacity: 1;
  background: transparent;
  border: none;
  box-shadow: none;
}

#historyQuiz .splide__arrow svg {
  display: none;
}

#historyQuiz .splide__arrow--prev {
  background: url("/wp-content/themes/kawasakishokuhin2026/assets/img/history/quiz-arrow-prev-icon.svg")
    no-repeat center;
  background-size: contain;
}

#historyQuiz .splide__arrow--next {
  background: url("/wp-content/themes/kawasakishokuhin2026/assets/img/history/quiz-arrow-next-icon.svg")
    no-repeat center;
  background-size: contain;
}

#historyQuiz .splide__arrow:hover {
  opacity: 0.7;
}

#historyQuiz .splide__arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ========================================
   Quiz Modal
======================================== */

.p-quiz-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  opacity: 0;
}

.p-quiz-modal.is-open {
  display: block;
  opacity: 1;
  animation: quizModalFadeIn 0.5s var(--e-ease) forwards;
}

.p-quiz-modal.is-closing {
  display: block;
  opacity: 0;
  animation: quizModalFadeOut 0.5s var(--e-ease) forwards;
}

@keyframes quizModalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes quizModalFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.p-quiz-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.p-quiz-modal__dialog {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 40px 24px;
}

.p-quiz-modal__card {
  position: relative;
  width: min(100%, 615px);
  min-height: auto;
  margin: 0;
}

.p-quiz-modal__answer {
  position: relative;
  inset: auto;
  padding: 0;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  background: transparent;
  border-radius: 0;
}

.p-quiz-modal .p-quiz-card__dots {
  position: absolute;
  top: 50px;
  left: 50px;
}

.p-quiz-modal .p-quiz-card {
  min-height: 0;
}

.p-quiz-modal .p-quiz-answer__media img {
  display: block;
  width: 234px;
  max-width: 100%;
  height: auto;
}

/* modal back button */

.p-quiz-modal .c-linkbtn--quiz {
  justify-content: center;
}

.p-quiz-modal .c-linkbtn--quiz::before,
.p-quiz-modal .c-linkbtn--quiz::after,
.p-quiz-modal .c-linkbtn__label::before,
.p-quiz-modal .c-linkbtn__label::after,
.p-quiz-modal .c-arrow-hover::before,
.p-quiz-modal .c-arrow-hover::after {
  content: none !important;
}

.p-quiz-modal .c-linkbtn__label {
  display: inline;
  width: 100%;
  text-align: center;
}

.p-quiz-modal .c-arrow-parent {
  background-image: none !important;
}

/* ========================================
   Banner
======================================== */

.p-history-banner__title {
  margin: 0;
  font-size: 36px;
  text-align: center;
}

.p-history-banner__title-inner {
  position: relative;
  display: inline-block;
  padding: 0 71px;
  color: var(--history-text);
}

.p-history-banner__title-inner::before,
.p-history-banner__title-inner::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 21px;
  height: 45px;
  background-repeat: no-repeat;
  background-size: 21px 45px;
  transform: translateY(-50%);
}

.p-history-banner__title-inner::before {
  left: 0;
  background-image: url("/wp-content/themes/kawasakishokuhin2026/assets/img/history/banner-title-l-icon.svg");
}

.p-history-banner__title-inner::after {
  right: 0;
  background-image: url("/wp-content/themes/kawasakishokuhin2026/assets/img/history/banner-title-r-icon.svg");
}

.p-history-banner__list {
  display: grid;
  gap: 36px;
  margin-top: var(--mb-46);
}

.p-history-banner__item {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 36px;
  color: #ffffff;
  text-decoration: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: var(--history-radius-m);
}

.p-history-banner__item:nth-of-type(1) {
  background-image: url("/wp-content/themes/kawasakishokuhin2026/assets/img/history/banner01-bg.jpg");
}

.p-history-banner__item:nth-of-type(2) {
  background-image: url("/wp-content/themes/kawasakishokuhin2026/assets/img/history/banner02-bg.jpg");
}

.p-history-banner__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--history-accent);
  opacity: 0.4;
  transition: opacity 0.5s var(--e-ease);
}

.p-history-banner__head,
.p-history-banner__button {
  position: relative;
  z-index: 1;
}

.p-history-banner__name {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
}

.p-history-banner__en {
  margin: 10px 0 0;
  font-size: 14px;
}

.p-history-banner__button {
  display: flex;
  justify-content: flex-end;
  margin-top: 40px;
}

.p-history-banner__button .c-linkbtn {
  width: 200px;
  height: 42px;
  color: var(--color-btn-text);
  background: var(--color-btn-bg);
  border: 1px solid #ffffff;
  opacity: 0.8;
}

.p-history-banner__item:hover .p-history-banner__button .c-linkbtn {
  color: var(--color-btn-text);
  background: var(--color-btn-bg);
  border: none;
  opacity: 0.8;
}

.p-history-banner__item:hover .p-history-banner__overlay {
  opacity: 1;
}

.c-linkbtn--invert {
  transition:
    border-color 0.5s var(--e-ease),
    color 0.5s var(--e-ease),
    background-color 0.5s var(--e-ease);
}

.c-linkbtn--invert .c-linkbtn__label {
  color: var(--history-text);
  transition: color 0.5s var(--e-ease);
}

.c-linkbtn--invert .c-linkbtn__label::after {
  transition: background-image 0.5s var(--e-ease);
}

.p-history-banner__item:hover .c-linkbtn--invert {
  color: #ffffff;
  background: transparent;
  border-color: #ffffff;
}

/* ========================================
   Pair Reveal Fix
======================================== */

.p-history-pair.is-in .p-history-event__bar {
  transform: scaleX(1);
}

.p-history-pair.is-in .p-history-event__year,
.p-history-pair.is-in .p-history-event__label {
  opacity: 1;
  transition-delay: 0.25s;
}

.p-history-pair.is-in .p-history-event__text {
  opacity: 1;
  transition-delay: 0.45s;
}

.p-history-pair.is-in .p-history-event__media {
  opacity: 1;
  filter: blur(0);
  transition-delay: 0.65s;
}

/* ========================================
   Tablet: 768 - 1023
======================================== */

@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --tree-side-gap: 28px;
    --tree-bar-w: 34px;
    --tree-line-w: 10px;

    --mv-logo-w: 260px;
    --mv-rule-w: 64px;
    --mv-spacer-h: 560px;
    --mv-img-scale: 0.75;
  }

  .c-sectionhead__jp {
    font-size: 16px;
  }

  .p-history .l-section {
    margin-top: 60px;
  }

  .p-history-tree {
    margin-top: 60px !important;
  }

  .p-history-intro .l-content,
  .p-history-topics .l-content,
  .p-history-banner .l-content {
    width: min(100% - 80px, var(--content));
    margin-inline: auto;
  }

  .p-history-intro__grid {
    width: 100%;
    gap: 28px;
    margin-top: 36px;
  }

  .p-history-mv__imgs--pc {
    display: block;
    transform: scale(0.9);
    transform-origin: top center;
  }

  .p-history-mv__sp-top,
  .p-history-mv__sp-inline {
    display: none !important;
  }

  .p-history-mv__imgs {
    position: relative;
    top: auto;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 1200px;
    height: 860px;
    margin: 0 auto;
    overflow: visible;
  }

  .p-history-mv__stage {
    min-height: 860px;
    padding-bottom: 0;
  }

  .p-history-mv__content {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 88px;
    pointer-events: none;
    transform: scale(0.7);
    transform-origin: top center;
  }

  .p-history-mv__spacer {
    display: none;
  }

  .p-history-mv__rule {
    display: block;
    width: var(--mv-rule-w);
    height: var(--mv-rule-h, 2px);
    margin-top: 36px;
    background: var(--history-rule);
  }

  .p-history-mv__title {
    margin-top: 36px;
  }

  .p-history-mv__lead {
    margin-top: 28px;
  }

  .p-history-mv__img:nth-of-type(1) {
    top: 6%;
  }

  .p-history-mv__img:nth-of-type(2) {
    top: 22%;
  }

  .p-history-mv__img:nth-of-type(3) {
    top: 31%;
  }

  .p-history-mv__img:nth-of-type(4) {
    top: 48%;
  }

  .p-history-mv__img:nth-of-type(5) {
    top: 66%;
  }

  .p-history-mv__img:nth-of-type(6) {
    top: 72%;
  }

  .p-history-mv__img:nth-of-type(7) {
    top: 3%;
  }

  .p-history-mv__img:nth-of-type(8) {
    top: 18%;
  }

  .p-history-mv__img:nth-of-type(9) {
    top: 34%;
  }

  .p-history-mv__img:nth-of-type(10) {
    top: 58%;
  }

  .p-history-mv__img:nth-of-type(11) {
    top: 74%;
  }

  .p-history-mv__img:nth-of-type(-n + 6) {
    transform: translateX(-40px);
  }

  .p-history-message--bg {
    overflow: visible;
    margin-top: 60px;
    padding: 60px 0;
  }

  .p-history-message--bg .l-content {
    display: grid;
    grid-template-columns: 1fr;
  }

  .p-history-message__body {
    display: grid;
    grid-template-columns: 1fr;
    width: min(100% - 80px, var(--content));
    margin-inline: auto;
  }

  .p-history-message__title {
    margin: 0;
    font-size: 22px;
    line-height: 1.8;
  }

  .p-history-message__text {
    width: 100%;
    max-width: none;
    margin: 20px 0 0;
    font-size: 15px;
    line-height: 2;
  }

  .p-history-message__bg {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    justify-content: center;
    width: 100%;
    height: auto;
    margin-top: 36px;
    order: 3;
    transform: none;
  }

  .p-history-message__bg-img {
    width: min(420px, 90vw);
    height: auto;
  }

  .p-history-message__button {
    margin: 50px auto 0;
    order: 4;
  }

  .p-history-tree .l-content {
    padding-inline: 24px;
  }

  .p-history-tree__inner {
    grid-template-columns: minmax(0, 1fr) var(--tree-line-w) minmax(0, 1fr);
  }

  .p-history-tree__line {
    top: 170px;
    width: var(--tree-line-w);
  }

  .p-history-tree__line::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    width: 20px;
    height: 40px;
    transform: translateX(-15px);
  }

  .p-history-tree__decade {
    margin: 30px 0;
    font-size: 56px;
  }

  .p-history-event--left {
    max-width: 310px;
  }

  .p-history-event--right {
    max-width: 330px;
  }

  .p-history-event--right .p-history-event__bar {
    flex: 0 0 var(--tree-bar-w);
    width: var(--tree-bar-w);
  }

  .p-history-event__media {
    width: min(var(--media-w, 100%), 100%);
    max-width: 100%;
  }

  .p-history-event__media.is-w336 {
    width: min(280px, 100%);
  }

  .p-history-event__media.is-w280 {
    width: min(240px, 100%);
  }

  .p-history-event__media.is-w183 {
    width: min(160px, 100%);
  }

  .p-history-event--left .p-history-event__media.is-bleed160 {
    --media-bleed: 80px;
  }

  .p-history-event__media.is-gap200 {
    --media-bleed: 60px;
  }

  .p-history-event--left .p-history-event__text,
  .p-history-event--left .p-history-event__media {
    margin-right: var(--tree-side-gap);
  }

  .p-history-event--right .p-history-event__text,
  .p-history-event--right .p-history-event__media,
  .p-history-event--right.p-history-event--nohead .p-history-event__year {
    margin-left: 50px;
  }

  .p-history-event__year {
    font-size: 36px;
  }

  .p-history-event__year-suffix {
    margin-left: 6px;
    font-size: 18px;
  }

  .p-history-event__text {
    font-size: 15px;
  }

  .p-history-anniversary {
    width: 900px;
    padding: 50px;
  }

  .p-history-anniversary__logo {
    width: 520px;
  }

  .p-history-anniversary__line {
    position: absolute;
    top: -53px;
    bottom: 280px;
    left: 50%;
    z-index: 0;
    width: var(--tree-line-w);
    background: var(--history-accent);
    transform: translateX(-50%);
  }

  .p-history-anniversary.is-in .p-history-anniversary__text {
    font-size: 21px;
  }

  .p-history-topics__grid {
    gap: 24px;
    margin-top: 36px;
  }

  #historyQuiz .splide__track {
    overflow: visible;
    padding-right: 64px !important;
    padding-left: 64px !important;
  }

  #historyQuiz .splide__slide {
    width: 520px;
  }

  #historyQuiz .splide__arrow--next {
    right: 0;
  }

  #historyQuiz .splide__arrow--prev {
    left: 0;
  }

  .p-quiz-card {
    width: min(100%, 608px);
    min-height: 610px;
    padding: var(--mt-50);
    background: #f4f4f2;
    border-radius: var(--history-radius-s);
  }

  .p-quiz-card__dots {
    top: var(--mt-50);
    left: var(--mt-50);
  }

  .p-quiz-answer__grid {
    grid-template-columns: 1fr 234px;
    gap: 40px;
  }

  .p-quiz-answer__media img {
    width: 234px;
  }

  .p-history-banner__item {
    padding: 28px;
  }
}

/* ========================================
   SP: max 767
======================================== */

@media (max-width: 767px) {
  :root {
    --quiz-pad: 24px;
    --quiz-radius: 6px;
    --quiz-head-col: 96px;
    --quiz-head-gap: 16px;
    --quiz-dot: 10px;
    --quiz-dot-gap: 10px;
    --quiz-choice-h: 40px;
    --quiz-choice-key: 43px;
    --quiz-answer-media: 160px;
    --quiz-arrow: 40px;

    --tree-line-x: 10px;
    --tree-line-w: 10px;
    --tree-gap: 18px;
    --tree-bar: 46px;
  }

  .p-history .l-section {
    margin-top: var(--space-4xl);
  }

  .p-history-tree {
    margin-top: 70px !important;
  }

  .p-history-mv__sp-top,
  .p-history-mv__title,
  .p-history-mv__rule,
  .p-history-mv__lead,
  .p-history-mv__sp-inline {
    opacity: 0;
    transition: opacity var(--t-fade) var(--e-ease);
    will-change: opacity;
  }

  .p-history-mv__sp-top.is-show,
  .p-history-mv__title.is-show,
  .p-history-mv__rule.is-show,
  .p-history-mv__lead.is-show,
  .p-history-mv__sp-inline.is-show {
    opacity: 1;
  }

  .p-history-mv__sp-img {
    opacity: 0;
    transition: opacity var(--t-fade-long) var(--e-ease);
  }

  .p-history-mv__sp-img.is-show {
    opacity: 1;
  }

  .p-history-mv__stage {
    min-height: auto;
  }

  .p-history-mv__spacer {
    height: 0;
  }

  .p-history-mv__imgs--pc {
    display: none;
  }

  .p-history-mv__content {
    position: relative;
    inset: auto;
    margin-top: -40px;
    padding: 0 var(--gutter);
    pointer-events: none;
  }

  .p-history-mv__sp-top {
    position: relative;
    display: block;
    width: 100%;
    height: 217px;
    padding: 0 var(--gutter);
  }

  .p-history-mv__sp-inline {
    position: relative;
    display: block;
    width: 100%;
    height: 225px;
    margin-top: 40px;
    margin-bottom: 74px;
  }

  .p-history-mv__sp-img {
    position: absolute;
    display: block;
    overflow: hidden;
    border-radius: var(--history-radius-m);
  }

  .p-history-mv__sp-top .p-history-mv__sp-img:nth-child(1) {
    top: 20px;
    left: 0;
    width: 150px;
  }

  .p-history-mv__sp-top .p-history-mv__sp-img:nth-child(2) {
    top: 134px;
    left: 16px;
    width: 55px;
  }

  .p-history-mv__sp-top .p-history-mv__sp-img:nth-child(3) {
    top: 0;
    right: 16px;
    width: 136px;
  }

  .p-history-mv__sp-top .p-history-mv__sp-img:nth-child(4) {
    top: 88px;
    left: 120px;
    width: 98px;
  }

  .p-history-mv__sp-top .p-history-mv__sp-img:nth-child(5) {
    top: 104px;
    right: 16px;
    width: 74px;
  }

  .p-history-mv__sp-inline .p-history-mv__sp-img:nth-child(1) {
    top: 46px;
    left: 54px;
    width: 144px;
  }

  .p-history-mv__sp-inline .p-history-mv__sp-img:nth-child(2) {
    top: 0;
    left: 0;
    width: 90px;
  }

  .p-history-mv__sp-inline .p-history-mv__sp-img:nth-child(3) {
    top: 146px;
    left: 16px;
    width: 115px;
  }

  .p-history-mv__sp-inline .p-history-mv__sp-img:nth-child(4) {
    top: 0;
    right: 40px;
    width: 114px;
  }

  .p-history-mv__sp-inline .p-history-mv__sp-img:nth-child(5) {
    top: 149px;
    left: 210px;
    width: 115px;
  }

  .p-history-mv__sp-inline .p-history-mv__sp-img:nth-child(6) {
    top: 89px;
    right: 0;
    width: 115px;
  }

  .p-history-mv__logo {
    width: 154px;
  }

  .p-history-mv__rule {
    width: 58px;
    margin-top: 32px;
  }

  .p-history-mv__title {
    margin-top: 34px;
    font-size: 22px;
  }

  .p-history-mv__lead {
    margin-top: 34px;
    font-size: 14px;
    line-height: 2.4;
  }

  .p-history-intro__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    width: min(100% - (var(--gutter) * 2), var(--content));
    margin-inline: auto;
  }

  .p-history-intro__title {
    font-size: 20px;
  }

  .p-history-intro__text > * + * {
    margin-top: 36px;
    font-size: 14px;
  }

  .p-history-message--bg {
    overflow: visible;
    margin-top: var(--space-4xl);
    padding: var(--space-4xl) 0;
  }

  .p-history-message--bg .l-content {
    display: grid;
    grid-template-columns: 1fr;
  }

  .p-history-message__body {
    display: grid;
    grid-template-columns: 1fr;
    width: min(100% - (var(--gutter) * 2), var(--content));
    margin-inline: auto;
  }

  .p-history-message__title {
    margin: 0;
    font-size: 20px;
    line-height: 1.8;
  }

  .p-history-message__text {
    width: 100%;
    max-width: none;
    margin: 20px 0 0;
    font-size: 14px;
    line-height: 2;
  }

  .p-history-message__bg {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    justify-content: center;
    width: 100%;
    height: auto;
    margin-top: 32px;
    order: 3;
    transform: none;
  }

  .p-history-message__bg-img {
    width: min(320px, 90vw);
    height: auto;
  }

  .p-history-message__button {
    margin: 40px auto 0;
    order: 4;
  }

  .p-history-topics__grid {
    grid-template-columns: 1fr;
    gap: 12px;
    width: min(100% - (var(--gutter) * 2), var(--content));
    margin-inline: auto;
  }

  .p-history-topics__grid[data-count="1"],
  .p-history-topics__grid[data-count="2"] {
    justify-content: initial;
  }

  .c-topic-card__link {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: start;
    column-gap: 16px;
  }

  .c-topic-card__media {
    width: 100%;
    border-radius: var(--history-radius-s);
  }

  .c-topic-card__date {
    margin-top: 0;
    font-size: 12px;
  }

  .c-topic-card__title {
    display: -webkit-box;
    margin: 6px 0 0;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.6;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .c-sectionhead__en {
    font-size: 46px;
  }

  .c-sectionhead__jp {
    margin: 10px 0 0;
    font-size: 14px;
  }

  .p-history-quiz__lead {
    margin: 24px auto 0;
    font-size: 14px;
    text-align: center;
    letter-spacing: 0.05em;
  }

  .p-history-quiz--bg {
    margin-top: var(--space-4xl);
    padding: var(--space-4xl) 16px;
  }

  .p-history-quiz__carousel {
    width: 100%;
    margin-top: 32px;
  }

  #historyQuiz .splide__track {
    overflow: hidden;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  #historyQuiz .splide__slide {
    width: min(630px, calc(100vw - 32px));
    max-width: 100%;
  }

  .p-quiz-card {
    display: grid;
    min-height: unset;
    max-height: 350px;
    padding: 0;
    overflow: hidden;
    background: #f4f4f2;
    border-radius: var(--quiz-radius);
  }

  .p-quiz-face {
    position: relative;
    inset: auto;
    grid-area: 1 / 1;
    padding: var(--quiz-pad);
    border-radius: var(--quiz-radius);
  }

  .p-quiz-card__head {
    grid-template-columns: var(--quiz-head-col) 1fr;
    column-gap: var(--quiz-head-gap);
  }

  .p-quiz-card__dots {
    top: var(--quiz-pad);
    left: var(--quiz-pad);
    gap: var(--quiz-dot-gap);
  }

  .p-quiz-card__dot {
    width: var(--quiz-dot);
    height: var(--quiz-dot);
  }

  .p-quiz-card__qno {
    margin-top: 20px;
    font-size: 50px;
  }

  .p-quiz-card__question {
    font-size: 12px;
    line-height: 1.75;
  }

  .p-quiz-card__choices {
    margin-top: 28px;
    row-gap: 6px;
  }

  .p-quiz-choice {
    grid-template-columns: var(--quiz-choice-key) 1fr;
    height: var(--quiz-choice-h);
  }

  .p-quiz-choice__key {
    font-size: 14px;
  }

  .p-quiz-choice__text {
    height: var(--quiz-choice-h);
    padding-left: 14px;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.1em;
    text-overflow: ellipsis;
  }

  .js-quiz-open {
    margin: 26px auto 0;
  }

  .p-quiz-answer__head {
    align-items: center;
    gap: 16px;
    margin-top: 40px;
  }

  .p-quiz-answer__label {
    font-size: 28px;
  }

  .p-quiz-answer__key {
    font-size: 50px;
  }

  .p-quiz-answer__rule {
    margin-top: 20px;
  }

  .p-quiz-answer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
  }

  .p-quiz-answer__text {
    font-size: 12px;
    line-height: 1.8;
    text-align: justify;
    letter-spacing: 0.15em;
  }

  .p-quiz-answer__media img {
    width: 100%;
    max-width: var(--quiz-answer-media);
    margin: 0 auto;
  }

  .p-quiz-answer__button {
    margin-top: 24px;
  }

  .c-linkbtn--quiz {
    height: 42px;
  }

  .c-linkbtn--quiz .c-linkbtn__label {
    font-size: 14px;
  }

  #historyQuiz .splide__arrow {
    width: 12px;
    height: 40px;
  }

  #historyQuiz .splide__arrow--next {
    right: -21px;
  }

  #historyQuiz .splide__arrow--prev {
    left: -21px;
  }

  .p-quiz-modal__dialog {
    padding: 16px;
  }

  .p-quiz-modal__card {
    width: min(630px, calc(100vw - 64px));
    min-height: unset;
    max-height: unset;
    padding: 0;
    overflow: hidden;
    background: #f4f4f2;
    border-radius: var(--quiz-radius);
  }

  .p-quiz-modal .p-quiz-modal__answer {
    position: relative;
    inset: auto;
    padding: var(--quiz-pad);
    background: transparent;
    border-radius: var(--quiz-radius);
  }

  .p-quiz-modal .p-quiz-card__dots {
    top: var(--quiz-pad);
    left: var(--quiz-pad);
    gap: var(--quiz-dot-gap);
  }

  .p-quiz-modal .p-quiz-card__dot {
    width: var(--quiz-dot);
    height: var(--quiz-dot);
  }

  .p-quiz-modal .p-quiz-answer__head {
    align-items: center;
    gap: 16px;
    margin-top: 40px;
  }

  .p-quiz-modal .p-quiz-answer__label {
    font-size: 28px;
  }

  .p-quiz-modal .p-quiz-answer__key {
    font-size: 50px;
  }

  .p-quiz-modal .p-quiz-answer__rule {
    margin-top: 20px;
  }

  .p-quiz-modal .p-quiz-answer__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 16px;
    margin-top: 24px;
  }

  .p-quiz-modal .p-quiz-answer__text {
    font-size: 12px;
    line-height: 1.8;
    text-align: justify;
    letter-spacing: 0.15em;
  }

  .p-quiz-modal .p-quiz-answer__media {
    margin: 0;
  }

  .p-quiz-modal .p-quiz-answer__media img {
    display: block;
    width: 100%;
    max-width: var(--quiz-answer-media);
    margin: 0 auto;
  }

  .p-quiz-modal .p-quiz-answer__button {
    margin-top: 24px;
  }

  .p-quiz-modal .c-linkbtn--quiz {
    width: 120px;
    max-width: none;
    height: 42px;
  }

  .p-quiz-modal .c-linkbtn--quiz .c-linkbtn__label {
    font-size: 14px;
  }

  .p-history-banner__title {
    font-size: 18px;
  }

  .p-history-banner__title-inner {
    padding: 0 30px;
  }

  .p-history-banner__title-inner::before,
  .p-history-banner__title-inner::after {
    width: 10px;
    height: 28px;
    background-size: 10px 28px;
  }

  .p-history-banner__list {
    display: grid;
    gap: 18px;
    margin-top: 20px;
  }

  .p-history-banner__item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 16px;
    padding: 16px;
  }

  .p-history-banner__head {
    align-self: start;
  }

  .p-history-banner__name {
    font-size: 22px;
  }

  .p-history-banner__en {
    margin: 0;
    font-size: 12px;
  }

  .p-history-banner__button {
    align-self: center;
    justify-content: flex-end;
    margin-top: 30px;
  }

  .p-history-banner__button .c-linkbtn {
    width: 148px;
  }

  .p-history-banner__button .c-linkbtn__label {
    width: 110px;
  }

  .p-history-tree__inner {
    grid-template-columns: calc(var(--tree-line-x) * 2) minmax(0, 1fr);
  }

  .p-history-tree__line {
    top: 140px;
    left: var(--tree-line-x);
    width: var(--tree-line-w);
    transform: none;
  }

  .p-history-tree__line::before {
    top: -24px;
    left: 40%;
    transform: translateX(-70%);
  }

  .p-history-tree__decade {
    width: auto;
    margin: 0 0 30px;
    padding: 0;
    font-size: 60px;
    line-height: 1.8;
    text-align: left;
  }

  .p-history-event--left,
  .p-history-event--right {
    grid-column: 2;
    justify-self: stretch;
    width: 100%;
    max-width: none;
    margin-bottom: 30px;
  }

  .p-history-event[class*="is-offset"] {
    margin-top: 0 !important;
    transform: none !important;
  }

  .p-history-event__head {
    gap: 12px;
    line-height: 1.8;
  }

  .p-history-event__bar {
    order: 1;
    flex: 0 0 var(--tree-bar);
    width: var(--tree-bar);
    transform-origin: left;
  }

  .p-history-event--left .p-history-event__bar {
    transform-origin: left;
  }

  .p-history-event__year,
  .p-history-event__label {
    order: 2;
    font-size: 14px;
  }

  .p-history-event__year {
    margin-left: 0 !important;
    font-size: 34px;
  }

  .p-history-event__year-suffix {
    margin-left: 2px;
    font-size: 16px;
  }

  .p-history-event--left .p-history-event__text,
  .p-history-event--left .p-history-event__media {
    margin-right: auto;
    margin-left: 60px;
  }

  .p-history-event--right .p-history-event__media {
    margin-left: 60px;
  }

  .p-history-event__text {
    font-size: 14px;
  }

  .p-history-event__caption {
    margin-top: 6px;
    font-size: 12px;
  }

  .p-history-event__media.is-bleed80,
  .p-history-event__media.is-bleed160,
  .p-history-event__media.is-overlap-20,
  .p-history-event__media.is-gap168,
  .p-history-event__media.is-gap200 {
    margin-right: 0 !important;
    transform: none !important;
  }

  .p-history-event__media.is-w336 {
    width: 278px;
  }

  .p-history-event__media.is-w280 {
    width: 222px;
  }

  .p-history-event__media.is-w183 {
    width: 146px;
  }

  .p-history-event__media.is-sp-w200 {
    width: 200px;
  }

  .p-history-event__media.is-sp-w200.is-sp-mr0 {
    margin-left: 138px;
  }

  .p-history-event__media.is-w280.is-sp-mr0 {
    margin-left: 116px;
  }

  .p-history-event.is-sp-nobar .p-history-event__bar {
    visibility: hidden;
  }

  .p-history-event--nohead .p-history-event__bar {
    display: inline;
  }

  .p-history-pair {
    display: flex;
    flex-direction: column;
    gap: 0;
    grid-column: 2;
  }

  .p-history-pair .p-history-event {
    width: 100%;
    max-width: none;
  }

  .p-history-pair .is-sp-order-1 {
    order: 1;
    margin-bottom: 0;
  }

  .p-history-pair .is-sp-order-2 {
    order: 2;
  }

  .p-history-anniversary {
    width: 100vw;
    max-width: unset;
    padding: 30px;
  }

  .p-history-anniversary__head {
    width: 170px;
    gap: 10px;
    margin-top: -5px;
  }

  .p-history-anniversary__head .p-history-event__bar {
    transform-origin: left;
  }

  .p-history-anniversary__line {
    top: -30px;
    bottom: 174px;
    left: -8px;
    width: var(--tree-line-w);
    transform: none;
  }

  .p-history-anniversary__logo {
    width: 277px;
    margin-top: 20px;
  }

  .p-history-anniversary__text {
    font-size: 16px;
  }
}

/* ========================================
   Large Desktop Image Position Fix
======================================== */

@media (min-width: 1024px) and (max-width: 1199px) {
  .p-history-mv {
    --mv-img-scale: 0.9;
  }
}

@media (min-width: 1200px) {
  .p-history-mv__img:nth-of-type(1) {
    left: 60px;
  }

  .p-history-mv__img:nth-of-type(2) {
    left: -12px;
  }

  .p-history-mv__img:nth-of-type(3) {
    left: 228px;
  }

  .p-history-mv__img:nth-of-type(4) {
    left: 84px;
  }

  .p-history-mv__img:nth-of-type(5) {
    left: 24px;
  }

  .p-history-mv__img:nth-of-type(6) {
    left: 192px;
  }

  .p-history-mv__img:nth-of-type(7) {
    left: 960px;
  }

  .p-history-mv__img:nth-of-type(8) {
    left: 888px;
  }

  .p-history-mv__img:nth-of-type(9) {
    left: 936px;
  }

  .p-history-mv__img:nth-of-type(10) {
    left: 1044px;
  }

  .p-history-mv__img:nth-of-type(11) {
    left: 900px;
  }
}
