@charset "utf-8";
/* ==========================================================================
   目の愛護デー / ブロッコリー探しゲーム LP
   - .bc-*   … LP本体（通常スクロール）
   - .bcg-*  … ゲーム（全画面オーバーレイ）
   デザインカンプは幅750pxで作られているため、寸法は基本 % で指定している。
   （% の margin/padding は「親要素の幅」を基準に解決されるので、
     カンプ上の px をそのまま 750 で割った値を入れれば比率が保たれる）
   ========================================================================== */

[hidden] {
  display: none !important;
}

/* ---- LP本体 -------------------------------------------------------------- */
.bc {
  --green: #72b647; /* カンプの緑 */
  --paper: #f3f1ef; /* カンプの背景色 */
  --code: #4c341c; /* クーポンコードの文字色 */
  --maru: "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN", "Yu Gothic Medium", "游ゴシック体", system-ui, sans-serif;
  --w: min(100vw, 750px); /* 寸法の基準。カンプの幅 */
  overflow: hidden;
}
/* 背景は全幅で敷き、中身だけ750pxで頭打ちにする */
.bc--paper {
  background: var(--paper);
}
.bc--green {
  background: var(--green);
}
.bc-in {
  max-width: 750px;
  margin: 0 auto;
}
.bc img {
  display: block;
  width: 100%;
  height: auto;
}
.bc picture {
  display: block;
}

/* 画像ボタン。タップ領域を画像と一致させる */
.bc-btn {
  display: block;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease;
}
.bc-btn:active {
  opacity: 0.75;
}
.bc-btn:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

/* --- LPトップ --- */
.bc-cta {
  padding-bottom: 9.7%;
}
.bc-cta__lead {
  width: 70.7%;
  margin: 6.4% auto 0;
} /* ブロッコリーを見つけよう! */
.bc-cta__btn {
  width: 97.1%;
  margin-top: 2.9%;
} /* ゲームにチャレンジする */
.bc-cta__note {
  width: 55.2%;
  margin: 0.93% auto 0;
} /* ※ゲーム中は「戻る」…  */

/* --- 結果：未クリア（緑ベタ） --- */
.bc-res--ng {
  padding: 5.33% 0 9.73%;
}
.bc-res--ng .bc-res__btn {
  width: 92%;
  margin-top: 3.33%;
}
.bc-res--ng .bc-res__note {
  width: 100%;
  margin-top: 3.87%;
}

/* --- 結果：クリア（クーポン） --- */
/* 白エリア。角丸（カンプ実測40px）を画像に焼くと、
   750pxを超えた幅で角の外側が緑にならないためCSSで描いている */
.bc-ok-body {
  /* max-width: 750px; */
  /* margin-inline: auto; */
  /* background: #fff; */
  border-radius: 30px 30px 0 0;
}
.bc-res--ok {
  padding-bottom: 9.87%;
  background-color: #fff;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  padding-top: 20px;
}
.bc-res__desc {
  margin-top: 1.33%;
}
.bc-res__lead {
  margin-top: 6.67%;
}
.bc-res--ok .bc-res__shop {
  width: 93.6%;
  margin-top: 3.2%;
}
.bc-res--ok .bc-res__btn {
  width: 93.6%;
  margin-top: 3.73%;
}

/* クーポンコード。券を分割するとドロップシャドウが途切れるため、
   画像は1枚のまま（焼き込まれた文字は消してある）、コードだけ上に重ねている */
.bc-coupon {
  position: relative;
}
.bc-code {
  position: absolute;
  left: 0;
  right: 0;
  top: 81.5%;
  transform: translateY(-50%);
  margin: 0;
  color: var(--code);
  text-align: center;
  font-family: var(--maru);
  font-weight: 700;
  font-size: calc(var(--w) * 0.0587); /* = 44/750 */
  line-height: 1;
  letter-spacing: 0.02em;
  -webkit-user-select: text;
  user-select: text;
}

/* ==========================================================================
   ゲーム（全画面オーバーレイ）
   ========================================================================== */
.bcg {
  --green: #72b647;
  --paper: #f3f1ef;
  --maru: "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN", "Yu Gothic Medium", "游ゴシック体", system-ui, sans-serif;
  --s: min(100vw, 750px); /* 寸法の基準。カンプの幅で頭打ちにする */
  --tap: max(60px, calc(var(--s) * 0.26)); /* タップ領域。最低60px角は必ず確保する */
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--paper);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  overscroll-behavior: none;
}
.bcg img {
  display: block;
}
.bcg picture {
  display: block;
}

/* 内枠。ローディング／カウントダウン／プレイはこの中に absolute で重なる */
.bcg-inner {
  position: relative;
  width: 100%;
  max-width: 750px;
  height: 100%;
  margin: 0 auto;
}

/* --- ローディング --- */
.bcg-load {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: var(--paper);
  display: grid;
  place-content: center;
  justify-items: center;
}
.bcg-load__row {
  display: flex;
  gap: calc(var(--s) * 0.04);
}
.bcg-load__row picture {
  width: calc(var(--s) * 0.17);
  animation: bcgBob 1.1s ease-in-out infinite;
}
.bcg-load__row img {
  width: 100%;
  height: auto;
}
.bcg-load__row picture:nth-child(2) {
  animation-delay: 0.15s;
}
.bcg-load__row picture:nth-child(3) {
  animation-delay: 0.3s;
}
.bcg-load__txt {
  margin-top: calc(var(--s) * 0.03);
  color: var(--green);
  font-family: var(--maru);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: calc(var(--s) * 0.075);
}
@keyframes bcgBob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12%);
  }
}

