@charset "UTF-8";

/* =============================================================
   GIANT × 薬屋のひとりごと コラボキャンペーン 応募フォーム
   共通スタイルシート
   - PCデザイン(幅1500px)をベースに記述
   - ブレイクポイント 768px でSP(幅375px)対応
   ============================================================= */

/* -------------------------------------------------------------
   1. デザイントークン（Figma変数）
   ------------------------------------------------------------- */
:root {
  --color-dark-green: #215d3a; /* 見出しバー・緑ボタン影 */
  --color-green: #008c4e;      /* primaryボタン */
  --color-violet: #5f4b8b;     /* アップロードボタン */
  --color-violet-shadow: #3d1e5c;
  --color-dark-red: #822225;   /* 謎解きモーダルの「秘密その①」バッジ */
  --color-text: #333333;       /* 本文 */
  --color-text-dark: #1e1e1e;  /* 戻るボタン文字 */
  --color-border-gray: #a8a8a8;/* 戻るボタン枠 */
  --color-divider: #cbcbcb;    /* 区切り線 */
  --color-error: #d9333f;      /* エラー表示 */
  --color-error-bg: #fdECEC;
  --color-bg: #f3f3f3;         /* コンテンツ領域の背景（薄いグレー） */

  --font-gothic: "Noto Sans JP", sans-serif;
  --font-mincho: "Kaisei Opti", serif;

  --shadow-card: 2px 2px 2px rgba(0, 0, 0, 0.1);
}

/* -------------------------------------------------------------
   2. リセット
   ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-gothic);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: url("../images/bg-pattern.png");
  background-repeat: repeat;
  background-size: 256px 256px; /* Figmaの表示サイズ（菱形約42px周期）に合わせる */
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

p {
  margin: 0;
}

/* -------------------------------------------------------------
   3. ページ全体レイアウト
   ------------------------------------------------------------- */
.site {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  background: #fff;
}

.main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* -------------------------------------------------------------
   4. ヘッダー（全ページ共通）
   PC: Glico(左) + GIANT(右) ／ SP: Glico中央のみ
   ------------------------------------------------------------- */
.site-header {
  height: 80px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
}

.site-header__logo-glico {
  height: 50px;
  width: auto;
}

.site-header__logo-giant {
  height: 60px;
  width: auto;
}

/* -------------------------------------------------------------
   5. KV（全ページ共通・1枚画像）
   ------------------------------------------------------------- */
.kv {
  width: 100%;
}

.kv__img {
  width: 100%;
  height: auto;
}

/* -------------------------------------------------------------
   6. コンテンツラッパー（KV下の白地エリア）
   ------------------------------------------------------------- */
.contents {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  padding: 50px 0;
  background-color: var(--color-bg);
  background-image: url("../images/bg-pattern.png");
  background-repeat: repeat;
  background-size: 256px 256px; /* Figmaの表示サイズ（菱形約42px周期）に合わせる */
}

/* -------------------------------------------------------------
   7. カード（緑見出し + 白ボディ）共通コンポーネント
   ------------------------------------------------------------- */
.card {
  width: 930px;
  max-width: calc(100% - 40px);
  background: #fff;
  border-radius: 5px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card__head {
  min-height: 90px;
  background: var(--color-dark-green);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.card__title {
  margin: 0;
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  color: #fff;
  text-align: center;
}

.card__body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ボディ内の区切り線付きブロック */
.card__divider-top {
  border-top: 1px solid var(--color-divider);
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* -------------------------------------------------------------
   8. テキストパーツ
   ------------------------------------------------------------- */
.lead {
  font-weight: 700;
  font-size: 20px;
  line-height: 32px;
  text-align: center;
}

.note {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  color: var(--color-text);
}

/* -------------------------------------------------------------
   9. ボタン（共通コンポーネント）
   ------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 440px;
  max-width: 100%;
  padding: 20px;
  border: none;
  border-radius: 50px;
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

/* primary（緑・右矢印） */
.btn--primary {
  background: var(--color-green);
  color: #fff;
  box-shadow: 0 8px 0 var(--color-dark-green);
}

/* アップロード（紫） */
.btn--upload {
  background: var(--color-violet);
  color: #fff;
  box-shadow: 0 8px 0 var(--color-violet-shadow);
}

/* 戻る（白地・グレー枠・左矢印） */
.btn--back {
  background: #fff;
  border: 3px solid var(--color-border-gray);
  color: var(--color-text-dark);
}

/* 小サイズ戻るボタン（マイページへ戻る等） */
.btn--sm {
  width: 296px;
  font-size: 18px;
}

/* ボタン内アイコン */
.btn__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
}

.btn--primary .btn__arrow {
  right: 24px;
}

.btn--back .btn__arrow {
  left: 24px;
}

/* ボタンを縦積みで中央寄せするラッパー */
.btn-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 40px;
}

/* -------------------------------------------------------------
   10. フッター（全ページ共通）
   ------------------------------------------------------------- */
.site-footer {
  height: 50px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 50px;
}

.site-footer__text {
  font-weight: 400;
  font-size: 10px;
  color: #000;
  text-align: center;
  white-space: nowrap;
}

/* -------------------------------------------------------------
   11. 応募コース（apply.html）
   ------------------------------------------------------------- */
/* ボディ余白が広いカード（応募コース用） */
.card__body--wide {
  padding: 40px 80px;
  gap: 0;
}

/* サブ見出し（両側に飾り罫線） */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  height: 80px;
  width: 100%;
}

