/* ストップウォッチ系ゲーム（ピタッとストップ・反射神経・体内時計・連打）の共通スタイル
   共通のクラス名（.card .big .row .btn など）と重ならないよう sg- を付ける */

/* ---------- メイン画面 ---------- */
.sg-status { font-size: 20px; font-weight: 800; margin-bottom: 8px; min-height: 1.5em; }
.sg-clock { font-family: var(--num); font-size: 52px; line-height: 1; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
/* スタート＝緑、ストップ・押す＝赤 の1つの大きなボタン */
.sg-main { display: block; width: 100%; border: 0; border-radius: 18px; padding: 30px 16px; font: inherit; font-size: 34px; font-weight: 900; color: #fff; cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,.18); transition: transform .06s, filter .15s; touch-action: manipulation; user-select: none; }
.sg-main small { display: block; font-size: 15px; font-weight: 700; opacity: .9; margin-top: 4px; }
.sg-main:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.sg-main:hover { filter: brightness(1.06); }
.sg-main.go { background: #1f9d55; }
.sg-main.stop { background: #e53935; }
.sg-main.off { background: #8a909c; cursor: default; }
.sg-pbtns { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 12px; }
.sg-pbtns:empty { display: none; }
.sg-pbtns button { padding: 26px 10px; min-height: 92px; border-radius: 14px; border: 0; background: var(--c); color: #fff; font: inherit; font-size: 22px; font-weight: 800; cursor: pointer; text-shadow: 0 1px 2px rgba(0,0,0,.4); touch-action: manipulation; }
.sg-pbtns button kbd { display: inline-block; min-width: 1.6em; padding: 0 4px; margin-right: 6px; border-radius: 6px; background: rgba(255,255,255,.9); color: #222; text-shadow: none; }
.sg-pbtns button.done { opacity: .45; }
.sg-who { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sg-who:empty { display: none; }
.sg-who button { padding: 6px 12px; border-radius: 999px; border: 2px solid var(--c); background: var(--surface); color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.sg-who button.on { background: var(--c); color: #fff; }
.sg-turns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sg-turns:empty { display: none; }
.sg-turns span { padding: 4px 10px; border-radius: 8px; background: var(--surface2); border-left: 5px solid var(--c); font-size: 14px; font-weight: 700; }
.sg-ranklist { display: grid; gap: 4px; }
.sg-rk { display: grid; grid-template-columns: 3em 1fr auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 8px; background: var(--surface2); border-left: 6px solid var(--c); }
.sg-rk.out { opacity: .55; }
.sg-rk b { font-family: var(--num); }
.sg-anti { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface2); }
.sg-anti > b { display: block; }
.sg-anti .switch { display: flex; margin-top: 6px; }

/* ---------- 出力画面 ---------- */
.sg { --stage: radial-gradient(circle at 50% 35%, #1d2a4a, #0b0c10 75%); flex-direction: row; gap: 3vmin; padding: 3vmin 4vmin; }
.sg.go { --stage: radial-gradient(circle at 50% 40%, #2fd27a, #0f6b3a 80%); }
.sg.wait { --stage: radial-gradient(circle at 50% 40%, #3a1420, #0b0c10 80%); }
.sg.over { --stage: radial-gradient(circle at 50% 40%, #7a1622, #1a0508 80%); }
.sg-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6vmin; }
.sg-rule { font-size: 4.2vmin; font-weight: 800; color: #ffd84d; text-align: center; }
.sg-name { font-size: 6vmin; font-weight: 900; padding: .6vmin 3vmin; border-radius: 2vmin; background: var(--c, #3d5afe); text-shadow: 0 .3vmin 1vmin rgba(0,0,0,.5); }
.sg-big { font-family: var(--num); font-size: min(17vw, 34vh); line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 1vmin 3vmin rgba(0,0,0,.5); text-align: center; }
.sg-big.msg { font-family: inherit; font-weight: 900; font-size: min(12vw, 24vh); }
.sg-big small { font-size: .45em; }
.sg-verdict { font-size: 9vmin; font-weight: 900; min-height: 1.2em; text-align: center; }
.sg-verdict.safe { color: #6ee7a0; } .sg-verdict.out { color: #ff6b6b; }
.sg-verdict small { display: block; font-size: .45em; color: #c9d2ea; font-weight: 700; }
.sg-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2vmin; max-width: 100%; }
.sg-chip { display: flex; align-items: center; gap: 1vmin; padding: .8vmin 1.6vmin; border-radius: 1.4vmin; background: rgba(255,255,255,.08); border-left: 1vmin solid var(--c); font-size: 3.4vmin; font-weight: 800; }
.sg-chip kbd { font-family: var(--num); background: #fff; color: #222; border-radius: .8vmin; padding: 0 1vmin; }
.sg-chip .v { font-family: var(--num); color: #ffd84d; }
.sg-chip.out .v { color: #ff6b6b; }
.sg-chip.win { background: rgba(255,216,77,.25); }
.sg-chip.now { background: rgba(255,255,255,.22); box-shadow: 0 0 0 .4vmin #fff inset; }
.sg-side { width: 30vw; display: flex; flex-direction: column; gap: 1vmin; }
.sg-side:empty { display: none; }
.sg-side h3 { margin: 0 0 .5vmin; font-size: 3.4vmin; color: #9fb0d6; }
.sg-r { display: grid; grid-template-columns: 5vmin 1fr auto; gap: 1.5vmin; align-items: center; padding: .7vmin 1.5vmin; border-radius: 1.2vmin; background: rgba(255,255,255,.07); border-left: 1vmin solid var(--c); font-size: 3.2vmin; font-weight: 800; }
.sg-r .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-r .k { font-family: var(--num); color: #ffd84d; text-align: center; }
.sg-r .v { font-family: var(--num); }
.sg-r.out { opacity: .5; } .sg-r.out .v { color: #ff6b6b; }
