/*
 * gioco.css — "Trova la città" (versione SVG)
 * Tutte le regole stanno sotto #tc: l'ID batte le regole generiche del sito
 * (.bg-centro h2, .bg-centro ul, ...) senza bisogno di !important, e niente di
 * quello che c'e' qui puo' toccare le altre pagine.
 */
#tc {
	--tc-blu: #117ebe;
	--tc-blu-scuro: #0c5a87;
	--tc-blu-scurissimo: #0a3b57;
	--tc-verde: #d7e6d2;
	--tc-verde-bordo: #6f9a63;
	--tc-testo: #222;
	max-width: 1100px;
	margin: 0 auto;
	padding: 18px 12px 36px;
	color: var(--tc-testo);
	font-family: inherit;
	box-sizing: border-box;
}
#tc *, #tc *::before, #tc *::after { box-sizing: border-box; }

/* ---- elenco dei giochi (link veri) ---- */
#tc .tc-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
#tc .tc-picker a {
	font-size: 0.85rem; padding: 4px 12px; border-radius: 999px;
	border: 1px solid #c5d4de; background: #fff; color: var(--tc-blu-scuro);
	text-decoration: none; white-space: nowrap; line-height: 1.5;
}
#tc .tc-picker a:hover { background: #e8f2f8; }
#tc .tc-picker a.active { background: var(--tc-blu); border-color: var(--tc-blu); color: #fff; font-weight: 600; }

/* ---- console unica ---- */
#tc .tc-console {
	background: #fff; border-radius: 16px; overflow: hidden;
	box-shadow: 0 8px 24px rgba(10, 40, 60, 0.14); border: 1px solid #d8e3ea;
}
#tc .tc-header {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px 16px;
	background: linear-gradient(135deg, var(--tc-blu-scurissimo), var(--tc-blu-scuro));
	color: #fff;
}
#tc .tc-brand { font-weight: 700; font-size: 1rem; min-width: 0; }
#tc .tc-brand small { display: block; font-weight: 400; font-size: 0.75rem; opacity: 0.85; margin-top: 2px; }
#tc .tc-header-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
#tc .tc-info-btn {
	width: 28px; height: 28px; border-radius: 50%; padding: 0; cursor: pointer; line-height: 1;
	border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.12); color: #fff;
	font: italic 700 15px Georgia, 'Times New Roman', serif;
}
#tc .tc-info-btn:hover { background: rgba(255, 255, 255, 0.28); }
#tc .tc-total {
	background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 0.95rem; white-space: nowrap;
}

/* puntini di difficolta' */
#tc .tc-dots { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 2px; }
#tc .tc-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(120, 140, 155, 0.35); display: inline-block; }
#tc .tc-dots i.on { background: #e5533d; }
#tc .tc-header .tc-dots i { background: rgba(255, 255, 255, 0.35); }
#tc .tc-header .tc-dots i.on { background: #f5b400; }

#tc .tc-body { display: flex; flex-wrap: wrap; align-items: stretch; }
#tc .tc-map-pane {
	position: relative; display: flex; flex-direction: column;
	flex: 1 1 440px; min-width: 280px; background: #e3eef5;
}

/* fascia con la città da cercare: SOPRA la mappa, non la copre mai */
#tc .tc-target {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	background: var(--tc-blu); color: #fff; padding: 8px 16px; min-height: 48px;
}
#tc .tc-current { font-weight: 700; font-size: 1.15rem; }
#tc #tcRestartInline { display: none; }

#tc .tc-map-wrap { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
#tc svg {
	display: block; flex: 0 0 auto; width: 100%; height: auto; max-height: 78vh;
	cursor: crosshair; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
#tc .country { fill: var(--tc-verde); stroke: var(--tc-verde-bordo); stroke-width: 1.2; stroke-linejoin: round; }
#tc .graticule { stroke: #b9cfdc; stroke-width: 1; }
#tc .graticule-label { fill: #7f97a3; font-size: 11px; font-family: Arial, sans-serif; }
#tc .guess-marker { fill: #e5533d; stroke: #fff; stroke-width: 1.5; }
#tc .city-marker { fill: #17406b; stroke: #fff; stroke-width: 1; }
#tc .city-label {
	fill: #17406b; font-size: calc(13px * var(--k, 1)); font-weight: bold; font-family: Arial, sans-serif;
	paint-order: stroke; stroke: #fff; stroke-width: calc(3.5px * var(--k, 1)); stroke-linejoin: round;
}
#tc .link-line { stroke: #f5b400; stroke-width: calc(2px * var(--k, 1) * 0.8); stroke-dasharray: 4 3; }

#tc .tc-noscript { padding: 24px; text-align: center; color: #8a3b3b; }

