*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* EC Force ラッパー（実機で DevTools とずれる原因になりやすい） */
.l-wrapper:has(main.page),
.l-wrapper-none:has(main.page) {
  overflow: visible;
  overflow-x: clip;
  letter-spacing: normal;
  opacity: 1 !important;
  transition: none !important;
}

/* ティザー: 入場のフェード／広がりエフェクトを無効（最初から固定表示） */
.l-wrapper:has(#index-view.page) .hero__bg,
.l-wrapper:has(#index-view.page) .hero__switch-logo,
.l-wrapper-none:has(#index-view.page) .hero__bg,
.l-wrapper-none:has(#index-view.page) .hero__switch-logo {
  opacity: 1 !important;
  transition: none !important;
  transform: none !important;
}

/* hero__content は transform を殺さない（カウントダウンのリール用） */
.l-wrapper:has(#index-view.page) .hero__content,
.l-wrapper-none:has(#index-view.page) .hero__content {
  opacity: 1 !important;
  transition: none !important;
  animation: none !important;
}

/* STORY 装飾は入場アニメなし・最初から表示（回路の遅延ポップイン防止） */
.l-wrapper:has(#index-view.page) .teaser-story,
.l-wrapper:has(#index-view.page) .teaser-story__circuit,
.l-wrapper:has(#index-view.page) .teaser-story__dice,
.l-wrapper:has(#index-view.page) .teaser-story__crystal,
.l-wrapper-none:has(#index-view.page) .teaser-story,
.l-wrapper-none:has(#index-view.page) .teaser-story__circuit,
.l-wrapper-none:has(#index-view.page) .teaser-story__dice,
.l-wrapper-none:has(#index-view.page) .teaser-story__crystal {
  opacity: 1 !important;
  visibility: visible !important;
  transition: none !important;
  animation: none !important;
}

#index-view.page .countdown,
#index-view.page .countdown__unit,
#index-view.page .countdown__value,
#index-view.page .countdown__digit,
#index-view.page .countdown__label,
#index-view.page .countdown__reel {
  opacity: 1 !important;
  visibility: visible !important;
  transition: none !important;
}

/* グリッチ中: カラカラ点滅＋リール（animation:none を当てない） */
#index-view.page .countdown__slot.is-glitching {
  opacity: 1 !important;
  visibility: visible !important;
}

#index-view.page .countdown__slot.is-glitching .countdown__reel {
  animation: glitch-flicker 0.1s steps(2) infinite !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#index-view.page .countdown__reel-track {
  opacity: 1 !important;
  visibility: visible !important;
  will-change: transform;
}

body {
  background: #000;
  color: #fff;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Helvetica Neue", Arial, sans-serif;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

/* Hero */
.hero {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
}

/* カルマン: bottom + translateY(px) で縦位置を調整 */
.hero__ground-runner {
  --karman-drop: 118px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 0;
  pointer-events: none;
  overflow: visible;
}

.hero__karman {
  position: absolute;
  right: 0;
  bottom: 0;
  left: auto;
  --karman-w: 80px;
  --karman-h: 119px;
  width: var(--karman-w);
  height: var(--karman-h);
  --karman-duration: 48s;
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: screen;
  filter: grayscale(1) brightness(0.22) contrast(1.5);
  transform: translateY(calc(-100% + var(--karman-drop))) translateX(100%);
  animation: karman-cross var(--karman-duration) linear infinite;
  animation-fill-mode: backwards;
  will-change: transform;
}

/* 右端の奥から一定速度で左へ（最初は非表示） */
@keyframes karman-cross {
  0% {
    transform: translateY(calc(-100% + var(--karman-drop))) translateX(100%);
  }
  100% {
    transform: translateY(calc(-100% + var(--karman-drop)))
      translateX(calc(-100vw - 100%));
  }
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 120px);
  padding: 48px 64px 32px;
}

.hero__switch-logo {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 4;
  width: 114px;
  height: 114px;
  margin: 0;
  padding: 0;
  object-fit: contain;
  object-position: right top;
  image-rendering: auto;
}

/* Countdown */
.countdown {
  --countdown-digit-size: 208px;
  --countdown-unit-w: 200px;
  --countdown-days-w: 248px;
  --countdown-slot-h: 208px;
  --countdown-label-h: 46px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-top: 4vh;
}

.countdown__unit + .countdown__unit {
  margin-left: 20px;
}

.countdown__unit--days + .countdown__unit {
  margin-left: 28px;
}

.countdown__unit {
  display: flex;
  flex: 0 0 var(--countdown-unit-w);
  width: var(--countdown-unit-w);
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
}

.countdown__unit--days {
  flex: 0 0 var(--countdown-days-w);
  width: var(--countdown-days-w);
}

.countdown__slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 var(--countdown-slot-h);
  width: 100%;
  height: var(--countdown-slot-h);
  min-height: var(--countdown-slot-h);
  max-height: var(--countdown-slot-h);
}

.countdown__value {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--countdown-slot-h);
  gap: 0;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.countdown__digit {
  display: flex;
  flex: 0 0 0.44em;
  width: 0.44em;
  min-width: 0.44em;
  max-width: 0.44em;
  align-items: center;
  justify-content: center;
  height: var(--countdown-slot-h);
  font-family: "Teko", sans-serif;
  font-size: var(--countdown-digit-size);
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  transform: none;
  will-change: auto;
}

.countdown__reel {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.countdown__reel-track {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  will-change: transform;
  backface-visibility: hidden;
}

.countdown__reel-track > .countdown__value {
  flex: 0 0 var(--countdown-slot-h);
  height: var(--countdown-slot-h);
  min-height: var(--countdown-slot-h);
  max-height: var(--countdown-slot-h);
}

.countdown__slot.is-glitching {
  animation: glitch-flicker 0.1s steps(2) infinite;
}

/* レイアウトに影響しない点滅（終了後の位置ズレを防ぐ） */
@keyframes glitch-flicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.96;
  }
}

.countdown__label {
  flex: 0 0 var(--countdown-label-h);
  height: var(--countdown-label-h);
  margin: 0;
  padding: 0;
  font-family: "Teko", sans-serif;
  font-size: 43px;
  font-weight: 400;
  font-style: normal;
  line-height: var(--countdown-label-h);
  letter-spacing: 0;
  text-align: center;
  color: #fff;
  text-transform: capitalize;
}

/* SNS（Frame 101 とフッターの間） */
.teaser-sns {
  flex-shrink: 0;
  width: 100%;
  max-width: 100vw;
  padding: clamp(48px, 12vw, 80px) 24px clamp(52px, 13vw, 88px);
  background: #fff;
  text-align: center;
  box-sizing: border-box;
}

.teaser-sns__title {
  margin: 0 0 clamp(20px, 5vw, 32px);
  font-family: "Teko", sans-serif;
  font-size: clamp(56px, 26vw, 102px);
  font-weight: 600;
  font-style: normal;
  line-height: clamp(25px, 11.8vw, 46px);
  letter-spacing: 0;
  color: #3d3d3d;
  text-align: center;
  text-transform: uppercase;
}

.teaser-sns__br--sp {
  display: none;
}

.teaser-sns__lead {
  margin: 0 0 clamp(28px, 7vw, 40px);
  font-family: "Yusei Magic", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", sans-serif;
  font-size: clamp(18px, 6vw, 24px);
  font-weight: 400;
  font-style: normal;
  line-height: clamp(23px, 7.5vw, 30px);
  letter-spacing: 0;
  color: #3d3d3d;
  text-align: center;
}

.teaser-sns__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 6vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.teaser-sns__item {
  flex: 0 0 auto;
}

.teaser-sns__link {
  display: block;
  line-height: 0;
  border-radius: 50%;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.teaser-sns__link:hover,
.teaser-sns__link:focus-visible {
  transform: scale(1.06);
  opacity: 0.92;
  outline: none;
}

.teaser-sns__link:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

.teaser-sns__icon {
  display: block;
  width: clamp(64px, 16vw, 88px);
  height: clamp(64px, 16vw, 88px);
  object-fit: contain;
}

#index-view.page .teaser-sns,
#index-view.page .teaser-sns__link {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Footer */
.site-footer {
  flex-shrink: 0;
  background: #fff;
  border-top: 0.5px solid #bbb;
}

.site-footer__inner {
  max-width: 1920px;
  margin: 0 auto;
}

.site-footer__logos {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: clamp(24px, 3vw, 40px);
  flex-shrink: 0;
  padding: 0;
}

.site-footer__logo-link {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.site-footer__logo {
  display: block;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.site-footer__logo--artepiazza {
  height: 56px;
}

.site-footer__logo--any {
  height: 56px;
}

.site-footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: 24px 64px;
  flex-wrap: wrap;
}

.site-footer__nav {
  display: flex;
  align-items: center;
  flex: 1;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 24px 28px;
  min-width: 0;
}

.site-footer__link {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #666666;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
  color: #333333;
  outline: none;
}

.site-footer__legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px 28px;
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #666666;
}

.site-footer__legal-item {
  text-decoration: none;
  white-space: nowrap;
}

/* Frame 7 / Frame 101（ヒーローとフッターの間） */
.teaser-panel {
  flex-shrink: 0;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* STORY（Frame 7）— Figma 1440×1311 基準 */
.teaser-story {
  --story-design-w: 1440;
  --story-design-h: 1311;
  --story-max-w: 1440px;
  --crystal-scale: 1.24;
  position: relative;
  flex-shrink: 0;
  width: 100%;
  max-width: var(--story-max-w);
  margin-inline: auto;
  /* 高さはセクション実幅（max 1440）基準。100vw だとワイド画面で下に余白が出る */
  aspect-ratio: 1440 / 1311;
  min-height: clamp(
    520px,
    calc(
      min(100vw, var(--story-max-w)) * var(--story-design-h) /
        var(--story-design-w)
    ),
    1311px
  );
  height: auto;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0710 33.63%, #432480 100%);
  color: #fff;
}

/* 装飾・本文の配置基準（PC は 1440 内、SP は全幅） */
.teaser-story__frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

/* Group 626110 — 参照どおり下寄せ・contain で正方形ブロック維持 */
/* SP専用クリスタル（PCでは非表示） */
.teaser-story__crystal-sp,
.teaser-story__crystal-sp-02,
.teaser-story__crystal-sp-03,
.teaser-story__crystal-sp-04,
.teaser-story__crystal-sp-05,
.teaser-story__crystal-sp-06 {
  display: none;
}

/* Group 626110 — 回路パターン（PC / SP で画像を出し分け） */
.teaser-story__circuit {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 1;
  display: block;
  height: auto;
  transform-origin: center bottom;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  opacity: 1;
  mix-blend-mode: normal;
}

/* PC: グラデーション版 */
.teaser-story__circuit--pc {
  --circuit-scale: 0.983002; /* 0.936192 × 1.05 */
  width: min(100%, var(--story-max-w, 1440px));
  max-height: 100%;
  transform: translate(calc(-50% - 2.5%), 0) scale(var(--circuit-scale));
}

/* SP: Group 626110(1) — モバイルのみ表示 */
.teaser-story__circuit--sp {
  display: none;
}

/* クリスタル — フレーム全体に重ねる */
.teaser-story__dice {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.teaser-story__crystal {
  position: absolute;
  display: block;
  width: var(--crystal-w);
  height: auto;
  max-width: none;
  transform: rotate(var(--crystal-rot, 0deg))
    scale(calc(var(--crystal-scale) * var(--crystal-extra-scale, 1)));
  transform-origin: var(--crystal-origin-x, 50%) var(--crystal-origin-y, 50%);
}

/* image 2160 — 1枚目 */
.teaser-story__crystal--01 {
  --crystal-w: calc(228 / var(--story-design-w) * 100%);
  --crystal-origin-x: 0;
  --crystal-origin-y: 0;
  top: calc(54 / var(--story-design-h) * 100%);
  left: calc(1109 / var(--story-design-w) * 100%);
  z-index: 4;
}

/* image 2146 — 2枚目 */
.teaser-story__crystal--02 {
  --crystal-w: calc(90 / var(--story-design-w) * 100%);
  --crystal-origin-x: 0;
  --crystal-origin-y: 0;
  top: calc(458 / var(--story-design-h) * 100%);
  left: calc(1301 / var(--story-design-w) * 100%);
  z-index: 3;
}

/* image 2157 — 3枚目（×2.7） */
.teaser-story__crystal--03 {
  --crystal-w: calc(43.94 / var(--story-design-w) * 100%);
  --crystal-extra-scale: 2.7;
  --crystal-rot: 59.19deg;
  top: calc(412.53 / var(--story-design-h) * 100%);
  left: calc(1129.68 / var(--story-design-w) * 100%);
  z-index: 2;
}

/* image 2156 — 4枚目 */
.teaser-story__crystal--04 {
  --crystal-w: calc(151 / var(--story-design-w) * 100%);
  --crystal-origin-x: 0;
  --crystal-origin-y: 0;
  top: calc(664 / var(--story-design-h) * 100%);
  left: calc(1120 / var(--story-design-w) * 100%);
  z-index: 3;
}

/* image 2148 — 5枚目 */
.teaser-story__crystal--05 {
  --crystal-w: calc(99 / var(--story-design-w) * 100%);
  --crystal-rot: -38.11deg;
  top: calc(891.6 / var(--story-design-h) * 100%);
  left: calc(1244.37 / var(--story-design-w) * 100%);
  z-index: 2;
}

/* image 2149 — 6枚目（右） */
.teaser-story__crystal--06 {
  --crystal-w: calc(179.84 / var(--story-design-w) * 100%);
  --crystal-rot: 6.55deg;
  top: calc(1218 / var(--story-design-h) * 100%);
  left: calc(1120 / var(--story-design-w) * 100%);
  z-index: 3;
}

/* image 2153 — 7枚目（左） top 71 / left 46 */
.teaser-story__crystal--07 {
  --crystal-w: calc(94 / var(--story-design-w) * 100%);
  --crystal-origin-x: 0;
  --crystal-origin-y: 0;
  top: calc(71 / var(--story-design-h) * 100%);
  left: calc(46 / var(--story-design-w) * 100%);
  z-index: 3;
}

/* image 2155 — 8枚目（左） top 228 / left 121 */
.teaser-story__crystal--08 {
  --crystal-w: calc(208 / var(--story-design-w) * 100%);
  --crystal-origin-x: 0;
  --crystal-origin-y: 0;
  top: calc(228 / var(--story-design-h) * 100%);
  left: calc(121 / var(--story-design-w) * 100%);
  z-index: 3;
}

/* image 2158 — 9枚目（左・×2.7） */
.teaser-story__crystal--09 {
  --crystal-w: calc(71.57 / var(--story-design-w) * 100%);
  --crystal-extra-scale: 2.7;
  --crystal-rot: 59.19deg;
  top: calc(500 / var(--story-design-h) * 100%);
  left: calc(64 / var(--story-design-w) * 100%);
  z-index: 2;
}

/* image 2154 — 10枚目（左） top 842 / left 59 */
.teaser-story__crystal--10 {
  --crystal-w: calc(61.62 / var(--story-design-w) * 100%);
  --crystal-rot: 9.87deg;
  top: calc(842.29 / var(--story-design-h) * 100%);
  left: calc(58.75 / var(--story-design-w) * 100%);
  z-index: 2;
}

/* image 2148 (1) — 11枚目（左） top 959 / left 106 */
.teaser-story__crystal--11 {
  --crystal-w: calc(237 / var(--story-design-w) * 100%);
  --crystal-origin-x: 0;
  --crystal-origin-y: 0;
  top: calc(959 / var(--story-design-h) * 100%);
  left: calc(106 / var(--story-design-w) * 100%);
  z-index: 4;
}

.teaser-story__content {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 72px) 20px;
  box-sizing: border-box;
  text-align: center;
}

/* STORY 見出し — Teko SemiBold 102 / 46 */
.teaser-story__title {
  margin: 0 0 clamp(20px, 5vw, 28px);
  font-family: "Teko", sans-serif;
  font-size: clamp(56px, 13.3vw, 102px);
  font-weight: 600;
  font-style: normal;
  line-height: clamp(25px, 6vw, 46px);
  letter-spacing: 0;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
}

/* ー あなたは死にました ー — Yusei Magic Regular 52 / 140% */
.teaser-story__hook {
  margin: 0 0 clamp(28px, 7vw, 40px);
  font-family: "Yusei Magic", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    sans-serif;
  font-size: clamp(28px, 6.8vw, 52px);
  font-weight: 400;
  font-style: normal;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: center;
  color: #fff;
}

/* 本文 — Yusei Magic Regular 26 / 190% */
.teaser-story__body p {
  margin: 0;
  font-family: "Yusei Magic", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    sans-serif;
  font-size: clamp(18px, 3.4vw, 26px);
  font-weight: 400;
  font-style: normal;
  line-height: 1.9;
  letter-spacing: 0;
  text-align: center;
  color: #fff;
}

.teaser-story__br--sp {
  display: none;
}

.teaser-story__body-karma {
  white-space: nowrap;
  font-size: clamp(12px, 3.15vw, 26px);
}

.teaser-story__body {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 5vw, 28px);
  margin: 0 0 clamp(28px, 7vw, 40px);
}

/* さあ生まれ変わるために… — Yusei Magic Regular 38 / 150% */
.teaser-story__close {
  margin: 0;
  font-family: "Yusei Magic", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    sans-serif;
  font-size: clamp(22px, 5vw, 38px);
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: center;
  color: #fff;
}

.teaser-story__close strong {
  font-weight: 400;
}

#index-view.page .teaser-story,
#index-view.page .teaser-story__circuit,
#index-view.page .teaser-story__dice,
#index-view.page .teaser-story__crystal,
#index-view.page .teaser-story__crystal-sp,
#index-view.page .teaser-story__crystal-sp-02,
#index-view.page .teaser-story__crystal-sp-03,
#index-view.page .teaser-story__crystal-sp-04,
#index-view.page .teaser-story__crystal-sp-05,
#index-view.page .teaser-story__crystal-sp-06,
#index-view.page .teaser-story__content {
  opacity: 1 !important;
  visibility: visible !important;
}

.teaser-panel--frame-101 {
  --cat-tile-w: clamp(68px, 8.47vw, 122px);
  --cat-tile-h: clamp(66px, 8.19vw, 118px);
  position: relative;
  background: #eee;
  padding: clamp(40px, 7.8vw, 80px) clamp(16px, 4vw, 32px)
    clamp(48px, 9vw, 88px);
  box-sizing: border-box;
  overflow: hidden;
}

/* 猫背景 — 千鳥タイル・小さめでぎゅうぎゅう（元のセクション高さのまま） */
.teaser-panel__cats-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #eee;
  background-image: url("./images/teaser/credits-cat-tile.png"),
    url("./images/teaser/credits-cat-tile.png");
  background-size: var(--cat-tile-w) var(--cat-tile-h),
    var(--cat-tile-w) var(--cat-tile-h);
  background-repeat: repeat, repeat;
  background-position: 0 0,
    calc(var(--cat-tile-w) / 2) calc(var(--cat-tile-h) / 2);
}

.teaser-panel__content {
  position: relative;
  z-index: 1;
  max-width: 1024px;
  margin: 0 auto;
}

.teaser-panel__title {
  margin: 0 0 clamp(36px, 7vw, 64px);
  font-family: "Teko", sans-serif;
  font-size: clamp(48px, 10vw, 80px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: center;
  color: #111;
  text-transform: uppercase;
}

/* 上段3列 + 下段3列 */
.teaser-panel__grid {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 8vw, 72px);
}

.teaser-panel__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(12px, 2.5vw, 24px);
  align-items: start;
}

.teaser-panel__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}

/* 上段 — meta高さ固定で区切り線を横一列に揃える */
.teaser-panel__cell--top .teaser-panel__meta {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  min-height: calc(2 * 1.5 * clamp(10px, 2.1vw, 13px));
  margin: 0 0 clamp(12px, 2.4vw, 18px);
  text-align: center;
}

.teaser-panel__cell--top .teaser-panel__rule {
  flex-shrink: 0;
  margin-top: 0;
}

.teaser-panel__cell--bottom .teaser-panel__name {
  margin-top: 0;
}

.teaser-panel__meta-line {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(10px, 2.1vw, 13px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0;
  color: #333;
}

.teaser-panel__meta-line + .teaser-panel__meta-line {
  margin-top: 0.12em;
}

.teaser-panel__rule {
  display: block;
  width: min(100%, 11.5em);
  height: 1px;
  margin: 0 0 clamp(18px, 3.6vw, 28px);
  padding: 0;
  border: 0;
  background: #b8b8b8;
}

/* 名前のみ通常ウェイト */
.teaser-panel__name {
  margin: 0 0 clamp(10px, 2vw, 16px);
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(24px, 5.2vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #111;
}

.teaser-panel__role {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(11px, 2.2vw, 14px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0;
  color: #333;
}

#index-view.page .teaser-panel,
#index-view.page .teaser-panel__content,
#index-view.page .teaser-panel__cats-bg {
  opacity: 1 !important;
  visibility: visible !important;
}

/* スマホ: iPhone 8〜16 など（論理幅 320〜430px / max-width:1199 以下） */
@media (max-width: 1199px) {
  body {
    touch-action: pan-y;
    overscroll-behavior-x: none;
    min-height: 100dvh;
    min-height: 100svh;
    min-height: -webkit-fill-available;
  }

  .l-wrapper:has(main.page),
  .l-wrapper-none:has(main.page) {
    overflow: visible;
    overflow-x: clip;
    min-height: 100dvh;
    min-height: 100svh;
    min-height: -webkit-fill-available;
  }

  /* ヒーロー／STORY 境界の白線（u-color__bg--base #fff）を消す */
  .l-wrapper:has(#index-view.page),
  .l-wrapper-none:has(#index-view.page) {
    background: #0a0710;
  }

  #index-view.page {
    background: #0a0710;
  }

  .page {
    min-height: calc(100dvh + 160px);
    min-height: calc(100svh + 160px);
    min-height: calc(100vh + 160px);
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
    overflow-x: hidden;
  }

  .hero {
    position: relative;
    flex: 0 0 auto;
    min-height: 85dvh;
    min-height: 85svh;
    min-height: 85vh;
    max-height: 85dvh;
    max-height: 85svh;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    margin-bottom: -2px;
  }

  main.page > .site-footer {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    letter-spacing: normal;
    font-size: 16px;
  }

  .hero__bg {
    z-index: 0;
    object-position: center 55%;
  }

  .hero__content {
    position: relative;
    z-index: 4;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    min-height: 0;
    height: auto;
    box-sizing: border-box;
    padding: clamp(120px, 34vh, 280px) 10px 8vh;
    padding-top: max(
      clamp(120px, 34vh, 280px),
      calc(56px + env(safe-area-inset-top, 0px))
    );
  }

  .hero__switch-logo {
    top: env(safe-area-inset-top, 0px);
    right: env(safe-area-inset-right, 0px);
    left: auto;
    width: min(68px, 17vw);
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
    object-fit: contain;
    object-position: right top;
    z-index: 5;
  }

  .countdown {
    --countdown-pad: 4px;
    --countdown-digit-size: clamp(79px, 20.7vw, 142px);
    /* PC と同様: 桁幅固定でコロコロ前後も横ブレなし */
    --countdown-digit-w: 0.44em;
    --countdown-unit-w: 25%;
    --countdown-slot-h: var(--countdown-digit-size);
    position: relative;
    z-index: 1;
    display: flex;
    flex-shrink: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 var(--countdown-pad);
    transform: none;
    flex-wrap: nowrap;
  }

  .countdown__unit + .countdown__unit,
  .countdown__unit--days + .countdown__unit {
    margin-left: 0;
  }

  .countdown__unit,
  .countdown__unit--days {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-content: start;
    flex: 0 0 var(--countdown-unit-w);
    flex-shrink: 0;
    width: var(--countdown-unit-w);
    min-width: 0;
    max-width: var(--countdown-unit-w);
    gap: 1.5px;
  }

  .countdown__slot {
    width: 100%;
    height: var(--countdown-slot-h);
    min-height: var(--countdown-slot-h);
    max-height: var(--countdown-slot-h);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    z-index: 1;
    background: transparent;
    contain: layout style paint;
  }

  /* Hours: グリッチ前後で同じ位置（transform は is-glitching で切り替えない） */
  .countdown__unit:has(.countdown__slot[data-unit="hours"]) {
    margin-left: -3px;
  }

  .countdown__slot.is-glitching {
    animation: none;
    overflow: hidden;
    background: transparent;
  }

  /* カラカラは数字スロット内のみ（ラベルと重ならない） */
  .countdown__slot.is-glitching .countdown__reel {
    display: block;
    width: 100%;
    height: var(--countdown-slot-h);
    min-height: var(--countdown-slot-h);
    max-height: var(--countdown-slot-h);
    overflow: hidden;
    background: transparent;
    animation: glitch-flicker 0.1s steps(2) infinite;
  }

  .countdown__slot.is-glitching .countdown__reel-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
    will-change: transform;
  }

  .countdown__slot.is-glitching .countdown__reel-track > .countdown__value {
    flex: 0 0 var(--countdown-slot-h);
    width: 100%;
    height: var(--countdown-slot-h);
    min-height: var(--countdown-slot-h);
    max-height: var(--countdown-slot-h);
    margin: 0;
    padding: 0;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    background: transparent;
    box-sizing: border-box;
  }

  .countdown__slot.is-glitching .countdown__digit {
    flex: 0 0 var(--countdown-digit-w);
    width: var(--countdown-digit-w);
    min-width: var(--countdown-digit-w);
    max-width: var(--countdown-digit-w);
    overflow: hidden;
    line-height: 1;
    background: transparent;
  }

  .countdown__value {
    display: flex;
    width: 100%;
    height: var(--countdown-slot-h);
    letter-spacing: 0;
    gap: 0;
    justify-content: center;
    align-items: center;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    background: transparent;
  }

  .countdown__digit {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--countdown-slot-h);
    font-size: var(--countdown-digit-size);
    font-weight: 500;
    flex: 0 0 var(--countdown-digit-w);
    flex-shrink: 0;
    width: var(--countdown-digit-w);
    min-width: var(--countdown-digit-w);
    max-width: var(--countdown-digit-w);
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
    overflow: hidden;
    background: transparent;
    box-shadow: none;
    outline: none;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
  }

  .countdown__slot.is-glitching .countdown__digit {
    font-weight: 500;
  }

  .countdown__label {
    align-self: center;
    width: max-content;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    font-size: clamp(22.5px, calc(5vw + 3.5px), 32.5px);
    font-weight: 400;
    line-height: 1;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
  }

  .hero__ground-runner {
    /* 実寸の 30%（以前 min(240px, 62vw) 相当） */
    --karman-w: min(72px, 18.6vw);
    --karman-h: calc(var(--karman-w) * 1.4875);
    --karman-drop: calc(var(--karman-h) * 0.98);
    z-index: 2;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    height: 0;
    overflow: visible;
    pointer-events: none;
  }

  .hero__karman {
    --karman-w: min(72px, 18.6vw);
    --karman-h: calc(var(--karman-w) * 1.4875);
    --karman-duration: 36s;
    height: var(--karman-h);
    width: var(--karman-w);
    object-fit: contain;
    object-position: center bottom;
    mix-blend-mode: screen;
    filter: grayscale(1) brightness(0.22) contrast(1.5);
    animation-fill-mode: backwards;
    opacity: 1;
    visibility: visible;
  }

  main.page > .site-footer .site-footer__inner {
    width: 100%;
  }

  main.page > .site-footer .site-footer__bar {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 20px calc(40px + env(safe-area-inset-bottom, 0px));
    gap: 28px;
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  main.page > .site-footer .site-footer__logos {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(24px, 8vw, 56px);
    width: 100%;
    max-width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
  }

  main.page > .site-footer .site-footer__logo {
    width: auto;
    max-width: 46vw;
    object-fit: contain;
  }

  main.page > .site-footer .site-footer__logo--artepiazza {
    height: min(63px, 15.1vw);
    max-height: 63px;
  }

  main.page > .site-footer .site-footer__logo--any {
    height: min(81px, 18.9vw);
    max-height: 81px;
  }

  main.page > .site-footer .site-footer__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    flex: none;
    justify-items: center;
    align-items: center;
    column-gap: clamp(16px, 6vw, 40px);
    row-gap: clamp(20px, 5vw, 32px);
    width: 100%;
    max-width: min(360px, calc(100vw - 32px));
    margin: 0 auto;
  }

  main.page > .site-footer {
    background: #fff;
  }

  main.page > .site-footer .site-footer__link {
    display: block;
    width: 100%;
    font-family: "Inter", sans-serif;
    font-size: clamp(14px, 3.8vw, 18px);
    font-weight: 400;
    line-height: 1.4;
    color: #666666;
    text-align: center;
    white-space: nowrap;
  }

  main.page > .site-footer .site-footer__link:hover,
  main.page > .site-footer .site-footer__link:focus-visible {
    color: #333333;
  }

  main.page > .site-footer .site-footer__legal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: "Inter", sans-serif;
    font-size: clamp(12px, 3.2vw, 15px);
    font-weight: 400;
    line-height: 1.5;
    color: #666666;
    white-space: normal;
    width: 100%;
    max-width: min(360px, calc(100vw - 32px));
    margin: 0 auto;
  }

  main.page > .site-footer .site-footer__legal-item {
    white-space: normal;
    text-align: center;
  }

  /* ── STORY（モバイル） ── */
  .teaser-story__dice {
    display: none !important;
  }

  #index-view.page .teaser-story__dice,
  #index-view.page .teaser-story__crystal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .teaser-story {
    --story-sp-design-w: 410;
    --story-sp-crystal-scale: 1.4;
    --story-sp-circuit-scale: calc(0.805 * 1.18);
    background: linear-gradient(180deg, #0a0710 33.63%, #432480 100%);
  }

  .teaser-story__crystal-sp,
  .teaser-story__crystal-sp-02,
  .teaser-story__crystal-sp-03,
  .teaser-story__crystal-sp-04,
  .teaser-story__crystal-sp-05,
  .teaser-story__crystal-sp-06 {
    display: block !important;
    position: absolute;
    z-index: 3;
    height: auto;
    max-width: none;
    pointer-events: none;
  }

  /* 2151 — 右上（上20px） */
  .teaser-story__crystal-sp {
    width: calc(98 * var(--story-sp-crystal-scale) / var(--story-sp-design-w) * 100%);
    top: -6px;
    left: calc(312 / var(--story-sp-design-w) * 100%);
  }

  /* 2146 — 上60px（top 365）・左10px */
  .teaser-story__crystal-sp-02 {
    width: calc(58 * var(--story-sp-crystal-scale) / var(--story-sp-design-w) * 100%);
    top: 365px;
    left: calc(349 / var(--story-sp-design-w) * 100%);
    transform: translateX(-10px);
  }

  /* 2149 — 右下・×2・下10px */
  .teaser-story__crystal-sp-03 {
    top: auto;
    bottom: 0;
    left: auto;
    right: clamp(2px, 0.8vw, 8px);
    width: calc(56 * 2 * var(--story-sp-crystal-scale) / var(--story-sp-design-w) * 100%);
    transform: rotate(6.55deg) translate(10px, 10px);
    transform-origin: bottom right;
  }

  /* 2148 — 左下・×1.3（Story底＝Credits境目） */
  .teaser-story__crystal-sp-04 {
    top: auto;
    bottom: 0;
    left: clamp(0px, 0.5vw, 6px);
    right: auto;
    width: calc(78 * 1.3 * var(--story-sp-crystal-scale) / var(--story-sp-design-w) * 100%);
    transform: none;
    transform-origin: bottom left;
  }

  /* 2154 — 左6px */
  .teaser-story__crystal-sp-05 {
    width: calc(47.52 * var(--story-sp-crystal-scale) / var(--story-sp-design-w) * 100%);
    top: 394.5px;
    left: calc(-12.18 / var(--story-sp-design-w) * 100%);
    transform: translateX(-6px) rotate(26.82deg);
    transform-origin: center center;
  }

  /* 2155 — 左上（上20px） */
  .teaser-story__crystal-sp-06 {
    width: calc(72 * var(--story-sp-crystal-scale) / var(--story-sp-design-w) * 100%);
    top: 24px;
    left: calc(-16 / var(--story-sp-design-w) * 100%);
  }

  #index-view.page .teaser-story__crystal-sp,
  #index-view.page .teaser-story__crystal-sp-02,
  #index-view.page .teaser-story__crystal-sp-03,
  #index-view.page .teaser-story__crystal-sp-04,
  #index-view.page .teaser-story__crystal-sp-05,
  #index-view.page .teaser-story__crystal-sp-06 {
    visibility: visible !important;
    opacity: 1 !important;
  }

  .teaser-story {
    width: 100%;
    max-width: 100vw;
    margin-inline: 0;
    margin-top: -2px;
    margin-bottom: 0;
    overflow: hidden;
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
  }

  .teaser-story__frame {
    height: auto;
    min-height: 0;
    padding-bottom: 0;
  }

  .teaser-story__circuit--pc {
    display: none !important;
  }

  /* Group 626110(1) — SP: 左・底固定・横100%（管を右端まで）・縦のみ scale */
  .teaser-story__circuit--sp {
    display: block !important;
    left: 0;
    right: auto;
    bottom: 0;
    --circuit-scale: var(--story-sp-circuit-scale);
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    transform-origin: left bottom;
    transform: scaleY(var(--circuit-scale));
    object-position: left bottom;
  }

  /* 本文は上から積む（absolute + center だとヒーローと重なって見える） */
  .teaser-story__content {
    position: relative;
    inset: auto;
    z-index: 5;
    justify-content: flex-start;
    padding: clamp(40px, 10vw, 56px) 16px 12px;
    max-width: min(100%, 340px);
    min-height: 0;
  }

  /* STORY — Figma: Teko SemiBold 50 / 46 */
  .teaser-story__title {
    margin-bottom: clamp(20px, 5.2vw, 28px);
    font-family: "Teko", sans-serif;
    font-size: clamp(42px, 12.2vw, 50px);
    font-weight: 600;
    font-style: normal;
    line-height: 46px;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
  }

  /* ー あなたは死にました ー — Figma: Yusei Magic 32 / 140% */
  .teaser-story__hook {
    margin-bottom: clamp(28px, 7.2vw, 36px);
    font-family: "Yusei Magic", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
      "Noto Sans JP", sans-serif;
    font-size: 32px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.4;
    letter-spacing: 0;
    text-align: center;
    white-space: nowrap;
  }

  .teaser-story__body {
    gap: clamp(22px, 5.6vw, 28px);
    margin-bottom: clamp(20px, 5vw, 28px);
  }

  .teaser-story__body p,
  .teaser-story__body-karma {
    font-size: clamp(15px, 3.85vw, 18px);
    line-height: 1.85;
  }

  .teaser-story__br--sp {
    display: block;
  }

  .teaser-story__body-karma {
    white-space: normal;
    font-size: clamp(15px, 3.85vw, 18px);
  }

  .teaser-story__close,
  .teaser-story__close strong {
    font-size: clamp(17px, 4.4vw, 22px);
    line-height: 1.55;
    font-weight: 400;
  }

  /* 締めコピー下：ダイス分のみ確保（フレーム外余白は作らない） */
  .teaser-story__close {
    padding-bottom: clamp(52px, 13vw, 68px);
  }

  /* ── CREDITS（モバイル・1列） ── */
  .teaser-panel--frame-101 {
    --cat-tile-w: clamp(92px, 23.5vw, 112px);
    --cat-tile-h: clamp(89px, 22.8vw, 108px);
    margin-top: 0;
    padding: clamp(44px, 11vw, 64px) 16px clamp(48px, 12vw, 64px);
  }

  .teaser-panel__cats-bg {
    background-image: url("./images/teaser/credits-cat-tile.png");
    background-size: var(--cat-tile-w) var(--cat-tile-h);
    background-repeat: repeat;
    background-position: 0 0;
  }

  .teaser-panel__content {
    max-width: min(100%, 360px);
    margin-inline: auto;
    padding: 0 8px;
    text-align: center;
  }

  .teaser-panel__title {
    margin-bottom: clamp(32px, 8.2vw, 48px);
    font-size: clamp(56px, 14.4vw, 72px);
    text-align: center;
  }

  .teaser-panel__grid {
    align-items: center;
    width: 100%;
    gap: clamp(36px, 9.2vw, 52px);
  }

  .teaser-panel__row {
    display: contents;
  }

  .teaser-panel__cell {
    width: 100%;
    max-width: 100%;
    align-items: center;
    text-align: center;
  }

  .teaser-panel__cell--top .teaser-panel__meta {
    min-height: calc(2 * 1.5 * clamp(11px, 2.85vw, 13px));
    margin-bottom: clamp(12px, 3vw, 18px);
  }

  .teaser-panel__meta-line {
    font-size: clamp(11px, 2.85vw, 13px);
  }

  .teaser-panel__rule {
    width: min(100%, 12em);
    margin-inline: auto;
    margin-bottom: clamp(16px, 4.1vw, 22px);
  }

  .teaser-panel__name {
    margin-bottom: clamp(8px, 2vw, 12px);
    font-size: clamp(22px, 5.6vw, 28px);
  }

  .teaser-panel__role {
    font-size: clamp(12px, 3.1vw, 14px);
  }

  .teaser-panel__cell--bottom .teaser-panel__name {
    margin-top: 0;
  }

  /* ── SNS（モバイル） ── */
  .teaser-sns {
    padding: clamp(44px, 11vw, 60px) 20px clamp(48px, 12vw, 56px);
  }

  .teaser-sns__title {
    margin-bottom: clamp(20px, 5.2vw, 28px);
    font-size: clamp(56px, 14.4vw, 72px);
    line-height: 0.9;
  }

  .teaser-sns__br--sp {
    display: block;
  }

  .teaser-sns__lead {
    margin-bottom: clamp(28px, 7.2vw, 36px);
    font-size: clamp(16px, 4.1vw, 20px);
    line-height: 1.5;
  }

  .teaser-sns__list {
    gap: clamp(24px, 6.2vw, 32px);
  }

  .teaser-sns__icon {
    width: clamp(72px, 18.5vw, 88px);
    height: clamp(72px, 18.5vw, 88px);
  }
}

/* PC: 背景フル幅・レイアウト 1440 内 — 左右の白余白を解消 */
@media (min-width: 1200px) {
  .l-wrapper:has(#index-view.page),
  .l-wrapper-none:has(#index-view.page) {
    background: #0a0710;
  }

  #index-view.page {
    background: #0a0710;
  }

  .teaser-story {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    height: calc(
      min(100vw, var(--story-max-w)) * var(--story-design-h) /
        var(--story-design-w)
    );
    min-height: unset;
    max-height: none;
    aspect-ratio: unset;
  }

  .teaser-story__frame {
    width: min(100%, var(--story-max-w));
    max-width: var(--story-max-w);
    margin-inline: auto;
  }
}

@supports (width: 1svw) {
  @media (max-width: 1199px) {
    .countdown {
      --countdown-digit-size: clamp(79px, 20.7svw, 142px);
    }
  }
}
