/* ============================================================
   ニケちゃん！サバイバーズ — Nike Edition
   ポーランド・ソポトの夜のビーチ。夜の海の紺に、スイカとポーランド国旗の赤
   ============================================================ */
:root {
  --night: #0b1530;
  --panel: rgba(14, 28, 64, 0.94);
  --panel2: rgba(26, 46, 96, 0.9);
  --gold: #ffd84a;
  --gold2: #ffb52e;
  --pink: #ff8ad8;
  --purple: #a86aff;
  --cyan: #8ad8ff;
  --ink: #111530;
  --text: #fff8f0;
  --font: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
  --pop: "Mochiy Pop One", "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); color: var(--text); font-family: var(--font); font-weight: 700; -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; touch-action: none; }
canvas { display: block; }
#cv { position: fixed; inset: 0; width: 100vw; height: 100vh; image-rendering: pixelated; }
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 20; }
#ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
img { image-rendering: pixelated; }

#loading { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--night); font-size: 18px; color: var(--gold); transition: opacity .4s; }
#loading.hide { opacity: 0; pointer-events: none; }
.ld-star { font-size: 42px; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 画面 ---- */
.screen { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; pointer-events: auto; overflow-y: auto; }
.screen.on { display: flex; animation: fadeIn .25s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.scr-title { margin: 0; font-family: var(--pop); font-weight: 400; font-size: clamp(22px, 3.4vw, 34px); color: var(--gold); text-shadow: 0 3px 0 var(--ink), 0 0 18px rgba(255, 216, 74, .4); letter-spacing: .04em; }
.scr-title small { font-size: .5em; color: var(--cyan); margin-left: .5em; }
.panel { background: var(--panel); border: 3px solid var(--gold); border-radius: 22px; padding: 22px 26px; box-shadow: 0 0 0 4px var(--ink), 0 12px 50px rgba(0, 0, 0, .55), inset 0 0 40px rgba(90, 150, 255, .16); max-width: min(980px, 100%); width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; position: relative; }
.panel::before, .panel::after { content: "★"; position: absolute; color: var(--gold); font-size: 20px; top: -14px; text-shadow: 0 2px 0 var(--ink); }
.panel::before { left: 22px; } .panel::after { right: 22px; }

/* ---- ボタン ---- */
.btn { font-family: var(--pop); font-weight: 400; font-size: 18px; color: #fff; padding: 10px 26px; border-radius: 999px; border: 3px solid var(--gold); background: linear-gradient(180deg, #ff8a9c 0%, #e2364e 100%); box-shadow: 0 0 0 3px var(--ink), 0 6px 0 3px #7a1428, inset 0 3px 0 rgba(255, 255, 255, .45); text-shadow: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink); cursor: pointer; transition: transform .12s, filter .12s, box-shadow .12s; position: relative; letter-spacing: .04em; }
.btn:active { transform: translateY(4px) scale(.98); box-shadow: 0 0 0 3px var(--ink), 0 2px 0 3px #7a1428, inset 0 3px 0 rgba(255, 255, 255, .45); }
.btn.focus, .btn:hover { transform: translateY(-2px) scale(1.06); filter: brightness(1.12); box-shadow: 0 0 0 3px var(--ink), 0 8px 0 3px #7a1428, 0 0 26px rgba(255, 216, 74, .8), inset 0 3px 0 rgba(255, 255, 255, .5); }
.btn.focus::before { content: ""; position: absolute; left: -36px; top: 50%; width: 24px; height: 13px; transform: translateY(-50%); border-radius: 0 0 24px 24px; border: 3px solid #2f9a40; border-top: 2px solid #eaffd8; background: radial-gradient(circle at 28% 30%, var(--ink) 1.5px, transparent 2px), radial-gradient(circle at 52% 52%, var(--ink) 1.5px, transparent 2px), radial-gradient(circle at 74% 30%, var(--ink) 1.5px, transparent 2px), #ff4a62; box-shadow: 0 0 0 2px var(--ink); animation: twinkle .6s ease-in-out infinite alternate; }
@keyframes twinkle { from { transform: translateY(-50%) scale(.8) rotate(-15deg); } to { transform: translateY(-50%) scale(1.15) rotate(15deg); } }
.btn-big { font-size: 24px; padding: 13px 44px; background: linear-gradient(180deg, #ffe680 0%, #ffb52e 55%, #ff7a3a 100%); color: #fff; box-shadow: 0 0 0 3px var(--ink), 0 7px 0 3px #8a3a12, inset 0 3px 0 rgba(255, 255, 255, .6); }
.btn-big.focus, .btn-big:hover { box-shadow: 0 0 0 3px var(--ink), 0 9px 0 3px #8a3a12, 0 0 30px rgba(255, 216, 74, .9), inset 0 3px 0 rgba(255, 255, 255, .6); }
.btn-small { font-size: 15px; padding: 7px 18px; }
.btn-ghost { background: linear-gradient(180deg, #4a5ea0 0%, #22306a 100%); box-shadow: 0 0 0 3px var(--ink), 0 6px 0 3px #0e1638, inset 0 3px 0 rgba(255, 255, 255, .2); }
.btn:disabled { filter: grayscale(.8) brightness(.7); cursor: default; }
.row-btns { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; align-items: center; margin-top: 4px; }

/* ---- タイトル ---- */
#s-title { justify-content: space-between; padding: 7vh 16px 3vh; background: radial-gradient(ellipse at 50% 30%, rgba(8, 16, 44, 0) 0%, rgba(8, 16, 44, .25) 70%); }
.logo { text-align: center; animation: float 4s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.logo-sub { font-family: var(--pop); font-size: clamp(12px, 1.7vw, 18px); letter-spacing: .4em; color: var(--cyan); text-shadow: 0 2px 0 var(--ink), 0 0 12px rgba(138, 216, 255, .6); }
/* タイトルロゴ（OGP と同じロゴ画像）。画面の高さに合わせて、背景のニケちゃんにかからない大きさにする */
.logo-title { margin: 4px 0 0; line-height: 0; }
.logo-img { display: block; margin: 0 auto; width: min(92vw, 46vh, 480px); height: auto; filter: drop-shadow(0 5px 0 rgba(10, 16, 40, .5)) drop-shadow(0 0 16px rgba(255, 140, 220, .3)); }
.logo-tag { font-family: var(--font); font-weight: 800; font-size: clamp(12px, 1.6vw, 16px); color: #e4e2ff; text-shadow: 0 2px 0 var(--ink); margin-top: 2px; }
.menu { display: flex; flex-direction: column; gap: 18px; align-items: center; margin-top: auto; margin-bottom: 2vh; }
.menu > .btn { min-width: 240px; }
.menu-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.menu-row .btn { min-width: 120px; }
/* 言語の切り替え（メニューのすぐ下。いまの言語は水色） */
.lang-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: -4px; }
.lang-chip { font-size: 13px; padding: 4px 16px; border-width: 2px; background: linear-gradient(180deg, #4a5ea0 0%, #22306a 100%); box-shadow: 0 0 0 2px var(--ink), 0 4px 0 2px #0e1638, inset 0 2px 0 rgba(255, 255, 255, .2); }
.lang-chip.selected { background: linear-gradient(180deg, #8ad8ff 0%, #4a7aff 100%); border-color: #fff6b8; }
.lang-chip.focus::before { display: none; } /* スイカの印は隣のボタンに重なるので出さない（光って大きくなるだけ） */
/* ポーランド語：Mochiy Pop One には ą ć ę ł ń ś ź ż が無いので、丸くて太い Nunito（900）にする（js/render.js の setPopFont も同じ） */
html[lang="pl"] { --pop: "Nunito", "M PLUS Rounded 1c", sans-serif; }
.title-foot { display: flex; justify-content: space-between; width: 100%; max-width: 1100px; font-size: 13px; color: #c8d4ee; text-shadow: 0 2px 0 var(--ink); gap: 12px; flex-wrap: wrap; }
#title-gold { color: var(--gold); }

/* ---- キャラ選択 ---- */
#s-char { background: rgba(6, 14, 36, .72); justify-content: center; }
.char-list { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.char-card { width: 250px; background: var(--panel); border: 3px solid #3e5aa0; border-radius: 20px; padding: 14px 16px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; box-shadow: 0 0 0 3px var(--ink), 0 10px 30px rgba(0, 0, 0, .4); position: relative; }
.char-card.focus, .char-card:hover { transform: translateY(-6px); border-color: var(--cc); box-shadow: 0 0 0 3px var(--ink), 0 0 30px color-mix(in srgb, var(--cc) 70%, transparent); }
.char-card.selected { border-color: var(--gold); background: linear-gradient(180deg, rgba(40, 70, 150, .95), rgba(14, 28, 64, .95)); }
.char-card.selected::after { content: "えらんだ！"; position: absolute; top: -14px; right: 14px; background: var(--gold); color: var(--ink); font-family: var(--pop); font-size: 13px; padding: 3px 10px; border-radius: 99px; box-shadow: 0 0 0 2px var(--ink); }
.char-sprite { width: 104px; height: 180px; background-size: 416px 180px; background-repeat: no-repeat; image-rendering: pixelated; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .35)); }
.char-card.focus .char-sprite, .char-card.selected .char-sprite, .char-card:hover .char-sprite { animation: walk .55s steps(4) infinite; }
@keyframes walk { from { background-position: 0 0; } to { background-position: -416px 0; } }
.char-name { font-family: var(--pop); font-size: 26px; color: var(--cc); text-shadow: 0 3px 0 var(--ink); display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.char-name span { font-size: 13px; color: #fff; font-family: var(--font); font-weight: 800; }
.char-desc { font-size: 13px; color: #e8e0ff; text-align: center; line-height: 1.5; min-height: 40px; }
.char-weapon { display: flex; gap: 8px; align-items: center; background: rgba(0, 0, 0, .25); border-radius: 12px; padding: 6px 10px; width: 100%; }
.char-weapon img { width: 54px; height: 54px; }
.char-weapon b { display: block; color: var(--gold); font-size: 14px; }
.char-weapon small { font-size: 11px; color: #d8d0f0; font-weight: 500; }
.char-bonus { font-size: 13px; color: var(--cyan); }
.mode-row { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; max-width: 980px; }
.mode-list { display: flex; gap: 10px; }
.mode-btn { background: linear-gradient(180deg, #4a5ea0 0%, #22306a 100%); }
.mode-btn.selected { background: linear-gradient(180deg, #8ad8ff 0%, #4a7aff 100%); }

/* ---- レベルアップ ---- */
#s-level { background: radial-gradient(ellipse at 50% 45%, rgba(255, 216, 74, .18) 0%, rgba(8, 18, 50, .75) 55%, rgba(4, 10, 30, .88) 100%); gap: 16px; }
.lv-head { text-align: center; }
.lv-title { font-family: var(--pop); font-size: clamp(40px, 7vw, 76px); line-height: 1; background: linear-gradient(90deg, #ff9ad8, #ffd84a, #8affc8, #8ad8ff, #c88aff, #ff9ad8); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rainbow 2s linear infinite, pop .45s cubic-bezier(.2, 1.6, .4, 1); filter: drop-shadow(0 4px 0 var(--ink)) drop-shadow(0 0 16px rgba(255, 216, 74, .6)); -webkit-text-stroke: 1.5px var(--ink); }
@keyframes rainbow { to { background-position: 200% 0; } }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lv-sub { font-size: 16px; color: #fff; text-shadow: 0 2px 0 var(--ink); margin-top: 4px; }
.lv-keys { font-size: 12px; color: #b8b0d8; text-shadow: 0 2px 0 var(--ink); }
.cards { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; perspective: 900px; }
.card { width: 210px; min-height: 290px; border-radius: 20px; padding: 16px 14px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer; position: relative; border: 3px solid var(--gold); box-shadow: 0 0 0 3px var(--ink), 0 14px 30px rgba(0, 0, 0, .5), inset 0 0 30px rgba(255, 255, 255, .08); animation: cardIn .55s cubic-bezier(.2, 1.4, .4, 1) both; transition: transform .14s, box-shadow .14s, opacity .2s, filter .2s; }
.card.k-weapon { background: linear-gradient(170deg, #e85474 0%, #a12a4a 60%, #641834 100%); }
.card.k-passive { background: linear-gradient(170deg, #2a9e80 0%, #1d6466 60%, #153a48 100%); border-color: #8af0c8; }
.card.k-gold { background: linear-gradient(170deg, #c88a1a 0%, #7a4a14 100%); }
@keyframes cardIn { from { opacity: 0; transform: translateY(80px) rotateY(80deg) scale(.6); } to { opacity: 1; transform: none; } }
.card.focus, .card:hover { transform: translateY(-12px) scale(1.05); box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--gold), 0 0 40px rgba(255, 216, 74, .85), 0 20px 30px rgba(0, 0, 0, .5); }
.card.picked { animation: picked .32s ease-out forwards; }
@keyframes picked { 0% { transform: scale(1.05); filter: brightness(1); } 40% { transform: scale(1.18); filter: brightness(2.2); } 100% { transform: scale(1.3); filter: brightness(3); opacity: 0; } }
.card.dim { opacity: 0; transform: scale(.85); }
.card-icon { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 70%); margin-top: 6px; }
.card-icon img { width: 72px; height: 72px; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.card-name { font-family: var(--pop); font-size: 17px; line-height: 1.25; color: #fff; text-shadow: 0 2px 0 var(--ink); }
.card-lv { font-size: 12px; color: var(--gold); background: rgba(0, 0, 0, .3); border-radius: 99px; padding: 2px 10px; }
.card-desc { font-size: 13px; color: #f0eaff; line-height: 1.5; font-weight: 700; }
.card-hint { margin-top: auto; font-size: 11px; color: #c8b8f0; background: rgba(0, 0, 0, .25); border-radius: 10px; padding: 5px 8px; line-height: 1.4; width: 100%; }
.card-hint.ok { color: #9affc8; box-shadow: inset 0 0 0 1px rgba(154, 255, 200, .5); }
.card-hint small { font-size: 10px; }
.card-new { position: absolute; top: -12px; left: -10px; background: linear-gradient(180deg, #ff5a8a, #ff2a5a); color: #fff; font-family: var(--pop); font-size: 14px; padding: 4px 12px; border-radius: 99px; transform: rotate(-10deg); box-shadow: 0 0 0 3px var(--ink); animation: newPulse .8s ease-in-out infinite alternate; }
@keyframes newPulse { to { transform: rotate(-10deg) scale(1.12); } }
.card-key { position: absolute; top: 8px; right: 10px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .35); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; }

/* ---- 宝箱 ---- */
#s-chest { background: radial-gradient(ellipse at 50% 42%, rgba(40, 70, 140, .7) 0%, rgba(4, 10, 30, .93) 70%); gap: 14px; overflow: hidden; }
.chest-rays { position: absolute; left: 50%; top: 40%; width: 180vmax; height: 180vmax; transform: translate(-50%, -50%); background: repeating-conic-gradient(from 0deg, rgba(255, 230, 140, .22) 0deg 9deg, rgba(255, 230, 140, 0) 9deg 22deg); -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 45%); mask-image: radial-gradient(circle, #000 0%, transparent 45%); opacity: 0; transition: opacity .5s; animation: rays 14s linear infinite; pointer-events: none; }
@keyframes rays { to { transform: translate(-50%, -50%) rotate(360deg); } }
#s-chest.shaking .chest-rays { opacity: .5; }
#s-chest.opened .chest-rays { opacity: 1; }
#s-chest.has-evo .chest-rays { background: repeating-conic-gradient(from 0deg, rgba(255, 140, 220, .3) 0deg 9deg, rgba(140, 220, 255, .12) 9deg 22deg); }
.chest-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
#s-chest.opened .chest-flash { animation: flashOut .7s ease-out; }
@keyframes flashOut { 0% { opacity: .9; } 100% { opacity: 0; } }
.chest-title { font-family: var(--pop); font-size: clamp(26px, 4vw, 40px); color: var(--gold); text-shadow: 0 3px 0 var(--ink), 0 0 20px rgba(255, 216, 74, .6); z-index: 1; }
#s-chest.jackpot .chest-title::after { content: " 大当たり！！"; color: #ff9ad8; }
.chest-wrap { z-index: 1; height: 168px; display: flex; align-items: flex-end; }
.chest-img { width: 176px; height: 168px; animation: chestDrop .5s cubic-bezier(.2, 1.5, .4, 1); filter: drop-shadow(0 0 30px rgba(255, 216, 74, .7)); }
@keyframes chestDrop { from { transform: translateY(-120px) scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
#s-chest.shaking .chest-img { animation: chestShake .09s linear infinite; }
@keyframes chestShake { 0% { transform: translate(-4px, 0) rotate(-4deg); } 50% { transform: translate(4px, -3px) rotate(4deg); } 100% { transform: translate(-4px, 0) rotate(-4deg); } }
#s-chest.opened .chest-img { animation: chestOpen .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes chestOpen { from { transform: scale(1.4); } to { transform: none; } }
.chest-items { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; z-index: 1; min-height: 150px; }
.chest-slot { width: 128px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--panel); border: 3px solid #3e5aa0; border-radius: 16px; padding: 10px 6px; box-shadow: 0 0 0 3px var(--ink); opacity: .35; transform: scale(.9); transition: all .2s; }
.chest-slot.spin { opacity: 1; transform: scale(1); }
.chest-slot.spin img { filter: blur(1px) brightness(1.4); }
.chest-slot.landed { opacity: 1; transform: scale(1); border-color: var(--gold); animation: land .4s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes land { from { transform: scale(1.5); } to { transform: scale(1); } }
.chest-slot.evo.landed { border-color: #fff; background: linear-gradient(160deg, #ff6ad0, #8a5aff, #4ad8ff); box-shadow: 0 0 0 3px var(--ink), 0 0 30px rgba(255, 154, 216, .9); animation: land .4s cubic-bezier(.2, 1.8, .4, 1), evoGlow 1s ease-in-out infinite alternate .4s; }
@keyframes evoGlow { to { box-shadow: 0 0 0 3px var(--ink), 0 0 50px rgba(140, 220, 255, 1); } }
.slot-icon img { width: 64px; height: 64px; }
.slot-name { font-family: var(--pop); font-size: 13px; text-align: center; min-height: 18px; text-shadow: 0 2px 0 var(--ink); }
.slot-lv { font-size: 12px; color: var(--gold); text-align: center; text-shadow: 0 2px 0 var(--ink); }
.chest-slot.evo .slot-lv { color: #fff; }
.chest-gold { font-family: var(--pop); font-size: 28px; color: var(--gold); min-height: 36px; text-shadow: 0 3px 0 var(--ink); z-index: 1; }
.chest-ok { z-index: 1; opacity: 0; pointer-events: none; transform: scale(.6); transition: all .25s cubic-bezier(.2, 1.6, .4, 1); }
.chest-ok.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---- ポーズ ---- */
#s-pause, #s-result, #s-shop, #s-settings, #s-howto, #s-share { background: rgba(4, 10, 30, .72); }
.pause-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; width: 100%; }
#pause-build h3, .res-h3 { margin: 4px 0; font-family: var(--pop); font-weight: 400; font-size: 15px; color: var(--cyan); }
.build-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.build-item { display: flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, .25); border-radius: 10px; padding: 4px 10px 4px 4px; font-size: 13px; }
.build-item img { width: 40px; height: 40px; }
.build-item small { display: block; font-size: 11px; color: var(--gold); }
.build-empty { font-size: 13px; color: #9a92c0; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; align-content: start; }
.stat-grid div { display: flex; justify-content: space-between; gap: 10px; background: rgba(0, 0, 0, .22); border-radius: 8px; padding: 5px 10px; font-size: 13px; }
.stat-grid span { color: #c8c0e8; }
.stat-grid b { color: #fff; }
.stat-grid em { font-style: normal; font-size: 10px; background: #ff4a7a; border-radius: 99px; padding: 1px 6px; margin-left: 6px; animation: newPulse .6s infinite alternate; }

/* ---- リザルト ---- */
.result-panel { max-width: 760px; }
.res-head { display: flex; align-items: center; gap: 18px; }
.res-char { width: 104px; height: 180px; }
#res-title { margin: 0; font-family: var(--pop); font-weight: 400; font-size: clamp(32px, 5vw, 52px); color: #8ad8ff; text-shadow: 0 4px 0 var(--ink), 0 0 24px rgba(138, 216, 255, .55); }
#s-result.win #res-title { color: var(--gold); text-shadow: 0 4px 0 var(--ink), 0 0 24px rgba(255, 216, 74, .7); }
#res-sub { margin: 4px 0 0; color: #e8e0ff; }
.res-stats { width: 100%; grid-template-columns: repeat(3, 1fr); }
.res-gold { font-size: 16px; }
.res-gold b { font-family: var(--pop); font-size: 26px; color: var(--gold); margin-left: 8px; }
.res-gold small { display: block; text-align: center; font-size: 11px; color: #c8c0e8; }
.res-dmg { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.dmg-row { display: grid; grid-template-columns: 40px 150px 1fr 90px; align-items: center; gap: 8px; font-size: 13px; }
.dmg-row img { width: 36px; height: 36px; }
.dmg-row b { text-align: right; }
.dmg-bar { height: 12px; background: rgba(0, 0, 0, .35); border-radius: 99px; overflow: hidden; }
.dmg-bar i { display: block; height: 100%; border-radius: 99px; animation: grow 1s cubic-bezier(.2, 1, .3, 1); transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }

/* ---- スコア・Xでシェア ---- */
.res-score { font-family: var(--pop); font-size: 18px; color: #8ad8ff; text-shadow: 0 2px 0 var(--ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.res-score b { font-weight: 400; font-size: 34px; color: #fff; }
.res-score em { font-style: normal; font-family: var(--font); font-weight: 800; font-size: 12px; background: #ff2a4a; color: #fff; border-radius: 99px; padding: 2px 10px; text-shadow: none; animation: newPulse .6s infinite alternate; }
.btn[hidden] { display: none; }
.btn-x { background: linear-gradient(180deg, #3a3a46 0%, #0e0e14 100%); box-shadow: 0 0 0 3px var(--ink), 0 6px 0 3px #000, inset 0 3px 0 rgba(255, 255, 255, .25); }
.btn-x.focus, .btn-x:hover { box-shadow: 0 0 0 3px var(--ink), 0 8px 0 3px #000, 0 0 26px rgba(255, 255, 255, .45), inset 0 3px 0 rgba(255, 255, 255, .3); }
.btn-big.btn-x { background: linear-gradient(180deg, #3a3a46 0%, #0e0e14 100%); }
.share-panel { max-width: 760px; }
.share-img { width: 100%; max-width: 640px; aspect-ratio: 1200 / 630; object-fit: contain; border-radius: 12px; image-rendering: auto; box-shadow: 0 0 0 3px var(--ink), 0 10px 30px rgba(0, 0, 0, .5); background: #0b1530; }
.share-img.loading { background: radial-gradient(circle at 50% 50%, rgba(138, 216, 255, .18), transparent 60%), #0b1530; animation: newPulse .8s ease-in-out infinite alternate; }
.share-text { margin: 0; width: 100%; max-width: 640px; white-space: pre-wrap; word-break: break-word; background: rgba(0, 0, 0, .3); border-radius: 12px; padding: 10px 14px; font-family: var(--font); font-weight: 700; font-size: 13px; line-height: 1.6; color: #e8eefc; user-select: text; -webkit-user-select: text; }
.share-note { margin: 0; font-size: 13px; color: var(--cyan); text-align: center; line-height: 1.6; }

/* ---- 売店（永続強化） ---- */
.shop-gold { font-size: 16px; }
.shop-gold b { font-family: var(--pop); color: var(--gold); font-size: 22px; }
.shop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; width: 100%; }
.shop-item { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 2px solid #3e5aa0; border-radius: 14px; padding: 8px 12px 8px 6px; cursor: pointer; transition: transform .12s, border-color .12s; }
.shop-item img { width: 54px; height: 54px; }
.shop-item.focus, .shop-item:hover { border-color: var(--gold); transform: scale(1.03); }
.shop-item.maxed { opacity: .6; }
.shop-item.nope { animation: nope .3s; }
@keyframes nope { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.shop-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.shop-info b { font-size: 15px; }
.shop-info small { font-size: 12px; color: #c8c0e8; }
.pips { display: flex; gap: 3px; }
.pips i { width: 12px; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .4); }
.pips i.on { background: var(--gold); }
.shop-cost { font-family: var(--pop); color: var(--gold); font-size: 15px; white-space: nowrap; }

/* ---- 設定・あそびかた ---- */
.set-panel { max-width: 520px; }
#settings-list { display: flex; flex-direction: column; gap: 10px; width: 100%; align-items: stretch; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: var(--panel2); border: 2px solid #3e5aa0; border-radius: 12px; padding: 10px 14px; color: #fff; font-family: var(--font); font-weight: 800; font-size: 15px; cursor: pointer; text-align: left; }
.set-row.focus, .set-row:hover { border-color: var(--gold); }
.set-row input[type=range] { flex: 1; accent-color: #ff8ad8; }
.set-row b { min-width: 44px; text-align: right; color: var(--gold); }
.set-toggle b { color: #9a92c0; }
.set-toggle b.on { color: #7dff9a; }
.set-row.danger b { color: #ff6a8a; }
#settings-list .btn { align-self: center; margin-top: 6px; }
.howto-panel { max-width: 760px; }
.howto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.howto-grid div { background: var(--panel2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.howto-grid b { font-family: var(--pop); font-weight: 400; color: var(--gold); font-size: 15px; }
.howto-grid span { font-size: 13px; color: #e8e0ff; line-height: 1.5; font-weight: 700; }
.howto-debug { font-size: 12px; color: #b8b0d8; text-align: center; line-height: 1.9; }
kbd { display: inline-block; background: #fff; color: var(--ink); border-radius: 5px; padding: 0 6px; font-family: var(--font); font-weight: 800; box-shadow: 0 2px 0 #8a82b0; }
.gem { display: inline-block; width: 10px; height: 12px; background: #56d4ff; clip-path: polygon(50% 0, 100% 45%, 50% 100%, 0 45%); margin: 0 3px; vertical-align: -1px; }

@media (max-width: 720px) {
  .pause-cols, .howto-grid { grid-template-columns: 1fr; }
  .res-stats { grid-template-columns: repeat(2, 1fr); }
  .dmg-row { grid-template-columns: 32px 1fr 70px; }
  .dmg-row .dmg-bar { display: none; }
  .card { width: 160px; min-height: 240px; }
  .card-icon { width: 72px; height: 72px; }
  .card-icon img { width: 54px; height: 54px; }
  .char-card { width: 200px; }
  .btn.focus::before { display: none; }
}

/* ---- Nike Edition：紫の髪、水色のパーカー、ピンクの水玉。ポーランドから配信中 ---- */
:root { --cyan: #84dce9; --pink: #f393b2; --purple: #9270c8; }
.logo-sub { color: #9ee7ed; letter-spacing: .38em; }
.btn-big { background: linear-gradient(180deg, #b0f0ed, #62c9d7 55%, #439bb8); box-shadow: 0 0 0 3px var(--ink), 0 7px 0 3px #245568, inset 0 3px 0 rgba(255,255,255,.6); }
.btn-big.focus, .btn-big:hover { box-shadow: 0 0 0 3px var(--ink), 0 9px 0 3px #245568, 0 0 30px rgba(132,220,233,.55), inset 0 3px 0 rgba(255,255,255,.6); }
#s-title .menu > .btn { font-size: clamp(17px, 2.5vw, 24px); }
#s-char { gap: 22px; }
.char-list { width: 100%; max-width: 620px; }
.char-card, .char-card.selected { width: 100%; flex-direction: row; padding: 20px 24px; gap: 24px; border-color: #7bd9e7; background: linear-gradient(135deg, rgba(34,58,120,.98), rgba(14,22,52,.98)); cursor: default; }
.char-card:hover { transform: none; box-shadow: 0 0 0 3px var(--ink), 0 10px 30px rgba(0,0,0,.4); }
.char-card.selected::after { content: "● ON AIR"; color: #fff; background: #ff2a4a; font-size: 10px; letter-spacing: .12em; top: -12px; }
.nike-sprite-stage { position: relative; flex: 0 0 152px; align-self: stretch; min-height: 214px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 60%, rgba(123,217,231,.16), transparent 70%); }
.nike-sprite-stage::before { content: ""; position: absolute; width: 126px; height: 28px; bottom: 27px; border: 1px solid #7bd9e7; border-radius: 50%; box-shadow: 0 0 20px rgba(123,217,231,.3), inset 0 0 15px rgba(123,217,231,.12); }
.char-sprite { position: relative; }
.nike-sprite-label { font-size: 9px; letter-spacing: .2em; color: #c0b6d8; margin-top: 12px; }
.nike-profile { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.char-name { align-items: flex-start; font-size: 30px; gap: 9px; }
.char-name span { font-size: 12px; color: #ebc9e2; }
.char-desc { text-align: left; font-size: 12px; min-height: 0; line-height: 1.8; }
.char-weapon { min-width: 0; }
.nike-howto-intro { margin: 0; color: var(--cyan); text-align: center; line-height: 1.7; }
/* ポーランド国旗（白と赤） */
.pl-flag { display: inline-block; width: 1.5em; height: 1em; margin-right: .6em; vertical-align: -.1em; background: linear-gradient(#ffffff 50%, #dc143c 50%); border-radius: 2px; box-shadow: 0 0 0 2px var(--ink); }
/* あそびかた：乱入してくるAIボット図鑑 */
.howto-h3 { margin: 6px 0 0; font-family: var(--pop); font-weight: 400; font-size: 17px; color: var(--gold); text-shadow: 0 2px 0 var(--ink); }
.bot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; width: 100%; }
.bot { display: flex; gap: 10px; align-items: center; background: var(--panel2); border-radius: 12px; padding: 8px 10px; }
.bot.boss { border: 2px solid #ff6a8a; }
.bot img { flex: 0 0 66px; width: auto; height: auto; max-width: 66px; max-height: 66px; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
.bot b { display: block; font-size: 14px; color: #fff; margin-bottom: 2px; }
.bot b em { font-style: normal; font-size: 10px; background: #ff2a4a; color: #fff; border-radius: 99px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px; }
.bot span { display: block; font-size: 12px; color: #d8e2f6; line-height: 1.5; font-weight: 700; }
.howto-note { margin: 0; font-size: 11px; color: #a8b8dc; text-align: center; }
.screen { touch-action: pan-y; }
@media (max-width: 600px) {
  #s-title { padding-top: 9vh; }
  .logo-sub { font-size: 11px; }
  .menu-row { gap: 12px; }
  .menu-row .btn { min-width: 0; padding: 8px 13px; font-size: 12px; }
  .lang-row { gap: 8px; }
  .lang-chip { font-size: 11px; padding: 4px 12px; }
  .title-foot { justify-content: center; font-size: 10px; gap: 6px; }
  #s-char { padding: 24px 18px; gap: 18px; }
  #s-char .scr-title { font-size: 22px; }
  .char-card { padding: 18px 12px; gap: 10px; }
  .nike-sprite-stage { flex-basis: 104px; min-height: 200px; }
  .nike-sprite-stage::before { width: 94px; }
  .nike-profile { gap: 10px; }
  .char-name { font-size: 24px; }
  .char-desc { font-size: 10px; }
  .char-weapon { padding: 6px; gap: 5px; }
  .char-weapon img { width: 36px; height: 36px; }
  .char-weapon b { font-size: 12px; }
  .char-weapon small { font-size: 10px; }
  .char-bonus { font-size: 11px; }
  .mode-row { gap: 16px; }
        #s-char .row-btns { gap: 16px; }
  #s-char .btn-big { font-size: 20px; padding: 12px 30px; }
}
@media (max-height: 650px) {
  #s-char { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .logo { animation: none; }
}
