:root {
  --bg: #fff6e0;
  --ink: #3b3355;
  --navy: #4453a3;
  --shigen: #7cc24a;
  --moyasu: #ff2a2a;
  --togakin: #00a6e6;
  --p1: #ff8a1f;
  --p2: #8a5cf6;
  --p3: #ff4fa3;
  --p4: #16b5a0;
  --card-ratio: 600 / 1006;
  --font: "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN", "BIZ UDPGothic", "Meiryo", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body {
  background-image:
    radial-gradient(circle at 20px 20px, rgba(68, 83, 163, .06) 6px, transparent 7px),
    radial-gradient(circle at 60px 60px, rgba(124, 194, 74, .07) 6px, transparent 7px);
  background-size: 80px 80px;
}

#app { position: fixed; inset: 0; }

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }

rt { font-size: .5em; }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }

/* ---------- 共通ボタン ---------- */
.btn {
  white-space: nowrap;
  border: none;
  border-radius: 999px;
  padding: .6em 1.4em;
  font-size: clamp(16px, 2.6vmin, 30px);
  font-weight: 800;
  background: #fff;
  box-shadow: 0 .25em 0 rgba(0, 0, 0, .18);
  transition: transform .08s;
}
.btn:active { transform: translateY(.15em); box-shadow: 0 .1em 0 rgba(0, 0, 0, .18); }
.btn.primary { background: var(--navy); color: #fff; }
.btn.orange { background: var(--p1); color: #fff; }

.icon-btn {
  white-space: nowrap;
  flex: none;
  border: none;
  background: #fff;
  border-radius: 999px;
  min-width: clamp(40px, 7vmin, 72px);
  height: clamp(36px, 6vmin, 64px);
  padding: 0 1em;
  font-size: clamp(13px, 2.2vmin, 24px);
  font-weight: 800;
  box-shadow: 0 .2em 0 rgba(0, 0, 0, .15);
  display: grid;
  place-items: center;
}

/* ---------- ホーム ---------- */
.screen.home { align-items: center; justify-content: safe center; padding: 2vmin 3vmin 2vmin; overflow-y: auto; gap: 1.2vmin; }
.screen.home header { text-align: center; }
.screen.home h1 {
  margin: 0;
  font-size: clamp(30px, 7.5vmin, 100px);
  color: var(--navy);
  letter-spacing: .05em;
  text-shadow: 0 .06em 0 #fff, 0 .1em 0 rgba(0, 0, 0, .1);
  display: flex; align-items: center; justify-content: center; gap: .2em;
}
.screen.home h1 img { height: 1.5em; vertical-align: -.35em; margin-right: .1em; }
.screen.home .sub { margin: .4em 0 0; font-size: clamp(14px, 2.8vmin, 32px); font-weight: 700; }

.chars-row { display: flex; align-items: flex-end; justify-content: center; gap: 2vmin; height: 14vmin; flex: none; }
.chars-row img { height: 100%; animation: bob 2.4s ease-in-out infinite; transform-origin: bottom center; }
.chars-row img:nth-child(2) { animation-delay: .3s; }
.chars-row img:nth-child(3) { animation-delay: .6s; height: 112%; }
.chars-row img:nth-child(4) { animation-delay: .9s; }
.chars-row img:nth-child(5) { animation-delay: 1.2s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6%) rotate(-2deg); } }

