/* もちもちストライク - 画面レイアウト（論理サイズ 450×800 を画面に合わせて拡大縮小） */
@font-face {
  font-family: 'LINE Seed JP';
  src: url('../fonts/LINESeedJP_OTF_Bd.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --pink: #ffe6ef;
  --pink2: #ffc6da;
  --rose: #ff5a8a;
  --rose-d: #d81b60;
  --ink: #5a2a40;
  --ink2: #8a4a68;
  --font: 'LINE Seed JP', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: var(--pink);
  overscroll-behavior: none; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  font-family: var(--font); color: var(--ink);
}
body {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.7) 0 8px, transparent 9px) 0 0 / 60px 60px,
    radial-gradient(circle at 70% 60%, rgba(255,190,215,0.6) 0 6px, transparent 7px) 0 0 / 60px 60px,
    linear-gradient(160deg, #fff0f5, #ffd6e4);
}
#stage {
  position: absolute; left: 0; top: 0; width: 450px; height: 800px;
  transform-origin: 0 0; overflow: hidden; border-radius: 0;
  box-shadow: 0 10px 40px rgba(200, 60, 110, 0.25);
  background: var(--pink);
}
#game { position: absolute; left: 0; top: 0; width: 450px; height: 800px; touch-action: none; display: block; }

.screen {
  position: absolute; inset: 0; display: none; flex-direction: column;
  animation: screenIn .28s ease-out;
}
.screen.show { display: flex; }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

