/* ぐどにゅ〜 PK合戦だけの見た目（共通の画面は ../screen.css） */

/* 画面のまわりは、夜のスタジアム（紺に、照明の光） */
.gn-game-body {
	--gn-game-night: #13284a;
	--gn-game-deep: #0b1830;
	--gn-game-glow: #1f6f43;
	--gn-game-frame: #23406b;
	--gn-game-frame-out: #050c18;
	--gn-game-veil: rgba(11, 24, 48, .88);
}
html:has(.gn-game-body) { background: #0b1830; }
.gn-game {
	background:
		radial-gradient(circle at 8% 6%, rgba(255, 248, 220, .22) 0, transparent 18%),
		radial-gradient(circle at 92% 6%, rgba(255, 248, 220, .22) 0, transparent 18%),
		radial-gradient(1px 1px at 30% 20%, rgba(255, 244, 230, .5) 50%, transparent 51%),
		radial-gradient(1px 1px at 70% 30%, rgba(255, 244, 230, .4) 50%, transparent 51%),
		radial-gradient(ellipse at 50% 125%, var(--gn-game-glow) 0%, var(--gn-game-deep) 62%);
}

.gn-pk-flag {
	display: block;
	width: 2.4em; height: 1.6em;
	image-rendering: pixelated;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
	border-radius: 2px;
}

/* 上のバー：国旗 0 - 0 国旗 ／ 何本目 */
.gn-pk-hud { display: inline-flex; align-items: center; gap: 6px; }
.gn-pk-hud__flag { width: 21px; height: 14px; image-rendering: pixelated; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }
.gn-pk-hud[hidden], .gn-pk-hud__flag[hidden] { display: none; }
.gn-game__icons img[data-gn-icon="flag"] { width: 2.8em; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.gn-pk-hud b { min-width: .7em; text-align: center; font-size: 16px; }
.gn-pk-hud__dash { opacity: .7; }
.gn-pk-hud__round { font-size: 12px; opacity: .85; }

/* スタート画面（国えらび）：中身が長いので上から並べる */
.gn-pk-select { justify-content: flex-start; padding-top: 1.4em; }
.gn-pk-select .gn-game__title { font-size: 1.6em; }
.gn-pk-select > p { font-size: .9em; }
/* 地域のタブは、画面の幅に収まるように折り返す（タブの中の文字は1行のまま） */
.gn-pk-tabs {
	flex: none;
	display: flex; flex-wrap: wrap; justify-content: center; gap: .35em;
	max-width: 100%; margin: 0 0 .7em;
}
.gn-pk-tab {
	flex: none; white-space: nowrap;
	padding: .1em .7em;
	border: 1px solid rgba(255, 244, 230, .4); border-radius: 999px;
	background: none; color: inherit; font-size: .75em;
}
.gn-pk-tab[aria-pressed="true"] { background: #ea580c; border-color: var(--gn-game-cream); color: #fff; }
.gn-pk-tab:focus-visible, .gn-pk-team:focus-visible { outline: 2px dashed var(--gn-game-gold); outline-offset: 2px; }

.gn-pk-teams {
	flex: none;
	list-style: none; margin: 0 0 1em; padding: 0;
	width: 100%; max-width: 26em;
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45em;
}
.gn-pk-team {
	position: relative;
	min-width: 0;
	width: 100%; height: 100%;
	display: flex; flex-direction: column; align-items: center; gap: .25em;
	padding: .5em .2em .35em;
	border: 2px solid transparent; border-radius: 8px;
	background: rgba(255, 244, 230, .1); color: inherit;
	font-size: .72em; line-height: 1.3;
}
.gn-pk-team:hover { border-color: var(--gn-game-gold); background: rgba(255, 244, 230, .16); }
/* 国名は、入りきらなければ折り返す */
.gn-pk-team__name { display: block; width: 100%; overflow-wrap: anywhere; }
.gn-pk-team__stars { color: var(--gn-game-gold); font-size: .8em; letter-spacing: -.05em; }
.gn-pk-team__won {
	position: absolute; top: .25em; right: .25em;
	padding: 0 .35em; border-radius: 999px;
	background: #ea580c; color: #fff; font-size: .8em; line-height: 1.5;
}

/* 操作の案内（ゴールの上の観客席のあたりに、操作するまで出しておく。結果のお知らせとは同時に出ない） */
.gn-pk-guide {
	position: absolute; left: 50%; top: 3%;
	transform: translateX(-50%);
	display: flex; flex-direction: column; align-items: center;
	width: max-content; max-width: calc(100% - 16px);
	padding: .35em 1.2em .45em;
	background: rgba(255, 244, 230, .96); color: var(--gn-game-ink);
	border: 2px solid var(--gn-game-ink); border-radius: 18px;
	box-shadow: 0 3px 0 rgba(0, 0, 0, .35);
	text-align: center; line-height: 1.35;
	pointer-events: none;
	animation: gn-pk-guide 1.2s ease-in-out infinite;
}
.gn-pk-guide[hidden] { display: none; }
.gn-pk-guide b { font-weight: 400; font-size: 1.05em; color: #c2410c; white-space: nowrap; }
.gn-pk-guide small { font-size: .7em; }
.gn-pk-guide.is-nudge { animation: gn-pk-nudge .4s ease-in-out, gn-pk-guide 1.2s ease-in-out .4s infinite; }
@keyframes gn-pk-nudge {
	0%, 100% { transform: translateX(-50%); }
	25% { transform: translateX(calc(-50% - 6px)); }
	75% { transform: translateX(calc(-50% + 6px)); }
}
.gn-pk-guide.is-keeper b { color: #1d4ed8; }
@keyframes gn-pk-guide {
	0%, 100% { transform: translateX(-50%) translateY(0); }
	50% { transform: translateX(-50%) translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) { .gn-pk-guide { animation: none; } }

/* 結果のスコアボード（スポーツ中継の結果ふう） */
.gn-pk-board {
	flex: none; /* 画面が縦に詰まっても、つぶれないように */
	width: 100%; max-width: 24em;
	margin: 0 0 1em;
	border: 2px solid var(--gn-game-cream); border-radius: 8px;
	background: #0f1e3d;
	overflow: hidden;
}
.gn-pk-board .gn-pk-board__head {
	display: flex; justify-content: space-between;
	margin: 0; padding: .2em .8em;
	background: #ea580c; color: #fff;
	font-size: .75em; letter-spacing: .1em;
}
.gn-pk-board__score {
	display: grid; grid-template-columns: 1fr auto auto auto 1fr; align-items: center; gap: .3em;
	padding: .7em .5em .5em;
}
.gn-pk-board__team { display: flex; flex-direction: column; align-items: center; gap: .3em; font-size: .78em; line-height: 1.3; word-break: keep-all; overflow-wrap: anywhere; }
.gn-pk-board__num { font-size: 2.2em; line-height: 1; color: rgba(255, 244, 230, .75); min-width: 1em; }
.gn-pk-board__num.is-win { color: var(--gn-game-gold); text-shadow: 2px 2px 0 #c2410c; }
.gn-pk-board__dash { font-size: 1.4em; opacity: .6; }
.gn-pk-board__scroll { overflow-x: auto; padding: 0 .5em .6em; }
.gn-pk-board__kicks { margin: 0 auto; border-collapse: collapse; font-size: .8em; }
.gn-pk-board__kicks th, .gn-pk-board__kicks td { padding: .1em .35em; text-align: center; font-weight: 400; white-space: nowrap; }
.gn-pk-board__kicks tr:first-child th { font-size: .75em; opacity: .6; }
.gn-pk-board__kicks tr:first-child th.is-sd { color: var(--gn-game-gold); opacity: .9; }
.gn-pk-board__kicks tr + tr th { text-align: left; font-size: .85em; padding-right: .6em; }
.gn-pk-board__kicks tr:nth-child(2) td { border-bottom: 1px solid rgba(255, 244, 230, .15); }
.gn-pk-board__kicks .is-goal { color: #4ade80; }
.gn-pk-board__kicks .is-miss { color: #f87171; }
.gn-pk-board .gn-pk-board__note { margin: 0; padding: .3em; border-top: 1px solid rgba(255, 244, 230, .15); font-size: .75em; color: var(--gn-game-gold); }

@media (max-width: 380px) {
	.gn-pk-hud { gap: 4px; }
	.gn-pk-hud__flag { width: 18px; height: 12px; }
	.gn-pk-hud__round { display: none; }
}
