/* ミニゲーム「マミィちゃんの 駄菓子クジ引き勝負！」（js/kuji.js） */
.kj { position: fixed; inset: 0; z-index: 92; display: grid; place-items: center; padding: 10px; background: rgba(40, 24, 8, .55); backdrop-filter: blur(3px); font-family: "M PLUS Rounded 1c", sans-serif; }
.kj-box { position: relative; width: min(94vw, 92vh, 820px); aspect-ratio: 1; border-radius: 28px; overflow: visible; box-shadow: 0 0 0 8px #c0392b, 0 0 0 14px #f5e3c0, 0 26px 70px rgba(0, 0, 0, .5); animation: kj-in .45s cubic-bezier(.3, 1.5, .5, 1); user-select: none; -webkit-user-select: none; }
@keyframes kj-in { from { transform: scale(.8) translateY(20px); opacity: 0; } }
.kj-cv { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 28px; touch-action: none; cursor: grab; }
.kj-hint { position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); margin: 0; padding: 10px 22px; border-radius: 999px; background: rgba(255, 250, 238, .95); color: #7a3408; font-weight: 900; font-size: clamp(14px, 2.8vmin, 20px); line-height: 1.4; text-align: center; box-shadow: 0 5px 0 #c0392b, 0 10px 18px rgba(0, 0, 0, .25); pointer-events: none; animation: kj-bob 2s ease-in-out infinite; white-space: nowrap; }
@keyframes kj-bob { 50% { transform: translateX(-50%) translateY(-6px); } }
.kj-x { position: absolute; right: -14px; top: -14px; z-index: 5; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fffaf0; color: #c0392b; font-size: 18px; font-weight: 900; cursor: pointer; box-shadow: inset 0 0 0 3px #c0392b, 0 4px 8px rgba(0, 0, 0, .3); }
.kj-ov { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; }
.kj-ov[hidden] { display: none; }
.kj-ov > * { pointer-events: auto; }
.kj-card { position: relative; width: min(74%, 500px); margin-top: 18%; padding: 22px 22px 18px; border-radius: 24px; text-align: center; color: #3b2a14; background: linear-gradient(180deg, #fffaf0, #ffeef4); box-shadow: inset 0 0 0 4px #f5a9c4, 0 16px 40px rgba(0, 0, 0, .35); animation: kj-in .4s cubic-bezier(.3, 1.6, .5, 1); }
.kj-mami { position: absolute; left: 50%; bottom: calc(100% - 30px); width: 46%; transform: translateX(-50%); filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .3)); animation: kj-jump .8s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.kj-card.is-win .kj-mami { animation: kj-jump .8s cubic-bezier(.3, 1.6, .5, 1), kj-dance 1.2s ease-in-out .8s infinite; }
@keyframes kj-jump { from { transform: translateX(-50%) translateY(120px) scale(.4); opacity: 0; } 60% { transform: translateX(-50%) translateY(-30px) scale(1.15); opacity: 1; } }
@keyframes kj-dance { 50% { transform: translateX(-50%) translateY(-10px) rotate(-5deg); } }
.kj-card h2 { margin: 0 0 10px; font-size: clamp(22px, 4.6vmin, 36px); font-weight: 900; line-height: 1.3; color: #e8467c; -webkit-text-stroke: 1px #8a1f45; }
.kj-card p { margin: 0 0 10px; font-weight: 800; font-size: clamp(14px, 2.6vmin, 19px); line-height: 1.6; }
.kj-yatta { font-size: clamp(30px, 6.4vmin, 50px) !important; color: #ffc21a !important; -webkit-text-stroke: 2px #8a1f45 !important; text-shadow: 0 5px 0 #8a1f45; }
.kj-prize.is-demo { padding: 8px 12px; border-radius: 14px; background: #eaf4ff; color: #1b4f8a; font-size: 14px !important; }
.kj-badge { display: inline-flex !important; align-items: center; gap: 8px; padding: 8px 22px !important; border-radius: 20px; color: #fff; font-size: clamp(28px, 6vmin, 44px) !important; font-weight: 900; background: linear-gradient(180deg, #ffd23d, #f5a90e); text-shadow: 0 3px 0 rgba(150, 70, 0, .5); box-shadow: 0 6px 0 #9a5a06, 0 0 24px rgba(255, 210, 60, .8); animation: kj-in .8s .2s cubic-bezier(.3, 1.8, .5, 1) both; }
.kj-badge img { width: 1.2em; height: auto; } .kj-badge small { font-size: .5em; }
.kj-go, .kj-sub { display: block; width: 100%; min-height: 58px; margin-top: 8px; border: 0; border-radius: 16px; cursor: pointer; font: inherit; font-weight: 900; font-size: clamp(18px, 3.4vmin, 23px); }
.kj-go { color: #fff; background: linear-gradient(180deg, #ff8fb8, #e8467c); box-shadow: 0 6px 0 #a8284f, 0 10px 18px rgba(232, 70, 124, .35); }
.kj-go:active { transform: translateY(5px); box-shadow: 0 1px 0 #a8284f; }
.kj-sub { min-height: 46px; font-size: 16px; color: #8a1f45; background: #fff; box-shadow: inset 0 0 0 2px #f5c4d6; }
.kj-confetti { position: fixed; inset: 0; z-index: 96; width: 100vw; height: 100vh; pointer-events: none; }
.kj-open-btn { background: linear-gradient(135deg, #ffd27a, #ff9f43 60%, #f07400) !important; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), 0 5px 0 #b85400, 0 10px 18px rgba(240, 116, 0, .35) !important; }
