:root {
  --primary: #E8382B;        /* 主軸レッド（KVの赤） */
  --primary-deep: #C4271C;   /* 濃いレッド（グラデ下・強調） */
  --primary-pale: #FFF3F1;   /* 淡いレッド面 */
  --ink: #1F2529;            /* 本文 */
  --ink-sub: #5C666D;        /* 副本文 */
  --muted: #9AA3A9;          /* キャプション */
  --line: #E7EAEC;           /* 罫線 */
  --bg: #FFFFFF;
  --bg-alt: #FAFAF8;         /* セクション境界の僅かなオフホワイト */
  --yellow: #FFE24D;         /* markerハイライト・CHECKラベル */
  --blue: #2E3E8F;           /* KVの青（アクセント最小限） */
}

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 56px; }
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  color: var(--ink);
  background: #e8e8e8;
  line-height: 1.85;
  letter-spacing: 0.04em;
  font-feature-settings: 'palt' 1;
  font-weight: 400;
}

h1, h2, h3 {
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
  font-weight: 800;
  margin: 0;
}

.page-wrap {
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  position: relative;
}

section {
  padding: 0 10px;
  position: relative;
}

/* ============ 開発中プレビュー帯 ============ */
.dev-ribbon {
  background: #37414A;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 7px 12px;
  line-height: 1.5;
}

/* ============ セクション見出し共通 ============ */
.sec-en {
  font-size: 13px;
  color: var(--primary);
  letter-spacing: 0.18em;
  margin: 0 0 4px;
  font-weight: 800;
  text-align: center;
}
.sec-jp {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.04em;
  line-height: 1.4;
  margin: 0 0 20px;
  text-align: center;
}

/* ============ ヘッダー ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}
.site-header-inner {
  position: relative;
  padding: 12px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 56px;
}
.site-header-inner a { display: flex; align-items: center; }
.site-logo {
  display: block;
  height: 26px;
  width: auto;
  object-fit: contain;
}

/* ============ HERO ============ */
.hero { padding: 0; }
.hero-img {
  display: block;
  width: 100%;
  height: auto;
}

/* ============ PR表記（KV下） ============ */
.intro-section {
  background: var(--bg);
  margin: 0;
  padding: 6px 16px 10px;
  text-align: center;
  border-bottom: 1px solid #C6CBD0;
}
.intro-pr {
  font-size: 11px;
  color: #B4BABF;
  margin: 0;
}

/* ============ About ============ */
.about-section { background: var(--bg); }
.marker {
  background: linear-gradient(transparent 58%, rgba(255, 226, 77, 0.75) 58%);
  padding: 0 2px;
  font-weight: 900;
  color: var(--ink);
}
.about-body {
  font-size: 14px;
  color: var(--ink);
  line-height: 2.0;
  letter-spacing: 0.04em;
  margin: 0 0 16px;
  font-weight: 500;
  text-align: center;
}
.about-body:last-of-type { margin-bottom: 0; }
.about-body--note {
  font-size: 11px;
  color: var(--ink-sub);
  line-height: 1.6;
  margin: -6px 0 0;
  font-weight: 500;
}

/* ============ Coupons（メイン・白背景） ============ */
.coupons-section {
  background: var(--bg);
  color: var(--ink);
  padding-top: 44px;
  padding-bottom: 44px;
}
.coupons-section .sec-jp { margin-bottom: 12px; }
.coupons-lead {
  text-align: center;
  font-size: 13px;
  color: var(--ink-sub);
  line-height: 1.75;
  margin: 0 auto 22px;
  max-width: 300px;
  font-weight: 500;
}
.coupons-howto-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* エリアナビ（ページ内リンク・横スクロール） */
.area-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 20px 6px;
  margin: 0 -10px 22px;
  scroll-padding-inline-start: 20px;
}
.area-nav::-webkit-scrollbar { display: none; }
.area-nav a {
  flex-shrink: 0;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-sub);
  text-decoration: none;
  white-space: nowrap;
  background: #fff;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.area-nav a:hover,
.area-nav a:active {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

/* エリアブロック */
.area-block { margin-bottom: 30px; }
.area-block:last-child { margin-bottom: 0; }
.area-block-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  margin: 0 0 14px;
  padding-left: 11px;
  border-left: 5px solid var(--primary);
}
.area-block-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-sub);
}
.area-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 横向きクーポンカード（画像左＋テキスト右） */
.coupon {
  position: relative;
  display: flex;
  flex-direction: row;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.coupon.is-clickable { cursor: pointer; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.coupon.is-clickable:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.12); }

