/* =============================================
   グルメ図鑑 — 高級メニュー風スタイル
   黒基調 × 金アクセント × 明朝見出し。絵文字不使用。
   ============================================= */

:root {
	--bg: #16130f;
	--bg-soft: #1f1a14;
	--card: #241e17;
	--line: #3a3128;
	--gold: #c9a227;
	--gold-soft: #e6c86a;
	--ink: #f2ead8;
	--muted: #b3a48c;
	--serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
	--sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html, body {
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	line-height: 1.8;
	-webkit-text-size-adjust: 100%;
}

body.modal-open { overflow: hidden; }

#app {
	max-width: 1080px;
	margin: 0 auto;
	padding: 22px 14px 60px;
}

/* ===== ヘッダー ===== */
#top { text-align: center; padding: 8px 0 4px; }

#hero {
	max-width: 420px;
	margin: 0 auto 18px;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--line);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

#hero img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.eyebrow {
	color: var(--gold);
	font-size: 0.82rem;
	letter-spacing: 0.32em;
	text-indent: 0.32em;
}

h1 {
	font-family: var(--serif);
	font-size: clamp(1.9rem, 7vw, 2.6rem);
	font-weight: 600;
	letter-spacing: 0.14em;
	margin: 4px 0 16px;
}

h1::after {
	content: "";
	display: block;
	width: 64px;
	height: 2px;
	margin: 12px auto 0;
	background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ===== タブ ===== */
#tabs {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 6px 0 14px;
}

.tab {
	font-family: var(--serif);
	font-size: 1.05rem;
	letter-spacing: 0.18em;
	text-indent: 0.18em;
	color: var(--muted);
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 9px 30px;
	min-height: 46px;
	cursor: pointer;
	transition: color .15s, border-color .15s, background .15s;
}

.tab.is-active {
	color: #1c1710;
	background: linear-gradient(135deg, var(--gold-soft), var(--gold));
	border-color: var(--gold);
	font-weight: 700;
}

/* ===== 検索・チップ ===== */
#controls { margin: 4px 0 14px; }

#search {
	width: 100%;
	min-height: 48px;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: 12px;
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1rem;
	padding: 10px 16px;
}

#search:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

#search::placeholder { color: #7d715f; }

#chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.chip {
	font-size: 0.85rem;
	color: var(--muted);
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 5px 14px;
	min-height: 36px;
	cursor: pointer;
	transition: color .15s, border-color .15s;
}

.chip.is-active {
	color: var(--gold-soft);
	border-color: var(--gold);
	font-weight: 700;
}

.count {
	margin-top: 10px;
	color: var(--muted);
	font-size: 0.8rem;
	letter-spacing: 0.1em;
}

/* ===== カードグリッド ===== */
#grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 12px;
}

.card {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 10px 10px 12px;
	cursor: pointer;
	text-align: left;
	color: var(--ink);
	font-family: var(--sans);
	transition: transform .15s, border-color .15s;
}

.card:hover { transform: translateY(-3px); border-color: var(--gold); }

.card-name {
	font-family: var(--serif);
	font-size: 1.02rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.4;
}

.card-group { color: var(--gold-soft); font-size: 0.72rem; letter-spacing: 0.12em; }

/* ===== サムネイル ===== */
.thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	overflow: hidden;
	background:
		radial-gradient(circle at 30% 25%, rgba(201, 162, 39, 0.18), transparent 55%),
		linear-gradient(150deg, #2b241b, #191510);
	border: 1px solid var(--line);
}

.thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity .25s;
}

.thumb.has-img img { opacity: 1; }

.thumb-ph {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--serif);
	font-size: 2.6rem;
	color: rgba(230, 200, 106, 0.5);
}

.thumb-lg { border-radius: 14px; }

.thumb-lg .thumb-ph { font-size: 4rem; }

.empty {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--muted);
	padding: 40px 0;
}

/* ===== フッター ===== */
#foot {
	margin-top: 34px;
	text-align: center;
	color: #7d715f;
	font-size: 0.75rem;
}

/* ===== 詳細モーダル ===== */
#modal {
	position: fixed;
	inset: 0;
	z-index: 40;
	background: rgba(8, 6, 4, 0.78);
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