.section-heading__bar {
  flex: 1;
  max-width: 300px;
  height: 0;
  border-top: 1px solid var(--color-dark-green);
}

.section-heading__text {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 20px;
  line-height: 32px;
  color: var(--color-dark-green);
  white-space: nowrap;
}

/* コースリスト */
.course-list {
  width: 100%;
}

.course {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  padding: 40px 0;
  border-bottom: 1px solid #d7d7d7;
}

.course__details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.course__name {
  display: flex;
  gap: 24px;
  align-items: center;
}

.course__badge {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
}

.course__title {
  margin: 0;
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: 30px;
  line-height: 38px;
  color: var(--color-text);
}

.course__lottery {
  margin: 0;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.5;
  color: var(--color-text);
}

.course__lottery .num {
  color: #bd353d;
}

.course__figure {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.course__image {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.course__note {
  margin: 0;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text);
}

/* コース応募ボタン（小・緑・右矢印） */
.btn--course {
  width: 296px;
  padding: 15px;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 4px 0 var(--color-dark-green);
}

.btn--course .btn__arrow {
  right: 14px;
  width: 24px;
  height: 24px;
}

/* 締め切り等でグレーアウトしたコースボタン */
.btn--course.is-disabled {
  background: #d8d8d8;
  box-shadow: none;
  pointer-events: none;
}

/* -------------------------------------------------------------
   12. フォーム（form.html / apply_question.html 等）
   ------------------------------------------------------------- */
/* リード文ブロック */
.summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 40px 0;
  text-align: center;
  width: 100%;
}

.summary__title {
  font-weight: 700;
  font-size: 20px;
  line-height: 32px;
  color: var(--color-dark-green);
}

.summary__note {
  font-weight: 400;
  font-size: 15px;
  line-height: 32px;
  color: var(--color-text);
}

/* 当選賞品の表示（ボタンなしのコース行） */
.prize-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 770px;
  padding: 40px 0;
}