/* 配布終了（coupon.js が is-sold-out を付与）：カードは残しつつグレーアウト */
.coupon.is-sold-out { opacity: 0.55; }
.coupon.is-sold-out .coupon-off-big { color: var(--muted); }

/* 画像（左）：グレープレースホルダ＋中央に「img」
   高さいっぱいに cover で敷く（画像は歪まず＝比率保持のままトリミング）。
   上下に余白（レターボックス）は出ない。 */
.coupon-photo {
  position: relative;
  flex: 0 0 40%;
  align-self: stretch;
  overflow: hidden;
  background: #DADDE0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.coupon-photo::after {
  content: 'img';
  color: #8C949B;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.coupon-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* テキスト（右） */
.coupon-body {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
/* 施設名（どこ）＝主役1 */
.coupon-place {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.4;
  letter-spacing: 0.01em;
}
.coupon-place svg { flex-shrink: 0; color: var(--primary); }
.coupon-place span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
/* 対象（プールチケット・学割 等の短い補足）。無いカードも高さを揃えるため行を確保 */
.coupon-target {
  margin: 0;
  min-height: 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-sub);
}
/* クーポン表示名（正式名） */
.coupon-cname {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-sub);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.coupon-off-big {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 0;
  color: var(--primary);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
}
.coupon-off-big .pre { font-size: 12px; font-weight: 700; }
.coupon-off-big .num { font-size: 26px; }
.coupon-off-big .unit { font-size: 15px; font-weight: 900; }
.coupon-desc {
  font-size: 12px;
  color: var(--ink-sub);
  margin: 0;
  font-weight: 500;
}
/* 対象範囲の注記（一部対象などのカード上の指標） */
.coupon-scope {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-sub);
}
.coupon-scope.is-partial {
  color: #B26A00;
  background: #FFF6E6;
  border: 1px solid #F0DCB4;
  border-radius: 6px;
  padding: 3px 8px;
  display: inline-block;
}
.cmodal-scopenote { color: var(--ink-sub); font-size: 12px; }
/* メタ（有効期限・値引き上限）：タグ。施設名の上に配置 */
.coupon-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.chip {
  font-size: 11px;
  border-radius: 7px;
  padding: 3px 8px;
  white-space: nowrap;
  font-weight: 700;
  line-height: 1.5;
  background: #F2F3F2;
  color: #4A5359;
  border: 1px solid #E7E9E8;
}
.chip.expiry { background: var(--primary-pale); border-color: #F6D3CE; color: var(--primary-deep); }
.chip.cap    { background: #EEF2FF; border-color: #D6DEF7; color: var(--blue); }
.coupon-shop {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-sub);
  font-weight: 600;
}
.coupon-shop svg { flex-shrink: 0; color: var(--muted); }
.coupon-shop span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 状態CTA（/coupon/準拠：区切り線＋アイコン付きテキスト） */
.coupon-ctawrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.coupon-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 4px 0;
  font-size: 13.5px;
  font-weight: 800;
  font-family: inherit;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1.4;
}
.coupon-cta .cta-ic { flex-shrink: 0; }
.coupon-cta.is-get,
.coupon-cta.is-use { color: var(--primary); }
.coupon-cta.is-get:hover,
.coupon-cta.is-use:hover { text-decoration: underline; }
.coupon-cta.is-soldout { color: var(--muted); cursor: default; }


.coupons-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--ink-sub);
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--bg-alt);
}

