* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  color: #fff6e6; background: #24150b radial-gradient(900px 600px at 50% 0%, #4a2c16, #1d1108 70%);
  overscroll-behavior: none;
}
#app { position: relative; width: 100%; max-width: 480px; height: 100vh; height: 100dvh; margin: 0 auto; overflow: hidden;
  background: linear-gradient(180deg, #4b2e18, #2f1c0e); box-shadow: 0 0 40px rgba(0,0,0,.55); }
button { font-family: inherit; }
.screen { display: none; position: absolute; inset: 0; flex-direction: column; }
.screen.active { display: flex; }
.screen.scroll { overflow-y: auto; padding: 10px 14px 24px; -webkit-overflow-scrolling: touch; }
.muted { color: #d9c3a5; } .small { font-size: .8rem; } .c { text-align: center; }
.mini { border: 0; border-radius: 10px; padding: 6px 10px; font-weight: 800; font-size: .9rem; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.mini:disabled { opacity: .35; }
.btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; border-radius: 14px; padding: 10px 8px; min-height: 48px;
  font-weight: 900; font-size: 1rem; color: #3a1f0c; background: linear-gradient(180deg, #ffe39a, #f2a93b); box-shadow: 0 4px 0 #a5621d, 0 6px 14px rgba(0,0,0,.35);
  text-decoration: none; cursor: pointer; text-align: center; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #a5621d; }
.btn small { font-size: .72rem; font-weight: 800; opacity: .85; }
.btn.big { font-size: 1.25rem; min-height: 56px; width: 100%; }
.btn.sub { background: linear-gradient(180deg, #f3e3cb, #cfb38d); box-shadow: 0 4px 0 #8a6b45; }
.btn:disabled { filter: grayscale(.7); opacity: .6; }
.btn.loading::after { content: "（よみこみ中…）"; font-size: .7rem; }
.btn-row { display: flex; gap: 10px; width: 100%; } .btn-row > * { flex: 1; }

/* title */
#scr-title { overflow-y: auto; align-items: center; padding: 8px 14px 14px; gap: 8px; }
.t-top { margin-top: auto; flex: none; width: 100%; display: flex; justify-content: space-between; align-items: center; }
.coin-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(0,0,0,.35); font-weight: 900; }
.coin-pill img { height: 24px; image-rendering: pixelated; }
.logo { position: relative; margin: 2px 0 0; font-size: 2.3rem; font-weight: 900; letter-spacing: .04em; line-height: 1.1; color: #ffe7b0;
  text-shadow: 0 3px 0 #8a4b16, 0 0 18px rgba(255,190,90,.45); }
.logo span { color: #ffb347; }
.hero { position: relative; width: 100%; aspect-ratio: 1376 / 620; border-radius: 16px; overflow: hidden; border: 3px solid #f2a93b; flex: none; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 80%; }
.hero-bucket { position: absolute; image-rendering: pixelated; height: 26%; }
.hero-cat { position: absolute; height: 24%; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.hero-cat.c1 { left: 28%; bottom: 10%; animation: walk1 6s linear infinite; }
.hero-cat.c2 { left: 52%; bottom: 46%; }
.hero-cat.c3 { right: 14%; bottom: 8%; transform: scaleX(-1); }
.hero-bucket { left: 6%; bottom: 4%; height: 30%; }
@keyframes walk1 { 0%,100% { transform: translateX(0); } 50% { transform: translateX(20%); } }
.play-row { display: flex; gap: 8px; width: 100%; align-items: stretch; }
.play-row .btn.big { flex: 1; width: auto; }
.stage-sel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 6px; border-radius: 14px; background: rgba(0,0,0,.3); font-weight: 900; font-size: .9rem; }
.stage-sel > span { order: -1; white-space: nowrap; }
.stage-sel { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; } .stage-sel > span { grid-column: 1 / 3; text-align: center; }
.btn-transfer { background: linear-gradient(180deg, #9fe3ff, #3fa7e0); box-shadow: 0 4px 0 #1f6b98; color: #06233a; animation: txGlow 2.4s ease-in-out infinite; }
@keyframes txGlow { 50% { filter: brightness(1.12); } }
.save-notice { display: block; width: 100%; padding: 8px 12px; border-radius: 12px; border: 2px solid #ffb020; background: rgba(60,30,0,.6); color: #fff1dc; text-decoration: none; font-size: .76rem; line-height: 1.5; }
.save-notice b { display: block; color: #ffd24a; font-size: .85rem; } .save-notice span { display: block; }
.save-notice .sn-p { margin-top: 3px; } .save-notice u { color: #9fe3ff; font-weight: 900; }
.meta { margin: 0; font-size: .74rem; color: #d9c3a5; text-align: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.meta .sep { opacity: .5; }
.foot { margin: 0 0 auto; font-size: .74rem; }
#scr-title > * { flex-shrink: 0; } .foot a { color: #ffd78a; }

/* play */
.hud { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; padding-top: max(6px, env(safe-area-inset-top));
  background: rgba(0,0,0,.45); font-size: .95rem; }
.hud span { display: inline-flex; align-items: center; gap: 3px; } .hud b { font-weight: 900; }
.hud img { height: 22px; image-rendering: pixelated; }
.h-stage { padding: 2px 8px; border-radius: 8px; background: #f2a93b; color: #3a1f0c; font-weight: 900; }
.stage-wrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; background: #3b2414; overflow: hidden; touch-action: none; }
#cv { display: block; touch-action: none; }
.toast { position: absolute; left: 50%; top: 68%; transform: translate(-50%, -50%) scale(.9); padding: 12px 18px; border-radius: 14px; background: rgba(30,15,5,.88); border: 2px solid #f2a93b;
  font-weight: 900; font-size: 1.15rem; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; width: max-content; max-width: 90%; }
.toast small { font-size: .82rem; font-weight: 700; } .toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.controls { flex: none; padding: 6px 10px; padding-bottom: max(8px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, #5a3a1f, #3a2312); display: flex; flex-direction: column; gap: 6px; }
.spot-row { display: flex; align-items: center; gap: 6px; }
.arrow { min-width: 44px; min-height: 40px; font-size: 1.1rem; }
.spot-txt { flex: 1; min-width: 0; text-align: center; font-weight: 900; font-size: .95rem; line-height: 1.25; }
.spot-txt > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-txt small { font-weight: 700; opacity: .7; } .spot-sub { font-size: .7rem; font-weight: 700; color: #d9c3a5; }
.baits { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.bait-chip { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 3px 1px 2px; min-height: 52px; border-radius: 10px;
  border: 2px solid transparent; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.bait-chip img { height: 24px; image-rendering: pixelated; }
.bait-chip .bn { font-size: .56rem; font-weight: 800; line-height: 1.1; white-space: nowrap; overflow: hidden; max-width: 100%; }
.bait-chip .bc { position: absolute; top: -2px; right: 0; font-size: .64rem; font-weight: 900; background: #000a; border-radius: 6px; padding: 0 4px; }
.bait-chip.sel { border-color: #ffd24a; background: rgba(255,210,74,.28); }
.bait-chip:disabled { opacity: .35; }
.bait-chip.sel:disabled { opacity: .75; }
.main-btn { width: 100%; min-height: 62px; border: 0; border-radius: 16px; font-weight: 900; font-size: 1.35rem; color: #3a1f0c; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none;
  background: linear-gradient(180deg, #ffe39a, #f2a93b); box-shadow: 0 5px 0 #a5621d; }
.main-btn.st-power { background: linear-gradient(180deg, #ffcf6b, #ff8a00); }
.main-btn.st-bite { background: linear-gradient(180deg, #ff8080, #e0302a); color: #fff; animation: biteBlink .25s steps(2) infinite; }
.main-btn.st-wait, .main-btn.st-nibble { background: linear-gradient(180deg, #e6d9c4, #b9a07c); box-shadow: 0 5px 0 #7a5f3c; }
.main-btn.st-reel { background: linear-gradient(180deg, #9fe3ff, #3fa7e0); box-shadow: 0 5px 0 #1f6b98; color: #06233a; }
.main-btn.holding { transform: translateY(3px); box-shadow: 0 2px 0 #1f6b98; filter: brightness(1.1); }
@keyframes biteBlink { 50% { filter: brightness(1.3); } }
.hint { min-height: 1.1em; font-size: .72rem; text-align: center; color: #e8d6bb; line-height: 1.35; }

/* sub screens */
.sub-head { display: flex; align-items: center; gap: 10px; } .sub-head h2 { margin: 0; font-size: 1.2rem; }
.tabs { display: flex; gap: 8px; margin: 10px 0 4px; }
.tab { flex: 1; border: 0; padding: 9px; border-radius: 12px; font-weight: 900; background: rgba(255,255,255,.12); color: #fff; font-size: .95rem; }
.tab.on { background: #f2a93b; color: #3a1f0c; }
.dex-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dex-card { display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-radius: 12px; background: rgba(255,255,255,.08); text-align: center; }
.dex-card img { height: 54px; max-width: 100%; object-fit: contain; }
.dex-card.no img { filter: brightness(0) opacity(.55); }
.dex-card b { font-size: .82rem; } .dex-card .st { font-size: .62rem; color: #ffd24a; letter-spacing: -1px; }
.dex-card small { font-size: .62rem; color: #d9c3a5; line-height: 1.3; } .dex-card .lk { color: #9fe3ff; }
img.gold { filter: drop-shadow(0 0 6px #ffd24a) brightness(1.1); }
.dex-card.no img.gold { filter: brightness(0) opacity(.55); }
.medal-list { display: flex; flex-direction: column; gap: 8px; }
.medal-card { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.08); }
.medal-card img { height: 54px; image-rendering: pixelated; } .medal-card.no img { filter: grayscale(1) opacity(.4); }
.medal-card div { display: flex; flex-direction: column; } .medal-card small { font-size: .74rem; color: #d9c3a5; }
.coin-big { font-size: 1.2rem; font-weight: 900; margin: 8px 0; }
#scr-shop h3 { margin: 12px 0 6px; font-size: .95rem; color: #ffd78a; }
.shop-list { display: flex; flex-direction: column; gap: 8px; }
.shop-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.08); }
.shop-item img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; }
.si-t { flex: 1; display: flex; flex-direction: column; } .si-t small { font-size: .72rem; color: #d9c3a5; }
.buy { border: 0; border-radius: 10px; padding: 10px 10px; min-width: 84px; font-weight: 900; background: #f2a93b; color: #3a1f0c; }
.buy:disabled { opacity: .45; }

/* overlays */
.overlay { position: absolute; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(10,5,0,.62); }
.overlay.show { display: flex; }
.card { width: 100%; max-width: 400px; max-height: 100%; overflow-y: auto; padding: 16px; border-radius: 18px; background: linear-gradient(180deg, #5a3a1f, #3a2312); border: 3px solid #f2a93b; box-shadow: 0 12px 30px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 8px; }
.card p { margin: 0; }
.catch-card { align-items: center; text-align: center; }
.cc-h { font-size: 1.7rem; font-weight: 900; color: #ffe39a; }
.new { margin-left: 8px; padding: 1px 8px; border-radius: 8px; background: #ff2d55; color: #fff; font-size: .9rem; vertical-align: middle; }
.cc-img { width: 150px; height: 130px; display: flex; align-items: flex-end; justify-content: center; border-radius: 50%; background: radial-gradient(circle, rgba(255,230,140,.4), transparent 70%); }
.cc-img img { height: 120px; max-width: 90%; object-fit: contain; animation: hop .6s ease-out; }
@keyframes hop { 0% { transform: translateY(30px) scale(.6); } 60% { transform: translateY(-12px) scale(1.05); } 100% { transform: none; } }
.cc-name { font-size: 1.4rem; font-weight: 900; } .cc-stars { color: #ffd24a; letter-spacing: 1px; }
.cc-coin { font-size: 1.3rem; font-weight: 900; color: #ffe39a; } .cc-perfect { color: #ffd24a; font-weight: 900; font-size: .85rem; }
.cc-desc { font-size: .8rem; color: #e8d6bb; } .cc-bucket { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: .85rem; }
.cc-bucket img { height: 30px; image-rendering: pixelated; }
.res-card { text-align: center; align-items: stretch; }
#res-title { font-size: 1.8rem; font-weight: 900; } #res-title.ok { color: #ffe39a; } #res-title.ng { color: #b9d8ff; }
.res-bar { height: 16px; border-radius: 8px; background: rgba(0,0,0,.4); overflow: hidden; border: 2px solid #f2a93b; }
.res-bar div { height: 100%; background: linear-gradient(90deg, #ffcf6b, #ff9f1a); }
.res-coin { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 1.6rem; font-weight: 900; color: #ffe39a; }
.res-coin img { height: 34px; image-rendering: pixelated; }
.res-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 40px; }
.res-cats img { height: 44px; }
.res-unlock { color: #9fe3ff; font-weight: 900; font-size: .9rem; }
.howto h2 { margin: 0; text-align: center; } .howto ol { margin: 0; padding-left: 1.3em; font-size: .86rem; line-height: 1.55; } .howto li { margin-bottom: 4px; }
.medal-pop { position: absolute; left: 50%; top: 10px; z-index: 40; transform: translate(-50%, calc(-100% - 20px)); visibility: hidden; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px;
  background: linear-gradient(180deg, #fff2c4, #f2b54b); color: #3a1f0c; box-shadow: 0 8px 22px rgba(0,0,0,.45); transition: transform .4s; width: max-content; max-width: 92%; }
.medal-pop.show { transform: translate(-50%, 0); visibility: visible; }
.medal-pop img { height: 46px; image-rendering: pixelated; } .medal-pop div { display: flex; flex-direction: column; } .medal-pop small { font-weight: 800; }
@media (max-height: 700px) {
  #scr-title { gap: 6px; } .logo { font-size: 1.8rem; } .hero { aspect-ratio: 1376 / 400; } .btn { min-height: 44px; padding: 6px 8px; } .save-notice { font-size: .7rem; }
  .bait-chip { min-height: 46px; } .main-btn { min-height: 54px; }
}
@media (prefers-reduced-motion: reduce) { .btn-transfer, .hero-cat.c1 { animation: none; } }
[hidden] { display: none !important; }

.aim-row { text-align: center; line-height: 1.25; min-height: 2.3em; }
#aim-name { font-weight: 900; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aim-sub { font-size: .7rem; font-weight: 700; color: #d9c3a5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot a { white-space: nowrap; }
.t-top-r { display: inline-flex; gap: 6px; align-items: center; }