.prize-detail__name {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.prize-detail__figure {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.prize-detail__image {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

/* 入力項目 */
.form-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 716px;
  padding-bottom: 40px;
}

.form-row {
  display: flex;
  gap: 26px;
  align-items: center;
  width: 100%;
}

.form-row__label {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
  /* 必須バッジの有無に関わらずラベル幅を固定し、入力欄の幅を揃える */
  width: 180px;
}

.form-row__label-text {
  font-weight: 500;
  font-size: 15px;
  line-height: 25px;
  color: #000;
  width: 120px;
}

/* 必須バッジ */
.req {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: #d6001c;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  line-height: 24px;
}

/* 入力欄・セレクト共通 */
.form-control {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #333;
  border-radius: 3px;
  font-family: var(--font-gothic);
  font-weight: 500;
  font-size: 15px;
  line-height: 25px;
  color: var(--color-text);
}

.form-control::placeholder {
  color: #838383;
}

.form-control--select {
  flex: none;
  width: 200px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 13 13'><path d='M6.5 9L1 3h11z' fill='%23333'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  -webkit-appearance: none;
  appearance: none;
}

/* 入力欄＋補足を縦に持つラッパー */
.form-field-group {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field-group .form-control {
  width: 100%;
}

.form-note {
  font-weight: 400;
  font-size: 12px;
  line-height: 18px;
  color: #000;
}

/* 応募規約ボックス */
.terms {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.terms__label {
  font-weight: 400;
  font-size: 15px;
  line-height: 25px;
  color: #000;
}

.terms__box {
  width: 100%;
  max-width: 716px;
  height: 217px;
  padding: 24px;
  background: #fff;
  border: 1px solid #d7d7d7;
  border-radius: 5px;
  overflow-y: auto;
  font-weight: 400;
  font-size: 15px;
  line-height: 25px;
  color: var(--color-text);
}

.terms__box p {
  margin: 0 0 25px;
}

.consent {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 716px;
  width: 100%;
  margin: 20px 0;
}

.consent input[type="checkbox"] {
  width: 25px;
  height: 25px;
  margin: 0;
  border: 1px solid #d7d7d7;
  border-radius: 3px;
  flex-shrink: 0;
}

.consent__text {
  font-weight: 400;
  font-size: 15px;
  line-height: 25px;
  color: #000;
}

/* ログアウトリンク */
.logout {
  font-weight: 700;
  font-size: 16px;
  color: #3f3f3f;
  text-decoration: underline;
  letter-spacing: 0.8px;
}

/* -------------------------------------------------------------
   13. マイページ（mypage.html）
   ------------------------------------------------------------- */
/* 影なしカード（マイページ） */
.card--flat {
  box-shadow: none;
}

/* マイページも共通の背景パターン（.contents / body）をそのまま使用 */

/* 購入本数ボックス */
.mypage-point {
  width: 100%;
  background: #eee;
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.mypage-point__title {
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: 20px;
  line-height: 32px;
  color: var(--color-text);
  text-align: center;
}

.mypage-point__value {
  font-family: var(--font-mincho);
  font-weight: 700;
  line-height: 32px;
  color: var(--color-dark-green);
  text-align: center;
}

.mypage-point__value .num {
  font-size: 48px;
}

.mypage-point__value .unit {
  font-size: 32px;
}

/* サブボタン（紫・小・履歴系） */
.btn--sub {
  width: 296px;
  padding: 15px;
  background: var(--color-violet);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 4px 0 #233658;
}

.btn--sub .btn__arrow {
  right: 14px;
  width: 24px;
  height: 24px;
}

/* 謎解きバナーセクション */
.nazotoki {
  width: 100%;
  padding: 200px 180px 120px;
  background-color: #402929;
  background-image: url("../images/nazotoki-bg.jpg");
  background-size: auto;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 謎解きペーパー（羊皮紙ボード）：各パーツを組み立て */
.nazotoki__board {
  position: relative;
  width: 100%;
  max-width: 1104px;
  /* 上部はタイトル帯（紙の上端に重なる）用に余白を大きめ確保／
     下部は報告書が紙からはみ出すため 0 */
  padding: 13% 1% 0;
  background-image: url("../images/secret/nazotoki_bg.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* タイトル帯：キャラが紙の上端からのぞくよう、ボード上端に重ねて配置 */
.nazotoki__title {
  width: 77%;
  height: auto;
  display: block;
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
}

/* 秘密①〜④の並び（足あと＋バナー） */
.nazotoki__steps {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 秘密バナー（クリックでモーダル） */
.nazotoki__step {
  display: block;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.nazotoki__step img {
  width: 100%;
  height: auto;
  display: block;
}

.nazotoki__step:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}

/* 各バナーは中央基準に左右へ僅かにずらしてジグザグ配置（デザインの箱位置に合わせる）
   幅はデザイン（Figma）の各バナー幅に合わせる */
.nazotoki__step { align-self: center; position: relative; }
.nazotoki__step--1 { width: 76%; left: -9%; }
.nazotoki__step--2 { width: 77%; left: 9%; }
.nazotoki__step--3 { width: 84%; left: -8%; }
.nazotoki__step--4 { width: 79%; left: 8%; }

/* 足あと装飾（バナーの隙間に配置） */
.nazotoki__print {
  height: auto;
  display: block;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.nazotoki__print--1 { width: 30%; align-self: center; margin: -1% 0 -5% 4%; }
.nazotoki__print--2 { width: 30%; align-self: center; margin: -1% 0 -1% -20%; }
.nazotoki__print--3 { width: 30%; align-self: center; margin: -1% 0 -10% 4%; }
.nazotoki__print--4 { width: 30%; align-self: center; margin: -1% 8% -10% 0; }
.nazotoki__print--5 { width: 30%; align-self: center; margin: -1% 0 -1%; }

/* 報告書バナー：ボード（羊皮紙）の下端をまたぐように半分はみ出す */
.nazotoki__report {
  display: block;
  width: 76%;
  margin-top: 3%;
  /* ボード下端をまたぐよう、高さの半分弱だけ下へはみ出す（紙の破れ端が中央付近に来る） */
  margin-bottom: -8%;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.nazotoki__report img {
  width: 100%;
  height: auto;
  display: block;
}

.nazotoki__report:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}

/* 応募案内カード内の説明画像 */
/* 対象商品（応募カード内・mypage-about の上） */
.target-product {
  text-align: center;
  font-family: var(--font-mincho);
}

.target-product__label {
  font-weight: 700;
  font-size: 30px;
  line-height: 1.6;
  color: var(--color-dark-green);
}

.target-product__name {
  font-weight: 700;
  font-size: 38px;
  line-height: 1.4;
  color: var(--color-text);
}

.mypage-about {
  display: block;
  width: 100%;
}

.mypage-about img {
  width: 100%;
  height: auto;
  display: block;
}

/* -------------------------------------------------------------
   13-b. 謎解きオーバーレイ（modal）
   ------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.overlay[hidden] {
  display: none;
}

/* 背景の暗幕 */
.overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  cursor: pointer;
}

/* 開閉アニメーション */
.overlay.is-open .overlay__backdrop {
  animation: overlay-fade 0.25s ease both;
}

.overlay.is-open .overlay__dialog {
  animation: overlay-pop 0.28s ease both;
}

@keyframes overlay-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes overlay-pop {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ダイアログ本体（ポスター画像に合わせて幅は内容フィット） */
.overlay__dialog {
  position: relative;
  width: auto;
  max-width: min(880px, 100%);
  max-height: 100%;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* 閉じるボタン（右上×） */
.overlay__close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 1;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: #a69d9d;
  font-family: var(--font-mincho);
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  /* Safariでボタンに枠（フォーカスリング／既定の見た目）が出るのを抑制 */
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.overlay__close:hover {
  color: var(--color-text);
}

/* フォーカス時も枠を出さない（Safariで自動フォーカス時に枠が出るのを防止） */
.overlay__close:focus,
.overlay__close:focus-visible {
  outline: none;
}

/* モーダル内容：謎解きポスターを中央に大きく表示（背景はクラフト紙） */
.nazotoki-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 64px 48px 48px;
  background-image: url("../images/secret/secret_bg.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 保存案内ブロック：画像の上・0.7透過の白背景 */
.nazotoki-modal__save {
  width: 100%;
  max-width: 760px;
  padding: 20px 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.nazotoki-modal__save-title {
  margin: 0 0 8px;
  font-family: var(--font-mincho); /* Kaisei Opti */
  font-weight: 700;
  font-size: 20px;
  line-height: 1.5;
  text-align: center;
  color: var(--color-text);
}

/* ポスター画像の並び：高さ基準で表示し、幅は 9:16 のアスペクト比から算出。
   画像枚数で幅・高さは変わらない。
   PCは大きめの固定高さ（画面が低ければスクロール可）。SPはビューポートに収める（下のSP指定）。 */
.nazotoki-modal__images {
  display: flex;
  justify-content: center;
  align-items: center;   /* 2枚時は縦中央に配置して高さを揃える */
  gap: 24px;
  height: 800px;         /* 1枚画像の表示高さ（PC） */
  max-width: 100%;
  aspect-ratio: 9 / 16;  /* 高さ基準で幅を算出（枚数に依らず一定） */
}

.nazotoki-modal__image {
  height: auto;
  border-radius: 4px;
  display: block;
}

/* 1枚表示：基準幅いっぱい */
.nazotoki-modal__images .nazotoki-modal__image {
  width: 100%;
}

/* 2枚横並び（秘密②＝2.png＋5.png / 秘密④＝4.png＋6.png）：
   基準幅を2分割して小さく表示（gap 24px を差し引く） */
.nazotoki-modal__images.is-multi .nazotoki-modal__image {
  width: calc((100% - 24px) / 2);
}

/* 保存案内・本文 */
.nazotoki-modal__save-text {
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 24px;
  text-align: left;
  color: #000;
}

/* オーバーレイ表示中は背面スクロールを固定 */
body.is-overlay-open {
  overflow: hidden;
}

/* -------------------------------------------------------------
   14. アンケート（apply_question.html）
   ------------------------------------------------------------- */
.survey {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  padding-top: 40px;
}

.question {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  padding-bottom: 32px;
  border-bottom: 1px solid #d7d7d7;
}

.question--last {
  border-bottom: none;
}

.question__title {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
}

.question__num {
  flex-shrink: 0;
  font-family: var(--font-mincho);
  font-weight: 500;
  font-size: 24px;
  line-height: 20px;
  color: var(--color-green);
}

.question__text {
  font-weight: 500;
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text);
}

.question__text .small {
  display: block;
  font-size: 14px;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.answer {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-left: 50px;
}

.answer input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-green);
}

.answer input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-green);
}

.answer__text {
  font-weight: 500;
  font-size: 15px;
  line-height: 20px;
  color: var(--color-text);
}

.answer-textarea {
  width: 100%;
  padding-left: 80px;
}

.answer-textarea textarea {
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid #d7d7d7;
  border-radius: 3px;
  font-family: var(--font-gothic);
  font-size: 15px;
  resize: vertical;
}

/* 回答のプルダウン（エリア選択など） */
.answer-select {
  display: flex;
  padding-left: 50px;
}

.answer-select .form-control--select {
  height: 50px;
}

/* -------------------------------------------------------------
   15. エラー枠（rup_error / form_error）
   ------------------------------------------------------------- */
.error-box {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
  max-width: 684px;
  padding: 24px 40px;
  background: #fff5f4;
  border: 5px solid #fb2711;
  border-radius: 10px;
}

.error-box__icon {
  flex-shrink: 0;
  width: 67px;
  height: 67px;
  border: 6px solid #fb2711;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: #fc432f;
}

.error-box__body {
  display: flex;
  flex-direction: column;
}

.error-box__label {
  font-weight: 700;
  font-size: 24px;
  color: #fb2711;
}

.error-box__text {
  font-weight: 400;
  font-size: 20px;
  line-height: 32px;
  color: #fb2711;
}

/* -------------------------------------------------------------
   16. 確認画面（*_conf）
   ------------------------------------------------------------- */
/* 「ご確認ください」注意ボックス */
.notice-box {
  width: 100%;
  padding: 24px 10px;
  background: #f3f3f3;
  border-radius: 3px;
}

.notice-box__title {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
  font-size: 16px;
  color: var(--color-green);
  border-bottom: 1px solid var(--color-green);
}

.notice-box__list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 15px;
  line-height: 20px;
  color: var(--color-text);
}

.notice-box__list li {
  margin-bottom: 8px;
}

.notice-box__list a {
  color: var(--color-green);
  text-decoration: underline;
  /* 長いURLが枠からはみ出さないよう折り返す */
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 入力値確認テーブル（ラベル→値・下線） */
.confirm-value {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
  border-bottom: 1px solid #838383;
  font-weight: 500;
  font-size: 15px;
  line-height: 25px;
  color: var(--color-text);
}

/* アンケート回答の確認表示 */
.answer-value {
  width: 100%;
  padding: 16px 24px;
  background: #f3f3f3;
  border-radius: 3px;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
}

/* レシート確認画像 */
.receipt-preview {
  display: block;
  width: 338px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* -------------------------------------------------------------
   17. 完了画面（*_comp）
   ------------------------------------------------------------- */
.complete {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 8px 0;
}

.complete__title {
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  color: var(--color-text);
}

.complete__title--green {
  font-size: 20px;
  color: var(--color-dark-green);
}

.complete__text {
  font-weight: 400;
  font-size: 20px;
  line-height: 32px;
  color: var(--color-text);
}

.complete__text--sm {
  font-weight: 500;
  font-size: 15px;
  line-height: 20px;
}

.complete__note {
  font-weight: 400;
  font-size: 16px;
  line-height: 32px;
  color: #d6001c;
  padding: 0 40px;
}

/* -------------------------------------------------------------
   18. お問い合わせ枠（apply_comp / form_comp）
   ------------------------------------------------------------- */
.contact {
  width: 100%;
  max-width: 716px;
  border: 5px solid #233658;
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto;
}

.contact__head {
  background: #233658;
  color: #fff;
  text-align: center;
  padding: 24px;
  font-family: "Shippori Mincho B1", var(--font-mincho);
  font-weight: 700;
  font-size: 24px;
}

.contact__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px;
  background: #fff;
  text-align: center;
}

.contact__label {
  font-weight: 700;
  font-size: 18px;
  color: #233658;
}

.contact__line {
  font-weight: 700;
  font-size: 16px;
  color: #233658;
}

.contact__line .tel-num {
  font-size: 20px;
}

.contact__hours {
  font-weight: 400;
  font-size: 15px;
  line-height: 26px;
  color: var(--color-text);
}

.contact__notes {
  font-weight: 400;
  font-size: 12px;
  line-height: 18px;
  color: var(--color-text);
}

/* -------------------------------------------------------------
   19. 履歴画面（*_history）
   ------------------------------------------------------------- */
.history-list {
  width: 100%;
}

.history-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 40px 0;
  border-bottom: 1px solid #d7d7d7;
}

/* レシート履歴：左サムネイル */
.history-item__thumb {
  flex-shrink: 0;
  width: 174px;
  height: auto;
  border-radius: 3px;
}

.history-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item__line {
  font-weight: 400;
  font-size: 16px;
  line-height: 40px;
  color: #000;
}

.history-item__sub {
  font-size: 13px;
  line-height: 24px;
  color: var(--color-text);
}

/* ステータスフラグ */
.status-flag {
  align-self: flex-start;
  display: inline-block;
  padding: 4px 30px;
  border-radius: 5px;
  color: #fff;
  font-size: 16px;
  line-height: 24px;
}

.status-flag--ok {
  background: var(--color-green);
}

.status-flag--pending {
  background: var(--color-violet);
}

.status-flag--ng {
  background: #d6001c;
}

/* 応募履歴：右にコース画像・テキストは大きめ */
.history-item--apply {
  justify-content: space-between;
  align-items: center;
  border-bottom-color: #b3b3b3;
}

.history-item--apply .history-item__line {
  font-size: 20px;
  line-height: 38px;
  color: var(--color-text);
}

.history-item__figure {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.history-item__course-img {
  flex-shrink: 0;
  width: 162px;
  height: 162px;
  object-fit: contain;
}

/* ページネーション */
.pager {
  display: flex;
  gap: 11px;
  align-items: center;
  justify-content: center;
  padding-top: 24px;
}

.pager__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-green);
  border-radius: 5px;
  color: var(--color-green);
  font-size: 15px;
  background: #fff;
  cursor: pointer;
}

.pager__item--current {
  background: var(--color-green);
  color: #fff;
}

/* =============================================================
   SP対応（〜768px）
   ============================================================= */
@media (max-width: 768px) {
  /* ヘッダー：Glico中央のみ */
  .site-header {
    height: 50px;
    justify-content: center;
    padding: 5px 50px;
  }
  .site-header__logo-glico {
    height: 40px;
  }
  .site-header__logo-giant {
    display: none;
  }

  /* コンテンツ */
  .contents {
    gap: 56px;
    padding: 50px 0;
  }

  /* カード */
  .card {
    width: 335px;
    max-width: calc(100% - 40px);
  }
  .card__head {
    min-height: 59px;
    padding: 15px;
  }
  .card__title {
    font-size: 20px;
  }
  .card__body {
    padding: 40px 24px;
    gap: 32px;
  }

  .target-product__label {
    font-size: 20px;
  }

.target-product__name {
    font-size: 24px;
  }

  /* テキスト */
  .lead {
    font-size: 16px;
    line-height: 27px;
  }
  .note {
    font-size: 14px;
  }

  /* ボタン */
  .btn {
    width: 100%;
    max-width: 296px;
    font-size: 16px;
    font-weight: 900;
    /* box-shadow: 0 4px 0 var(--color-dark-green); */
  }
  .btn--upload {
    box-shadow: 0 4px 0 var(--color-violet-shadow);
  }
  .btn--back {
    font-weight: 700;
    font-size: 15px;
  }
  .btn--sm {
    max-width: 225px;
  }
  .btn__arrow {
    width: 20px;
    height: 20px;
  }
  .btn--primary .btn__arrow {
    right: 20px;
  }
  .btn--back .btn__arrow {
    left: 20px;
  }
  /* 長いラベル（例：レシートをアップロードする）のみ、右矢印と重ならないよう右側に余白を確保。
     「応募する」など短いラベルの中央寄せには影響させない */
  .btn--long {
    padding-right: 46px;
  }

  /* フッター */
  .site-footer__text {
    font-size: 9px;
  }

  /* 応募コース */
  .card__body--wide {
    padding: 40px 24px;
  }
  .section-heading {
    gap: 12px;
    height: auto;
    padding: 8px 0;
  }
  .section-heading__bar {
    max-width: none;
  }
  .section-heading__text {
    font-size: 16px;
  }
  .course {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
    flex-direction: column-reverse;
  }
  .course__name {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }
  .course__title {
    font-size: 22px;
    line-height: 1.4;
  }
  .course__lottery {
    font-size: 18px;
  }
  .course__figure {
    order: -1;
  }
  .course__image {
    width: 160px;
    height: 160px;
  }
  .course__details {
    align-items: center;
    width: 100%;
  }
  .btn--course {
    width: 100%;
    max-width: 296px;
  }

  /* フォーム */
  .summary__title {
    font-size: 16px;
    line-height: 1.6;
  }
  .summary__note {
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
  }
  .prize-detail {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    flex-direction: column-reverse;
  }
  .prize-detail__name {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .prize-detail__figure {
    order: -1;
  }
  .prize-detail__image {
    width: 160px;
    height: 160px;
  }
  .form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .form-row__label {
    gap: 8px;
    width: auto;
    justify-content: space-between;
  }
  .form-row__label-text {
    width: auto;
  }
  .form-control--select {
    width: 100%;
  }

  /* マイページ */
  .mypage-point__value .num {
    font-size: 40px;
  }
  .mypage-point__value .unit {
    font-size: 26px;
  }
  .btn--sub {
    width: 100%;
    max-width: 296px;
  }
  .nazotoki {
    padding: 110px 24px 60px;
  }

  /* 謎解きオーバーレイ */
  .overlay {
    padding: 16px;
  }
  .overlay__dialog {
    width: 100%;
    border-radius: 8px;
  }
  .overlay__close {
    width: 32px;
    height: 32px;
    font-size: 32px;
    top: 12px;
    right: 12px;
  }

  /* SP：ポスター表示の余白を調整 */
  .nazotoki-modal {
    gap: 20px;
    padding: 48px 16px 24px;
  }
  .nazotoki-modal__save {
    padding: 14px 16px;
  }
  .nazotoki-modal__save-title {
    font-size: 17px;
  }
  .nazotoki-modal__images {
    gap: 10px;
    /* SPはスクロール不要でひと目で収まる高さに（下限220px／最大640px） */
    height: clamp(220px, calc(100vh - 380px), 640px);
  }
  /* 2枚横並びはスライドのデザイン通りSPでも横に並べる（gap 10px を差し引く） */
  .nazotoki-modal__images.is-multi .nazotoki-modal__image {
    width: calc((100% - 10px) / 2);
  }

  /* アンケート */
  .question__title {
    gap: 12px;
  }
  .question__text {
    font-size: 16px;
  }
  .answer {
    padding-left: 8px;
    align-items: flex-start;
  }
  .answer-textarea {
    padding-left: 8px;
  }
  .answer-select {
    padding-left: 8px;
  }

  /* エラー枠 */
  .error-box {
    padding: 16px;
    gap: 12px;
  }
  .error-box__icon {
    width: 44px;
    height: 44px;
    border-width: 4px;
    font-size: 26px;
  }
  .error-box__label {
    font-size: 18px;
  }
  .error-box__text {
    font-size: 15px;
    line-height: 1.6;
  }

  /* 確認テーブル */
  .confirm-value {
    width: 100%;
  }

  /* 完了 */
  .complete__title {
    font-size: 20px;
  }
  .complete__text {
    font-size: 16px;
  }
  .complete__note {
    padding: 0;
    font-size: 14px;
  }

  /* お問い合わせ */
  .contact__head {
    font-size: 18px;
    padding: 16px;
  }
  .contact__body {
    padding: 24px;
  }

  /* 履歴 */
  .history-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .history-item__thumb {
    width: 140px;
    margin: 0 auto;
  }
  .history-item--apply {
    flex-direction: row;
    align-items: center;
  }
  .history-item--apply .history-item__line {
    font-size: 16px;
    line-height: 1.6;
  }
  .history-item__course-img {
    width: 110px;
    height: 110px;
  }
}

/* =============================================================
   マイページ グレー版（mypage_gray.html）専用スタイル
   -------------------------------------------------------------
   ・謎解きの秘密①〜④・報告書を「未解禁（グレー画像）」で表示する
     ページ用のスタイルです。
   ・<body class="page-mypage is-gray"> の "is-gray" が付いている
     ときだけ適用されるため、通常版 mypage.html には影響しません。
   ============================================================= */

/* 未解禁バナーはクリック不可（ホバー演出も無効化） */
.page-mypage.is-gray .nazotoki__step,
.page-mypage.is-gray .nazotoki__report { position: relative; cursor: default; }
.page-mypage.is-gray .nazotoki__step:hover,
.page-mypage.is-gray .nazotoki__report:hover { transform: none; filter: none; }

/* バナー幅を基準に文字サイズ（cqw）を拡大縮小するためのコンテナ指定 */
.page-mypage.is-gray .nazotoki__board { container-type: inline-size; }

/* 各グレー画像の上に「◯本目購入で解禁！」ラベルを1行で重ねる */
.page-mypage.is-gray .nazotoki__lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
  margin: 0;
  color: #000;
  font-family: "Kaisei Opti", serif;
  font-weight: 700;
  font-size: 2.5cqw;          /* 全ラベル同じ大きさ（一番長い②④が1行に収まるサイズに統一） */
  line-height: 1.2;
  white-space: nowrap;        /* 常に1行で表示 */
  text-shadow: 0 0 4px #fff, 0 0 4px #fff, 0 2px 5px #fff;  /* 黒字＋白フチ（白シャドウ） */
  pointer-events: none;
}

/* 端の飛び出し（キャラ・旗）を除いた「四角い帯部分」の中央に文字を配置
   inset の指定順は「上 右 下 左」。各バナー画像ごとに帯の位置が異なるため個別調整 */
.page-mypage.is-gray .nazotoki__step--1 .nazotoki__lock { inset: 24.7% 11.9% 6.7% 1.5%; }
.page-mypage.is-gray .nazotoki__step--2 .nazotoki__lock { inset: 32.5% 3.0% 7.8% 7.8%; }
.page-mypage.is-gray .nazotoki__step--3 .nazotoki__lock { inset: 38.8% 6.8% 8.2% 2.7%; }
.page-mypage.is-gray .nazotoki__step--4 .nazotoki__lock { inset: 39.4% 2.1% 8.9% 6.2%; }

/* -------------------------------------------------------------
   SP専用改行ユーティリティ（PC時は改行しない）
   ------------------------------------------------------------- */
br.br-sp { display: none; }

/* -------------------------------------------------------------
   追加：レシートアップロード（複数枚プレビュー／開発側実装）
   ------------------------------------------------------------- */
[v-cloak] {
  display: none !important;
}

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.upload-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

.upload-preview__item {
  position: relative;
  width: 200px;
}

.upload-preview__img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-divider);
  border-radius: 6px;
  background: #fff;
}

.upload-preview__delete {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-error);
  color: #fff;
  font-family: var(--font-gothic);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.upload-status {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  color: var(--color-error);
}

/* 上限到達時のアップロードボタン */
.btn--upload:disabled {
  background: #d8d8d8;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 768px) {
  br.br-sp { display: inline; }
  .upload-preview {
    gap: 16px;
  }
  .upload-preview__item {
    width: 130px;
  }
  .upload-preview__delete {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  .upload-status {
    font-size: 14px;
  }
}

/* レシート確認：複数枚並べる */
.receipt-preview-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.receipt-preview-list .receipt-preview {
  flex: 0 1 338px;
  min-width: 0;
  margin: 0;
}

/* 登録中オーバーレイ */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .6);
}

.loading-overlay[hidden] {
  display: none;
}

.loading-overlay__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 40px;
  background: #fff;
  border-radius: 10px;
  text-align: center;
}

.loading-overlay__spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #e5e5e5;
  border-top-color: var(--color-green);
  border-radius: 50%;
  animation: loading-spin 1s linear infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

.loading-overlay__text {
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-text);
}

.loading-overlay__progress {
  font-family: var(--font-gothic);
  font-size: 14px;
  color: var(--color-text);
}

@media (max-width: 768px) {
  .receipt-preview-list {
    gap: 16px;
  }
  .loading-overlay__box {
    padding: 24px 32px;
  }
  .loading-overlay__text {
    font-size: 16px;
  }
}

/* .contents直下をformで包む場合のレイアウト調整 */
.form-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 履歴：ページャの無効状態 */
.pager__item--disabled {
  opacity: .4;
  pointer-events: none;
}

/* 区切り線なしのボタンブロック（履歴画面など） */
.card__divider-top--plain {
  border-top: none;
}

/* 履歴なしの表示 */
.history-empty {
  padding: 40px 0;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  color: var(--color-text);
}

/* レシートアップロード終了後のボタン */
.btn--primary.is-disabled {
  background: #d8d8d8;
  box-shadow: none;
  pointer-events: none;
}

/* 謎解き：未解禁の秘密（クリック不可＋解禁条件ラベル） */
.nazotoki__board {
  container-type: inline-size; /* ラベルの文字サイズ(cqw)の基準 */
}

.nazotoki__step.is-locked,
.nazotoki__report.is-locked {
  position: relative;
  cursor: default;
  pointer-events: none;
}

.nazotoki__step.is-locked:hover,
.nazotoki__report.is-locked:hover {
  transform: none;
  filter: none;
}

.nazotoki__step.is-locked img,
.nazotoki__report.is-locked img {
  width: 100%;
  height: auto;
  display: block;
}

/* 各グレー画像の上に「◯本目購入で解禁！」ラベルを1行で重ねる */
.nazotoki__lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
  margin: 0;
  color: #000;
  font-family: "Kaisei Opti", serif;
  font-weight: 700;
  font-size: 2.5cqw;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 0 4px #fff, 0 0 4px #fff, 0 2px 5px #fff;
  pointer-events: none;
}

/* 端の飛び出し（キャラ・旗）を除いた「四角い帯部分」の中央に文字を配置 */
.nazotoki__step--1.is-locked .nazotoki__lock { inset: 24.7% 11.9% 6.7% 1.5%; }
.nazotoki__step--2.is-locked .nazotoki__lock { inset: 32.5% 3.0% 7.8% 7.8%; }
.nazotoki__step--3.is-locked .nazotoki__lock { inset: 38.8% 6.8% 8.2% 2.7%; }
.nazotoki__step--4.is-locked .nazotoki__lock { inset: 39.4% 2.1% 8.9% 6.2%; }

/* アンケート：その他の自由入力（未選択時） */
.answer-textarea textarea:disabled {
  background: #f3f3f3;
  color: #999;
  cursor: not-allowed;
}