#modal-panel {
	position: relative;
	width: min(560px, 100%);
	max-height: 92dvh;
	overflow-y: auto;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-bottom: 0;
	border-radius: 20px 20px 0 0;
	padding: 18px 18px 40px;
}

#modal-close {
	position: sticky;
	top: 0;
	margin-left: auto;
	display: block;
	z-index: 2;
	color: var(--ink);
	background: rgba(22, 19, 15, 0.9);
	border: 1px solid var(--line);
	border-radius: 999px;
	font-family: var(--sans);
	font-size: 0.85rem;
	padding: 7px 18px;
	min-height: 40px;
	cursor: pointer;
}

#modal-close:hover { border-color: var(--gold); color: var(--gold-soft); }

.detail-head { margin: 14px 0 6px; }

.detail-group {
	display: inline-block;
	color: var(--gold-soft);
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	border: 1px solid var(--gold);
	border-radius: 999px;
	padding: 2px 12px;
	margin-bottom: 8px;
}

.detail-head h2 {
	font-family: var(--serif);
	font-size: 1.7rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.4;
}

.detail-yomi { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.14em; }

/* こってり度 */
.fat {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 10px 14px;
	margin: 12px 0 6px;
}

.fat-label { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.08em; }

.fat-dots { display: flex; gap: 5px; }

.fat-dots i {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #3a3128;
	border: 1px solid #4a4034;
}

.fat-dots i.on {
	background: linear-gradient(135deg, var(--gold-soft), var(--gold));
	border-color: var(--gold);
}

.fat-word { color: var(--gold-soft); font-size: 0.82rem; margin-left: auto; }

/* 解説セクション */
.detail-sec { margin-top: 16px; }

.detail-sec h3 {
	font-family: var(--serif);
	color: var(--gold-soft);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	padding-left: 10px;
	border-left: 3px solid var(--gold);
	margin-bottom: 4px;
}

.detail-sec p { font-size: 0.95rem; color: var(--ink); }

/* ===== レスポンシブ ===== */
@media (min-width: 700px) {
	#grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
	#modal { align-items: center; padding: 20px; }
	#modal-panel { border-radius: 20px; border-bottom: 1px solid var(--line); max-height: 88dvh; }
}

@media (max-width: 380px) {
	#grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   寿司ネタ神経衰弱
   ============================================= */

.game-nav { margin-top: 4px; }

.back-to-zukan,
.game-link {
	display: inline-block;
	color: var(--gold-soft);
	font-size: 0.85rem;
	letter-spacing: 0.1em;
	text-decoration: none;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 7px 18px;
	min-height: 38px;
}

.back-to-zukan:hover, .game-link:hover { border-color: var(--gold); }

/* レベル選択 */
#game-setup { text-align: center; margin-top: 8px; }

.setup-lead { color: var(--muted); font-size: 0.92rem; margin-bottom: 16px; }

.level-btns {
	display: grid;
	gap: 10px;
	max-width: 420px;
	margin: 0 auto;
}

.level-btn {
	font-family: var(--serif);
	font-size: 1.1rem;
	letter-spacing: 0.12em;
	color: var(--ink);
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 14px;
	min-height: 60px;
	cursor: pointer;
	transition: border-color .15s, transform .15s;
}

.level-btn:hover { border-color: var(--gold); transform: translateY(-2px); }

.level-btn span {
	display: block;
	font-family: var(--sans);
	font-size: 0.75rem;
	color: var(--muted);
	letter-spacing: 0.06em;
	margin-top: 2px;
}

/* HUD */
#game-hud {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 4px 0 12px;
	color: var(--muted);
	font-size: 0.85rem;
}

#btn-restart {
	margin-left: auto;
	color: var(--muted);
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-family: var(--sans);
	font-size: 0.8rem;
	padding: 5px 14px;
	min-height: 34px;
	cursor: pointer;
}

#btn-restart:hover { border-color: var(--gold); color: var(--gold-soft); }

/* 盤面 */
#board {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	max-width: 560px;
	margin: 0 auto;
}

#board[data-size="12"] { grid-template-columns: repeat(3, 1fr); max-width: 430px; }

@media (min-width: 700px) {
	#board[data-size="20"] { grid-template-columns: repeat(5, 1fr); max-width: 700px; }
}

