/* ひとり用ゲームの共通ガチャ（2026-10-02 SGC1002）。接頭辞 sgc-。各ゲームの上に全画面で重ねる。差し色は --sgc-a / --sgc-b（ゲームごと） */
.sgc { position: fixed; inset: 0; z-index: 2147483000; background: rgba(20, 14, 34, .55); opacity: 0; transition: opacity .2s; font-family: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic', sans-serif; color: #3a2c48; -webkit-tap-highlight-color: transparent; --sgc-a: #ffb84d; --sgc-b: #ff7aa8; }
.sgc.is-on { opacity: 1; }
.sgc *, .sgc *::before, .sgc *::after { box-sizing: border-box; }
.sgc-wrap { position: absolute; inset: 0; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; background: linear-gradient(180deg, #fff9ef 0%, #fff3f8 100%); transform: translateY(16px); transition: transform .22s; padding-bottom: env(safe-area-inset-bottom); }
.sgc.is-on .sgc-wrap { transform: none; }
.sgc-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: linear-gradient(90deg, var(--sgc-a), var(--sgc-b)); color: #fff; flex: none; }
.sgc-x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .28); color: #fff; font-weight: 900; font-size: 20px; line-height: 1; font-family: inherit; cursor: pointer; }
.sgc-ttl { flex: 1; font-size: 16px; font-weight: 900; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgc-bal:empty { display: none; }
.sgc-bal { font-size: 14px; font-weight: 800; background: rgba(255, 255, 255, .25); border-radius: 99px; padding: 4px 10px; white-space: nowrap; }
.sgc-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px 24px; }
.sgc-load { text-align: center; padding: 40px 0; color: #8a7a98; }

/* カプセル機 */
.sgc-hero { display: flex; gap: 12px; align-items: center; }
.sgc-mc { position: relative; width: 132px; height: 170px; flex: none; }
.sgc-dome { position: absolute; left: 8px; right: 8px; top: 0; height: 104px; border-radius: 58px 58px 14px 14px; background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .95), rgba(230, 244, 255, .55) 45%, rgba(200, 225, 255, .45)); border: 4px solid #fff; box-shadow: 0 0 0 3px var(--sgc-b), inset 0 -8px 16px rgba(120, 140, 200, .2); overflow: hidden; }
.sgc-caps i { position: absolute; left: var(--x); top: var(--y); width: 24px; height: 24px; border-radius: 50%; transform: translate(-50%, -50%); background: linear-gradient(180deg, var(--c1, #ffd1e3) 50%, #fff 50%); border: 2px solid rgba(0, 0, 0, .08); }
.sgc-caps i.is-n { --c1: #c9d3e3; } .sgc-caps i.is-r { --c1: #8ec5ff; } .sgc-caps i.is-sr { --c1: #ffd25a; } .sgc-caps i.is-ur { --c1: #ff9ad0; }
.sgc-mc.is-spin .sgc-caps i { animation: sgcJig .32s var(--d) infinite alternate ease-in-out; }
@keyframes sgcJig { from { transform: translate(-50%, -50%) rotate(-14deg); } to { transform: translate(-40%, -62%) rotate(18deg); } }
.sgc-glass { position: absolute; left: 14%; top: 10%; width: 22%; height: 44%; border-radius: 50%; background: rgba(255, 255, 255, .55); filter: blur(1px); }
.sgc-base { position: absolute; left: 0; right: 0; bottom: 0; height: 72px; border-radius: 14px; background: linear-gradient(180deg, var(--sgc-b), var(--sgc-a)); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12); }
.sgc-plate { position: absolute; left: 8px; right: 8px; top: 6px; font-size: 10px; font-weight: 900; color: #fff; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgc-crank { position: absolute; left: 18px; top: 26px; width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.sgc-crank b { position: absolute; left: 50%; top: 4px; width: 8px; height: 28px; margin-left: -4px; border-radius: 4px; background: var(--sgc-b); }
.sgc-mc.is-spin .sgc-crank { animation: sgcCrank .55s linear infinite; }
@keyframes sgcCrank { to { transform: rotate(360deg); } }
.sgc-chute { position: absolute; right: 16px; top: 28px; width: 40px; height: 30px; border-radius: 8px 8px 16px 16px; background: rgba(0, 0, 0, .22); }
.sgc-side { flex: 1; min-width: 0; }
.sgc-lead { margin: 0 0 8px; font-size: 12.5px; line-height: 1.6; color: #6a5a78; }
.sgc-pity { background: #fff; border-radius: 12px; padding: 8px 10px; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
.sgc-pity p { margin: 6px 0 0; font-size: 12.5px; font-weight: 700; }
.sgc-pity__bar { height: 9px; border-radius: 9px; background: #f0e6f2; overflow: hidden; }
.sgc-pity__bar i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--sgc-a), var(--sgc-b)); }
.sgc-wallet { display: flex; gap: 10px; margin: 8px 0 0; font-size: 12.5px; flex-wrap: wrap; }
.sgc-wallet span { background: #fff; border-radius: 99px; padding: 3px 10px; }

/* レア度の色 */
.sgc-rt { display: inline-block; min-width: 2.2em; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 900; text-align: center; color: #fff; background: #9aa5b8; }
.sgc-rt.is-r { background: #3f8cff; } .sgc-rt.is-sr { background: linear-gradient(135deg, #f7b500, #ffdf6e); color: #5a3a00; }
.sgc-rt.is-ur { background: linear-gradient(90deg, #ff6f8f, #ffb347, #6ee07a, #4fb6ff, #b07bff); }
.sgc-rt.is-lg { background: linear-gradient(90deg, #2a124a, #8a3bff, #ff4fb0, #ffd34d); }

/* ボタン */
.sgc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 6px; }
.sgc-b { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 8px 6px; border: 0; border-radius: 14px; font-weight: 900; font-size: 14px; line-height: 1.25; font-family: inherit; color: #fff; text-align: center; text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, .14); transition: transform .08s; }
.sgc-b:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .14); }
.sgc-b small { font-size: 10.5px; font-weight: 700; opacity: .92; }
.sgc-b[disabled] { opacity: .45; cursor: default; }
.sgc-b--free { background: linear-gradient(180deg, #4fd18b, #22a866); grid-column: 1 / -1; }
.sgc-b--tk { background: linear-gradient(180deg, #ffb84d, #f08a24); }
.sgc-b--st { background: linear-gradient(180deg, var(--sgc-b), #d9508a); }
.sgc-b--ten { background: linear-gradient(180deg, #a26bff, #7342d6); }
.sgc-b--sub { background: #fff; color: #6a5a78; box-shadow: 0 2px 0 rgba(0, 0, 0, .1); border: 2px solid #eadff0; }
.sgc-howfree { margin: 2px 0 12px; font-size: 11.5px; line-height: 1.6; color: #7a6a88; }

/* タブ */
.sgc-tabs { display: flex; gap: 4px; border-bottom: 2px solid #f0e2ee; margin-bottom: 10px; }
.sgc-tabs button { flex: 1; border: 0; background: none; padding: 9px 2px; font-weight: 800; font-size: 13px; line-height: 1.2; font-family: inherit; color: #9a8aa8; border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; }
.sgc-tabs button.is-on { color: #3a2c48; border-bottom-color: var(--sgc-b); }
.sgc-tabs small { font-weight: 700; }
.sgc-h { margin: 12px 0 6px; font-size: 13px; }
.sgc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.sgc-cell { background: #fff; border-radius: 12px; padding: 8px 4px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px solid #f0e6f2; }
.sgc-cell.is-r { border-color: #cfe2ff; } .sgc-cell.is-sr { border-color: #ffe39a; } .sgc-cell.is-ur { border-color: #ffc4e2; } .sgc-cell.is-lg { border-color: #c9a6ff; }
.sgc-cell b { font-size: 11.5px; line-height: 1.3; }
.sgc-cell small { font-size: 10.5px; color: #8a7a98; }
.sgc-cell.is-lock { opacity: .6; }
.sgc-mini { border: 0; border-radius: 99px; padding: 4px 10px; font-weight: 800; font-size: 11.5px; line-height: 1.2; font-family: inherit; color: #fff; background: var(--sgc-b); cursor: pointer; }
.sgc-mini[disabled] { background: #d8cfe0; cursor: default; }
.sgc-rate { width: 100%; border-collapse: collapse; font-size: 12.5px; background: #fff; border-radius: 12px; overflow: hidden; }
.sgc-rate th, .sgc-rate td { padding: 7px 6px; border-bottom: 1px solid #f3eaf3; text-align: center; }
.sgc-rate th { background: #fbf3fb; font-size: 11.5px; color: #7a6a88; }
.sgc-rate--items td:nth-child(2) { text-align: left; }
.sgc-rate__n small { display: block; font-size: 10.5px; color: #8a7a98; }
.sgc-notes { margin: 10px 0; padding-left: 1.2em; font-size: 12px; line-height: 1.7; color: #5a4a68; }
.sgc-fine { margin: 14px 0 0; font-size: 11px; line-height: 1.6; color: #9a8aa8; }

/* 見本 */
.sgc-pv { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; overflow: hidden; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.sgc-pv--q { background: #efe8f2; color: #b6a8c4; font-size: 22px; font-weight: 900; }
.sgc-pv--img img { width: 100%; height: 100%; object-fit: contain; }
.sgc-g-box { width: 62%; height: 52%; margin-top: 18%; border: 5px solid; border-top: 0; border-radius: 0 0 8px 8px; background: rgba(255, 255, 255, .35); }
.sgc-g-pen { width: 16%; height: 70%; border-radius: 8px; box-shadow: 0 0 12px 4px rgba(255, 255, 255, .5); transform: rotate(18deg); }
.sgc-g-look { width: 58%; height: 56%; border-radius: 30% 30% 10% 10%; border: 3px solid; clip-path: polygon(0 18%, 26% 0, 74% 0, 100% 18%, 88% 40%, 80% 34%, 80% 100%, 20% 100%, 20% 34%, 12% 40%); }
.sgc-g-frame { width: 64%; height: 64%; border: 8px solid; border-radius: 6px; }
.sgc-g-mark { font-size: 30px; font-style: normal; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .15)); }
.sgc-g-lens { width: 46%; height: 46%; border-radius: 50%; border: 5px solid #8a6a3a; position: relative; margin: -10% 0 0 -10%; }
.sgc-g-lens::after { content: ''; position: absolute; right: -40%; bottom: -40%; width: 12px; height: 34%; background: #8a6a3a; border-radius: 4px; transform: rotate(-45deg); }
.sgc-g-theme { width: 70%; height: 50%; border-radius: 6px; border: 3px solid rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .15); }
.sgc-g-emo { font-size: 34px; font-style: normal; }

/* 確認 */
.sgc-sheet { position: absolute; inset: 0; background: rgba(20, 14, 34, .5); display: flex; align-items: flex-end; justify-content: center; z-index: 5; }
.sgc-sheet__in { width: 100%; max-width: 520px; background: #fff; border-radius: 20px 20px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); text-align: center; animation: sgcUp .2s; }
.sgc-sheet__in p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; }
.sgc-sheet__t { font-size: 15.5px !important; font-weight: 900; }
.sgc-sheet__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.sgc-sheet__pv { margin-bottom: 8px; }
@keyframes sgcUp { from { transform: translateY(40px); opacity: 0; } }
.sgc-toast { position: absolute; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: rgba(40, 30, 56, .92); color: #fff; padding: 10px 16px; border-radius: 99px; font-size: 13px; font-weight: 700; opacity: 0; transition: .25s; z-index: 9; max-width: 90%; text-align: center; }
.sgc-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* 演出 */
.sgc-stage { position: absolute; inset: 0; z-index: 6; background: radial-gradient(circle at 50% 40%, #3a2a5e, #120c22 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; color: #fff; padding: 16px; }
.sgc-rays { position: absolute; left: 50%; top: 40%; width: 900px; height: 900px; margin: -450px 0 0 -450px; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .10) 0 8deg, transparent 8deg 20deg); animation: sgcRot 9s linear infinite; opacity: .5; pointer-events: none; }
.sgc-rays.is-r { background-color: transparent; filter: drop-shadow(0 0 0 #3f8cff); }
.sgc-rays.is-sr { background: repeating-conic-gradient(from 0deg, rgba(255, 214, 90, .28) 0 8deg, transparent 8deg 20deg); opacity: .8; }
.sgc-rays.is-ur, .sgc-rays.is-lg { background: repeating-conic-gradient(from 0deg, rgba(255, 120, 170, .3) 0 6deg, rgba(120, 220, 255, .3) 6deg 12deg, transparent 12deg 20deg); opacity: 1; animation-duration: 4s; }
@keyframes sgcRot { to { transform: rotate(360deg); } }
.sgc-cap { position: relative; width: 120px; height: 120px; animation: sgcDrop .6s cubic-bezier(.3, 1.6, .5, 1); cursor: pointer; }
.sgc-cap__t, .sgc-cap__b { position: absolute; left: 0; width: 120px; height: 60px; border: 4px solid rgba(255, 255, 255, .9); }
.sgc-cap__t { top: 0; border-radius: 60px 60px 0 0; border-bottom-width: 2px; background: var(--cc, #c9d3e3); transition: transform .35s; }
.sgc-cap__b { bottom: 0; border-radius: 0 0 60px 60px; border-top-width: 2px; background: #fff; transition: transform .35s; }
.sgc-cap__s { position: absolute; left: 22px; top: 16px; width: 24px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, .7); }
.sgc-cap.is-r { --cc: #4f9bff; } .sgc-cap.is-sr { --cc: #ffcd3a; } .sgc-cap.is-ur { --cc: linear-gradient(90deg, #ff6f8f, #ffb347, #6ee07a, #4fb6ff, #b07bff); } .sgc-cap.is-lg { --cc: linear-gradient(90deg, #2a124a, #8a3bff, #ff4fb0, #ffd34d); }
.sgc-cap.is-sr, .sgc-cap.is-ur, .sgc-cap.is-lg { filter: drop-shadow(0 0 22px rgba(255, 230, 140, .8)); }
.sgc-cap.is-shake { animation: sgcShake .12s 5 linear; }
.sgc-cap.is-open .sgc-cap__t { transform: translate(-30px, -80px) rotate(-40deg); opacity: 0; transition: transform .45s, opacity .45s .2s; }
.sgc-cap.is-open .sgc-cap__b { transform: translate(30px, 90px) rotate(30deg); opacity: 0; transition: transform .45s, opacity .45s .2s; }
.sgc-cap.is-open { position: absolute; top: 30%; pointer-events: none; }
.sgc-cap.is-open .sgc-cap__s { opacity: 0; }
@keyframes sgcDrop { from { transform: translateY(-60vh) rotate(-180deg); } }
@keyframes sgcShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
.sgc-tap { margin: 18px 0 0; font-size: 14px; font-weight: 800; animation: sgcBlink 1s infinite; }
@keyframes sgcBlink { 50% { opacity: .4; } }
.sgc-reveal { position: relative; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; max-width: 480px; }
.sgc-reveal.is-ten { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: 100%; }
.sgc-card { position: relative; background: rgba(255, 255, 255, .96); color: #3a2c48; border-radius: 14px; padding: 10px 6px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; animation: sgcPop .35s cubic-bezier(.3, 1.5, .5, 1); border: 3px solid #c9d3e3; min-width: 0; }
.sgc-reveal:not(.is-ten) .sgc-card { width: 200px; padding: 16px 10px 12px; }
.sgc-card.is-r { border-color: #4f9bff; } .sgc-card.is-sr { border-color: #ffcd3a; box-shadow: 0 0 18px rgba(255, 210, 80, .7); }
.sgc-card.is-ur { border-color: #ff8ac0; box-shadow: 0 0 24px rgba(255, 140, 200, .8), 0 0 40px rgba(120, 200, 255, .5); }
.sgc-card.is-lg { border-color: #8a3bff; box-shadow: 0 0 28px rgba(160, 90, 255, .9); }
.sgc-card b { font-size: 12px; line-height: 1.25; word-break: break-all; }
.sgc-reveal:not(.is-ten) .sgc-card b { font-size: 16px; }
.sgc-card small { font-size: 10px; color: #8a7a98; line-height: 1.3; }
.sgc-card__r { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 10px !important; white-space: nowrap; min-width: 0; padding: 1px 5px; }
.sgc-reveal.is-ten .sgc-card__r { font-size: 8.5px !important; padding: 1px 3px; letter-spacing: -.02em; }
.sgc-new { position: absolute; top: 4px; right: 4px; font-style: normal; font-size: 9px; font-weight: 900; color: #fff; background: #ff4f6a; border-radius: 6px; padding: 1px 4px; }
.sgc-why { color: #c0398a !important; font-weight: 800; }
@keyframes sgcPop { from { transform: scale(.4); opacity: 0; } }
.sgc-after { margin-top: 16px; text-align: center; position: relative; width: 100%; max-width: 420px; }
.sgc-after__p { margin: 0 0 10px; font-size: 13px; }
.sgc-after__b { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sgc-after__b .sgc-b:only-child { grid-column: 1 / -1; }
.sgc-skip { position: absolute; right: 12px; top: calc(12px + env(safe-area-inset-top)); border: 0; background: rgba(255, 255, 255, .2); color: #fff; border-radius: 99px; padding: 6px 12px; font-weight: 800; font-size: 12px; line-height: 1; font-family: inherit; cursor: pointer; }

@media (max-width: 370px) {
	.sgc-mc { width: 112px; height: 150px; }
	.sgc-dome { height: 90px; }
	.sgc-base { height: 64px; }
	.sgc-b { font-size: 13px; min-height: 48px; }
	.sgc-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
	.sgc-reveal.is-ten .sgc-card b { font-size: 10.5px; }
}
@media (max-height: 600px) { .sgc-mc { transform: scale(.85); transform-origin: left center; } }
@media (prefers-reduced-motion: reduce) { .sgc-rays, .sgc-caps i, .sgc-crank { animation: none !important; } }
