/* ========== めざせ！お金マスター エンとフランのだいぼうけん ========== */
/* 絵本の水彩タッチに合わせた羊皮紙カラー基調のUI */

:root {
  --paper: #f7ecd4;
  --paper-dark: #ecd9b0;
  --wood: #8a5a2b;
  --wood-dark: #6b4420;
  --ink: #4a3520;
  --accent: #e0803c;
  --green: #7aa85c;
  --red: #cc5a4a;
  --blue: #6a9ec9;
  --gold: #e8b23a;
  --shadow: rgba(74, 53, 32, .25);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: "Hiragino Maru Gothic ProN", "BIZ UDGothic", "Yu Gothic UI", "Meiryo", sans-serif;
  background: #d8c294;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#app {
  max-width: 480px;
  height: 100%;
  margin: 0 auto;
  position: relative;
  background: var(--paper);
  box-shadow: 0 0 30px rgba(0,0,0,.3);
  overflow: hidden;
}

/* ふりがなOFF時はルビを隠す */
body.no-furigana rt { display: none; }
body.big-text { font-size: 112%; }
rt { font-size: .5em; color: #7d6748; }

.hidden { display: none !important; }

.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ---------- 汎用ボタン ---------- */
.big-btn {
  display: block;
  background: linear-gradient(#f3b158, var(--accent));
  color: #fff;
  border: 3px solid #b45f22;
  border-radius: 999px;
  padding: 14px 28px;
  margin: 10px auto;
  font-size: 1.15rem;
  font-weight: bold;
  text-align: center;
  min-width: 220px;
  box-shadow: 0 4px 0 #9c4f1b, 0 6px 10px var(--shadow);
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.big-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #9c4f1b; }
.big-btn.secondary { background: linear-gradient(#b9cfa0, var(--green)); border-color: #5c8342; box-shadow: 0 4px 0 #4e7038, 0 6px 10px var(--shadow); }
.big-btn.gray { background: linear-gradient(#cfc4ae, #a89877); border-color: #8a7a5c; box-shadow: 0 4px 0 #786a50; }
.big-btn.small { min-width: 0; padding: 10px 18px; font-size: 1rem; margin: 6px; display: inline-block; }
.big-btn.disabled { filter: grayscale(.8); opacity: .6; pointer-events: none; }

.icon-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-dark);
  border: 2px solid var(--wood);
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn.off { opacity: .4; }

.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---------- タイトル画面 ---------- */
#screen-title {
  background:
    radial-gradient(circle at 50% 20%, #fff7e2 0%, var(--paper) 55%, var(--paper-dark) 100%);
  align-items: center; justify-content: center;
}
.title-inner { text-align: center; padding: 24px; width: 100%; }

/* 全面背景画像モード（assets/ui/title_bg.png が置かれると自動で有効になる） */
#screen-title.has-bg {
  background: url("../assets/ui/title_bg.png?v=12") center / cover no-repeat, #bfe0f0;
}
#screen-title.has-bg #title-logo,
#screen-title.has-bg #title-sub,
#screen-title.has-bg .title-credit { display: none; }
#screen-title.has-bg .title-inner {
  height: 100%; display: flex; flex-direction: column;
  justify-content: center; padding-top: 18vh;
}
#screen-title.has-bg #btn-title-sound { top: auto; bottom: -70px; }
#title-logo { width: min(85%, 380px); height: auto; filter: drop-shadow(0 4px 8px var(--shadow)); }
#title-sub {
  font-size: 1.3rem; font-weight: bold; color: var(--wood-dark);
  margin: 4px 0 30px; letter-spacing: .1em;
  text-shadow: 1px 1px 0 #fff;
}
.title-credit { margin-top: 28px; font-size: .75rem; color: #9a8562; }
#title-menu { position: relative; }
#btn-title-sound { position: absolute; right: 8px; top: -56px; }

/* オープニングムービー */
#opening-wrap {
  position: absolute; inset: 0; background: #1a1208; z-index: 15;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#opening-video { width: 100%; max-height: 80%; }
#video-skip { position: absolute; right: 12px; bottom: max(16px, env(safe-area-inset-bottom)); opacity: .9; }

/* ---------- 初回設定 ---------- */
#screen-setup { align-items: center; justify-content: center; background: var(--paper); }
.setup-inner { width: 90%; max-width: 380px; text-align: center; }
.setup-inner h2 { color: var(--wood-dark); margin-bottom: 18px; }
.setup-label { display: block; text-align: left; font-weight: bold; margin: 14px 0 6px; }
#setup-name {
  width: 100%; padding: 12px; font-size: 1.2rem; text-align: center;
  border: 3px solid var(--wood); border-radius: var(--radius); background: #fff;
}
#setup-difficulty { display: flex; gap: 8px; }
.diff-btn {
  flex: 1; padding: 12px 4px; border: 3px solid var(--wood); border-radius: var(--radius);
  background: #fff; font-size: .85rem; font-weight: bold; line-height: 1.5; cursor: pointer;
}
.diff-btn.selected { background: var(--gold); border-color: #b8860b; }
.diff-btn.disabled { opacity: .45; }
.diff-btn small { color: var(--red); font-size: .7rem; }

/* ---------- HUD・ナビ ---------- */
#hud {
  display: flex; gap: 6px; padding: 10px 8px calc(6px);
  padding-top: max(10px, env(safe-area-inset-top));
  background: linear-gradient(var(--wood), var(--wood-dark));
  box-shadow: 0 3px 6px var(--shadow);
  z-index: 5;
}
.hud-item {
  flex: 1; background: var(--paper); border-radius: 999px;
  padding: 6px 4px; text-align: center; font-weight: bold; font-size: .82rem;
  border: 2px solid #d9c294; white-space: nowrap; overflow: hidden;
}

#navbar {
  display: flex; background: linear-gradient(var(--wood), var(--wood-dark));
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  box-shadow: 0 -3px 6px var(--shadow); z-index: 5;
}
.nav-btn {
  flex: 1; text-align: center; padding: 8px 0 6px; cursor: pointer; color: #fff;
}
.nav-btn:active { background: rgba(255,255,255,.15); }
.nav-icon { display: block; font-size: 1.5rem; }
.nav-label { font-size: .7rem; font-weight: bold; }

/* ---------- 村マップ ---------- */
#village-map {
  flex: 1; overflow-y: auto; position: relative;
  background: linear-gradient(#bfe0f0 0%, #d8ecd2 30%, #e8dfb8 60%, var(--paper) 100%);
  padding: 14px 12px 20px;
}
.village-title {
  text-align: center; font-weight: bold; color: var(--wood-dark);
  background: rgba(255,255,255,.6); border-radius: 999px; padding: 4px 12px;
  margin: 0 auto 12px; width: fit-content; font-size: .95rem;
}
/* むらのひろば：きふボックスの寄付で発展するエリア */
.village-plaza {
  background: rgba(255, 255, 255, .55); border: 3px solid var(--wood);
  border-radius: var(--radius); padding: 8px 10px 6px; margin: 0 auto 12px;
  text-align: center; cursor: pointer; box-shadow: 0 3px 6px var(--shadow);
}
.village-plaza:active { transform: scale(.98); }
.plaza-title { font-weight: bold; font-size: .85rem; color: var(--wood-dark); }
.plaza-empty { font-size: .75rem; color: #9a8562; padding: 6px 0 4px; }
.plaza-items { font-size: 2.1rem; letter-spacing: 6px; line-height: 1.4; padding: 2px 0 4px; }
.plaza-item { display: inline-block; }
/* 新しくできたものの お披露目アニメーション */
.plaza-new { animation: plazaPop .9s ease-out; }
@keyframes plazaPop {
  0% { transform: scale(0) rotate(-20deg); }
  60% { transform: scale(1.6) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}
/* きふボックスカードの「あと🪙◯」バッジ */
.building-badge.kifu-badge { background: #d16ba5; }
.building-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.building-card {
  background: rgba(255,255,255,.75);
  border: 3px solid var(--wood);
  border-radius: var(--radius);
  padding: 10px 6px; text-align: center; cursor: pointer;
  box-shadow: 0 3px 6px var(--shadow);
  position: relative;
}
.building-card:active { transform: scale(.96); }
.building-card.locked { opacity: .65; border-style: dashed; background: rgba(255,255,255,.4); }
.building-emoji { font-size: 2.4rem; line-height: 1.2; }
.building-emoji-img { width: 2.9rem; height: 2.9rem; object-fit: contain; vertical-align: middle; }
.building-name { font-weight: bold; font-size: .9rem; margin-top: 2px; }
.building-note { font-size: .7rem; color: #8a7a5c; }
.building-badge {
  position: absolute; top: -8px; right: -6px; background: var(--red); color: #fff;
  border-radius: 999px; font-size: .68rem; font-weight: bold; padding: 3px 8px;
  border: 2px solid #fff;
}
.village-chars { display: flex; justify-content: center; gap: 16px; margin: 14px 0 6px; flex-wrap: wrap; }

/* キャラ表示（画像 or プレースホルダー） */
.char-sprite { text-align: center; cursor: pointer; }
.char-sprite img, .char-sprite .char-ph { width: 84px; height: 84px; }
.char-ph {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; border: 3px solid rgba(255,255,255,.8);
  box-shadow: 0 3px 6px var(--shadow); margin: 0 auto;
}
.char-sprite .char-label { font-size: .75rem; font-weight: bold; margin-top: 3px; background: rgba(255,255,255,.7); border-radius: 999px; padding: 1px 8px; }
.char-sprite img { object-fit: contain; filter: drop-shadow(0 3px 4px var(--shadow)); }

.speech-bubble {
  position: absolute; left: 50%; transform: translateX(-50%);
  background: #fff; border: 2px solid var(--wood); border-radius: 12px;
  padding: 8px 14px; font-size: .85rem; font-weight: bold; z-index: 8;
  box-shadow: 0 3px 8px var(--shadow); max-width: 80%; text-align: center;
  animation: bubblein .25s ease-out;
}
@keyframes bubblein { from { opacity: 0; transform: translateX(-50%) translateY(6px); } }

/* ---------- サブ画面 ---------- */
#sub-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top));
  background: linear-gradient(var(--wood), var(--wood-dark)); color: #fff;
  box-shadow: 0 3px 6px var(--shadow); z-index: 5;
}
#sub-title { flex: 1; font-weight: bold; font-size: 1.1rem; }
#sub-title .title-icon { height: 1.6rem; width: 1.6rem; object-fit: contain; vertical-align: -0.4rem; margin-right: 2px; }
#sub-coins { font-weight: bold; background: var(--paper); color: var(--ink); border-radius: 999px; padding: 5px 12px; font-size: .85rem; }
#sub-content { flex: 1; overflow-y: auto; padding: 14px 12px 30px; }

.panel {
  background: #fff; border: 3px solid var(--wood); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; box-shadow: 0 3px 6px var(--shadow);
}
.panel h3 { color: var(--wood-dark); margin-bottom: 8px; font-size: 1rem; }
.panel p { line-height: 1.7; font-size: .92rem; }

/* クエストカード */
.quest-card {
  background: linear-gradient(#fffdf5, #f5ecd2);
  border: 3px solid var(--wood); border-radius: var(--radius);
  padding: 12px; margin-bottom: 12px; cursor: pointer;
  box-shadow: 2px 3px 0 var(--shadow);
  position: relative;
}
.quest-card:active { transform: scale(.98); }
.quest-name { font-weight: bold; font-size: 1.02rem; }
.quest-meta { display: flex; gap: 10px; margin-top: 6px; font-size: .82rem; flex-wrap: wrap; }
.quest-reward { color: #b8860b; font-weight: bold; }
.quest-deadline { color: var(--red); font-weight: bold; }
.quest-tag {
  position: absolute; top: -9px; left: 10px; font-size: .68rem; font-weight: bold;
  background: var(--blue); color: #fff; border-radius: 999px; padding: 2px 10px; border: 2px solid #fff;
}
.quest-tag.battle { background: var(--red); }
.quest-tag.again { background: var(--green); }

/* お店 */
.shop-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.shop-tab {
  flex: 1; text-align: center; font-weight: bold; font-size: .85rem;
  padding: 9px 2px; border: 3px solid var(--wood); border-radius: 999px;
  background: #fff; cursor: pointer;
}
.shop-tab.active { background: var(--gold); }
.item-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 3px solid var(--wood); border-radius: var(--radius);
  padding: 10px; margin-bottom: 10px;
}
.item-emoji { font-size: 1.9rem; width: 46px; text-align: center; }
.item-info { flex: 1; }
.item-name { font-weight: bold; font-size: .95rem; }
.item-desc { font-size: .76rem; color: #7d6748; line-height: 1.5; }
.item-price { font-weight: bold; color: #b8860b; white-space: nowrap; }
.item-row .big-btn.small { margin: 0; padding: 8px 14px; font-size: .85rem; }
.item-row.owned { opacity: .55; }
.tag-needs, .tag-wants {
  display: inline-block; font-size: .65rem; font-weight: bold; color: #fff;
  border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: middle;
}
.tag-needs { background: var(--green); }
.tag-wants { background: var(--accent); }
.tag-wish {
  display: inline-block; font-size: .68rem; font-weight: bold; color: #fff;
  background: var(--blue); border-radius: 999px; padding: 2px 8px; margin-top: 4px;
}

/* 貯金箱 */
.piggy-visual { text-align: center; font-size: 3.4rem; margin: 6px 0; }
.progress-outer {
  height: 26px; background: #e8ddc4; border: 2px solid var(--wood);
  border-radius: 999px; overflow: hidden; margin: 8px 0;
}
.progress-inner {
  height: 100%; background: linear-gradient(#ffd97a, var(--gold));
  border-radius: 999px; transition: width .5s ease; min-width: 6px;
}
.money-btns { display: flex; flex-wrap: wrap; justify-content: center; }

/* 牧場 */
.ranch-slot {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(#f2fbe8, #e2f0d2);
  border: 3px solid var(--green); border-radius: var(--radius);
  padding: 12px; margin-bottom: 10px;
}
.ranch-monster { font-size: 2.6rem; width: 56px; text-align: center; }
.ranch-info { flex: 1; font-size: .85rem; line-height: 1.6; }
.warn-box {
  background: #fdf3e3; border: 2px dashed var(--accent); border-radius: var(--radius);
  padding: 10px; font-size: .82rem; line-height: 1.7; margin-bottom: 12px;
}

/* こうかいメーター */
.regret-meter { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.regret-heart { font-size: 1.4rem; filter: grayscale(1); opacity: .35; }
.regret-heart.on { filter: none; opacity: 1; }

/* ---------- 会話 ---------- */
.overlay {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(40, 26, 10, .55);
  display: flex; flex-direction: column; justify-content: flex-end;
}
/* 重なり順：ミニゲーム < 会話 < ポップアップ < 絵本 */
#overlay-game { z-index: 20; }
#overlay-dialog { z-index: 30; }
#overlay-popup { z-index: 40; }

/* 絵本オープニング（タップでめくる） */
#overlay-book {
  z-index: 60; justify-content: center; align-items: center;
  background: #1a130a; cursor: pointer;
}
#book-img {
  max-width: 100%; max-height: calc(100% - 52px);
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}
#book-counter {
  color: #f3e6c8; font-size: .95rem; padding: 12px;
  text-align: center; animation: pulse 1.6s infinite;
}
#dialog-stage { flex: 1; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; }
#dialog-char img, #dialog-char .char-ph { width: 150px; height: 150px; }
#dialog-char img { object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
#dialog-char .char-ph { font-size: 3.4rem; }
#dialog-box {
  background: var(--paper); border-top: 4px solid var(--wood);
  padding: 12px 16px; padding-bottom: max(16px, env(safe-area-inset-bottom));
  min-height: 130px; cursor: pointer;
}
#dialog-name {
  display: inline-block; background: var(--wood); color: #fff; font-weight: bold;
  border-radius: 999px; padding: 3px 14px; font-size: .85rem; margin-bottom: 8px;
  margin-top: -26px; border: 2px solid #fff;
}
#dialog-text { font-size: 1.05rem; line-height: 1.9; min-height: 64px; }
#dialog-next { text-align: right; font-size: .75rem; color: #9a8562; animation: pulse 1.2s infinite; }

/* ---------- ポップアップ ---------- */
#overlay-popup { justify-content: center; align-items: center; }
#popup-box {
  background: var(--paper); border: 4px solid var(--wood); border-radius: 18px;
  width: 88%; max-width: 380px; padding: 18px; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  max-height: 82%; overflow-y: auto;
}
#popup-title { font-weight: bold; font-size: 1.15rem; color: var(--wood-dark); margin-bottom: 10px; }
#popup-body { font-size: .95rem; line-height: 1.8; margin-bottom: 8px; }
#popup-body .huge { font-size: 2.6rem; margin: 6px 0; }

/* ---------- ミニゲーム ---------- */
#overlay-game { background: rgba(40, 26, 10, .35); justify-content: center; }
#game-container {
  background: var(--paper); border-top: 4px solid var(--wood); border-bottom: 4px solid var(--wood);
  height: 100%; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.mg-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top));
  background: var(--wood); color: #fff; font-weight: bold;
}
/* ミニゲームを とちゅうでやめる ✕ボタン */
.mg-quit {
  background: rgba(255, 255, 255, .2); border-radius: 8px;
  padding: 3px 11px; margin-left: 10px; cursor: pointer;
  font-size: 1.05rem; line-height: 1.4; flex-shrink: 0;
}
.mg-quit:active { background: rgba(255, 255, 255, .35); }
.mg-instruction { text-align: center; padding: 10px; font-weight: bold; font-size: 1rem; background: #fff7e2; line-height: 1.6; }
.mg-field { flex: 1; position: relative; overflow: hidden; }
.mg-target {
  position: absolute; font-size: 2.6rem; cursor: pointer;
  animation: popin .2s ease-out; line-height: 1; padding: 8px;
}
@keyframes popin { from { transform: scale(0); } to { transform: scale(1); } }
.mg-basket {
  position: absolute; bottom: 12px; font-size: 3rem; text-align: center;
  border: 3px dashed var(--wood); border-radius: var(--radius); padding: 6px 18px;
  background: rgba(255,255,255,.7);
}
.mg-drag-item { position: absolute; font-size: 2.8rem; cursor: grab; touch-action: none; z-index: 3; line-height: 1; padding: 6px; }

/* おとどけものゲーム */
.deliver-field { background: linear-gradient(#d8ecd2, #e8dfb8); }
.deliver-char {
  position: absolute; width: 34%; text-align: center; cursor: pointer;
}
.deliver-char img, .deliver-char .char-ph { width: 72px; height: 72px; margin: 0 auto; }
.deliver-hand {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
  background: #fff; border: 2px solid var(--accent); border-radius: 999px;
  padding: 4px 10px; font-size: .8rem; font-weight: bold; white-space: nowrap;
  animation: pulse 0.8s infinite;
}
.wobble { animation: shake .4s; }

/* ゴシゴシそうじ */
.scrub-field { background: linear-gradient(#e3f2fb, #d0e8f5); touch-action: none; }
.scrub-tub { position: absolute; bottom: 6px; right: 10px; font-size: 4rem; opacity: .5; pointer-events: none; }
.scrub-spot {
  position: absolute; width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle, #7a6248 30%, #9c8265 70%, transparent 100%);
  cursor: pointer;
}
.scrub-shine { position: absolute; font-size: 2rem; animation: popin .3s; pointer-events: none; }

/* くさむしり */
.weed-field { background: linear-gradient(#e6f2d8, #d2e8c0); }

/* おさらキャッチ */
.mg-rack {
  position: absolute; bottom: 8px; left: 40%; font-size: 2.6rem;
  pointer-events: none; line-height: 1; z-index: 3;
}
.mg-fall { position: absolute; font-size: 2rem; line-height: 1; pointer-events: none; }

/* パンやき */
.bake-field { display: flex; flex-direction: column; justify-content: center; background: linear-gradient(#fbe9d8, #f5d8b8); }
.bake-oven { text-align: center; font-size: 3rem; margin-bottom: 8px; }
.bake-oven span { font-size: 3.6rem; display: inline-block; margin: 0 10px; transition: filter .2s; }
.bake-labels { display: flex; justify-content: space-between; padding: 0 20px; font-size: .75rem; font-weight: bold; color: #8a6a48; }
.bake-dough {
  font-size: 4.6rem; text-align: center; cursor: pointer; user-select: none;
  -webkit-user-select: none; touch-action: manipulation;
  transition: transform .09s; margin: 14px auto; line-height: 1.2;
}
.bake-shapes { display: flex; gap: 8px; justify-content: center; align-items: stretch; padding: 24px 10px; }
.bake-shapes .bake-shape {
  flex: 1; min-width: 0; max-width: 118px;   /* .big-btnのmin-width:220pxを打ち消す（3つ横並びではみ出すため） */
  margin: 0; padding: 12px 4px; border-radius: 18px;
  text-align: center; line-height: 1.35; font-size: 1rem;
}

/* おみせのかたづけ（オリジナル収納パズル）——木の棚の温かいデザイン */
.shelf-score {
  display: flex; justify-content: space-between; font-size: .85rem; font-weight: bold;
  color: var(--wood-dark); background: #fff7e2; padding: 6px 14px;
}
.shelf-field {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(#e8d3ac, #d9bf92); touch-action: none; position: relative;
}
#shelf-canvas {
  border: 6px solid var(--wood); border-radius: 12px; background: #f3e2c0;
  box-shadow: inset 0 2px 8px rgba(74,53,32,.25), 0 3px 8px var(--shadow);
}
.shelf-controls {
  display: flex; gap: 8px; justify-content: center; padding: 10px 0;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: var(--paper-dark);
}
.shelf-btn {
  width: 60px; height: 58px; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 1.5rem; background: #fff; border: 3px solid var(--wood); border-radius: 16px;
  box-shadow: 0 3px 0 var(--wood-dark); cursor: pointer; user-select: none; touch-action: none;
}
.shelf-btn small { font-size: .55rem; font-weight: bold; color: var(--wood-dark); line-height: 1; }
.shelf-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--wood-dark); }
.shelf-pop {
  position: absolute; left: 50%; top: 38%; transform: translateX(-50%);
  background: #fff; border: 3px solid var(--gold); border-radius: 999px;
  padding: 8px 18px; font-weight: bold; color: var(--wood-dark); white-space: nowrap;
  box-shadow: 0 4px 10px var(--shadow); pointer-events: none; z-index: 5;
  animation: shelfpop .9s ease-out forwards;
}
@keyframes shelfpop {
  0% { opacity: 0; transform: translateX(-50%) scale(.6); }
  20% { opacity: 1; transform: translateX(-50%) scale(1.1); }
  70% { opacity: 1; transform: translateX(-50%) translateY(-18px) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-34px) scale(1); }
}

/* ===== 中学生以上：投資チャート ===== */
.fund-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.fund-tab {
  flex: 1; text-align: center; font-size: .78rem; font-weight: bold; line-height: 1.3;
  padding: 8px 2px; border: 3px solid var(--wood); border-radius: var(--radius);
  background: #fff; cursor: pointer;
}
.fund-tab.active { background: var(--gold); }
.fund-price { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0; }
.fund-now { font-size: 1.5rem; font-weight: bold; color: var(--wood-dark); }
.fund-chg { font-weight: bold; }
.fund-chg.up, .up { color: #4e9a52; }
.fund-chg.down, .down { color: #cc5a4a; }
.fund-chart { width: 100%; height: 130px; display: block; margin: 6px 0; background: #fbf4e4; border-radius: 8px; }
.fund-hold { font-size: .9rem; line-height: 1.9; }

/* プレイ時間ロック */
#overlay-timelock { z-index: 100; justify-content: center; align-items: center; background: rgba(20, 14, 46, .92); }
#timelock-box { text-align: center; color: #fff; padding: 30px; }
#timelock-title { font-size: 1.5rem; font-weight: bold; margin: 10px 0; }
#timelock-msg { font-size: 1.05rem; line-height: 1.9; }

/* 貯金目標の 金額入力キーパッド */
.goal-display {
  font-size: 1.8rem; font-weight: bold; color: var(--wood-dark);
  background: #fff; border: 3px solid var(--wood); border-radius: var(--radius);
  padding: 8px; margin: 8px 0; text-align: center;
}
.goal-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 4px; }
.goal-key {
  padding: 12px 0; text-align: center; background: #fff; border: 3px solid var(--wood);
  border-radius: 12px; font-size: 1.3rem; font-weight: bold; cursor: pointer;
  box-shadow: 0 2px 0 var(--wood-dark); user-select: none;
}
.goal-key:active { transform: translateY(2px); box-shadow: none; }
.goal-key-fn { background: var(--paper-dark); }

/* ずかん（であったなかま） */
.zukan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.zukan-cell {
  background: #fff7e2; border: 2px solid var(--wood); border-radius: 12px;
  padding: 6px 2px; text-align: center;
}
.zukan-cell.unknown { opacity: .5; border-style: dashed; }
.zukan-cell img, .zukan-cell .char-ph { width: 56px !important; height: 56px !important; object-fit: contain; }
.zukan-cell .char-ph { font-size: 1.7rem; }
.zukan-q { font-size: 2.4rem; line-height: 56px; }
.zukan-name { font-size: .64rem; font-weight: bold; margin-top: 2px; }

/* ===== キラキラ鉱山（マインスイーパー）===== */
.mine-field {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(#5a4636, #3d2f24); padding: 10px;
}
.mine-grid {
  display: grid; gap: 3px; width: 100%; max-width: 420px;
}
.mine-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #a8845e, #8a6a48);
  border: 2px outset #c4a078; border-radius: 6px;
  font-size: 1.05rem; font-weight: bold; cursor: pointer; user-select: none;
  min-width: 30px;
}
.mine-cell:active { filter: brightness(.85); }
.mine-cell.open {
  background: #efe3cc; border: 1px solid #cbb894; cursor: default;
}
.mine-cell.rock { background: #6b5a48; border-color: #4d4034; }
.mine-cell.gem { background: #fdf2ff; border-color: #d8a8e8; animation: crystalBurst .6s ease-out 2; }
.mine-controls {
  display: flex; gap: 10px; justify-content: center; padding: 10px;
  padding-bottom: max(12px, env(safe-area-inset-bottom)); background: var(--paper-dark);
}
.mine-mode {
  padding: 10px 18px; border: 3px solid var(--wood); border-radius: 999px;
  background: #fff; font-weight: bold; cursor: pointer; font-size: .95rem;
}
.mine-mode.on { background: var(--gold); border-color: #b8860b; box-shadow: 0 0 0 2px #fff inset; }
.mine-mode span { font-size: .78rem; color: var(--wood-dark); }

/* ===== おみせのレジ（百マス計算）===== */
.hm-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 12px; background: #fff7e2; font-weight: bold;
}
#hm-timer { color: var(--wood-dark); }
#hm-prompt { font-size: 1.15rem; }
.hm-grid-wrap { flex: 1; overflow: auto; padding: 6px; background: #fbf4e4; }
.hm-grid { display: grid; gap: 2px; }
.hm-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #d9c294; border-radius: 4px;
  font-size: .78rem; font-weight: bold; min-width: 26px;
}
.hm-cell.hm-head { background: var(--paper-dark); color: var(--wood-dark); }
.hm-cell.cur { background: #fff3c8; border: 2px solid var(--gold); }
.hm-cell.ok { background: #e3f2d8; color: #4e7038; }
.hm-cell.ng { background: #f8d7d0; animation: shake .3s; }
.hm-small { font-size: .6rem; color: #9a8562; }
.hm-pad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px;
  padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--paper-dark);
}
.hm-key {
  padding: 11px 0; text-align: center; background: #fff; border: 3px solid var(--wood);
  border-radius: 12px; font-size: 1.2rem; font-weight: bold; cursor: pointer;
  box-shadow: 0 2px 0 var(--wood-dark); user-select: none; touch-action: none;
}
.hm-key:active { transform: translateY(2px); box-shadow: none; }
.hm-key-wide { font-size: .9rem; }

/* ===== むらのおとどけセンター（ベルトコンベア）===== */
.cv-combo {
  text-align: center; font-weight: bold; padding: 4px; background: #fff7e2;
  font-size: .9rem; color: var(--wood-dark);
}
.cv-combo.hot { color: #d1560a; animation: pulse 0.6s infinite; }
.cv-field { background: linear-gradient(#e8f0d8, #dce8c8); position: relative; overflow: visible; }
.cv-belt {
  position: absolute; left: 50%; transform: translateX(-50%); top: 0; bottom: 0;
  width: 64px; background: repeating-linear-gradient(0deg, #9c8265 0 14px, #8a7358 14px 28px);
  border-left: 4px solid var(--wood-dark); border-right: 4px solid var(--wood-dark);
  overflow: visible;
}
.cv-item {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 2.1rem; line-height: 1; z-index: 3; top: -40px;
  filter: drop-shadow(0 2px 3px var(--shadow)); pointer-events: none;
  background: #fff; border-radius: 10px; padding: 3px 5px; border: 2px solid var(--wood);
}
.cv-arrow {
  position: absolute; bottom: -4px; font-size: 1.6rem; z-index: 4;
  transition: left .25s ease; animation: pulse 1s infinite;
}
.cv-shops {
  display: flex; gap: 6px; padding: 8px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: var(--paper-dark); justify-content: center;
}
.cv-shop {
  flex: 1; max-width: 88px; background: #fff; border: 3px solid var(--wood); border-radius: 12px;
  padding: 6px 2px; text-align: center; cursor: pointer; position: relative;
}
.cv-shop:active { transform: scale(.95); }
.cv-shop.routed { background: #fff3c8; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold), 0 3px 6px var(--shadow); }
.cv-keeper { height: 48px; display: flex; align-items: center; justify-content: center; }
.cv-keeper img, .cv-keeper .char-ph { width: 46px !important; height: 46px !important; }
.cv-keeper .char-ph { font-size: 1.4rem; }
.cv-keeper.happy { animation: keeperHop .5s ease-out; }
@keyframes keeperHop { 0% { transform: translateY(0); } 40% { transform: translateY(-12px) scale(1.1); } 100% { transform: translateY(0); } }
.cv-keeper.confused { animation: shake .45s; }
.cv-shop-name { font-size: .66rem; font-weight: bold; margin-top: 2px; }
.cv-thanks {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  background: #fff; border: 2px solid var(--green); border-radius: 999px;
  padding: 2px 8px; font-size: .68rem; font-weight: bold; white-space: nowrap; z-index: 6;
  animation: coinfly .9s ease-out forwards;
}
.cv-banner {
  position: absolute; top: 34%; left: 50%; transform: translateX(-50%);
  background: var(--gold); border: 3px solid #b8860b; border-radius: 999px;
  padding: 10px 20px; font-weight: bold; white-space: nowrap; z-index: 8;
  box-shadow: 0 4px 12px var(--shadow); animation: bannerIn 1.6s ease-out forwards;
}
@keyframes bannerIn {
  0% { opacity: 0; transform: translateX(-50%) scale(.5); }
  15% { opacity: 1; transform: translateX(-50%) scale(1.1); }
  25% { transform: translateX(-50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-16px); }
}

/* ===== キッズショップ ===== */
.shop-stock-row {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 3px solid var(--wood); border-radius: var(--radius);
  padding: 8px; margin-bottom: 8px;
}
.price-tiers { display: flex; gap: 4px; margin-top: 4px; }
.ptier {
  font-size: .68rem; font-weight: bold; padding: 2px 8px; border-radius: 999px;
  border: 2px solid var(--wood); background: #fff; cursor: pointer; color: var(--ink);
}
.ptier.on { background: var(--gold); border-color: #b8860b; }
.stock-qty { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.qbtn {
  width: 34px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border-radius: 8px; font-weight: bold; font-size: 1.2rem;
  cursor: pointer; border: 2px solid #b45f22;
}
.qbtn:active { transform: translateY(1px); }
.qnum { font-weight: bold; font-size: 1.1rem; min-width: 28px; text-align: center; }

/* 接客シーン */
.shop-scene {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(#fce8c8, #f5d9b0); overflow-y: auto; padding: 10px;
}
.shop-auto { text-align: center; font-weight: bold; font-size: 1.1rem; margin: auto; line-height: 1.8; }
.shop-customer { text-align: center; margin-top: 6px; }
.cust-face { font-size: 3.2rem; animation: custBounce .5s ease-out; }
@keyframes custBounce { from { transform: translateY(-20px); opacity: 0; } }
.speech-bubble2 {
  display: inline-block; background: #fff; border: 3px solid var(--wood); border-radius: 14px;
  padding: 8px 16px; font-size: 1.3rem; font-weight: bold; margin-top: 4px; box-shadow: 0 3px 6px var(--shadow);
}
.shop-timer { width: 90%; height: 8px; background: #e8ddc4; border-radius: 999px; margin: 8px 0; overflow: hidden; }
.shop-timer-bar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); border-radius: 999px; transition: width .1s linear; }
.shop-register {
  width: 100%; background: rgba(255,255,255,.7); border-radius: var(--radius);
  padding: 10px; text-align: center;
}
.reg-label { font-weight: bold; margin-bottom: 6px; line-height: 1.6; }
.reg-cart { min-height: 30px; font-size: 1.5rem; font-weight: bold; margin-bottom: 6px; }
.cart-total { color: #b8860b; }
.reg-shelf { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.shelf-item {
  display: flex; flex-direction: column; align-items: center; width: 74px; padding: 6px 2px;
  background: #fff; border: 3px solid var(--wood); border-radius: 12px; font-size: 1.8rem; cursor: pointer;
}
.shelf-item:active { transform: scale(.94); }
.shelf-item.shake { animation: shake .4s; }
.shelf-name { font-size: .68rem; font-weight: bold; }
.shelf-price { font-size: .66rem; color: #b8860b; font-weight: bold; }
.reg-total { font-weight: bold; margin-bottom: 8px; }
.change-opts { display: flex; flex-direction: column; gap: 8px; }
.change-btn {
  background: #fff; border: 3px solid var(--blue); border-radius: 999px;
  padding: 12px; font-size: 1.2rem; font-weight: bold; cursor: pointer;
}
.change-btn:active { background: #e8f2fb; }
.cust-result { font-weight: bold; font-size: 1.1rem; line-height: 1.8; padding: 8px; }
.cust-result.ok { color: #4e9a52; }
.cust-result.ng { color: var(--accent); }
.result-line { display: flex; justify-content: space-between; padding: 4px 0; font-size: .95rem; }
.result-line.total { border-top: 2px solid var(--wood); margin-top: 4px; padding-top: 8px; font-size: 1.1rem; }

/* ===== ひかりのクリスタル（レーザーパズル）===== */
.crystal-top {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 6px 12px; background: #2a1e5c; color: #ffe9a8; font-size: .8rem; font-weight: bold;
}
.crystal-top .cr-hint-txt { font-weight: normal; font-size: .72rem; opacity: .9; text-align: right; }
.crystal-stage {
  flex: 1; display: flex; align-items: center; justify-content: center; position: relative;
  background: radial-gradient(circle at 50% 40%, #3a2c78 0%, #241a52 70%, #1a1240 100%);
  overflow: hidden;
}
.crystal-wrap { position: relative; border-radius: 10px; }
.cr-cell {
  position: absolute; display: flex; align-items: center; justify-content: center;
  box-sizing: border-box; font-size: 1.5rem;
}
.cr-cell.cr-emitter { font-size: 1.7rem; }
.cr-crystal { transition: transform .2s, filter .3s; filter: grayscale(.6) brightness(.7); }
.cr-crystal.lit { filter: none; animation: crystalPulse 1s ease-in-out infinite; }
@keyframes crystalPulse { 0%,100% { transform: scale(1); text-shadow: 0 0 8px currentColor; } 50% { transform: scale(1.2); text-shadow: 0 0 18px currentColor, 0 0 30px currentColor; } }
.cr-crystal.clear-burst { animation: crystalBurst .6s ease-out 3; }
@keyframes crystalBurst { 0% { transform: scale(1); } 50% { transform: scale(1.5); text-shadow: 0 0 24px #fff, 0 0 40px currentColor; } 100% { transform: scale(1); } }
.cr-wall { font-size: 1.4rem; }
.cr-portal { animation: spinSlow 3s linear infinite; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.cr-splitter { color: #8fd4ff; text-shadow: 0 0 8px #8fd4ff; }
.cr-mirror {
  border-radius: 8px; cursor: pointer;
  background: linear-gradient(145deg, rgba(180,200,255,.22), rgba(120,140,220,.12));
  border: 1px solid rgba(180,200,255,.3);
}
.cr-mirror .cr-glass {
  font-size: 2rem; font-weight: bold; color: #dff0ff; line-height: 1;
  text-shadow: 0 0 8px #bcd8ff, 0 0 2px #fff;
}
.cr-rot:active { transform: scale(.9); }
.cr-fixed { cursor: default; background: rgba(120,110,90,.35); position: relative; }
.cr-fixed .cr-glass { color: #c9c2a8; text-shadow: none; }
.cr-fixed::after { content: ""; }
.cr-mirror.spin .cr-glass { animation: mirrorSpin .25s ease-out; }
@keyframes mirrorSpin { from { transform: rotate(-90deg) scale(.6); } to { transform: rotate(0) scale(1); } }
.cr-mirror.hint-flash { animation: hintFlash .5s ease-in-out 3; }
@keyframes hintFlash { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 0 3px #ffd24a, 0 0 16px #ffd24a; } }
.cr-canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.crystal-controls {
  display: flex; gap: 8px; justify-content: center; padding: 10px;
  padding-bottom: max(12px, env(safe-area-inset-bottom)); background: #2a1e5c;
}
.crystal-controls .big-btn.small { margin: 0; }
.cr-clear-banner {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; z-index: 10;
  background: rgba(20,12,50,.55); animation: popin .3s ease-out;
}
.cr-clear-txt { font-size: 1.6rem; font-weight: bold; color: #fff; text-shadow: 0 2px 8px #000; }
.cr-stars { font-size: 2.4rem; margin-top: 8px; animation: crystalBurst .6s; }

/* レベルせんたく */
.cr-level-wrap {
  flex: 1; overflow-y: auto; padding: 14px;
  background: radial-gradient(circle at 50% 30%, #3a2c78 0%, #241a52 70%, #1a1240 100%);
  display: flex; flex-direction: column;
}
.cr-level-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cr-level {
  background: rgba(255,255,255,.12); border: 2px solid rgba(180,200,255,.4);
  border-radius: 14px; padding: 12px 6px; text-align: center; cursor: pointer;
}
.cr-level:active { transform: scale(.96); }
.cr-level.locked { opacity: .45; cursor: default; }
.cr-level-num { font-size: 1.3rem; font-weight: bold; color: #ffe9a8; }
.cr-level-stars { font-size: .72rem; color: #cfd8ff; margin-top: 2px; }
.cr-level-wrap .small-note { color: #cfd8ff; margin-top: 10px; }

/* レア景品の でた演出 */
.prize-reveal { margin: 8px auto; padding: 10px; border-radius: 14px; }
.prize-reveal .tier-badge { font-weight: bold; margin-bottom: 4px; }
.prize-reveal.prize-rare { background: linear-gradient(135deg, #cdefff, #a8d8ff); box-shadow: 0 0 16px #7ec0ff; }
.prize-reveal.prize-rare .tier-badge { color: #2a7fc9; }
.prize-reveal.prize-legend { background: linear-gradient(135deg, #ffe6a8, #ffd0f0, #b8e6ff); box-shadow: 0 0 22px #ffcf5a; animation: legendGlow 1.2s ease-in-out infinite; }
.prize-reveal.prize-legend .tier-badge { color: #d1408a; }
@keyframes legendGlow { 0%,100% { box-shadow: 0 0 18px #ffcf5a; } 50% { box-shadow: 0 0 32px #ff9ad8, 0 0 48px #8fd4ff; } }

/* ===== ゲームセンター ===== */
.prize-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.prize-cell {
  background: #fff; border: 3px solid var(--wood); border-radius: var(--radius);
  padding: 10px 4px; text-align: center; position: relative;
}
.prize-cell.locked { opacity: .5; border-style: dashed; }
.prize-emoji { font-size: 2.4rem; }
.prize-name { font-size: .72rem; font-weight: bold; margin-top: 2px; }
.prize-count {
  position: absolute; top: -8px; right: -6px; background: var(--red); color: #fff;
  border-radius: 999px; font-size: .72rem; font-weight: bold; padding: 2px 8px; border: 2px solid #fff;
}
.pet-visual { font-size: 4.5rem; margin: 8px 0; }

/* まとあて */
.arcade-target-field { background: linear-gradient(#bfe0f0, #d8ecf5); overflow: hidden; touch-action: none; }
.balloon { position: absolute; font-size: 2.8rem; cursor: pointer; line-height: 1; z-index: 2; will-change: top, left; touch-action: none; }

/* クレーンゲーム */
.crane-field { background: linear-gradient(#f5e6d0, #ecd9b0); position: relative; overflow: hidden; }
.crane-arm { position: absolute; top: 6px; left: 10%; z-index: 3; display: flex; flex-direction: column; align-items: center; }
.crane-cable { width: 3px; height: 42px; background: #6b4420; }
.crane-claw { font-size: 2.4rem; line-height: 1; margin-top: -4px; }
.crane-row {
  position: absolute; bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: space-around; align-items: flex-end;
}
.crane-prize {
  font-size: 2.6rem; background: rgba(255,255,255,.6); border-radius: 12px;
  padding: 6px; border: 2px solid var(--wood);
}
.crane-controls { padding: 12px; padding-bottom: max(14px, env(safe-area-inset-bottom)); background: var(--paper-dark); text-align: center; }
.crane-controls .big-btn { margin: 0 auto; }

/* えあわせマシン */
.slot-field { background: linear-gradient(#f3d9e8, #e8c9d8); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.slot-reels { display: flex; gap: 10px; margin-bottom: 14px; }
.slot-reel {
  width: 78px; height: 90px; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; background: #fff; border: 4px solid var(--wood); border-radius: var(--radius);
  cursor: pointer; box-shadow: 0 4px 0 var(--wood-dark);
}
.slot-reel.stopped { background: #fff7d0; border-color: var(--gold); }
.slot-reel:active { transform: translateY(2px); }

/* タイミングバー */
.timing-track {
  position: relative; height: 44px; margin: 24px 16px;
  background: #e8ddc4; border: 3px solid var(--wood); border-radius: 999px; overflow: hidden;
}
.timing-zone { position: absolute; top: 0; bottom: 0; background: rgba(122,168,92,.65); }
.timing-marker { position: absolute; top: 2px; bottom: 2px; width: 12px; background: var(--red); border-radius: 6px; }

/* バトル */
.battle-enemy { text-align: center; padding: 10px; }
.battle-enemy .enemy-face { font-size: 4.2rem; display: inline-block; }
.battle-enemy .enemy-face img { width: 130px; height: 130px; object-fit: contain; filter: drop-shadow(0 4px 8px var(--shadow)); }
.battle-enemy .enemy-face .char-ph { width: 110px; height: 110px; font-size: 3.4rem; }
.battle-enemy .enemy-face.hit { animation: shake .4s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.hp-bar { display: flex; justify-content: center; gap: 4px; margin-top: 4px; font-size: 1.1rem; }
.battle-q { background: #fff; border: 3px solid var(--wood); border-radius: var(--radius); margin: 8px 14px; padding: 12px; font-weight: bold; line-height: 1.7; }
.battle-choices { padding: 0 14px 20px; }
.choice-btn {
  display: block; width: 100%; background: #fff; border: 3px solid var(--blue);
  border-radius: 999px; padding: 12px; margin-bottom: 10px; font-size: .95rem;
  font-weight: bold; cursor: pointer; text-align: center;
}
.choice-btn:active { background: #e8f2fb; }
.choice-btn.correct { background: var(--green); color: #fff; border-color: #4e7038; }
.choice-btn.wrong { background: var(--red); color: #fff; border-color: #a03a2c; }

/* コイン獲得演出 */
.coin-fly {
  position: absolute; font-size: 1.8rem; z-index: 40; pointer-events: none;
  animation: coinfly .8s ease-in forwards;
}
@keyframes coinfly {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-90px) scale(1.4); }
}

.center { text-align: center; }
.mt { margin-top: 12px; }
.small-note { font-size: .75rem; color: #8a7a5c; line-height: 1.6; }