/* カード（3Dフリップ） */
.mcard {
	position: relative;
	aspect-ratio: 3 / 4;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	perspective: 700px;
}

.mcard-inner {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
	transition: transform 0.45s cubic-bezier(.3,1.4,.5,1);
}

.mcard.is-open .mcard-inner,
.mcard.is-matched .mcard-inner { transform: rotateY(180deg); }

.mcard-back, .mcard-face {
	position: absolute;
	inset: 0;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	border-radius: 12px;
	overflow: hidden;
}

/* 裏面：共通デザイン（CSSのみ・青海波風パターン＋「寿」） */
.mcard-back {
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		repeating-radial-gradient(circle at 50% 130%, transparent 0 10px, rgba(201, 162, 39, 0.12) 10px 12px),
		repeating-radial-gradient(circle at 0% 0%, transparent 0 14px, rgba(201, 162, 39, 0.08) 14px 16px),
		linear-gradient(160deg, #221c14, #171310);
	border: 1px solid var(--gold);
	box-shadow: inset 0 0 0 3px #171310, inset 0 0 0 4px rgba(201, 162, 39, 0.5);
}

.mcard-mark {
	font-family: var(--serif);
	font-style: normal;
	font-size: clamp(1.6rem, 6vw, 2.2rem);
	color: var(--gold);
	opacity: 0.9;
	border: 1px solid rgba(201, 162, 39, 0.6);
	border-radius: 50%;
	width: 2.1em;
	height: 2.1em;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* 表面：ネタ画像 */
.mcard-face {
	transform: rotateY(180deg);
	background:
		radial-gradient(circle at 30% 25%, rgba(201, 162, 39, 0.18), transparent 55%),
		linear-gradient(150deg, #2b241b, #191510);
	border: 1px solid var(--line);
}

.mcard-face img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity .2s;
}

.mcard-face.has-img img { opacity: 1; }

.mcard-ph {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--serif);
	font-style: normal;
	font-size: 1.8rem;
	color: rgba(230, 200, 106, 0.55);
}

.mcard.is-matched { cursor: default; }

.mcard.is-matched .mcard-face {
	border-color: var(--gold);
	box-shadow: 0 0 14px rgba(201, 162, 39, 0.45);
}

/* ペア成立トースト */
#match-toast {
	position: fixed;
	left: 50%;
	bottom: 22px;
	transform: translateX(-50%);
	z-index: 30;
	width: min(480px, calc(100% - 28px));
	background: rgba(22, 19, 15, 0.96);
	border: 1px solid var(--gold);
	border-radius: 12px;
	color: var(--ink);
	font-size: 0.85rem;
	line-height: 1.7;
	padding: 10px 16px;
	text-align: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* クリア画面 */
#result {
	position: fixed;
	inset: 0;
	z-index: 40;
	background: rgba(8, 6, 4, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

#result-panel {
	width: min(440px, 100%);
	background: var(--bg-soft);
	border: 1px solid var(--gold);
	border-radius: 18px;
	padding: 28px 22px;
	text-align: center;
}

.result-label {
	color: var(--gold);
	font-size: 0.8rem;
	letter-spacing: 0.4em;
	text-indent: 0.4em;
}

#result-title {
	font-family: var(--serif);
	font-size: 1.5rem;
	letter-spacing: 0.1em;
	margin: 6px 0 10px;
}

#result-stats { color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; }

.result-btns { display: grid; gap: 10px; }

.gold-btn {
	font-family: var(--serif);
	font-size: 1rem;
	letter-spacing: 0.14em;
	color: #1c1710;
	background: linear-gradient(135deg, var(--gold-soft), var(--gold));
	border: 0;
	border-radius: 999px;
	padding: 12px;
	min-height: 48px;
	cursor: pointer;
	font-weight: 700;
}

.plain-btn {
	display: block;
	color: var(--muted);
	font-size: 0.9rem;
	text-decoration: none;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 11px;
	min-height: 44px;
}

.plain-btn:hover { border-color: var(--gold); color: var(--gold-soft); }

/* =============================================
   制覇率・食べたことある
   ============================================= */

#conquer {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
}

#conquer-label {
	color: var(--gold-soft);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	white-space: nowrap;
}

.conquer-bar {
	flex: 1;
	height: 6px;
	border-radius: 999px;
	background: #2c251c;
	border: 1px solid var(--line);
	overflow: hidden;
}