.mode-sec { width: min(1200px, 96vw); }
.mode-sec h3 { margin: 0 0 .8vmin .4em; font-size: clamp(14px, 2.4vmin, 28px); color: var(--navy); }
.mode-grid { display: grid; gap: 1.6vmin; }
.mode-grid.play { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mode-grid.learn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mode-grid.learn .mode-btn { font-size: clamp(13px, 2.2vmin, 24px); padding: .8vmin 1vmin; gap: .15em; border-bottom-width: .9vmin; }
.mode-grid.learn .mode-btn .mode-icon { height: 1.8em; }
.mode-grid.learn .mode-btn small { font-size: .6em; }
.mode-btn {
  border: none;
  border-radius: 3vmin;
  padding: 1.2vmin 1vmin;
  background: #fff;
  box-shadow: 0 .7vmin 0 rgba(0, 0, 0, .15);
  display: flex; flex-direction: column; align-items: center; gap: .3em;
  font-size: clamp(14px, 2.8vmin, 34px);
  font-weight: 800;
  border-bottom: 1.2vmin solid var(--c, var(--navy));
  transition: transform .08s;
}
.mode-btn:active { transform: translateY(.5vmin); }
.mode-btn .mode-icon { height: 2.4em; width: auto; max-width: 70%; object-fit: contain; }
.mode-btn small { font-size: .5em; font-weight: 700; opacity: .7; }

.settings {
  display: flex; flex-wrap: wrap; gap: 1.2vmin 3vmin; align-items: center; justify-content: center;
  font-size: clamp(13px, 2.2vmin, 24px); font-weight: 700;
}
.seg { display: inline-flex; background: #fff; border-radius: 999px; padding: .25em; box-shadow: 0 .15em 0 rgba(0, 0, 0, .1); }
.seg button { border: none; background: transparent; border-radius: 999px; padding: .35em .9em; font-weight: 800; font-size: 1em; }
.seg button.on { background: var(--navy); color: #fff; }

/* ---------- カード ---------- */
.card3d {
  aspect-ratio: var(--card-ratio);
  perspective: 1400px;
  position: relative;
  touch-action: none;
}
.card3d .inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.3, 1.4, .5, 1);
  transform: rotateY(180deg);
}
.card3d.flipped .inner { transform: rotateY(0); }
.card3d .face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 8%/4.8%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1vmin 2.4vmin rgba(0, 0, 0, .18);
}
.card3d .face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.card3d .face .ans { opacity: 0; transition: opacity .35s; }
.card3d.reveal .face .ans { opacity: 1; }
.card3d .back {
  transform: rotateY(180deg);
  background: radial-gradient(circle at 50% 40%, #6574c8, var(--navy));
  border: .6vmin solid #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6%;
  color: #fff; font-weight: 800;
}
.card3d .back .logo {
  width: 55%; aspect-ratio: 1; border-radius: 50%; background: #fff;
  display: grid; place-items: center;
}
.card3d .back .logo img { position: static; width: 80%; height: 80%; object-fit: contain; }
.card3d .back .logo b { font-size: clamp(20px, 7vmin, 120px); color: var(--navy); }
.card3d .back span { font-size: clamp(10px, 2.4vmin, 40px); letter-spacing: .1em; }
.card3d.dragging { z-index: 50; }
.card3d.dragging .face { box-shadow: 0 3vmin 5vmin rgba(0, 0, 0, .3); }
.card3d.can-drag { cursor: grab; }
.card3d.snap { transition: transform .3s cubic-bezier(.3, 1.5, .5, 1); }
.card3d.fly { transition: transform .35s ease-in, opacity .35s ease-in; }

/* ---------- ゴミ箱 ---------- */
.bins { display: flex; gap: 2vmin; justify-content: center; align-items: flex-end; }
.bin {
  --c: var(--navy);
  position: relative;
  border: none; background: none; padding: 0;
  width: 26vmin;
  display: flex; flex-direction: column; align-items: center;
  transition: transform .15s;
  container-type: inline-size;
}
.bin .lid {
  width: 100%; height: 12%;
  min-height: 10px;
  background: var(--c);
  border-radius: 1.4vmin 1.4vmin .4vmin .4vmin;
  position: relative;
  transform-origin: 8% 100%;
  transition: transform .2s;
  filter: brightness(.9);
}
.bin .lid::before {
  content: ""; position: absolute; left: 38%; right: 38%; top: -45%; height: 55%;
  border: .6vmin solid var(--c); border-bottom: none; border-radius: 1vmin 1vmin 0 0;
}
.bin .body {
  width: 92%;
  aspect-ratio: 1 / .78;
  background: var(--c);
  clip-path: polygon(0 0, 100% 0, 90% 100%, 10% 100%);
  margin-top: 3%;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 800;
  text-align: center;
  line-height: 1.25;
  font-size: 10cqi;
  white-space: nowrap;
  padding: 0 12% 4%;
  background-image: repeating-linear-gradient(90deg, transparent 0 18%, rgba(255, 255, 255, .12) 18% 22%);
  text-shadow: 0 .08em .1em rgba(0, 0, 0, .25);
}
.bin .key {
  position: absolute; top: -1.6em; right: 0;
  background: #fff; color: var(--ink); border-radius: .4em; padding: 0 .4em;
  font-weight: 800; font-size: 2.4vmin; box-shadow: 0 .1em 0 rgba(0, 0, 0, .2);
}
.bin.hover { transform: scale(1.08); }
.bin.hover .lid, .bin.open .lid { transform: rotate(-24deg); }
.bin.correct { animation: pulse .6s ease-in-out 3; }
.bin.dim { opacity: .35; }
.bin[data-cat="shigen"] { --c: var(--shigen); }
.bin[data-cat="shigen"] .body { font-size: 17cqi; }
.bin[data-cat="moyasu"] .body { font-size: 14cqi; }
.bin[data-cat="moyasu"] { --c: var(--moyasu); }
.bin[data-cat="togakin"] { --c: var(--togakin); }
@keyframes pulse { 50% { transform: scale(1.12); } }

/* ---------- 上部バー ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 2vmin;
  padding: 1.6vmin 2vmin; font-weight: 800; font-size: clamp(14px, 3vmin, 34px);
}
.pill { background: #fff; border-radius: 999px; padding: .3em 1em; box-shadow: 0 .15em 0 rgba(0, 0, 0, .1); white-space: nowrap; }

/* ---------- ひとりで ---------- */
.solo .stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding-bottom: 2vmin; min-height: 0; }
.solo .card-slot { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.solo .card3d { height: min(50vh, 62vw); }
.solo .hint { font-weight: 800; font-size: clamp(14px, 3vmin, 32px); margin: 1vmin 0; color: var(--navy); }
.solo .bins .bin { width: min(26vmin, 30vw); }

/* ---------- 結果オーバーレイ ---------- */
.overlay {
  position: absolute; inset: 0; background: rgba(40, 30, 70, .45);
  display: grid; place-items: center; z-index: 100;
  animation: fadein .2s;
}
@keyframes fadein { from { opacity: 0; } }
.result-panel {
  background: #fff; border-radius: 4vmin; padding: 3vmin 4vmin;
  width: min(92vw, 1100px); max-height: 92vh;
  display: grid; grid-template-columns: auto 1fr; gap: 3vmin; align-items: center;
  box-shadow: 0 2vmin 5vmin rgba(0, 0, 0, .3);
  animation: pop .35s cubic-bezier(.3, 1.6, .5, 1);
}
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.rcard-wrap { position: relative; }
.new-ribbon {
  position: absolute; left: 50%; top: -1.6vmin; transform: translateX(-50%) rotate(-4deg); white-space: nowrap;
  background: var(--moyasu); color: #fff; font-weight: 900; border-radius: .5em; padding: .2em .7em;
  font-size: clamp(13px, 2.6vmin, 30px); box-shadow: 0 .3vmin 0 rgba(0,0,0,.2); animation: pop .5s cubic-bezier(.3,1.6,.5,1);
}
.result-panel .rcard { height: min(56vh, 60vmin); aspect-ratio: var(--card-ratio); border-radius: 8%/4.8%; box-shadow: 0 1vmin 2vmin rgba(0, 0, 0, .15); }
.result-panel .rtext { display: flex; flex-direction: column; gap: 2vmin; min-width: 0; }
.mark { font-size: clamp(40px, 11vmin, 140px); font-weight: 900; line-height: 1; display: flex; align-items: center; gap: .2em; }
.mark.ok { color: var(--moyasu); }
.mark.ng { color: var(--navy); }
.mark small { font-size: .38em; color: var(--ink); }
.answer-line { font-size: clamp(18px, 4.2vmin, 48px); font-weight: 800; line-height: 1.6; }
.cat-badge { display: inline-block; color: #fff; border-radius: .4em; padding: .05em .45em; margin: 0 .1em; }
.tip-row { display: flex; align-items: flex-end; gap: 2vmin; }
.tip-row img { height: clamp(70px, 18vmin, 220px); flex: none; }
.bubble {
  position: relative; background: #fffbe8; border: .4vmin solid #f1c84b; border-radius: 2.5vmin;
  padding: 1.6vmin 2.2vmin; font-size: clamp(15px, 3vmin, 34px); font-weight: 700; line-height: 1.6;
}
.bubble::before {
  content: ""; position: absolute; left: -2.2vmin; bottom: 3vmin;
  border: 1.1vmin solid transparent; border-right: 1.4vmin solid #f1c84b;
}

/* ---------- 終了画面 ---------- */
.end { align-items: center; justify-content: safe center; gap: 2vmin; padding: 3vmin; text-align: center; overflow-y: auto; }
.end h2 { font-size: clamp(30px, 8vmin, 96px); margin: 0; color: var(--navy); }
.end .score { font-size: clamp(40px, 11vmin, 160px); font-weight: 900; color: var(--moyasu); line-height: 1; }
.end .score small { font-size: .35em; color: var(--ink); }
.end .stars .on { color: #f5b800; }
.end .stars { font-size: clamp(26px, 7vmin, 100px); color: #c9c3d6; letter-spacing: .1em; }
.end .btns { display: flex; gap: 2vmin; flex-wrap: wrap; justify-content: center; }
.miss-list { display: flex; gap: 1.2vmin; flex-wrap: wrap; justify-content: center; max-width: 92vw; }
.miss-list img { height: 15vmin; border-radius: 1vmin; }
.miss-title { font-weight: 800; font-size: clamp(14px, 2.8vmin, 30px); }

/* ---------- 対戦 ---------- */
.versus { position: absolute; inset: 0; }
.zone {
  --pc: var(--p1);
  position: absolute;
  display: flex; align-items: center; gap: 2vmin;
  padding: 1.2vmin 2vmin;
  background: color-mix(in srgb, var(--pc) 14%, #fff);
  border: .6vmin solid var(--pc);
  border-radius: 3vmin;
  overflow: hidden;
}
.zone .who { display: flex; flex-direction: column; align-items: center; font-weight: 900; color: var(--pc); flex: none; }
.zone .who img { height: var(--who-h, 9vmin); }
.zone .who .pts { font-size: var(--pts-font, 5vmin); line-height: 1; color: var(--ink); }
.zone .who .pts small { font-size: .45em; }
.zone .bins { flex: 1; min-width: 0; gap: 1.2vmin; }
.zone .bins .bin { flex: 1; width: auto; max-width: var(--bin-max, 24vmin); }
.zone .status {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 2vmin;
  background: rgba(255, 255, 255, .86); font-weight: 900; font-size: var(--status-font, 5vmin); text-align: center;
}
.zone .status.show { display: flex; animation: fadein .2s; }
.zone .status .big { font-size: 1.8em; }
.zone.p1 { --pc: var(--p1); }
.zone.p2 { --pc: var(--p2); }
.zone.p3 { --pc: var(--p3); }
.zone.p4 { --pc: var(--p4); }

/* 2人 */
.versus.two .zone { left: 1.5vmin; right: 1.5vmin; height: calc(50% - 2.25vmin); --bin-max: 26vmin; }
.versus.two .zone.p1 { bottom: 1.5vmin; }
.versus.two .zone.p2 { top: 1.5vmin; transform: rotate(180deg); }
.versus.two .zone .msg { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }

/* 4人 */
.versus.four { --t: 31vmin; }
.versus.four .zone { --who-h: 6vmin; --pts-font: 4vmin; --bin-max: 20vmin; --status-font: 3.6vmin; gap: 1.2vmin; padding: .8vmin 1.4vmin; }
.versus.four .zone.p1, .versus.four .zone.p2 { left: calc(var(--t) + 1vmin); right: calc(var(--t) + 1vmin); height: var(--t); }
.versus.four .zone.p1 { bottom: .8vmin; }
.versus.four .zone.p2 { top: .8vmin; transform: rotate(180deg); }
.versus.four .zone.p3, .versus.four .zone.p4 {
  top: 50%; width: calc(100vh - 1.6vmin); height: var(--t);
}
.versus.four .zone.p3 { left: calc(var(--t) / 2 + .8vmin); transform: translate(-50%, -50%) rotate(90deg); }
.versus.four .zone.p4 { right: calc(var(--t) / 2 + .8vmin); transform: translate(50%, -50%) rotate(-90deg); }
.versus .zone .card3d { height: 94%; flex: none; }
.versus.four .center {
  position: absolute; inset: calc(var(--t) + 2vmin);
  display: flex; align-items: center; justify-content: center; gap: 2vmin;
  font-weight: 800; font-size: 3.4vmin;
}
.versus .quit { position: absolute; left: 1.5vmin; top: 50%; transform: translateY(-50%); z-index: 20; }
.versus.two .quit { left: auto; right: 2.5vmin; }
.versus.four .quit { left: calc(var(--t) + 2.5vmin); top: calc(var(--t) + 2.5vmin); transform: none; }
.versus .next-btn { z-index: 20; }

/* ---------- イベントモード ---------- */
.host { padding: 2vmin 3vmin; gap: 1.5vmin; }
.host .main { flex: 1; min-height: 0; display: grid; grid-template-columns: auto 1fr; gap: 4vmin; align-items: stretch; }
.host .card3d { height: min(78vh, 100%); align-self: center; cursor: pointer; }
.host .right { display: flex; flex-direction: column; gap: 2vmin; min-width: 0; min-height: 0; }
.host .panel { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 2.4vmin; }
.host .q { font-size: clamp(28px, 6.4vmin, 120px); font-weight: 900; color: var(--navy); line-height: 1.3; }
.host .item-name { font-size: clamp(24px, 5.6vmin, 96px); font-weight: 900; line-height: 1.5; }
.host .mark { font-size: clamp(36px, 9vmin, 140px); }
.host .answer-line { font-size: clamp(22px, 5vmin, 90px); }
.host .bubble { font-size: clamp(16px, 3.3vmin, 56px); }
.host .tip-row img { height: clamp(80px, 17vmin, 300px); }
.host .bins { padding-top: 3vmin; }
.host .bins .bin { width: min(28vmin, 20vw); }
.host .help { font-size: clamp(11px, 1.8vmin, 22px); opacity: .6; text-align: center; font-weight: 700; }
.countdown {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 60;
  font-size: 40vmin; font-weight: 900; color: var(--navy); text-shadow: 0 1vmin 0 #fff;
}
.countdown span { animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }

/* ---------- さがせ ---------- */
.search .prompt {
  text-align: center; font-weight: 900; font-size: clamp(18px, 4.6vmin, 60px); padding: .5vmin 2vmin;
  display: flex; align-items: center; justify-content: center; gap: .5em; flex-wrap: wrap;
}
.search .grid {
  flex: 1; min-height: 0; padding: 1vmin 2vmin 2vmin;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1.6vmin; justify-items: center; align-items: center;
}
.search .tile {
  position: relative; height: 100%; max-width: 100%; aspect-ratio: var(--card-ratio);
  border: none; padding: 0; background: none; border-radius: 8%/4.8%;
}
.search .tile img { width: 100%; height: 100%; object-fit: contain; border-radius: 8%/4.8%; box-shadow: 0 .6vmin 1.2vmin rgba(0, 0, 0, .15); transition: opacity .3s; }
.search .tile .a { position: absolute; inset: 0; opacity: 0; }
.search .tile.found .a, .search .tile.miss .a { opacity: 1; }
.search .tile.miss { opacity: .45; }
.search .tile .stamp {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 14vmin; font-weight: 900;
  color: var(--moyasu); opacity: 0; transform: scale(1.6); transition: all .25s cubic-bezier(.3, 1.6, .5, 1);
  text-shadow: 0 0 .1em #fff;
}
.search .tile.found .stamp { opacity: .9; transform: scale(1); }
.search .tile.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6%); } 40%, 80% { transform: translateX(6%); } }

/* ---------- ずかん ---------- */
.zukan .tabs { display: flex; gap: 1vmin; flex-wrap: wrap; }
.zukan .tabs button { border: none; border-radius: 999px; padding: .4em 1em; font-weight: 800; font-size: clamp(13px, 2.4vmin, 28px); background: #fff; box-shadow: 0 .15em 0 rgba(0, 0, 0, .1); }
.zukan .tabs button.on { color: #fff; background: var(--tc, var(--navy)); }
.zukan .desc {
  margin: 0 2vmin; padding: 1.4vmin 2vmin; border-radius: 2vmin; color: #fff; font-weight: 700;
  font-size: clamp(13px, 2.6vmin, 30px); line-height: 1.6;
}
.zukan .list {
  flex: 1; overflow-y: auto; padding: 2vmin; -webkit-overflow-scrolling: touch;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(90px, 15vmin, 200px), 1fr)); gap: 1.6vmin;
  align-content: start;
}
.zukan .list button { border: none; padding: 0; background: none; }
.zukan .list img { width: 100%; border-radius: 1.2vmin; box-shadow: 0 .5vmin 1vmin rgba(0, 0, 0, .12); }
.zukan .note { font-size: clamp(11px, 1.8vmin, 18px); opacity: .7; padding: 0 2vmin 1.5vmin; font-weight: 700; }

/* 縦長画面の調整 */
@media (orientation: portrait) {
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chars-row { height: 14vmin; }
  .result-panel { grid-template-columns: 1fr; justify-items: center; overflow-y: auto; }
  .result-panel .rcard { height: 34vh; }
  .host .main { grid-template-columns: 1fr; justify-items: center; }
  .search .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); }
}

