/* ミニゲーム「マミィちゃんの 駄菓子クジ引き勝負！」（js/kuji.js） */
.sb { 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; }
.sb-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: sb-in .45s cubic-bezier(.3, 1.5, .5, 1); user-select: none; -webkit-user-select: none; }
@keyframes sb-in { from { transform: scale(.8) translateY(20px); opacity: 0; } }
.sb-cv { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 28px; touch-action: none; cursor: grab; }
.sb-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: sb-bob 2s ease-in-out infinite; white-space: nowrap; }
@keyframes sb-bob { 50% { transform: translateX(-50%) translateY(-6px); } }
.sb-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); }
.sb-ov { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; }
.sb-ov[hidden] { display: none; }
.sb-ov > * { pointer-events: auto; }
.sb-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: sb-in .4s cubic-bezier(.3, 1.6, .5, 1); }
.sb-buu { 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: sb-jump .8s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.sb-card.is-win .sb-buu { animation: sb-jump .8s cubic-bezier(.3, 1.6, .5, 1), sb-dance 1.2s ease-in-out .8s infinite; }
@keyframes sb-jump { from { transform: translateX(-50%) translateY(120px) scale(.4); opacity: 0; } 60% { transform: translateX(-50%) translateY(-30px) scale(1.15); opacity: 1; } }
@keyframes sb-dance { 50% { transform: translateX(-50%) translateY(-10px) rotate(-5deg); } }
.sb-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; }
.sb-card p { margin: 0 0 10px; font-weight: 800; font-size: clamp(14px, 2.6vmin, 19px); line-height: 1.6; }
.sb-yatta { font-size: clamp(30px, 6.4vmin, 50px) !important; color: #ffc21a !important; -webkit-text-stroke: 2px #8a1f45 !important; text-shadow: 0 5px 0 #8a1f45; }
.sb-prize.is-demo { padding: 8px 12px; border-radius: 14px; background: #eaf4ff; color: #1b4f8a; font-size: 14px !important; }
.sb-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: sb-in .8s .2s cubic-bezier(.3, 1.8, .5, 1) both; }
.sb-badge img { width: 1.2em; height: auto; } .sb-badge small { font-size: .5em; }
.sb-go, .sb-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); }
.sb-go { color: #fff; background: linear-gradient(180deg, #ff8fb8, #e8467c); box-shadow: 0 6px 0 #a8284f, 0 10px 18px rgba(232, 70, 124, .35); }
.sb-go:active { transform: translateY(5px); box-shadow: 0 1px 0 #a8284f; }
.sb-sub { min-height: 46px; font-size: 16px; color: #8a1f45; background: #fff; box-shadow: inset 0 0 0 2px #f5c4d6; }
.sb-confetti { position: fixed; inset: 0; z-index: 96; width: 100vw; height: 100vh; pointer-events: none; }
.sb-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; }
/* スマートボール用の調整 */
.sb-box { width: min(94vw, calc(92vh * .75), 640px); aspect-ratio: 3 / 4; box-shadow: 0 26px 70px rgba(0, 0, 0, .5); border-radius: 28px; }
.sb-cv { border-radius: 28px; }
.sb-hint { bottom: 20%; box-shadow: 0 5px 0 #8a5222, 0 10px 18px rgba(0, 0, 0, .25); color: #5a2e0a; }
.sb-x { color: #6b3a14; box-shadow: inset 0 0 0 3px #8a5222, 0 4px 8px rgba(0, 0, 0, .3); }
.sb-balls { position: absolute; left: 8%; top: 13%; margin: 0; display: flex; align-items: baseline; gap: 3px; padding: 4px 12px; border-radius: 999px; background: rgba(90, 46, 10, .85); color: #ffe9c4; font-weight: 900; pointer-events: none; }
.sb-balls b { font-size: clamp(22px, 4vmin, 32px); color: #fff; }
.sb-balls small, .sb-balls i { font-size: 12px; font-style: normal; }
.sb-buu { width: 40% !important; }
.sb-card h2 { color: #e8467c; }
.sb-open-btn { background: linear-gradient(135deg, #9ef0d9, #2fbfa0 60%, #16957c) !important; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), 0 5px 0 #0f6f5c, 0 10px 18px rgba(20, 150, 120, .35) !important; }