#conquer-fill {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--gold-soft), var(--gold));
	transition: width .4s ease;
}

.count-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

#btn-roulette {
	color: var(--gold-soft);
	background: transparent;
	border: 1px solid var(--gold);
	border-radius: 999px;
	font-family: var(--sans);
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	padding: 6px 14px;
	min-height: 36px;
	cursor: pointer;
	transition: background .15s;
}

#btn-roulette:hover { background: rgba(201, 162, 39, 0.12); }

.card { position: relative; }

.card-eaten {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 2;
	display: none;
	color: #1c1710;
	background: linear-gradient(135deg, var(--gold-soft), var(--gold));
	border-radius: 999px;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	padding: 2px 9px;
}

.card.is-eaten .card-eaten { display: inline-block; }

.eaten-btn {
	width: 100%;
	margin: 10px 0 2px;
	color: var(--muted);
	background: var(--card);
	border: 1px dashed var(--line);
	border-radius: 12px;
	font-family: var(--sans);
	font-size: 0.9rem;
	padding: 12px;
	min-height: 48px;
	cursor: pointer;
	transition: color .15s, border-color .15s;
}

.eaten-btn.is-on {
	color: #1c1710;
	background: linear-gradient(135deg, var(--gold-soft), var(--gold));
	border: 1px solid var(--gold);
	font-weight: 700;
}

/* =============================================
   おまかせルーレット
   ============================================= */

#roulette {
	position: fixed;
	inset: 0;
	z-index: 45;
	background: rgba(8, 6, 4, 0.82);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

#roulette-panel {
	width: min(400px, 100%);
	background: var(--bg-soft);
	border: 1px solid var(--gold);
	border-radius: 18px;
	padding: 24px 20px;
	text-align: center;
}

.roulette-title {
	color: var(--gold);
	font-size: 0.8rem;
	letter-spacing: 0.4em;
	text-indent: 0.4em;
}

#roulette-name {
	font-family: var(--serif);
	font-size: 1.7rem;
	letter-spacing: 0.08em;
	margin: 8px 0 2px;
	min-height: 1.5em;
}

#roulette-note { color: var(--muted); font-size: 0.85rem; min-height: 1.4em; margin-bottom: 10px; }

#roulette-thumb { max-width: 240px; margin: 0 auto 12px; }

#roulette-actions { display: grid; gap: 10px; margin-bottom: 10px; }

#roulette-close {
	color: var(--muted);
	background: transparent;
	border: 0;
	font-family: var(--sans);
	font-size: 0.82rem;
	padding: 8px;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* =============================================
   ききネタクイズ
   ============================================= */

.qcat-btn {
	font-family: var(--serif);
	font-size: 1.1rem;
	letter-spacing: 0.12em;
	color: var(--ink);
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 14px;
	min-height: 60px;
	cursor: pointer;
	transition: border-color .15s, transform .15s;
}

.qcat-btn:hover { border-color: var(--gold); transform: translateY(-2px); }

.qcat-btn span {
	display: block;
	font-family: var(--sans);
	font-size: 0.75rem;
	color: var(--muted);
	letter-spacing: 0.06em;
	margin-top: 2px;
}

#quiz-main { max-width: 480px; margin: 0 auto; }

#quiz-hud {
	display: flex;
	justify-content: space-between;
	color: var(--muted);
	font-size: 0.85rem;
	margin-bottom: 10px;
}

#quiz-photo { max-width: 320px; margin: 0 auto 12px; }

#quiz-q {
	font-family: var(--serif);
	text-align: center;
	font-size: 1.1rem;
	letter-spacing: 0.1em;
	margin-bottom: 12px;
}

#quiz-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.quiz-choice {
	color: var(--ink);
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	font-family: var(--sans);
	font-size: 0.95rem;
	padding: 13px 8px;
	min-height: 52px;
	cursor: pointer;
	transition: border-color .15s;
}

.quiz-choice:hover:not(:disabled) { border-color: var(--gold); }

.quiz-choice:disabled { cursor: default; opacity: 0.75; }

.quiz-choice.is-correct {
	color: #1c1710;
	background: linear-gradient(135deg, var(--gold-soft), var(--gold));
	border-color: var(--gold);
	font-weight: 700;
	opacity: 1;
}

