.comparison {
  width: 650px;
  height: 1150px;
  margin-bottom: 80px;
  background: #fff;
}

.comparison .c-overlap {
  position: relative;
  width: 650px;
  height: 1150px;
  background-color: #ffffff;
  box-shadow: 0px 0px 3px #00000040;
}

#comparison {
  font-family: "Noto Serif JP", Helvetica;
  font-weight: bold;
  color: #000000;
  font-size: 18px;
  text-align: center;
  letter-spacing: 1.28px;
  white-space: nowrap;
  padding-top: 50px;
}
@media screen and (max-width: 480px) {
  #comparison {
    font-size: 24px!important;
    font-weight: 600!important;
  }
}

.comparison .c-table {
  position: absolute;
  width: 600px;
  height: 475px;
  top: 96px;
  left: 25px;
}

.comparison .c-overlap-group {
  position: relative;
  width: 608px;
  height: 475px;
}

/* ========== button ========== */
.c-button-wrapper {
  position: absolute;
  width: 165px;
  height: 52px;
  top: 423px;
  background-color: #ffffff;
  border: 1px solid;
  border-color: #dddddd;
}
.c-button-wrapper.button-1 {
  left: 107px!important;
}
.c-button-wrapper.button-2 {
  left: 271px!important;
}
.c-button-wrapper.button-3 {
  left: 435px!important;
}

.c-button-wrapper a {
  font-family: "Noto Serif JP", Helvetica;
  display: inline-block;
  font-size: 14px;
  padding: 7% 20%;
  color: #fff;
  background-color: #595757;
  text-align: center;
  margin: 4%;
  white-space: nowrap;
}
.c-button-wrapper a:hover {
  opacity: 0.8;
}
/* ============================= */

.comparison .c-rectangle {
  width: 108px;
  height: 52px;
  top: 423px;
  background-color: #ffffff;
  border: 1px solid;
  border-color: #dddddd;
  position: absolute;
  left: 0;
}

.comparison .c-overlap-wrapper {
  position: absolute;
  width: 167px;
  height: 52px;
  top: 372px;
  left: 435px;
}

.comparison .c-element-wrapper {
  position: relative;
  width: 165px;
  height: 52px;
  background-color: #ffffff;
  border: 1px solid;
  border-color: #dddddd;
}

.comparison .c-element {
  top: 11px;
  left: 50px;
  color: #000000;
  font-size: 16px;
  letter-spacing: 0.96px;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  line-height: normal;
}

.comparison .c-text-wrapper {
  letter-spacing: 0.15px;
}

.comparison .c-span {
  font-size: 24px;
  letter-spacing: 0.35px;
}

.comparison .c-group-2 {
  position: absolute;
  width: 167px;
  height: 52px;
  top: 372px;
  left: 271px;
}

.comparison .c-group-3 {
  position: absolute;
  width: 167px;
  height: 52px;
  top: 372px;
  left: 107px;
}

.comparison .c-group-4 {
  position: absolute;
  width: 110px;
  height: 52px;
  top: 372px;
  left: 0;
}

.comparison .c-overlap-2 {
  position: relative;
  width: 108px;
  height: 52px;
  background-color: #ffffff;
  border: 1px solid;
  border-color: #dddddd;
}

.comparison .c-text-wrapper-2 {
  top: 16px;
  left: 12px;
  color: #000000;
  font-size: 16px;
  letter-spacing: 0.48px;
  white-space: nowrap;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  line-height: normal;
}

.comparison .c-group-5 {
  position: absolute;
  width: 331px;
  height: 52px;
  top: 321px;
  left: 271px;
}

.comparison .c-overlap-3 {
  position: relative;
  width: 329px;
  height: 52px;
  background-color: #ffffff;
  border: 1px solid;
  border-color: #dddddd;
}

.comparison .c-p {
  top: 11px;
  left: 123px;
  color: #000000;
  font-size: 16px;
  letter-spacing: 0.96px;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  line-height: normal;
}

.comparison .c-group-6 {
  position: absolute;
  width: 167px;
  height: 52px;
  top: 321px;
  left: 107px;
}

.comparison .c-element-2 {
  top: 11px;
  left: 43px;
  color: #000000;
  font-size: 16px;
  letter-spacing: 0.96px;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  line-height: normal;
}

.comparison .c-group-7 {
  position: absolute;
  width: 110px;
  height: 52px;
  top: 321px;
  left: 0;
}

