.chii3-gacha-container { max-width: 420px; margin: 0 auto; border: 2px solid var(--chii-pink, #ffb7c5); border-radius: 12px; padding: 10px; background: var(--chii-pink-light, #fff5f7); text-align: center; box-sizing: border-box; position: relative; overflow: hidden; font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif; }
.gacha-header h2 { color: var(--chii-pink-deep, #ec407a); margin: 0 0 10px 0; font-size: 1.3em; }
.gacha-lucky-item { background: #fff; border: 1px dashed #ffb7c5; border-radius: 8px; padding: 4px 8px; font-size: 0.75em; display: flex; align-items: center; justify-content: center; gap: 5px; margin-bottom: 10px; }
.gacha-lucky-item img { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; }
.lucky-pt { color: #ec407a; font-weight: bold; }
.gacha-actions { margin-bottom: 10px; }
.chii3-f-btn-primary { background: #ec407a !important; color: white !important; border: none !important; cursor: pointer !important; font-weight: bold !important; border-radius: 20px !important; padding: 10px 24px !important; font-size: 1.1em !important; transition: 0.2s !important; font-family: inherit !important; outline: none !important; }
.chii3-f-btn-primary:disabled { background: #999 !important; cursor: not-allowed !important; transform: none !important; }
.gacha-viewport { position: relative; width: 100%; background: #eef7e0; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 10px rgba(0,0,0,0.1); margin-bottom: 10px; display: flex; flex-direction: column; }
.gacha-results-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px 10px; padding: 15px; box-sizing: border-box; min-height: 400px; }
.gacha-viewport-score-box { margin: 0 12px 12px 12px; background: #fff; border: 2px solid #ffb7c5; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.viewport-score-label { font-size: 0.85em; font-weight: bold; color: #888; margin-bottom: 2px; }
.viewport-score-value { font-size: 1.8em; font-weight: bold; color: #ec407a; line-height: 1.1; }
.gacha-item-card { width: 100%; display: flex; flex-direction: column; align-items: center; position: relative; opacity: 0; transform: scale(0.5); }
.gacha-item-card img { width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; object-fit: cover; display: block; border: 1px solid rgba(0,0,0,0.1); box-sizing: border-box; }
.rarity-1 img, .rarity-2 img, .rarity-3 img { box-shadow: 0 0 3px #fff, 0 0 6px rgba(255,255,255,0.6); }
.rarity-4 img { box-shadow: 0 0 4px #d500f9, 0 0 8px #d500f9; } 
.rarity-5 img { box-shadow: 0 0 5px #ff9800, 0 0 10px #ff9800; } 
.rarity-6 img { box-shadow: 0 0 8px #76ff03, 0 0 14px #76ff03; } 
.rarity-7 img { box-shadow: 0 0 10px #ff1744, 0 0 18px #ff1744; } 
.anim-pop { animation: popIn 0.3s forwards; }
.anim-high { animation: popInHigh 0.5s forwards; z-index: 5; }
.anim-upgrade { animation: upgradeFlash 1.5s forwards; z-index: 10; }
@keyframes popIn { to { opacity: 1; transform: scale(1); } }
@keyframes popInHigh { 0% { opacity: 0; transform: scale(0.5); } 60% { opacity: 1; transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } }
@keyframes upgradeFlash { 0% { opacity: 1; transform: scale(1); filter: brightness(1); } 20% { transform: scale(1.3) rotate(-5deg); filter: brightness(2) drop-shadow(0 0 10px #fff); } 40% { transform: scale(1.3) rotate(5deg); filter: brightness(3) drop-shadow(0 0 20px #fff); } 60% { transform: scale(1.3) rotate(-5deg); filter: brightness(3) drop-shadow(0 0 20px #fff); } 80% { transform: scale(1.3) rotate(0deg); filter: brightness(2) drop-shadow(0 0 10px #fff); } 100% { opacity: 1; transform: scale(1); filter: brightness(1); } }
.upgrade-stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #ffeb3b; font-weight: bold; font-size: 1.2em; text-shadow: 2px 2px 0 #d50000, -2px -2px 0 #d50000, 2px -2px 0 #d50000, -2px 2px 0 #d50000; z-index: 20; opacity: 0; pointer-events: none; animation: stampPopAndFade 1.8s 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes stampPopAndFade { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-10deg); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-10deg); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2) rotate(-10deg); } }
#gacha-score-board { margin-top: 10px; background: #fff; padding: 15px; border-radius: 8px; border: 2px solid #ffb7c5; }
.score-new-record { display: inline-block; background: #d50000; color: #fff; padding: 4px 16px; border-radius: 20px; font-weight: bold; font-size: 1.1em; letter-spacing: 1px; box-shadow: 0 4px 6px rgba(0,0,0,0.3); animation: newRecordBounce 1s infinite alternate; margin-bottom: 10px; }
.score-campaign { color: #d50000; font-weight: bold; font-size: 0.9em; margin-bottom: 10px; }
@keyframes newRecordBounce { from { transform: translateY(0); } to { transform: translateY(-3px); } }
.yaku-details { font-size: 0.85em; text-align: left; background: #fafafa; border-radius: 4px; padding: 8px; margin-bottom: 10px; }
.yaku-details summary { cursor: pointer; color: #0288d1; font-weight: bold; }
.yaku-details ul { padding-left: 20px; margin: 5px 0 0 0; color: #555; }
.score-highscore-display { font-size: 0.85em; font-weight: bold; color: #666; margin-top: 10px; border-top: 1px dashed #ddd; padding-top: 10px; line-height: 1.5; }
.action-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; font-size: 0.95em; font-weight: bold; text-decoration: none; border-radius: 25px; box-shadow: 0 4px 6px rgba(0,0,0,0.2); transition: all 0.2s ease; cursor: pointer; border: none; font-family: inherit; }
.action-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 10px rgba(0,0,0,0.25); text-decoration: none; color: #fff; }
.action-btn:active { transform: translateY(2px); box-shadow: 0 2px 4px rgba(0,0,0,0.15); }
.btn-save { background: #4caf50; color: #fff; }
.btn-share { background: #000; color: #fff; }
#gacha-effect-container { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); z-index: 100; display: flex; align-items: center; justify-content: center; transition: opacity 0.5s; }
.effect-inner { position: relative; width: 100%; height: 100%; }
.effect-img-layer { position: absolute; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.effect-img-layer img { width: 80%; max-width: 300px; height: auto; object-fit: contain; opacity: 0; transform: scale(0); animation: effectZoomIn 0.5s forwards; border:none; box-shadow:none; }
.effect-text { position: absolute; top: 65%; left: 50%; transform: translate(-50%, -50%) scale(0); width: 100%; text-align: center; font-size: 2.6rem; font-weight: 900; opacity: 0; animation: effectPopText 0.4s 0.4s forwards; z-index: 10; white-space: normal; line-height: 1.2; font-family: inherit; }
@keyframes effectZoomIn { 0% { opacity: 0; transform: scale(0.2); } 100% { opacity: 1; transform: scale(1); } }
@keyframes effectPopText { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-3deg); } }
.text-chance { color: #0288d1; text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff, -2px 0 #fff, 2px 0 #fff, 0 -2px #fff, 0 2px #fff, 0 4px 6px rgba(0,0,0,0.4); }
.text-daichance { color: #c2185b; text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff, -2px 0 #fff, 2px 0 #fff, 0 -2px #fff, 0 2px #fff, 0 4px 6px rgba(0,0,0,0.4); }
.text-gekiatsu { color: #d50000; font-size: 2.4rem; text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff, -2px 0 #fff, 2px 0 #fff, 0 -2px #fff, 0 2px #fff, 0 4px 6px rgba(0,0,0,0.4); }
.camp-overlay { position: absolute; top:0; left:0; right:0; bottom:0; background: rgba(255,255,255,0.85); z-index: 150; display: flex; align-items: center; justify-content: center; opacity: 0; animation: fadeInOut 2.5s forwards; }
.camp-text { font-size: 2.2em; font-weight: 900; transform: scale(0); animation: campTextPop 2.5s forwards; text-align: center; line-height: 1.4; font-family: inherit; }
.style-campaign { color: #ff5722; text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff, -2px 0 #fff, 2px 0 #fff, 0 -2px #fff, 0 2px #fff, 0 4px 6px rgba(0,0,0,0.4); }
.style-campaign-super { color: #d50000; text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff, -2px 0 #fff, 2px 0 #fff, 0 -2px #fff, 0 2px #fff, 0 4px 6px rgba(0,0,0,0.4); }
.style-bonus { color: #0288d1; text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff, -2px 0 #fff, 2px 0 #fff, 0 -2px #fff, 0 2px #fff, 0 4px 6px rgba(0,0,0,0.4); }
.style-highscore-up { color: #ff9800; text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff, -2px 0 #fff, 2px 0 #fff, 0 -2px #fff, 0 2px #fff, 0 4px 6px rgba(0,0,0,0.4); }
@keyframes fadeInOut { 0%{opacity:0;} 10%{opacity:1;} 90%{opacity:1;} 100%{opacity:0;} }
@keyframes campTextPop { 0% { transform: scale(0); } 15% { transform: scale(1.1) rotate(-5deg); } 25% { transform: scale(1) rotate(-5deg); } 80% { transform: scale(1) rotate(-5deg); opacity:1;} 100% { transform: scale(1.5) rotate(-5deg); opacity:0;} }