/* ---------- もっと しらべよう ---------- */
.zukan .desc .ext { display: inline-block; margin-left: .6em; color: #fff; font-weight: 800; white-space: nowrap; }
.zukan .topbar .links-btn { font-size: clamp(13px, 2.2vmin, 24px); padding: .4em 1em; }
.links .link-body { flex: 1; overflow-y: auto; padding: 0 3vmin 4vmin; -webkit-overflow-scrolling: touch; }
.links .link-body section { width: min(1000px, 100%); margin: 0 auto 3.2vmin; }
.links h3 { font-size: clamp(15px, 2.6vmin, 30px); margin: 1.6vmin .2em 1.2vmin; color: var(--navy); }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; }
.link-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .08);
  color: var(--ink); text-decoration: none;
  font-size: clamp(15px, 2.3vmin, 24px);
}
.link-card:active { transform: translateY(2px); }
.li-icon { flex: none; width: 2.3em; height: 2.3em; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--navy); }
.li-icon svg { width: 60%; height: 60%; }
.li-icon.video { background: #e8453c; }
.li-icon.pdf { background: #f1a81b; }
.link-card .li-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3em; line-height: 1.35; }
.link-card .li-text b { font-weight: 800; }
.link-card .li-text small { font-size: .72em; opacity: .65; font-weight: 700; }
.link-card .li-go, .cat-tile .li-go { flex: none; font-size: 1.6em; line-height: 1; color: #b9b2a3; font-weight: 700; }
.link-card .li-multi { display: flex; gap: 8px; flex-wrap: wrap; margin-top: .4em; }
.link-card .li-multi .btn { font-size: .85em; padding: .35em 1em; text-decoration: none; color: var(--ink); background: #f1f2fa; }
.cat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.cat-tile {
  display: flex; align-items: center; justify-content: space-between; gap: .4em;
  background: var(--tc); color: #fff; text-decoration: none; border-radius: 16px; padding: 14px 16px;
  font-size: clamp(14px, 2.2vmin, 22px); font-weight: 800; line-height: 1.3; box-shadow: 0 3px 0 rgba(0, 0, 0, .12);
}
.cat-tile .li-go { color: rgba(255, 255, 255, .8); }
@media (max-width: 700px) {
  .cat-tiles { grid-template-columns: 1fr; }
}
.links .note { font-size: clamp(11px, 1.8vmin, 18px); opacity: .7; font-weight: 700; margin-top: 2.4vmin; }

.disclaimer { margin: 0; font-size: clamp(11px, 1.7vmin, 18px); font-weight: 700; opacity: .65; text-align: center; }
.host-tools { display: flex; gap: 1vmin; }
.host-tools .btn { font-size: clamp(13px, 2vmin, 24px); padding: .4em 1em; }

/* ---------- きいてみよう（チャット） ---------- */
.chat .log {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 1vmin 3vmin 2vmin; display: flex; flex-direction: column; gap: 1.4vmin;
  font-size: clamp(15px, 2.8vmin, 30px); line-height: 1.6;
}
.chat .msg { display: flex; align-items: flex-end; gap: 1.4vmin; max-width: min(900px, 92%); animation: fadein .2s; }
.chat .msg.user { align-self: flex-end; }
.chat .msg.bot { align-self: flex-start; }
.chat .avatar { width: clamp(40px, 8vmin, 90px); height: auto; flex: none; }
.chat .bubble-b, .chat .bubble-u { padding: 1.2vmin 2vmin; border-radius: 2.6vmin; font-weight: 700; word-break: break-word; }
.chat .bubble-b { background: #fff; border-bottom-left-radius: .6vmin; box-shadow: 0 .4vmin 0 rgba(0, 0, 0, .08); }
.chat .bubble-u { background: var(--navy); color: #fff; border-bottom-right-radius: .6vmin; }
.chat .bubble-b.media { padding: 1vmin; }
.chat .bubble-b .memo { font-size: .82em; opacity: .8; }
.chat .bubble-b .ok { color: var(--moyasu); }
.chat .bubble-b .ng { color: var(--navy); }
.chat .chat-card { display: block; height: clamp(150px, 34vmin, 380px); border-radius: 1.2vmin; }
.chat .chat-chars { display: flex; gap: 1vmin; height: 14vmin; }
.chat .chat-chars img { height: 100%; }
.chat .chat-link { color: var(--navy); font-weight: 800; }
.chat .typing { display: flex; gap: .4em; padding: 1.6vmin 2.2vmin; }
.chat .typing span { width: .55em; height: .55em; border-radius: 50%; background: #b9b4cc; animation: blink 1s infinite; }
.chat .typing span:nth-child(2) { animation-delay: .15s; }
.chat .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-30%); } }
.chat .chips { display: flex; gap: 1vmin; flex-wrap: wrap; padding: 0 3vmin 1vmin; min-height: 1px; }
.chat .chip {
  border: .35vmin solid var(--navy); color: var(--navy); background: #fff; border-radius: 999px;
  padding: .4em 1em; font-weight: 800; font-size: clamp(13px, 2.4vmin, 26px);
}
.chat .inputbar { display: flex; gap: 1.2vmin; padding: 1vmin 3vmin 2.4vmin; align-items: center; }
.chat .inputbar input {
  flex: 1; min-width: 0; border: .4vmin solid #d8d3e6; border-radius: 999px; padding: .6em 1em;
  font-family: inherit; font-size: clamp(16px, 2.8vmin, 30px); font-weight: 700; color: var(--ink); outline: none;
  -webkit-user-select: text; user-select: text;
}
.chat .inputbar input:focus { border-color: var(--navy); }
.chat .mic.on { background: var(--moyasu); color: #fff; }

/* ---------- ともだちと（人数えらび） ---------- */
.friends, .setup { align-items: center; gap: 2vmin; }
.friends .topbar, .setup .topbar { align-self: stretch; }
.friends h2, .setup h2 { margin: 1vmin 0 0; font-size: clamp(24px, 6vmin, 72px); color: var(--navy); }
.friends .count-grid, .setup .count-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3vmin; width: min(1100px, 94vw); }
.friends .count-btn, .setup .count-btn {
  border: none; background: #fff; border-radius: 3vmin; padding: 2.4vmin 1.6vmin;
  box-shadow: 0 .7vmin 0 rgba(0, 0, 0, .15); border-bottom: 1.2vmin solid var(--p2);
  display: flex; flex-direction: column; align-items: center; gap: 1vmin; font-weight: 800;
  font-size: clamp(13px, 2.4vmin, 28px);
}
.friends .count-btn:active, .setup .count-btn:active { transform: translateY(.5vmin); }
.friends .count-btn .faces { display: flex; justify-content: center; height: 14vmin; }
.friends .count-btn .faces img { height: 100%; margin: 0 -1vmin; }
.friends .count-btn b { font-size: clamp(36px, 10vmin, 120px); line-height: 1; color: var(--navy); }
.friends .count-btn b small { font-size: .35em; }
.friends .hint { font-size: clamp(14px, 2.8vmin, 30px); font-weight: 700; text-align: center; line-height: 1.7; }
.versus.four.n3 .zone.p1, .versus.four.n3 .zone.p2 { right: .8vmin; }

.friends .setting-row { display: flex; align-items: center; gap: 1.6vmin; font-weight: 800; font-size: clamp(14px, 2.6vmin, 30px); }
.friends .setting-row .seg { font-size: 1em; }
.setup h2 { margin-top: 6vmin; }
.setup .count-btn { border-bottom-color: var(--p1); padding: 3vmin 1.6vmin; }
.setup .count-btn img { height: 16vmin; }
.setup .count-btn b { font-size: clamp(22px, 5.4vmin, 64px); color: var(--navy); }
.setup .count-btn.last { outline: .6vmin solid var(--p1); }

/* ---------- ホームの追加部品 ---------- */
.status-row { display: flex; gap: 1vmin; flex-wrap: wrap; justify-content: center; border: none; background: none; padding: 0; font-size: clamp(13px, 2.2vmin, 26px); font-weight: 800; }
.status-row .pill b { color: var(--moyasu); font-size: 1.2em; }
.event-btn { background: transparent; box-shadow: none; text-decoration: underline; opacity: .75; font-size: clamp(12px, 1.9vmin, 22px); }
.chat-fab {
  position: fixed; right: max(2.4vmin, env(safe-area-inset-right)); bottom: max(2.4vmin, env(safe-area-inset-bottom)); z-index: 30;
  width: clamp(64px, 12vmin, 120px); height: clamp(64px, 12vmin, 120px); border-radius: 50%; border: none;
  background: var(--navy); color: #fff; box-shadow: 0 .8vmin 1.6vmin rgba(40, 30, 90, .35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1em;
  font-weight: 800; font-size: clamp(10px, 1.6vmin, 18px); animation: fabin .5s cubic-bezier(.3, 1.6, .5, 1);
}
.chat-fab svg { width: 50%; height: auto; }
.chat-fab:active { transform: scale(.94); }
@keyframes fabin { from { transform: scale(0); } }

.toast {
  position: fixed; left: 50%; top: 3vmin; transform: translateX(-50%); z-index: 300;
  background: #fff; border-radius: 2vmin; padding: 1.4vmin 2.4vmin; box-shadow: 0 1vmin 3vmin rgba(0,0,0,.25);
  font-weight: 800; font-size: clamp(14px, 2.6vmin, 30px); display: flex; align-items: center; gap: 1.4vmin; text-align: center;
  animation: toast 2.8s ease forwards; max-width: 92vw;
}
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -40%); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -20%); } }