.comparison .c-group-8 {
  position: absolute;
  width: 173px;
  height: 73px;
  top: 249px;
  left: 435px;
}

.comparison .c-overlap-4 {
  position: relative;
  width: 165px;
  height: 73px;
  background-color: #ffffff;
  border: 1px solid;
  border-color: #dddddd;
}

.comparison .c-overlap-5 {
  position: absolute;
  width: 116px;
  height: 20px;
  top: 45px;
  left: 26px;
}

.comparison .c-rectangle-2 {
  width: 116px;
  height: 20px;
  top: 1px;
  background-color: #e20000;
  border-radius: 2px;
  position: absolute;
  left: 0;
}

.comparison .c-element-OFF {
  position: absolute;
  top: 0;
  left: 17px;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 700;
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 0.84px;
  line-height: normal;
}

.comparison .c-text-wrapper-3 {
  letter-spacing: 0.10px;
}

.comparison .c-text-wrapper-4 {
  font-size: 14px;
  letter-spacing: 0.14px;
}

.comparison .c-element-3 {
  top: 22px;
  left: 49px;
  color: #e20000;
  font-size: 17px;
  letter-spacing: 0.51px;
  white-space: nowrap;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  line-height: normal;
}

.comparison .c-text-wrapper-5 {
  letter-spacing: 0.09px;
}

.comparison .c-text-wrapper-6 {
  font-size: 12px;
  letter-spacing: 0.04px;
}

.comparison .c-text-wrapper-7 {
  top: 23px;
  left: 25px;
  color: #000000;
  font-size: 16px;
  letter-spacing: 0.48px;
  white-space: nowrap;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  line-height: normal;
}

.comparison .c-overlap-group-2 {
  position: absolute;
  width: 91px;
  height: 19px;
  top: 4px;
  left: 25px;
}

.comparison .c-element-4 {
  top: 0;
  left: 0;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  color: #000000;
  font-size: 16px;
  letter-spacing: 0.48px;
  line-height: normal;
  white-space: nowrap;
}

.comparison .c-text-wrapper-8 {
  letter-spacing: 0.08px;
}

.comparison .c-vector {
  position: absolute;
  width: 90px;
  height: 1px;
  top: 12px;
  left: 0;
  object-fit: cover;
  background-color: #000000;
}

.comparison .c-group-9 {
  position: absolute;
  width: 167px;
  height: 73px;
  top: 249px;
  left: 271px;
}

.comparison .c-element-5 {
  top: 26px;
  left: 36px;
  color: #000000;
  font-size: 16px;
  letter-spacing: 0.48px;
  white-space: nowrap;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  line-height: normal;
}

.comparison .c-group-10 {
  position: absolute;
  width: 171px;
  height: 73px;
  top: 249px;
  left: 107px;
}

.comparison .c-element-6 {
  top: 38px;
  left: 58px;
  color: #e20000;
  font-size: 17px;
  letter-spacing: 0.51px;
  white-space: nowrap;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  line-height: normal;
}

.comparison .c-text-wrapper-9 {
  top: 39px;
  left: 34px;
  color: #000000;
  font-size: 16px;
  letter-spacing: 0.48px;
  white-space: nowrap;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  line-height: normal;
}

.comparison .c-overlap-group-3 {
  position: absolute;
  width: 90px;
  height: 19px;
  top: 17px;
  left: 34px;
}

.comparison .c-group-11 {
  position: absolute;
  width: 110px;
  height: 73px;
  top: 249px;
  left: 0;
}

.comparison .c-overlap-6 {
  position: relative;
  width: 108px;
  height: 73px;
  background-color: #ffffff;
  border: 1px solid;
  border-color: #dddddd;
}

.comparison .c-text-wrapper-10 {
  top: 26px;
  left: 12px;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  color: #000000;
  font-size: 16px;
  letter-spacing: 0.48px;
  line-height: normal;
  white-space: nowrap;
}

.comparison .c-group-12 {
  position: absolute;
  width: 331px;
  height: 73px;
  top: 177px;
  left: 271px;
}

.comparison .c-element-g-ml-wrapper {
  position: relative;
  width: 329px;
  height: 73px;
  background-color: #ffffff;
  border: 1px solid;
  border-color: #dddddd;
}