/* schermate sovrapposte alla mappa (istruzioni e fine partita) */
#tc .tc-overlay { position: absolute; inset: 0; background: rgba(10, 30, 45, 0.55); z-index: 3; }
#tc #tcFinal { display: none; }
#tc .tc-card {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	background: #fff; border-radius: 12px; padding: 20px 22px; text-align: center;
	width: min(90%, 340px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
#tc .tc-card p { margin: 0 0 10px; font-size: 0.92rem; line-height: 1.45; text-align: left; }
#tc .tc-headline { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
#tc .tc-score { color: var(--tc-blu); font-weight: 700; font-size: 1.5rem; margin: 6px 0 14px; }

#tc .tc-btn {
	padding: 8px 20px; font-size: 0.95rem; cursor: pointer; border-radius: 999px;
	border: 1px solid var(--tc-blu); background: var(--tc-blu); color: #fff; font-weight: 600; line-height: 1.3;
}
#tc .tc-btn:hover { background: var(--tc-blu-scuro); border-color: var(--tc-blu-scuro); }
#tc .tc-btn-light { background: #fff; color: var(--tc-blu-scuro); border-color: #fff; padding: 5px 16px; font-size: 0.9rem; }
#tc .tc-btn-light:hover { background: #e8f2f8; border-color: #e8f2f8; }
#tc .tc-btn-ghost { background: transparent; color: var(--tc-blu); margin-left: 6px; }
#tc .tc-btn-ghost:hover { background: #e8f2f8; }

/* ---- elenco città passate ---- */
#tc .tc-side-pane {
	flex: 1 1 220px; min-width: 220px; max-width: 320px; background: #f7f9fa;
	border-left: 1px solid #e3e9ed; padding: 14px 16px; display: flex; flex-direction: column;
}
#tc .tc-side-pane h2 {
	font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #7a8a94;
	margin: 0 0 8px; padding: 0; border: 0; font-weight: 700; font-family: inherit;
}
#tc .tc-log { font-size: 0.9rem; line-height: 1.7; overflow-y: auto; max-height: 320px; }
#tc .tc-log .log-row {
	display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; border-bottom: 1px dashed #e3e9ed;
}
#tc .tc-log .log-row .km { color: var(--tc-blu); font-weight: 600; white-space: nowrap; }

/* ---- testo sotto la console ---- */
#tc .tc-info { margin-top: 18px; font-size: 0.82rem; line-height: 1.5; max-width: 780px; color: #5a6872; }
#tc .tc-info a { color: var(--tc-blu-scuro); }
#tc .tc-info h2 {
	font-size: 0.95rem; margin: 0 0 6px; padding: 0; border: 0; text-transform: none;
	font-weight: 700; font-family: inherit; color: #44525c;
}
#tc .tc-index h2 {
	font-size: 1.15rem; margin: 18px 0 8px; padding: 0; border: 0; text-transform: none;
	font-weight: 700; font-family: inherit; color: var(--tc-blu-scurissimo);
}
#tc .tc-info p { margin: 0 0 6px; font-size: inherit; line-height: inherit; color: inherit; }
#tc .tc-info .tc-dots { margin-left: 4px; }

/* ---- indice dei giochi ---- */
#tc .tc-lead { font-size: 1.02rem; line-height: 1.55; max-width: 780px; margin: 0 0 8px; }
#tc .tc-cards {
	list-style: none; margin: 0 0 6px; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr)); gap: 10px;
}
#tc .tc-cards li { margin: 0; padding: 0; }
#tc .tc-cards a {
	display: flex; justify-content: space-between; align-items: center; gap: 8px;
	padding: 12px 14px; border-radius: 12px; border: 1px solid #d8e3ea; background: #fff;
	color: var(--tc-blu-scurissimo); text-decoration: none; font-weight: 600;
	box-shadow: 0 2px 6px rgba(10, 40, 60, 0.06);
}
#tc .tc-cards a:hover { border-color: var(--tc-blu); background: #f3f9fd; }
#tc .tc-card-name { white-space: nowrap; }
#tc .tc-card-go { color: var(--tc-blu); font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
#tc .tc-more { margin-top: 18px; font-size: 0.95rem; }

/* ---- mobile: mappa sopra, elenco sotto ---- */
@media (max-width: 680px) {
	#tc { padding: 12px 8px 28px; }
	#tc .tc-body { display: block; }
	#tc .tc-map-pane { flex: 0 0 auto; }
	#tc .tc-map-wrap { flex: 0 0 auto; display: block; }
	#tc .tc-side-pane { max-width: none; border-left: 0; border-top: 1px solid #e3e9ed; }
	#tc .tc-log { max-height: 190px; }
	#tc .tc-brand { font-size: 0.95rem; }
	#tc .tc-current { font-size: 1.05rem; }
}