/* ============ How to（獲得の3ステップ） ============ */
/* How to（imatoku準拠カルーセル・赤背景） */
.howto-section {
  background: var(--primary);
  color: #fff;
  padding: 44px 0 48px;
  overflow-x: clip;
}
.howto-section .sec-en,
.howto-section .sec-jp,
.howto-section .howto-lead { padding-left: 24px; padding-right: 24px; }
.howto-section .sec-en { color: rgba(255,255,255,0.85); }
.howto-section .sec-jp { color: #fff; margin-bottom: 8px; }
.howto-lead {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.92);
  line-height: 1.75;
  margin: 0;
  font-weight: 500;
}
.howto-steps {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 32px 24px;
  margin-top: 16px;
}
.howto-steps::-webkit-scrollbar { display: none; }
.howto-step {
  flex: 0 0 100%;
  scroll-snap-align: center;
  background: #fff;
  border-radius: 20px;
  padding: 24px 20px 0;
  text-align: center;
  position: relative;
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
  overflow: hidden;
}
.howto-step-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.howto-step-num { font-size: 20px; font-weight: 900; color: var(--primary); letter-spacing: 0.04em; flex-shrink: 0; }
.howto-step-title { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.4; margin: 0; letter-spacing: 0.02em; }
.howto-step-desc { font-size: 11px; color: var(--ink); font-weight: 500; line-height: 1.7; margin: 0 0 20px; }
.phone-mockup {
  width: 170px;
  height: 300px;
  margin: 0 auto -56px;
  background: #1a1a1a;
  border-radius: 28px 28px 0 0;
  padding: 7px 7px 0;
  position: relative;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
}
.phone-mockup::before {
  content: '';
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 56px; height: 13px;
  background: #1a1a1a; border-radius: 99px; z-index: 2;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: #ECEEF0;
  border-radius: 21px 21px 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.phone-screen img.img-bottom { object-position: bottom center; }
.howto-dots { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }
.howto-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.45); }
.howto-dot.active { background: #fff; }

/* ============ Footer ============ */
.ft {
  background-color: #F9FAFB;
  border-top: 1px solid #E5E7EB;
  padding: 32px 0;
  text-align: center;
}
.ft-content {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}
.ft-content p {
  font-size: 13px;
  color: #4B5563;
  line-height: 1.4;
  margin: 0;
}

/* ============ クーポンステータス検証（開発用パネル） ============ */
.verify-section {
  background: #EEF1F4;
  border-top: 4px dashed #C4CDD5;
  /* 3ステップとの間に余白 */
  margin-top: 32px;
  padding-top: 44px;
  padding-bottom: 44px;
}
.verify-tag {
  display: inline-block;
  background: #37414A;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 5px;
}
.verify-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin: 10px 0 8px;
}
.verify-lead {
  font-size: 12px;
  color: var(--ink-sub);
  line-height: 1.7;
  margin: 0 0 18px;
}
.verify-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.verify-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.verify-meta { flex: 1; min-width: 0; }
.verify-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  word-break: break-all;
}
.verify-cta { flex: 0 0 130px; max-width: 130px; }
.verify-cta button {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

/* ============ デモ用ツールバー（未ログイン/ログイン切替） ============ */
.demo-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: #2b3238;
  padding: 8px 12px;
}
.demo-toolbar-label { color: #c7ced4; font-size: 11px; font-weight: 700; }
.demo-seg {
  background: #3f484f;
  color: #cfd6db;
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.demo-seg.is-active { background: #fff; color: #1f2529; }
.demo-seg--alt { margin-left: 8px; }
.demo-seg--alt.is-active { background: var(--yellow); color: #1f2529; }
.demo-toolbar-note { color: #8f99a1; font-size: 10.5px; flex-basis: 100%; }

/* 終了クーポン（デモで「終了も表示」時のマーカー） */
.coupon-endednote {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: #37414a;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 5px;
}

/* ============ 詳細モーダル ============ */
.cmodal[hidden] { display: none; }
.cmodal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cmodal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.cmodal-panel {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 14px;
  max-width: 380px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px 20px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.cmodal-x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  font-size: 18px;
  color: #333;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
/* 施設画像を上部に大きく（縦積み） */
.cmodal-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 10px;
  overflow: hidden;
  background: #DADDE0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.cmodal-hero::after { content: 'img'; color: #8C949B; font-size: 13px; font-weight: 700; }
.cmodal-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cmodal-name { font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.5; margin: 0 0 6px; }
.cmodal-desc { font-size: 15px; color: var(--primary); font-weight: 800; margin: 0 0 14px; }
.cmodal-use {
  display: block;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 8px;
  background: #2E6BE6;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  margin: 6px 0 18px;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
}
.cmodal-use:hover { background: #2559c4; }
.cmodal-dl { margin: 0; border-top: 1px solid var(--line); padding-top: 14px; }
.cmodal-dl dt { font-size: 12px; font-weight: 800; color: var(--ink-sub); margin-top: 14px; }
.cmodal-dl dt:first-child { margin-top: 0; }
.cmodal-dl dd { font-size: 13px; margin: 5px 0 0; line-height: 1.75; }
.cmodal-close {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f4f6;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 18px;
  font-family: inherit;
}

/* ============ PC分岐 ============ */
@media (min-width: 481px) {
  .sec-jp { font-size: 26px; }
}