/* --- カウントダウン --- */
/* 4枚ともDOMに置いたまま opacity で切り替える。
   display の出し入れだと1秒ごとの切り替わりでデコード待ちのちらつきが出る */
.bcg-cd {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.bcg-cd__f {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.12s linear;
}
.bcg-cd__f.is-on {
  opacity: 1;
}
.bcg-cd__f picture {
  width: 100%;
  height: 100%;
}
.bcg-cd__f img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* --- プレイ画面 --- */
.bcg-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* 残り時間タブ。カンプの実測（本体 x155-594 / 高さ140 / 上両端に半径30の入隅）をCSSで再現 */
.bcg-hud {
  flex: 0 0 auto;
  position: relative;
  width: calc(var(--s) * 0.587);
  height: calc(var(--s) * 0.187);
  margin: 0 auto;
  border-radius: 0 0 calc(var(--s) * 0.04) calc(var(--s) * 0.04);
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--s) * 0.04);
}
.bcg-hud::before,
.bcg-hud::after {
  /* 上両端の入隅 */
  content: "";
  position: absolute;
  top: 0;
  width: calc(var(--s) * 0.04);
  height: calc(var(--s) * 0.04);
}
.bcg-hud::before {
  right: 100%;
  background: radial-gradient(circle at 0 100%, transparent calc(var(--s) * 0.04), var(--green) calc(var(--s) * 0.04));
}
.bcg-hud::after {
  left: 100%;
  background: radial-gradient(circle at 100% 100%, transparent calc(var(--s) * 0.04), var(--green) calc(var(--s) * 0.04));
}
.bcg-hud__label {
  width: calc(var(--s) * 0.213);
} /* 「残り時間」 */
.bcg-hud__unit {
  width: calc(var(--s) * 0.077);
} /* 「秒」 */
.bcg-hud__label img,
.bcg-hud__unit img {
  width: 100%;
  height: auto;
}
.bcg-hud__num {
  min-width: calc(var(--s) * 0.16);
  color: #fff;
  text-align: center;
  font-family: var(--maru);
  font-weight: 700;
  font-size: calc(var(--s) * 0.123);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* アイテムを出す場所 */
.bcg-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.bcg-item {
  position: absolute;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(23, 51, 42, 0.12);
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  cursor: pointer;
  animation: bcgPop 0.18s cubic-bezier(0.2, 1.5, 0.5, 1) forwards;
}
.bcg-item picture {
  width: 76%;
  height: 76%;
  display: grid;
  place-items: center;
}
.bcg-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.bcg-item:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
@keyframes bcgPop {
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.bcg-item.is-gone {
  animation: bcgFade 0.2s ease forwards;
}
@keyframes bcgFade {
  to {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
}

/* ダミーをタップしたとき。演出だけで判定には影響させない */
.bcg-item.is-wrong {
  animation: bcgShake 0.3s ease forwards;
}
@keyframes bcgShake {
  0% {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
  30% {
    transform: translate(calc(-50% - 8px), -50%);
  }
  70% {
    transform: translate(calc(-50% + 8px), -50%);
  }
  100% {
    transform: translate(-50%, -50%);
    opacity: 0;
  }
}

.bcg-ring {
  position: absolute;
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  border: 3px solid var(--green);
  transform: translate(-50%, -50%);
  animation: bcgRing 0.42s ease-out forwards;
  pointer-events: none;
}
@keyframes bcgRing {
  to {
    transform: translate(-50%, -50%) scale(2.1);
    opacity: 0;
  }
}

.bcg-cap {
  flex: 0 0 auto;
  width: calc(var(--s) * 0.909);
  margin: 0 auto calc(var(--s) * 0.055);
}
.bcg-cap img {
  width: 100%;
  height: auto;
}

/* 先読み用。画面には出さないが読み込みは走らせる */
.bcg-pre {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .bcg-item,
  .bcg-item.is-gone,
  .bcg-item.is-wrong,
  .bcg-ring {
    animation-duration: 0.01s;
  }
  .bcg-load__row picture {
    animation: none;
  }
  .bcg-cd__f {
    transition: none;
  }
}

.p-footer--copy {
  width: 100%;
  padding: 20px 15px 20px 15px;
  background: #195496;
  text-align: center;
  color: white;
  font-size: 8px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

@media (min-width: 400px) {
  .p-footer--copy {
    font-size: 12px;
  }
}
@media (min-width: 500px) {
  .p-footer--copy {
    font-size: 14px;
  }
}
@media (min-width: 640px) {
  .p-footer--copy {
    font-size: 16px;
  }
}
.p-footer--item {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  margin: 30px 0px;
  text-align: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.p-footer--line {
  height: 8px;
  background: #195496;
}

.p-footer--logo {
  width: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.p-footer--btn {
  width: 100%;
  padding-left: 15px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

@media (min-width: 400px) {
  .p-footer--btn {
    padding-left: 20px;
  }
}
@media (min-width: 500px) {
  .p-footer--btn {
    padding-left: 28px;
  }
}
@media (min-width: 640px) {
  .p-footer--btn {
    padding-left: 35px;
  }
}
.p-footer p {
  margin: 0;
}

.p-footer {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.c-container {
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 15px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
.c-container .p-footer--item__logo {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  width: 50%;
}
@media (max-width: 690px) {
  .c-container .p-footer--item__logo {
    width: 60%;
  }
}