.comparison .c-element-g-ml {
  position: absolute;
  top: 13px;
  left: 114px;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  color: #000000;
  font-size: 16px;
  letter-spacing: 0.48px;
  line-height: 23px;
}

.comparison .c-group-13 {
  position: absolute;
  width: 167px;
  height: 73px;
  top: 177px;
  left: 107px;
}

.comparison .c-element-7 {
  position: absolute;
  top: 13px;
  left: 37px;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  color: #000000;
  font-size: 16px;
  letter-spacing: 0.48px;
  line-height: 23px;
}

.comparison .c-group-14 {
  position: absolute;
  width: 110px;
  height: 73px;
  top: 177px;
  left: 0;
}

.comparison .c-group-15 {
  position: absolute;
  width: 167px;
  height: 178px;
  top: 0;
  left: 435px;
}

.comparison .c-overlap-7 {
  position: relative;
  width: 165px;
  height: 178px;
  background-color: #f3f3f3;
  border: 1px solid;
  border-color: #dddddd;
}

.comparison .c-text-wrapper-11 {
  top: 149px;
  left: 19px;
  color: #000000;
  font-size: 12px;
  letter-spacing: 0.60px;
  white-space: nowrap;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  line-height: normal;
}

.comparison .c-table-set {
  top: 4px;
  position: absolute;
  width: 141px;
  height: 141px;
  left: 11px;
  aspect-ratio: 1;
  object-fit: cover;
}

.comparison .c-group-16 {
  position: absolute;
  width: 167px;
  height: 178px;
  top: 0;
  left: 271px;
}

.comparison .c-text-wrapper-12 {
  top: 149px;
  left: 54px;
  color: #000000;
  font-size: 12px;
  letter-spacing: 0.60px;
  white-space: nowrap;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  line-height: normal;
}

.comparison .c-table-set-2 {
  top: 3px;
  position: absolute;
  width: 141px;
  height: 141px;
  left: 11px;
  aspect-ratio: 1;
  object-fit: cover;
}

.comparison .c-group-17 {
  position: absolute;
  width: 167px;
  height: 178px;
  top: 0;
  left: 107px;
}

.comparison .c-text-wrapper-13 {
  top: 149px;
  left: 31px;
  color: #000000;
  font-size: 12px;
  letter-spacing: 0.60px;
  white-space: nowrap;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  line-height: normal;
}

.comparison .c-rectangle-3 {
  position: relative;
  width: 108px;
  height: 178px;
  background-color: #f3f3f3;
  border: 1px solid;
  border-color: #dddddd;
}

.comparison .c-text-wrapper-14 {
  top: 80px;
  left: 12px;
  position: absolute;
  font-family: "Noto Serif JP", Helvetica;
  font-weight: 500;
  color: #000000;
  font-size: 16px;
  letter-spacing: 0.48px;
  line-height: normal;
  white-space: nowrap;
}

.comparison .c-table-trial {
  position: absolute;
  width: 142px;
  height: 142px;
  top: 3px;
  left: 11px;
  aspect-ratio: 1;
  object-fit: cover;
}

[role="table"] {
  display: block;
}

[role="cell"],
[role="rowheader"],
[role="columnheader"] {
  display: block;
}

.btn-zoom {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 200px;
  padding: 10px;
  margin: 0 auto 20px;
  border: 1px solid #c3c3c3;
  background-color: #fff;
  font-weight: 500;
  cursor: pointer;
}
@media screen and (max-width: 480px) {
  .btn-zoom {
    display: block;
  }
}

.btn-zoom .icon {
  position: absolute;
  left: 17px;
}

.btn-zoom .btn-text {
  pointer-events: none;
  letter-spacing: 2px;
}


.c-ingredients {
  font-family: "Noto Serif JP", Helvetica;
  padding: 0 50px 0;
  color: #000000;
  position: absolute;
  top: 600px;
}
.c-ingredients h3 {
  margin-bottom: 1em;
}
.c-ingredients h4 {
  margin-bottom: 0.5em;
  font-weight: 600;
}
.c-ingredients p {
  margin-bottom: 2em;
  line-height: 24px;
  letter-spacing: 0.6px;
}

/* ========== modal ========== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  pointer-events: none;
}
.modal[aria-hidden="false"] {
  display: block;
  pointer-events: auto;
}
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
}
.modal__dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(100vw - 20px, 980px);
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal__close {
  appearance: none;
  background: none;
  border: none;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  color: #fff;
}
.modal__body {
  overflow-x: auto;   /* ← 横スクロール */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  padding: 0 50px;
}