button { font-family: var(--font); cursor: pointer; border: none; color: inherit; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 22px; border-radius: 24px; font-size: 18px; font-weight: 800;
  background: linear-gradient(180deg, #ff82a8, #ff4f84); color: #fff;
  box-shadow: 0 5px 0 #c2185b, 0 8px 16px rgba(200, 30, 90, 0.3);
  text-shadow: 0 2px 0 rgba(150, 10, 60, 0.35);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #c2185b, 0 3px 8px rgba(200, 30, 90, 0.3); }
.btn.sub { background: linear-gradient(180deg, #ffffff, #ffe6ef); color: var(--rose-d); box-shadow: 0 5px 0 #f3a6c2, 0 8px 16px rgba(200, 30, 90, 0.15); text-shadow: none; }
.btn.sub:active { box-shadow: 0 1px 0 #f3a6c2; }
.btn.gold { background: linear-gradient(180deg, #ffe066, #ffb12c); box-shadow: 0 5px 0 #d07a00, 0 8px 16px rgba(200, 120, 0, 0.3); text-shadow: 0 2px 0 rgba(150, 70, 0, 0.35); }
.btn.gold:active { box-shadow: 0 1px 0 #d07a00; }
.btn.small { min-height: 38px; font-size: 14px; padding: 0 14px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 22px; background: #fff; color: var(--rose-d);
  font-size: 20px; font-weight: 800; box-shadow: 0 3px 0 #f3a6c2;
}

/* ---------- タイトル ---------- */
#title { align-items: center; justify-content: flex-start; }
.logo { margin-top: 118px; text-align: center; position: relative; }
.logo .l1, .logo .l2 { display: block; font-weight: 800; letter-spacing: 0.02em; line-height: 1; }
.logo .l1 { font-size: 58px; color: #fff; filter: drop-shadow(0 3px 0 rgba(216, 27, 96, .35)) drop-shadow(0 8px 12px rgba(200, 30, 90, .25)); }
.logo .l1 span { display: inline-block; animation: mochiBounce 1.6s ease-in-out infinite; -webkit-text-stroke: 12px #fff; paint-order: stroke fill; }
/* もちもちれんさのタイトルと同じ 1 文字ずつの色 */
.logo .l1 span:nth-child(1) { color: #ff6f9a; } .logo .l1 span:nth-child(2) { color: #5ab94a; } .logo .l1 span:nth-child(3) { color: #35a7e0; } .logo .l1 span:nth-child(4) { color: #f0a91e; }
.logo .l1 span:nth-child(2) { animation-delay: .1s; } .logo .l1 span:nth-child(3) { animation-delay: .2s; }
.logo .l1 span:nth-child(4) { animation-delay: .3s; }
.logo .l2 { margin-top: 10px; font-size: 50px; color: #ffd23c; filter: drop-shadow(0 4px 0 #c96a00) drop-shadow(0 8px 12px rgba(200, 100, 0, .35)); transform: rotate(-3deg); }
.logo .l2 span { display: inline-block; animation: mochiBounce 1.6s ease-in-out infinite; animation-delay: .5s; }
.logo .tag { display: inline-block; margin-top: 16px; padding: 6px 16px; border-radius: 16px; background: rgba(255, 255, 255, .85); color: var(--rose-d); font-size: 14px; font-weight: 800; }
@keyframes mochiBounce { 0%, 100% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-8px) scale(.96, 1.05); } 60% { transform: translateY(0) scale(1.08, .92); } 75% { transform: scale(.98, 1.02); } }
.tap-start { position: absolute; bottom: 318px; left: 50%; transform: translateX(-50%); padding: 10px 26px; border-radius: 26px; background: rgba(255, 90, 138, .92); text-align: center; font-size: 21px; font-weight: 800; color: #fff; white-space: nowrap; box-shadow: 0 4px 0 #c2185b, 0 8px 18px rgba(200, 30, 90, .3); animation: tapPulse 1.4s ease-in-out infinite; z-index: 2; }
@keyframes tapPulse { 50% { transform: translateX(-50%) scale(1.06); box-shadow: 0 4px 0 #c2185b, 0 8px 26px rgba(255, 90, 138, .55); } }
@keyframes blink { 50% { opacity: .35; transform: scale(.96); } }
.title-foot { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--ink2); }
.corner { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }

/* ---------- 共通ヘッダ ---------- */
.head { height: 64px; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: linear-gradient(180deg, #ffd3e2, #ffc2d6); box-shadow: 0 2px 0 rgba(180, 60, 110, .2); flex: none; }
.head h2 { margin: 0; flex: 1; font-size: 22px; color: var(--rose-d); text-shadow: 0 2px 0 #fff; }
.panel-bg { background: rgba(255, 240, 246, 0.9); backdrop-filter: blur(3px); }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.scroll::-webkit-scrollbar { width: 6px; } .scroll::-webkit-scrollbar-thumb { background: #f3a6c2; border-radius: 3px; }

/* ---------- 編成 ---------- */
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 12px 6px; flex: none; }
.slot { position: relative; height: 104px; border-radius: 16px; background: #fff; border: 3px solid #f3c0d4; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 6px; font-size: 11px; font-weight: 800; }
.slot.sel { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(255, 90, 138, .25); transform: translateY(-3px); }
.slot .no { position: absolute; top: 4px; left: 6px; font-size: 11px; color: var(--ink2); }
.slot canvas { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); }
.slot .nm { position: relative; white-space: nowrap; font-size: 11px; }
.hint { font-size: 12px; color: var(--ink2); text-align: center; padding: 2px 0 6px; flex: none; }
.roster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 6px 12px 10px; }
.chip { position: relative; height: 92px; border-radius: 14px; background: linear-gradient(180deg, #fff, var(--c2, #ffeef4)); border: 2.5px solid var(--c, #f3c0d4); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 5px; }
.chip canvas { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); }
.chip .nm { position: relative; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.chip { height: 100px; }
.chip .ab { position: relative; display: flex; gap: 2px; margin-top: 1px; height: 13px; }
.chip .ab i { font-style: normal; font-size: 8.5px; font-weight: 800; line-height: 13px; padding: 0 3px; border-radius: 4px; background: rgba(90, 42, 64, .12); color: var(--ink2); }
.chip .ab i.hit { background: #3fae4a; color: #fff; }
.teamquest { flex: none; margin: 10px 12px 0; padding: 7px 10px; border-radius: 14px; background: #fff; border: 2px solid #f6d3e1; display: flex; align-items: center; gap: 6px; font-size: 13px; flex-wrap: wrap; }
.teamquest b { color: var(--rose-d); margin-right: 4px; }
.teamquest .gim { background: #fff4f8; border: 1.5px solid #f6d3e1; }
.teamquest .gim.okk { background: #e6f8dc; border-color: #9fd88a; color: #2a7a2a; }
.teamquest .gim.ng { background: #ffe0e6; border-color: #ff9ab3; color: #c2185b; }
.chip.in::after { content: attr(data-slot); position: absolute; top: 4px; right: 5px; width: 20px; height: 20px; border-radius: 10px; background: var(--rose); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.chip.focus { box-shadow: 0 0 0 3px rgba(255, 90, 138, .45); }
.el { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 0 0 2px #fff; }
.chip .el { position: absolute; top: 4px; left: 5px; width: 18px; height: 18px; font-size: 11px; }
.detail { margin: 0 12px 10px; padding: 12px; border-radius: 16px; background: #fff; border: 2.5px solid #f3c0d4; display: grid; grid-template-columns: 96px 1fr; gap: 4px 12px; font-size: 12.5px; }
.detail .pic { grid-row: span 3; position: relative; width: 96px; height: 96px; border-radius: 14px; background: var(--c2, #ffeef4); }
.detail .pic canvas { position: absolute; inset: 0; }
.detail h3 { margin: 0; font-size: 19px; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.detail .ttl { color: var(--ink2); font-size: 12px; font-weight: 800; }
.detail .stats { display: flex; gap: 10px; font-weight: 800; flex-wrap: wrap; }
.detail .stats b { color: var(--rose-d); }
.detail .row { grid-column: span 2; display: flex; gap: 8px; align-items: baseline; line-height: 1.45; }
.detail .row .k { flex: none; min-width: 108px; padding: 2px 8px; border-radius: 10px; background: #ffe6ef; color: var(--rose-d); font-weight: 800; font-size: 11.5px; text-align: center; }
.detail .desc { grid-column: span 2; color: var(--ink2); font-size: 12px; line-height: 1.5; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 11px; font-weight: 800; color: #fff; background: #8a6aa8; margin-right: 3px; }
.badge.t-reflect { background: #1a6fd8; } .badge.t-pierce { background: #d81b60; }
.foot { flex: none; padding: 10px 12px 14px; display: flex; gap: 10px; justify-content: center; background: linear-gradient(180deg, rgba(255,230,239,0), rgba(255,214,228,.95) 30%); }

/* ---------- クエスト ---------- */
.quests { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.qcard { position: relative; border-radius: 18px; padding: 14px 14px 12px; color: #fff; text-align: left; overflow: hidden; box-shadow: 0 5px 0 rgba(0,0,0,.18), 0 10px 18px rgba(120, 30, 70, .18); }
.qcard:active { transform: translateY(3px); }
.qcard.q1 { background: linear-gradient(135deg, #8ed06a, #4aa84a); }
.qcard.q2 { background: linear-gradient(135deg, #ffa36a, #e0503a); }
.qcard.q3 { background: linear-gradient(135deg, #9a7ae0, #4b2a8f); }
.qcard.q4 { background: linear-gradient(135deg, #7fd0f6, #3a7fe0); }
.qcard::after { content: ''; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 70px; background: rgba(255,255,255,.14); }
.qcard .rk { display: inline-block; padding: 2px 10px; border-radius: 10px; background: rgba(255,255,255,.9); color: var(--rose-d); font-size: 12px; font-weight: 800; }
.qcard .stars { margin-left: 6px; color: #ffe45c; font-size: 14px; letter-spacing: 1px; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.qcard h3 { margin: 6px 0 4px; font-size: 22px; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.qcard p { margin: 0 0 8px; font-size: 12px; opacity: .95; }
.qcard .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; font-weight: 800; }
.gim { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 3px; border-radius: 12px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11px; font-weight: 800; }
.gim svg { width: 18px; height: 18px; }
.clear-badge { position: absolute; right: 12px; top: 12px; z-index: 1; padding: 4px 10px; border-radius: 12px; background: #fff; color: var(--rose-d); font-weight: 800; font-size: 12px; transform: rotate(6deg); box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.clear-badge .r { font-size: 16px; color: #ff9a00; }

.sheet-wrap { position: absolute; inset: 0; background: rgba(60, 10, 40, .45); display: none; align-items: flex-end; z-index: 5; }
.sheet-wrap.show { display: flex; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { width: 100%; border-radius: 24px 24px 0 0; background: #fff6f9; padding: 18px 16px 18px; animation: sheetUp .25s ease-out; max-height: 90%; overflow-y: auto; }
@keyframes sheetUp { from { transform: translateY(60px); } }
.sheet h3 { margin: 0 0 4px; font-size: 22px; color: var(--rose-d); }
.sheet .sub { font-size: 12px; color: var(--ink2); margin-bottom: 10px; }
.gtable { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.grow { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #fff; border: 2px solid #f6d3e1; font-size: 12.5px; }
.grow svg { width: 26px; height: 26px; flex: none; }
.grow .gname { font-weight: 800; min-width: 110px; }
.grow .gdesc { flex: 1; color: var(--ink2); font-size: 11.5px; }
.grow .ok { flex: none; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.grow .ok.yes { background: #dcf6cc; color: #2a7a2a; } .grow .ok.no { background: #ffe0e6; color: #c2185b; } .grow .ok.na { background: #eee; color: #888; }
.teamline { display: flex; gap: 6px; justify-content: center; margin: 4px 0 14px; }
.teamline canvas { border-radius: 12px; background: #ffeef4; }
.sheet .acts { display: flex; gap: 10px; justify-content: center; }

/* ---------- リザルト ---------- */
#result { align-items: center; justify-content: center; background: rgba(60, 10, 40, 0.55); }
.rbox { width: 380px; border-radius: 26px; background: #fff6f9; padding: 22px 20px 20px; text-align: center; box-shadow: 0 12px 40px rgba(60, 10, 40, .4); animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); position: relative; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.rbox h2 { margin: 0; font-size: 34px; color: var(--rose-d); text-shadow: 0 3px 0 #ffd1e2; }
.rbox.lose h2 { color: #6a5a8a; text-shadow: 0 3px 0 #e2dcf0; }
.rbox .qn { font-size: 13px; color: var(--ink2); margin: 4px 0 10px; }
.rank { width: 120px; height: 120px; margin: 4px auto 8px; border-radius: 60px; display: flex; align-items: center; justify-content: center; font-size: 76px; font-weight: 800; color: #fff; background: radial-gradient(circle at 35% 30%, #ffe98a, #ff9a1f 60%, #d9650a); box-shadow: 0 6px 0 #b35400, 0 10px 24px rgba(200, 100, 0, .4); text-shadow: 0 4px 0 rgba(140, 50, 0, .45); animation: stamp .5s .25s cubic-bezier(.2, 1.8, .4, 1) both; }
.rank.S { background: radial-gradient(circle at 35% 30%, #fff6b0, #ffcf2c 50%, #ff6a9a); }
.rank.B { background: radial-gradient(circle at 35% 30%, #d8f2ff, #5aa8f0 60%, #2a6ab8); box-shadow: 0 6px 0 #1a4a8a; }
.rank.C { background: radial-gradient(circle at 35% 30%, #eee, #aaa 60%, #777); box-shadow: 0 6px 0 #555; }
.rank.lose { font-size: 30px; background: radial-gradient(circle at 35% 30%, #efe8ff, #a896d0 60%, #6a5a8a); box-shadow: 0 6px 0 #4a3a6a; }
@keyframes stamp { from { transform: scale(2.4) rotate(-20deg); opacity: 0; } }
.rstats { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; margin: 8px 6px 14px; font-size: 14px; text-align: left; }
.rstats div:nth-child(odd) { color: var(--ink2); font-weight: 700; }
.rstats div:nth-child(even) { font-weight: 800; text-align: right; }
.newb { display: inline-block; margin: 0 4px 10px; padding: 3px 10px; border-radius: 12px; background: #ffd23c; color: #7a3a00; font-weight: 800; font-size: 12px; animation: blink 1s infinite; }
.rbox .acts { display: flex; gap: 10px; justify-content: center; }

/* ---------- ポーズ ---------- */
#pause { align-items: center; justify-content: center; background: rgba(60, 10, 40, 0.5); }
.pbox { width: 320px; border-radius: 24px; background: #fff6f9; padding: 22px; display: flex; flex-direction: column; gap: 14px; text-align: center; animation: pop .3s cubic-bezier(.2, 1.6, .4, 1); }
.pbox h2 { margin: 0 0 4px; color: var(--rose-d); }
.pbox .help { text-align: left; font-size: 12px; line-height: 1.6; color: var(--ink2); background: #fff; border-radius: 12px; padding: 10px 12px; }

#loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--rose-d); font-weight: 800; }
.toast { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); background: rgba(60, 10, 40, .85); color: #fff; padding: 10px 16px; border-radius: 16px; font-size: 13px; font-weight: 800; z-index: 10; pointer-events: none; animation: fadeIn .2s; white-space: nowrap; }
