/* ⚡ フラッシュ暗算チャレンジ（challenge.html・en/challenge.html） */
:root { --navy: #16305c; --gold: #d4a017; --cream: #f5f0e6; --red: #c0392b; --green: #1f8a4c; --ink: #2b2b2b; }
* { box-sizing: border-box; }
body.cg { margin: 0; background: var(--cream); color: var(--ink); font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Meiryo", sans-serif; }
.cg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: var(--navy); }
.cg-head a { color: #fff; text-decoration: none; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.cg-head img { height: 34px; }
.cg-head .cg-lang { font-size: 13px; font-weight: 700; opacity: .9; }
.cg-main { max-width: 560px; margin: 0 auto; padding: 16px 16px 40px; text-align: center; }
.hidden { display: none !important; }
.cg-card { background: #fff; border: 3px solid var(--gold); border-radius: 18px; padding: 20px 16px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.cg-title { font-size: clamp(24px, 6.5vw, 34px); font-weight: 900; color: var(--navy); margin: 6px 0 4px; line-height: 1.3; }
.cg-lead { font-size: 15px; line-height: 1.8; margin: 6px 0 12px; }
.cg-solo { width: 150px; height: 150px; object-fit: contain; }
.cg-pair { display: flex; justify-content: center; align-items: flex-end; gap: 6px; }
.cg-keeper { width: 170px; height: 170px; filter: drop-shadow(0 0 10px rgba(255,220,120,.6)); }   /* 時の 番人（1分を はかる・2026-09-28） */
.cg-go { display: inline-block; font-size: 24px; font-weight: 900; padding: 16px 44px; border: none; border-radius: 999px; cursor: pointer;
  background: linear-gradient(180deg, #f3cf5c, var(--gold)); color: #3a2a00; box-shadow: 0 4px 0 #a47a0c; margin: 8px 0; touch-action: manipulation; }
.cg-go:active { transform: translateY(3px); box-shadow: 0 1px 0 #a47a0c; }
.cg-small { font-size: 13px; color: #6b5f4c; margin: 6px 0; }
.cg-sound { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; margin-top: 4px; }
.cg-hud { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 6px; min-height: 22px; }
.cg-msg { font-size: 15px; color: #6b5f4c; min-height: 22px; }
.cg-stage { background: var(--navy); border-radius: 18px; height: min(46vw, 240px); display: flex; align-items: center; justify-content: center; margin: 10px 0; }
.cg-big { font-size: clamp(64px, 20vw, 128px); font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.cg-big.cg-answer { color: #ffe9a6; }
.cg-big.pop { animation: cgpop .12s ease-out; }
@keyframes cgpop { from { transform: scale(.85); opacity: .5; } to { transform: scale(1); opacity: 1; } }
.cg-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 360px; margin: 8px auto 0; }
.cg-pad button { font-size: 28px; font-weight: 900; padding: 14px 0; border-radius: 14px; border: 2px solid #d9cdb4; background: #fff; color: var(--navy); cursor: pointer; touch-action: manipulation; }
.cg-pad button:active { background: #f3ead2; }
.cg-pad .k-ok { background: var(--green); color: #fff; border-color: var(--green); font-size: 22px; }
.cg-pad .k-del { color: #8a7560; }
.cg-feedback { font-size: 20px; font-weight: 900; min-height: 30px; margin-top: 8px; }
.cg-feedback.ok { color: var(--green); }
.cg-feedback.ng { color: var(--red); }
.cg-feedback small { display: block; font-size: 14px; font-weight: 700; color: #6b5f4c; margin-top: 4px; word-break: break-all; }
.cg-resH { font-size: 18px; margin: 4px 0 0; color: #6b5f4c; }
.cg-resLv { font-size: clamp(24px, 7vw, 34px); font-weight: 900; color: var(--red); margin: 4px 0 8px; line-height: 1.3; }
.cg-share { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.cg-share a, .cg-share button { font-size: 14px; font-weight: 800; padding: 10px 16px; border-radius: 999px; border: 2px solid var(--navy); background: #fff; color: var(--navy); text-decoration: none; cursor: pointer; }
.cg-cta { display: block; margin: 14px auto 4px; padding: 14px 18px; border-radius: 14px; background: var(--navy); color: #fff; font-weight: 900; text-decoration: none; font-size: 16px; line-height: 1.5; }
.cg-about { text-align: left; font-size: 14px; line-height: 1.9; margin-top: 22px; }
.cg-about h2 { font-size: 18px; color: var(--navy); margin: 18px 0 6px; }
.cg-foot { text-align: center; font-size: 12px; color: #8a7560; padding: 20px 16px; }
.cg-foot a { color: #8a7560; }
.cg-playing .cg-about, .cg-playing .cg-foot { display: none; }
/* 🚦 信号（数を 出す 前） */
.cg-signal { display: flex; gap: 14px; padding: 12px 18px; background: #0e1f3d; border-radius: 40px; border: 3px solid #2d4675; }
.cg-signal i { width: clamp(44px, 13vw, 64px); height: clamp(44px, 13vw, 64px); border-radius: 50%; background: #2b3a55; display: block; transition: background .08s; }
.cg-signal i.r.on { background: #ff4d4d; box-shadow: 0 0 22px #ff4d4d; }
.cg-signal i.y.on { background: #ffd23f; box-shadow: 0 0 22px #ffd23f; }
.cg-signal i.g.on { background: #3ee07a; box-shadow: 0 0 26px #3ee07a; }
.cg-adv { display: block; font-size: 18px; padding: 12px 20px; margin: 12px auto 0; text-decoration: none; background: linear-gradient(180deg, #7fd3ff, #2f8fd6); color: #fff; box-shadow: 0 4px 0 #1f5f96; }