/* ====== 既存レイアウトを崩さず、モーダル内だけ上書き ====== */
/* モーダル内に複製するラッパーとして .comparison を使うが、
   そのままだと元CSSの寸法/余白が効くため、モーダル内だけ無効化する */
.modal .comparison {
  margin: 0;
  background: transparent;
}
.modal .comparison .c-overlap {
  position: relative;
  background: transparent;
  box-shadow: none;
}


/* ========== modal（CSSだけで：縦スクOFF・横スクのみ・拡大表示） ========== */

/* ダイアログをビューポート全面にして上下スクを殺す */
#table-zoom-modal .modal__dialog{
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  width: 100dvw; height: 100dvh;   /* iOSのアドレスバーにも対応 */
  max-width: none; max-height: none;
  transform: none;                 /* 中央寄せのtranslateは使わない */
  overflow: hidden;                /* ダイアログ自体の縦オーバーは隠す */
}

/* ヘッダー固定、本文だけスクロール対象に */
#table-zoom-modal .modal__header{
  flex: 0 0 auto;
  padding: 8px 10px; background: transparent;
}
#table-zoom-modal .modal__body{
  flex: 1 1 auto;
  overflow-x: auto;                /* ← 横だけスクロール */
  overflow-y: hidden;              /* ← 縦は出さない */
  -webkit-overflow-scrolling: touch;
  background: #fff;
  padding: 8px 24px;               /* 余白はお好みで */
}

/* ========== スクロールアニメーション ========== */
.modal .scroll-animation {
  position: absolute;
  width: 30px;
  height: 120px;
  top: 40px;
  left: 65px;
  z-index: 1;
  transform: rotate(-90deg);
}

.modal .line-wrapper {
  position: absolute;
  width: 2px;
  height: 120px;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ccc;
  overflow: hidden;
}

.modal .line-progress {
  width: 100%;
  height: 100%;
  background-color: #000;
  transform: scaleY(0);
  transform-origin: top;
  animation: lineScroll 4s cubic-bezier(1, 0, 0.35, 1) infinite;
  will-change: transform;
}

@keyframes lineScroll {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  50.1% {
    transform: scaleY(1);
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

.modal .scroll-text {
  position: absolute;
  top: 23px;
  left: 27px;
  transform: translateX(-50%) rotate(90deg);
  font-family: "EB Garamond", Helvetica;
  font-size: 12px;
  font-weight: 500;
  color: #000;
  letter-spacing: 2px;
  white-space: nowrap;
}

/* ---- ズーム設定（ここだけ変えれば倍率調整できます） ---- */
#table-zoom-modal{ --modal-zoom: 1.5; }  /* デフォ拡大率 */

/* 元サイズ 650x1150 を “見た目倍率” 分だけレイアウトサイズにも反映
   → 横スクの量が見た目サイズに一致します（重要） */
#table-zoom-modal .comparison{
  display: inline-block;
  width:  calc(650px * var(--modal-zoom));   /* ← 元CSSの幅に合わせる */
  height: calc(1150px * var(--modal-zoom));  /* ← 元CSSの高さに合わせる */
}

/* 実体は元サイズのまま、左上基点で scale だけ掛ける */
#table-zoom-modal .comparison .c-overlap{
  width: 650px; height: 1150px;             /* ← 元CSSの寸法 */
  transform: scale(var(--modal-zoom));
  transform-origin: left top;
}

/* 元レイアウトを維持（絶対配置やtop/leftはそのままでOK） */
#table-zoom-modal .comparison .c-table{
  transform: none !important;               /* 二重スケール防止 */
  /* position/top/left は元CSSを尊重 */
}

/* 画面が低いときだけ CSSメディアクエリで倍率を段階的に下げ、縦に収める */
@media (max-height: 980px){ #table-zoom-modal{ --modal-zoom: 1.35; } }
@media (max-height: 900px){ #table-zoom-modal{ --modal-zoom: 1.20; } }
@media (max-height: 820px){ #table-zoom-modal{ --modal-zoom: 1.05; } }
@media (max-height: 740px){ #table-zoom-modal{ --modal-zoom: 0.90; } }
@media (max-height: 660px){ #table-zoom-modal{ --modal-zoom: 0.80; } }
