/* Kothe Adventures — coaster tiles, national parks map, theme park map.
   Uses the kothes theme's colour tokens with fallbacks. Chart colours validated
   with the dataviz palette checks (steel #3274B5 / wood #C27A3E: all pass). */

.kc, .kp, .kt {
	--kx-ink: var(--wp--preset--color--contrast, #1E2622);
	--kx-muted: var(--wp--preset--color--muted, #5B645E);
	--kx-line: var(--wp--preset--color--border, #E4DCD0);
	--kx-card: var(--wp--preset--color--white, #FFFFFF);
	--kx-sand: var(--wp--preset--color--base-2, #F2ECE2);
	--kx-green: var(--wp--preset--color--accent-1, #2F5741);
	--kx-steel: #3274B5;
	--kx-wood: #C27A3E;
}

/* ---------- coaster tiles ---------- */
.kc-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
	gap: 0.9rem;
}
.kc-tile {
	background: var(--kx-card);
	border: 1px solid var(--kx-line);
	border-radius: 16px;
	padding: 1.1rem 1.2rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}
.kc-num {
	font-family: var(--wp--preset--font-family--literata, Georgia, serif);
	font-size: clamp(2.2rem, 5vw, 3rem);
	line-height: 1;
	color: var(--kx-ink);
	font-variant-numeric: lining-nums tabular-nums;
}
.kc-label { color: var(--kx-muted); font-size: 0.9rem; }

.kc-split { margin: 1.4rem 0 0; }
.kc-split-title { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--kx-muted); margin-bottom: 0.5rem; }
.kc-bar { display: flex; gap: 2px; height: 14px; }
.kc-seg { display: block; height: 100%; border-radius: 4px; min-width: 6px; }
.kc-steel { background: var(--kx-steel); }
.kc-wood { background: var(--kx-wood); }
.kc-split-labels { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.45rem; font-size: 0.95rem; color: var(--kx-ink); }
.kc-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.4rem; vertical-align: 0.02em; }
.kc-note { margin-top: 0.9rem; font-size: 0.85rem; color: var(--kx-muted); }

/* ---------- progress ---------- */
.kp-progress { margin-bottom: 1rem; }
.kp-count { margin: 0 0 0.5rem; font-size: 1.05rem; color: var(--kx-ink); display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.kp-num { font-family: var(--wp--preset--font-family--literata, Georgia, serif); font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1; }
.kp-pct { margin-left: auto; color: var(--kx-muted); font-variant-numeric: tabular-nums; }
.kp-bar { height: 12px; border-radius: 999px; background: var(--kx-sand); border: 1px solid var(--kx-line); overflow: hidden; }
.kp-bar > span { display: block; height: 100%; background: var(--kx-green); border-radius: 999px; }

/* ---------- maps ---------- */
.kp-map { position: relative; margin: 0; }
.kp-map svg { display: block; width: 100%; height: auto; overflow: visible; }
.kp-hit { fill: transparent; }
.kp-park, .kt-park { cursor: pointer; outline: none; }
.kp-park .kp-dot { transition: r 0.15s ease; }
.kp-park.is-visited .kp-dot { fill: var(--kx-green); stroke: #fff; stroke-width: 2; }
.kp-park.is-todo .kp-dot { fill: #FBF8F3; stroke: #8C8577; stroke-width: 1.5; }
.kp-park:hover .kp-dot, .kp-park:focus-visible .kp-dot { stroke: var(--kx-ink); stroke-width: 2.5; }
.kp-inset rect { fill: #EFE8DC; stroke: #D9CFBF; }
.kp-inset text { font: 600 13px var(--wp--preset--font-family--manrope, system-ui, sans-serif); fill: var(--kx-muted); text-anchor: middle; }

.kt-dot { fill: var(--kx-steel); fill-opacity: 0.85; stroke: #fff; stroke-width: 2; }
.kt-park:hover .kt-dot, .kt-park:focus-visible .kt-dot { fill-opacity: 1; stroke: var(--kx-ink); stroke-width: 2.5; }
.kt-badge { font: 700 11px var(--wp--preset--font-family--manrope, system-ui, sans-serif); fill: #fff; text-anchor: middle; pointer-events: none; }

.kp-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; justify-content: center; margin-top: 0.6rem; font-size: 0.9rem; color: var(--kx-ink); }
.kp-key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 0.4rem; vertical-align: -0.05em; }
.kp-key.is-visited { background: var(--kx-green); }
.kp-key.is-todo { background: #FBF8F3; border: 1.5px solid #8C8577; }
.kt-key { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--kx-steel); opacity: 0.85; margin-right: 0.4rem; vertical-align: -0.1em; }
.kt-key-n { font: 700 9px/14px var(--wp--preset--font-family--manrope, system-ui, sans-serif); color: #fff; text-align: center; font-style: normal; }

.kp-tip {
	position: absolute;
	z-index: 5;
	pointer-events: none;
	max-width: 16rem;
	padding: 0.45rem 0.7rem;
	border-radius: 10px;
	background: var(--kx-ink);
	color: #fff;
	font-size: 0.85rem;
	line-height: 1.4;
	white-space: pre-line;
	box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.5);
	transform: translate(-50%, calc(-100% - 12px));
}

/* ---------- lists (the text view of each map) ---------- */
.kp-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1.2rem 0 0; justify-content: center; }
.kp-chips li { padding: 0.3rem 0.8rem; border-radius: 999px; background: var(--kx-card); border: 1px solid var(--kx-line); font-size: 0.9rem; }
.kp-chips li span { color: var(--kx-muted); font-variant-numeric: tabular-nums; }

.kp-all { margin-top: 1rem; }
.kp-all summary { cursor: pointer; font-weight: 600; color: var(--kx-green); text-align: center; }
.kp-all ul { columns: 2 15rem; list-style: none; padding: 0; margin: 0.8rem 0 0; font-size: 0.9rem; }
.kp-all li { break-inside: avoid; padding: 0.15rem 0; }
.kp-all li.is-todo { color: var(--kx-muted); }
.kp-all li.is-visited span { color: var(--kx-green); font-weight: 700; }
.kp-all small { color: var(--kx-muted); }
.kt .kp-all li strong { display: inline-block; min-width: 1.8rem; color: var(--kx-steel); font-variant-numeric: tabular-nums; }
.kt-abroad { text-align: center; font-size: 0.9rem; color: var(--kx-muted); margin-top: 0.8rem; }