.badge { display: inline-flex; flex-direction: column; align-items: center; gap: .2em; font-weight: 800; }
.badge > span {
  width: 2.4em; height: 2.4em; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.1em;
  background: var(--bc); border: .2em solid #fff; box-shadow: 0 0 0 .14em var(--bc), 0 .3em .5em rgba(0,0,0,.15);
}
.badge small { font-size: .62em; white-space: nowrap; }
.badge.off > span { background: #e3e0ec; box-shadow: 0 0 0 .14em #d0cbe0; color: #a9a3bd; }
.badge.off small { opacity: .5; }

/* ---------- スタンプ ---------- */
.stamp { width: 100%; aspect-ratio: 1; border-radius: 50%; background: #fff7e0; border: .5vmin dashed #f1c84b; position: relative; display: grid; place-items: center; }
.stamp img { width: 78%; height: 78%; object-fit: contain; transform: rotate(-8deg); }
.stamp small { position: absolute; bottom: -1.6em; left: 0; right: 0; text-align: center; font-weight: 800; font-size: clamp(10px, 1.6vmin, 18px); opacity: .7; }
.stamp:not(.empty) { border-style: solid; border-color: var(--moyasu); background: #fff; }
.stamp.big { width: min(30vmin, 260px); animation: stampin .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes stampin { from { transform: scale(2.2) rotate(20deg); opacity: 0; } }
.stamp-pop { grid-template-columns: 1fr; justify-items: center; text-align: center; width: min(92vw, 640px); }
.stamps .stamp-body { flex: 1; overflow-y: auto; padding: 0 3vmin 4vmin; display: flex; flex-direction: column; align-items: center; gap: 2.4vmin; }
.stamps .stats { display: flex; gap: 2vmin; flex-wrap: wrap; justify-content: center; }
.stamps .stats > div { background: #fff; border-radius: 2vmin; padding: 1.2vmin 2.4vmin; display: flex; align-items: baseline; gap: .3em; font-weight: 800; font-size: clamp(14px, 2.6vmin, 30px); box-shadow: 0 .4vmin 0 rgba(0,0,0,.08); }
.stamps .stats b { font-size: 2em; color: var(--moyasu); }
.stamps .badges, .zukan .badges { display: flex; gap: 2vmin; flex-wrap: wrap; justify-content: center; font-size: clamp(13px, 2.4vmin, 28px); }
.stamps .sheet { background: #fff; border-radius: 3vmin; padding: 2vmin 3vmin 4vmin; width: min(900px, 94vw); box-shadow: 0 .6vmin 0 rgba(0,0,0,.08); }
.stamps .sheet h3 { margin: 0 0 1.6vmin; color: var(--navy); font-size: clamp(14px, 2.6vmin, 28px); }
.stamps .slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3vmin 2.4vmin; }
.stamps .note { font-size: clamp(11px, 1.8vmin, 18px); opacity: .7; font-weight: 700; text-align: center; }

/* ---------- ずかん（コレクション） ---------- */
.zukan .collection { display: flex; align-items: center; gap: 2vmin; flex-wrap: wrap; padding: 0 2vmin 1.4vmin; font-weight: 800; font-size: clamp(13px, 2.4vmin, 26px); }
.zukan .collection .pill b { color: var(--moyasu); font-size: 1.2em; }
.zukan .collection .badges { font-size: clamp(11px, 1.9vmin, 22px); gap: 1.4vmin; }
.zukan .collection .show-all { margin-left: auto; font-size: clamp(11px, 1.8vmin, 20px); padding: .4em 1em; }
.zukan .list button.locked { position: relative; }
.zukan .list button.locked .q { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(28px, 7vmin, 80px); font-weight: 900; color: #fff; text-shadow: 0 0 .2em rgba(80, 70, 120, .5); }
.zukan .topbar { flex-wrap: wrap; }
.zukan .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: .4vmin; }
.zukan .tabs button { white-space: nowrap; flex: none; }

/* ---------- せまい画面（スマホ・縦置き） ---------- */
@media (max-width: 700px) {
  .mode-grid.play { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-grid.learn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zukan .tabs { order: 3; width: 100%; }
  .zukan .collection .show-all { margin-left: 0; }
  .friends .count-grid, .setup .count-grid { grid-template-columns: 1fr; }
  .friends .count-btn .faces, .setup .count-btn img { height: 10vmin; }
  .stamps .slots { gap: 4vmin 3vmin; }
  .chat-fab span { display: none; }
}
@media (orientation: portrait) and (min-width: 701px) {
  .mode-grid.play { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.stamp-pop { gap: 2vmin; padding: 3vmin; }
.stamp-pop .mark { font-size: clamp(26px, 6vmin, 72px); color: var(--moyasu); }
.stamp-pop .stamp.big { width: min(26vmin, 240px); height: min(26vmin, 240px); flex: none; }
.stamp-pop .answer-line { font-size: clamp(16px, 3.4vmin, 40px); }
.stamp-pop .bubble { font-size: clamp(14px, 2.6vmin, 30px); }
.stamp-pop .bubble::before { display: none; }
.chat .notice {
  align-self: center; max-width: min(760px, 94%); text-align: center;
  background: #fffbe8; border: .3vmin solid #f1c84b; border-radius: 1.6vmin; padding: 1vmin 2vmin;
  font-size: .8em; font-weight: 700; line-height: 1.6;
}
.chat .notice b { display: block; color: #b07d00; }
@media (max-width: 700px) {
  .solo .card3d { height: min(50vh, 100vw); }
  .solo .hint { font-size: 13px; text-align: center; padding: 0 2vw; }
  .solo .bins .bin { width: 30vw; }
}

/* ---------- 多言語 ---------- */
.lang-sw { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: .4em; margin-top: .6vmin; }
.lang-sw button {
  border: 2px solid #d9cfb8; background: #fff; color: var(--ink); border-radius: 999px;
  padding: .2em .8em; font: inherit; font-size: clamp(12px, 1.8vmin, 18px); font-weight: 700; cursor: pointer;
}
.lang-sw button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
/* カードの絵には日本語が入っているので、下に訳の名前を出す */
.cap {
  position: absolute; left: 6%; right: 6%; bottom: 3%;
  background: rgba(255, 255, 255, .92); color: var(--ink); border-radius: .5em;
  font-weight: 800; text-align: center; line-height: 1.2; padding: .2em .3em;
  font-size: clamp(11px, 2.4vmin, 26px); box-shadow: 0 .1em .3em rgba(0, 0, 0, .15);
  pointer-events: none;
}
.search .tile .cap, .zukan .list .cap { font-size: clamp(10px, 1.6vmin, 16px); }
.zukan .list button { position: relative; }
html:not([lang="ja"]) .bin .body { white-space: normal; line-height: 1.1; padding: 0 8% 4%; }
html[lang="en"] .bin[data-cat] .body { font-size: 8cqi; }
html[lang="en"] .bin[data-cat="shigen"] .body { font-size: 9cqi; }
html[lang="ko"] .bin[data-cat="shigen"] .body { font-size: 14cqi; }
html[lang="ko"] .bin[data-cat="togakin"] .body { font-size: 9cqi; }
html[lang="zh-Hans"] .bin[data-cat="togakin"] .body { font-size: 10cqi; }
.versus .cap { font-size: clamp(8px, 1.5vmin, 15px); padding: .1em .2em; }

/* ---------- せってい ---------- */
.screen.home .settings-btn {
  position: absolute; top: 2vmin; left: 2vmin; z-index: 2;
  display: inline-flex; align-items: center; gap: .3em; font-size: clamp(13px, 2vmin, 22px);
}
.screen.home .settings-btn svg { width: 1.4em; height: 1.4em; }
.settings-screen .set-body { flex: 1; overflow-y: auto; padding: 0 3vmin 4vmin; display: flex; flex-direction: column; align-items: center; gap: 1.6vmin; }
.set-row {
  width: min(760px, 94vw); background: #fff; border-radius: 2vmin; padding: 1.4vmin 2.4vmin;
  display: flex; align-items: center; justify-content: space-between; gap: 2vmin; flex-wrap: wrap;
  font-weight: 800; font-size: clamp(14px, 2.4vmin, 26px); box-shadow: 0 .4vmin 0 rgba(0, 0, 0, .08);
}
.set-row > span:first-child { display: flex; flex-direction: column; }
.set-row small { font-size: .6em; font-weight: 700; opacity: .65; }
.set-row .btn { font-size: .85em; padding: .4em 1.2em; }
.set-row .seg { flex-wrap: wrap; }
.set-row.adult { background: #f4f1ea; }
.settings-screen .about {
  width: min(760px, 94vw); background: #fff; border-radius: 2vmin; padding: 1.6vmin 2.8vmin;
  font-size: clamp(13px, 2vmin, 20px); line-height: 1.7; box-shadow: 0 .4vmin 0 rgba(0, 0, 0, .08);
}
.settings-screen .about h3 { margin: 0 0 .4em; color: var(--navy); }
.settings-screen .about p { margin: .5em 0; }
.settings-screen .about .disc { opacity: .75; font-weight: 700; }
.settings-screen .about .credit { text-align: right; font-weight: 800; opacity: .75; }
.stamps .sec-title { margin: 1vmin 0 0; color: var(--navy); font-size: clamp(14px, 2.6vmin, 28px); }
.stamps .sec-title b { color: var(--moyasu); }
.card-list { width: min(1100px, 96vw); display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(80px, 14vmin, 150px), 1fr)); gap: 1.6vmin; }
.card-list button { position: relative; border: none; padding: 0; background: none; }
.card-list img { width: 100%; border-radius: 1.2vmin; box-shadow: 0 .5vmin 1vmin rgba(0, 0, 0, .12); display: block; }
.card-list .locked .q { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(28px, 6vmin, 70px); font-weight: 900; color: #fff; text-shadow: 0 0 .2em rgba(80, 70, 120, .5); }
.card-list .cap { font-size: clamp(10px, 1.6vmin, 16px); }
@media (max-width: 700px) {
  .screen.home { padding-top: 60px; }
  .screen.home .settings-btn { top: 10px; left: 10px; }
}
.settings-screen .about .credit { display: flex; align-items: center; justify-content: flex-end; gap: .6em; }
.settings-screen .about .credit img { height: 4.5em; }

/* ---------- ホーム上部（すっきり版） ---------- */
.screen.home header { margin-top: 1vmin; }
.screen.home .sub { margin-top: .6em; }
.screen.home .chars-row { margin: 1.4vmin 0 .4vmin; }
.lang-pick {
  position: absolute; top: 2vmin; right: 2vmin; z-index: 2;
  display: inline-flex; align-items: center; gap: .35em;
  background: #fff; border-radius: 999px; padding: .35em .9em; color: var(--ink);
  font-size: clamp(13px, 2vmin, 22px); font-weight: 800; box-shadow: 0 .15em 0 rgba(0, 0, 0, .12); cursor: pointer;
}
.lang-pick svg { width: 1.3em; height: 1.3em; flex: none; }
.lang-pick select {
  appearance: none; -webkit-appearance: none; border: none; background: transparent; font: inherit; color: inherit;
  padding-right: 1em; cursor: pointer; outline-offset: 2px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right .35em center, right 0 center; background-size: .35em .35em; background-repeat: no-repeat;
}
.status-row {
  display: inline-flex; gap: 0; flex-wrap: nowrap; align-items: center;
  background: #fff; border-radius: 999px; padding: .45em .4em; margin-bottom: 1vmin;
  box-shadow: 0 .2em 0 rgba(0, 0, 0, .1); font-size: clamp(12px, 2vmin, 22px); font-weight: 800; color: var(--ink); cursor: pointer;
}
.status-row > span { padding: 0 1.1em; white-space: nowrap; }
.status-row > span + span { border-left: 2px solid #eee3cc; }
.status-row b { color: var(--moyasu); font-size: 1.25em; }
@media (max-width: 700px) {
  .lang-pick { top: 10px; right: 10px; }
  .status-row > span { padding: 0 .8em; }
}
.settings-screen .about .credit > span { display: flex; flex-direction: column; align-items: flex-end; gap: .5em; }
.settings-screen .about .brand-link { font-size: .9em; padding: .4em 1.1em; text-decoration: none; color: var(--ink); opacity: 1; }
.settings-screen .about .credit { opacity: 1; color: #6b6577; }
.settings-screen .about .brand-link { color: var(--ink); }
/* 注意書きは 画面の いちばん下に（右下の チャットボタンに かぶらないよう 左右に よゆう） */
.screen.home .disclaimer { margin-top: auto; padding: 2vmin calc(clamp(64px, 12vmin, 120px) + 3vmin) .4vmin; }
/* 注意書きは ことばの 区切り（<wbr>）でだけ 改行する */
html[lang="ja"] .disclaimer, html[lang="ja"] .about .disc, html[lang="ja"] .chat .notice { word-break: keep-all; overflow-wrap: anywhere; }
.disclaimer { text-wrap: balance; }

/* ---------- 清掃車 ---------- */
.truck-in { flex: none; display: flex; justify-content: center; overflow: visible; }
.truck-in img { height: 100%; animation: truck-in 1.1s cubic-bezier(.2, .8, .3, 1) both, truck-bob .5s ease-in-out 1.1s 3; }
@keyframes truck-in { from { transform: translateX(60vw); } to { transform: translateX(0); } }
@keyframes truck-bob { 50% { transform: translateY(-3%); } }
.end .truck-in { height: clamp(70px, 16vmin, 180px) !important; }
.truck-loop { overflow: hidden; height: clamp(60px, 13vmin, 150px); margin-top: 2vmin; position: relative; }
.truck-loop img { position: absolute; height: 100%; left: 100%; animation: truck-loop 9s linear infinite; }
@keyframes truck-loop { from { left: 100%; transform: translateX(0); } to { left: 0; transform: translateX(-100%); } }
.end { overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  .truck-in img, .truck-loop img { animation: none; }
  .truck-loop img { left: 50%; transform: translateX(-50%); }
}
/* ホームを よこぎる 清掃車 */
.drive-by { position: absolute; left: 0; right: 0; bottom: 1vmin; height: clamp(80px, 18vmin, 200px); overflow: hidden; pointer-events: none; z-index: 20; }
.drive-by img { position: absolute; height: 100%; left: 100%; animation: drive-by 5s linear .4s both; }
@keyframes drive-by {
  0% { left: 100%; transform: translateX(0) translateY(0); }
  25% { transform: translateX(-25%) translateY(-2%); }
  50% { transform: translateX(-50%) translateY(0); }
  75% { transform: translateX(-75%) translateY(-2%); }
  100% { left: 0; transform: translateX(-100%) translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .drive-by { display: none; } }
.setup .count-btn b { white-space: nowrap; }
.setup .count-btn .count-sub { font-size: clamp(13px, 2.4vmin, 26px); font-weight: 800; opacity: .6; margin-top: -.4em; }
/* スタンプは 絵の 大きさに ひっぱられず、いつも まんまる */
.stamp { align-self: start; }
.stamp img { position: absolute; inset: 11%; width: 78%; height: 78%; }

/* ---------- はじめての ごあんない ---------- */
.intro-pop { grid-template-columns: 1fr; justify-items: center; text-align: center; width: min(92vw, 600px); gap: 1.6vmin; padding: 3vmin; }
.intro-pop .intro-img { height: clamp(110px, 24vmin, 240px); max-width: 90%; object-fit: contain; animation: bob 2.4s ease-in-out infinite; transform-origin: bottom center; }
.intro-pop .intro-img.truck { height: clamp(100px, 20vmin, 200px); }
.intro-pop h2 { margin: 0; color: var(--navy); font-size: clamp(22px, 5vmin, 52px); }
.intro-pop .bubble { align-self: stretch; text-align: left; font-size: clamp(15px, 2.6vmin, 28px); line-height: 1.7; }
.intro-pop .bubble::before { display: none; }
.intro-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: .5em; font-size: clamp(14px, 2.4vmin, 26px); }
.intro-dots { display: flex; gap: .6em; }
.intro-dots span { width: .7em; height: .7em; border-radius: 50%; background: #e2dccd; }
.intro-dots span.on { background: var(--navy); }
.intro-btns { display: flex; gap: 1.4vmin; }