.quiz-choice.is-wrong {
	color: #f2c9bc;
	background: #4a2018;
	border-color: #8b3a2e;
	opacity: 1;
}

#quiz-feedback {
	margin: 12px 0 0;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	color: var(--ink);
	font-size: 0.88rem;
	line-height: 1.8;
	padding: 12px 14px;
}

#quiz-next { width: 100%; margin-top: 12px; }

#quiz-result {
	position: fixed;
	inset: 0;
	z-index: 40;
	background: rgba(8, 6, 4, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

/* =============================================
   神経衰弱 2人対戦
   ============================================= */

.mode-row {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-bottom: 14px;
}

.mode-btn {
	color: var(--muted);
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-family: var(--sans);
	font-size: 0.9rem;
	letter-spacing: 0.08em;
	padding: 8px 22px;
	min-height: 42px;
	cursor: pointer;
	transition: color .15s, border-color .15s, background .15s;
}

.mode-btn.is-active {
	color: #1c1710;
	background: linear-gradient(135deg, var(--gold-soft), var(--gold));
	border-color: var(--gold);
	font-weight: 700;
}

.hud-player {
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 3px 12px;
	transition: border-color .15s, color .15s;
}

.hud-player.is-turn {
	color: var(--gold-soft);
	border-color: var(--gold);
	font-weight: 700;
}

/* ===== オンライン対戦 ===== */
.online-sec {
	max-width: 560px;
	margin: 26px auto 0;
	padding: 18px 18px 20px;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: 16px;
	text-align: center;
}

.online-lead {
	font-family: var(--serif);
	color: var(--gold-soft);
	font-size: 1.05rem;
	letter-spacing: 0.12em;
}

.online-note { color: var(--muted); font-size: 0.8rem; margin: 4px 0 12px; }

.olevel-row { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }

.olevel-btn {
	font-size: 0.85rem;
	color: var(--muted);
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 6px 16px;
	min-height: 38px;
	cursor: pointer;
}

.olevel-btn.is-active { color: var(--gold-soft); border-color: var(--gold); font-weight: 700; }

#btn-create-room { width: 100%; max-width: 340px; }

.join-row { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }

#join-code {
	width: 200px;
	min-height: 46px;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 10px;
	color: var(--ink);
	font-size: 1.05rem;
	letter-spacing: 0.2em;
	text-align: center;
	text-transform: uppercase;
	padding: 8px 10px;
}

#join-code:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

#btn-join-room {
	color: var(--ink);
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 8px 20px;
	min-height: 46px;
	cursor: pointer;
	font-family: var(--sans);
	font-size: 0.95rem;
}

#btn-join-room:hover { border-color: var(--gold); color: var(--gold-soft); }

.online-error {
	margin-top: 12px;
	color: #f2b8a6;
	font-size: 0.85rem;
}

/* 相手待ち */
#online-wait { text-align: center; padding: 40px 0 20px; }

.wait-lead { color: var(--muted); letter-spacing: 0.1em; }

#room-code-big {
	font-family: var(--serif);
	font-size: clamp(2.4rem, 12vw, 4rem);
	letter-spacing: 0.3em;
	text-indent: 0.3em;
	color: var(--gold-soft);
	margin: 10px 0 18px;
}

.wait-btns { display: flex; justify-content: center; gap: 10px; }

.wait-note { color: var(--muted); font-size: 0.85rem; margin-top: 22px; animation: waitpulse 2s ease-in-out infinite; }

@keyframes waitpulse { 0%,100%{opacity:.55} 50%{opacity:1} }

/* 対戦中HUD */
#online-hud {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 10px 0 16px;
	color: var(--muted);
	font-size: 0.9rem;
}

.turn-badge {
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 5px 16px;
	color: var(--muted);
}

.turn-badge.is-mine {
	color: #1c1710;
	background: linear-gradient(135deg, var(--gold-soft), var(--gold));
	border-color: var(--gold);
	font-weight: 700;
}

.room-mini { font-size: 0.78rem; letter-spacing: 0.12em; }

#btn-leave {
	color: var(--muted);
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 5px 14px;
	cursor: pointer;
	font-size: 0.8rem;
}

#btn-leave:hover { border-color: var(--gold); color: var(--gold-soft); }
