@charset "UTF-8";
/* =========================================================
   MOTTOMASALA 特設ページ
   - デザイン基準: 376 × 667 (Figma)
   - 要素は style 属性の --x / --y / --w / --h（デザイン基準px）で配置し、
     1デザインpx = var(--u) に換算して画面幅に合わせて拡縮します。
   ========================================================= */

:root {
  --cream: #fff0e1;
  --orange: #ffb972;
  --brown: #5d2614;
  --green: #0c4842;
  --yellow: #f2b41c;
  --yellow-2: #ffae00;
  --grey: #919998;
  --black: #000;
  --white: #fff;

  --font-impact: Impact, "Anton", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  --font-jp: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-maru: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", var(--font-jp);
  --font-hand: "Architects Daughter", "Comic Sans MS", cursive;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100svh;
  background: var(--cream);
  color: var(--black);
  font-family: var(--font-jp);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
img { display: block; max-width: none; }
p, h1, h2 { margin: 0; font-weight: inherit; font-size: inherit; }
button { font: inherit; color: inherit; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------------------------------------------------
   デバイス枠 / ステージ
   --------------------------------------------------------- */
.device {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  margin: 0 auto;
  container-type: inline-size;
  /* 縦に余白がある端末ではステージを上下中央に */
  min-height: 100svh;
  display: flex;
  align-items: center;
}
.stage {
  --u: calc(100cqw / 376);
  position: relative;
  width: 100%;
  aspect-ratio: 376 / 667;
  overflow-x: clip;           /* 右にはみ出すイラストは切る */
  overflow-y: visible;        /* 下にはみ出すニワトリは見せる（SP） */
}

/* 位置決めユーティリティ（値はデザイン基準px） */
.p {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
}
/* 回転要素：外枠＝回転後のバウンディングボックス、.r＝回転前サイズ */
.rot { display: grid; place-items: center; }
.rot > .r {
  position: relative;
  flex: none;
  width: calc(var(--rw) * var(--u));
  height: calc(var(--rh) * var(--u));
  transform: rotate(var(--a, 0deg));
}
/* SVGのストローク分のはみ出しを含めた配置（Figma書き出し値） */
.i { position: absolute; }
.i > img, img.fill { position: absolute; inset: 0; width: 100%; height: 100%; }
.i > img { position: static; }
.title > img { width: 100%; height: 100%; }

.bg-cream { position: absolute; inset: 0; background: var(--cream); }

/* ---------------------------------------------------------
   メイン（2P）
   --------------------------------------------------------- */
.main { position: absolute; inset: 0; visibility: hidden; }
body.is-open .main { visibility: visible; }

.frame {
  background: var(--orange);
  border: calc(2 * var(--u)) solid var(--black);
  border-radius: calc(10 * var(--u));
  overflow: hidden;
}

.tab {
  border: calc(2 * var(--u)) solid var(--black);
  border-radius: calc(6 * var(--u));
}
.tab > span {
  position: absolute;
  left: calc(6 * var(--u));     /* テキスト x:25 − タブ x:17 − border:2 */
  top: calc(-2 * var(--u));
  font-family: var(--font-impact);
  font-size: calc(21 * var(--u));
  line-height: calc(26 * var(--u));
  letter-spacing: 0;
  white-space: nowrap;
}
.tab--dark { background: var(--black); color: var(--white); }
.tab--light { background: var(--cream); color: var(--black); }

.intro {
  font-weight: 600;
  font-size: calc(12 * var(--u));
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
}
.note {
  font-weight: 400;
  font-size: calc(10 * var(--u));
  line-height: 1.45;
  white-space: nowrap;
}
.hand {
  font-family: var(--font-hand);
  font-size: calc(11 * var(--u));
  line-height: calc(16.2 * var(--u));
  letter-spacing: .02em;
  color: var(--white);
  text-align: center;
  white-space: nowrap;
}

.pill {
  background: var(--white);
  border-radius: calc(10.261 * var(--u));
}
.copy-sq {
  background: var(--white);
  border: calc(1.3 * var(--u)) solid var(--black);
  border-radius: calc(1.3 * var(--u));
}

/* パッケージ画像（Figmaのトリミング値を再現） */
.pack { overflow: hidden; pointer-events: none; }
.pack > img { position: absolute; }
.pack--blue > img   { width: 100%;    height: 115.66%; left: 0;      top: -15.66%; }
.pack--yellow > img { width: 100%;    height: 116.08%; left: 0;      top: -15.69%; }
.pack--red > img    { width: 138.85%; height: 127.93%; left: -20.3%; top: -17%; }

/* コードコピー（ピル全体を透明ボタンで覆う） */
.copy-btn {
  margin: 0; padding: 0; border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: calc(12 * var(--u));
  -webkit-tap-highlight-color: transparent;
}
.copy-btn:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

/* おかわりボタン */
.okawari {
  display: block;
  background: var(--white);
  border-radius: calc(11 * var(--u));
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--c);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.okawari__label {
  position: absolute;
  left: calc(17 * var(--u));
  top: calc(2 * var(--u));
  font-family: var(--font-maru);
  font-weight: 900;
  font-size: calc(11 * var(--u));
  line-height: calc(16 * var(--u));
  color: var(--t);
  white-space: nowrap;
}
.okawari__icon {
  position: absolute;
  left: calc(71 * var(--u));
  top: calc(5 * var(--u));
  width: calc(12 * var(--u));
  height: calc(12 * var(--u));
  border-radius: 50%;
  background: var(--t);
}
.okawari__icon img {
  position: absolute;
  left: calc(3 * var(--u));
  top: calc(3.62 * var(--u));
  width: calc(5.76 * var(--u));
  height: calc(4.76 * var(--u));
}
.okawari--amazon  { --c: var(--brown);  --t: var(--brown); }
.okawari--rakuten { --c: var(--green);  --t: var(--grey); }
.okawari--tiktok  { --c: var(--yellow); --t: var(--grey); }
.okawari.is-disabled { cursor: not-allowed; }
.okawari--amazon { transition: scale .2s var(--ease-back); }
.okawari--amazon:hover { scale: 1.06; }
.okawari--amazon:active { scale: .95; }
.okawari--amazon:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

/* ---------------------------------------------------------
   ローディング（TOP）
   --------------------------------------------------------- */
.loader {
  position: absolute;
  inset: 0;
  z-index: 50;
  cursor: pointer;
}
.loader__card {
  background: var(--white);
  border: calc(2 * var(--u)) solid var(--black);
  border-radius: calc(10 * var(--u));
}
.loader__lead {
  font-weight: 600;
  font-size: calc(12 * var(--u));
  line-height: calc(17 * var(--u));
  text-align: center;
  white-space: nowrap;
}
.loader__title {
  font-family: var(--font-impact);
  font-size: calc(37 * var(--u));
  line-height: calc(45 * var(--u));
  text-align: center;
  white-space: nowrap;
}
.loader__title span { display: inline-block; }

/* ローディング 入場 */
.loader__card { animation: cardIn .5s var(--ease-out) both; }
.loader__lead { animation: fadeUp .5s .25s var(--ease-out) both; }
.loader__title span {
  animation: letterIn .55s var(--ease-back) both;
}
.loader__title span:nth-child(1)  { animation-delay: .40s; }
.loader__title span:nth-child(2)  { animation-delay: .45s; }
.loader__title span:nth-child(3)  { animation-delay: .50s; }
.loader__title span:nth-child(4)  { animation-delay: .55s; }
.loader__title span:nth-child(5)  { animation-delay: .60s; }
.loader__title span:nth-child(6)  { animation-delay: .65s; }
.loader__title span:nth-child(7)  { animation-delay: .70s; }
.loader__title span:nth-child(8)  { animation-delay: .75s; }
.loader__title span:nth-child(9)  { animation-delay: .80s; }
.loader__title span:nth-child(10) { animation-delay: .85s; }
.loader__title span:nth-child(11) { animation-delay: .90s; }

.shapes .s {
  animation: shapeIn .5s calc(.9s + var(--i) * 60ms) var(--ease-back) both;
  transition: translate .6s var(--ease-out), scale .6s var(--ease-out), opacity .45s ease;
}
.shapes .s--wave > * { animation: wiggle 1.4s calc(var(--i) * -.13s) ease-in-out infinite; }
.shapes .s--pulse > img { animation: pulse 1.2s ease-in-out infinite; }
.shapes .s--spin > img { animation: spin 3s linear infinite; }

/* ローディング 退場 */
body.is-open .shapes .s {
  translate: calc(var(--dx) * var(--u) * 2.2) calc(var(--dy) * var(--u) * 2.2);
  scale: 0;
  opacity: 0;
}
/* 入場アニメ(fill: both)の値を上書きするため、退場もkeyframesで行う */
body.is-open .loader__title,
body.is-open .loader__lead {
  animation: zoomOut .45s var(--ease-out) both;
}
body.is-open .loader__card,
body.is-open .loader .bg-cream,
body.is-open .loader .tab {
  animation: fadeOut .45s .25s ease both;
}
@keyframes zoomOut { to { opacity: 0; transform: scale(1.25); } }
@keyframes fadeOut { to { opacity: 0; } }
body.is-open .loader { pointer-events: none; }
body.is-done .loader { display: none; }

/* ---------------------------------------------------------
   メイン 入場アニメーション（.is-open 付与で再生）
   --------------------------------------------------------- */
body.is-open .a-slide-l { animation: slideL .7s var(--d, 0s) var(--ease-out) both; }
body.is-open .a-slide-r { animation: slideR .7s var(--d, 0s) var(--ease-out) both; }
body.is-open .a-pop     { animation: pop .55s var(--d, 0s) var(--ease-back) both; }
body.is-open .a-rise    { animation: rise .6s var(--d, 0s) var(--ease-back) both; }
body.is-open .a-title   { animation: titleIn .6s var(--d, 0s) var(--ease-back) both; }
body.is-open .a-drop    { animation: drop .6s var(--d, 0s) var(--ease-back) both; }
body.is-open .a-fade    { animation: fadeUp .6s var(--d, 0s) var(--ease-out) both; }

/* 常時ループ（ゆるく） — transform と競合しないよう個別プロパティを使用 */
body.is-done .amb-shake   { transform-origin: 60% 10%; animation: shake 3.2s 1s ease-in-out infinite; }
body.is-done .amb-bob     { animation: bob 2.4s ease-in-out infinite; }
body.is-done .amb-bob--late { animation-delay: -1.2s; }
body.is-done .amb-tilt    { transform-origin: 70% 90%; animation: tilt 2.8s ease-in-out infinite; }
body.is-done .amb-blink   { animation: blink 1.6s ease-in-out infinite; }
body.is-done .amb-blink--late { animation-delay: -.8s; }
body.is-done .amb-flicker { transform-origin: 50% 100%; animation: flicker .9s ease-in-out infinite; }
body.is-done .amb-wave    { transform-origin: 40% 100%; animation: tilt 3.4s ease-in-out infinite; }
body.is-done .okawari--amazon .okawari__icon img { animation: nudge 1.2s ease-in-out infinite; }

@keyframes cardIn   { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes letterIn { 0% { opacity: 0; transform: translateY(-60%) rotate(-12deg) scale(.6); } 100% { opacity: 1; transform: none; } }
@keyframes shapeIn  { from { opacity: 0; transform: scale(0) rotate(-90deg); } to { opacity: 1; transform: none; } }
@keyframes wiggle   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18%); } }
@keyframes pulse    { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@keyframes spin     { to { transform: rotate(360deg); } }

@keyframes slideL  { from { transform: translateX(-105%); } to { transform: none; } }
@keyframes slideR  { from { transform: translateX(105%); } to { transform: none; } }
@keyframes pop     { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes rise    { from { opacity: 0; transform: translateY(40%) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes titleIn { from { opacity: 0; transform: translateX(-30%) rotate(-8deg) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes drop    { from { opacity: 0; transform: translateY(-60%); } to { opacity: 1; transform: none; } }

@keyframes shake   { 0%, 70%, 100% { rotate: 0deg; } 75% { rotate: -6deg; } 80% { rotate: 5deg; } 85% { rotate: -4deg; } 90% { rotate: 2deg; } }
@keyframes bob     { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4%; } }
@keyframes tilt    { 0%, 100% { rotate: 0deg; } 50% { rotate: -5deg; } }
@keyframes blink   { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: .7; opacity: .55; } }
@keyframes flicker { 0%, 100% { scale: 1 1; } 50% { scale: 1.04 .92; } }
@keyframes nudge   { 0%, 100% { translate: 0 0; } 50% { translate: 25% 0; } }

/* ---------------------------------------------------------
   トースト
   --------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 100;
  translate: -50% 20px;
  padding: 10px 18px;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-maru);
  font-weight: 900;
  font-size: 14px;
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--yellow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, translate .35s var(--ease-back);
  white-space: nowrap;
}
.toast.is-show { opacity: 1; translate: -50% 0; }

/* ---------------------------------------------------------
   PC（768px〜）
   --------------------------------------------------------- */
.pc-bg, .pc-side { display: none; }

@media (min-width: 768px) {
  body { overflow: hidden; }
  .pc-bg {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background-color: var(--cream);
    background-image: radial-gradient(rgba(93, 38, 20, .14) 1.4px, transparent 1.6px);
    background-size: 22px 22px;
  }
  .device {
    position: fixed;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    min-height: 0;
    width: min(420px, calc((100svh - 80px) * 376 / 667));
    border: 3px solid var(--black);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 10px 10px 0 var(--black);
    background: var(--cream);
  }
  .stage { overflow: hidden; }

  /* 斜めの帯（各ストアセクションの色） */
  .band {
    position: absolute;
    left: -10vw;
    width: 120vw;
    height: 24vh;
    border-block: 3px solid var(--black);
    display: flex;
    align-items: center;
    overflow: hidden;
  }
  .band--brown  { top: 6vh;  background: var(--brown);  rotate: -5deg; }
  .band--green  { top: 39vh; background: var(--green);  rotate: 4deg; }
  .band--yellow { top: 72vh; background: var(--yellow); rotate: -3deg; }

  .marquee {
    display: flex;
    flex: none;
    white-space: nowrap;
    font-family: var(--font-impact);
    font-size: 13vh;
    line-height: 1;
    letter-spacing: .02em;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 240, 225, .55);
    animation: marquee 40s linear infinite;
  }
  .marquee > span { padding-right: .4em; }
  .marquee--rev { animation-direction: reverse; animation-duration: 46s; }
  .band--yellow .marquee { -webkit-text-stroke-color: rgba(0, 0, 0, .35); font-family: var(--font-impact); }
  @keyframes marquee { to { transform: translateX(-50%); } }

  .confetti {
    position: absolute;
    width: auto;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .15));
  }
  .c1 { left: 8vw;  top: 34vh; height: 64px; }
  .c2 { left: 30vw; top: 66vh; height: 40px; animation-delay: -1s; }
  .c3 { left: 70vw; top: 33vh; height: 30px; animation-delay: -2s; }
  .c4 { left: 84vw; top: 64vh; height: 48px; animation-delay: -3s; }
  .c5 { left: 18vw; top: 4vh;  height: 40px; animation-delay: -4s; }
  .c6 { left: 76vw; top: 2vh;  height: 44px; animation-delay: -2.5s; }
  .c7 { left: 4vw;  top: 96vh; height: 26px; animation-delay: -1.5s; }
  .c8 { left: 92vw; top: 30vh; height: 34px; animation-delay: -3.5s; }
  @keyframes float {
    0%, 100% { translate: 0 0; rotate: 0deg; }
    50% { translate: 0 -14px; rotate: 12deg; }
  }
}

/* サイドパネル（1180px〜） */
@media (min-width: 1180px) {
  .pc-side {
    display: block;
    position: fixed;
    top: 50%;
    z-index: 1;
    translate: 0 -50%;
    width: 300px;
  }
  .pc-side--left  { right: calc(50% + min(210px, (100svh - 80px) * 188 / 667) + 72px); }
  .pc-side--right { left:  calc(50% + min(210px, (100svh - 80px) * 188 / 667) + 72px); }

  .comic-card {
    position: relative;
    padding: 28px 26px 26px;
    background: var(--white);
    border: 3px solid var(--black);
    border-radius: 14px;
    box-shadow: 8px 8px 0 var(--black);
  }
  .pc-side--left .comic-card  { rotate: -3deg; }
  .pc-side--right .comic-card { rotate: 2.5deg; }

  .comic-card__lead { font-weight: 600; font-size: 14px; }
  .comic-card__title {
    margin-top: 6px;
    font-family: var(--font-impact);
    font-size: 64px;
    line-height: .95;
    letter-spacing: .01em;
  }
  .comic-card__text {
    margin-top: 14px;
    font-family: var(--font-maru);
    font-weight: 900;
    font-size: 18px;
    line-height: 1.5;
  }
  .comic-card__text strong {
    display: inline-block;
    padding: 0 8px;
    background: var(--yellow);
    border: 2px solid var(--black);
    border-radius: 8px;
    font-family: var(--font-impact);
    font-weight: 400;
    font-size: 30px;
    line-height: 1.2;
    rotate: -4deg;
  }

  .comic-card__label {
    position: absolute;
    top: -16px;
    left: 20px;
    padding: 2px 12px;
    background: var(--black);
    color: var(--white);
    font-family: var(--font-impact);
    font-size: 20px;
    border-radius: 6px;
  }
  .steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
  .steps li {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.55;
  }
  .steps__num {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 2px solid var(--black);
    border-radius: 50%;
    background: var(--orange);
    font-family: var(--font-impact);
    font-size: 18px;
  }
  .steps li:nth-child(2) .steps__num { background: var(--green); color: var(--white); }
  .steps li:nth-child(3) .steps__num { background: var(--yellow); }
}

/* ---------------------------------------------------------
   視差効果を減らす設定
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}
