.game-strip,.town { --forest:#274b36; --soft-green:#e8f1d9; --map-edge:#aec391; --gold:#bd7618; }
.sprite { display:inline-block; flex:none; background-image:url(./gebouwen.webp); background-size:400% 300%; background-repeat:no-repeat; }
.game-strip { display:flex; flex-wrap:wrap; align-items:center; gap:.65rem; margin-bottom:1rem; padding:.6rem 1rem; border:1px solid #c6d6ad; border-radius:16px; background:#edf4df; color:var(--forest); }
.game-strip-icon { width:3.1rem; height:3.1rem; }
.game-strip-copy { display:grid; margin-right:auto; }
.game-strip-copy strong { font-size:1.04rem; }
.game-strip-copy span { font-size:.9rem; }
.coin-pill,.map-wallet { display:inline-flex; align-items:center; gap:.4rem; font-variant-numeric:tabular-nums; white-space:nowrap; }
.coin-pill { font-size:.95rem; }
.coin { display:inline-block; width:1.15em; height:1.15em; border:2px solid #a36917; border-radius:50%; background:radial-gradient(ellipse at 38% 30%,#ffed93 8%,#f8cb54 50%,#e0a534 90%); box-shadow:inset 0 0 0 2px #f9d776,0 1px 0 #97621f; }
.town { color:#26352c; }
main:has(.town:not([hidden])) { padding-top:clamp(1rem,3vw,2rem); }
.town-heading,.town-map-head,.map-key { display:flex; align-items:center; gap:.7rem; }
.town-heading { justify-content:space-between; margin-bottom:1.15rem; flex-wrap:wrap; }
.town-player { color:var(--muted); font-weight:680; font-size:.9rem; }
.town h1,.map-title { font-family:Georgia,'Times New Roman',serif; font-weight:650; }
.town h1 { margin:.12rem 0 0; font-size:clamp(2rem,4.5vw,3.8rem); line-height:1; letter-spacing:-.055em; }
.town-solved { border-left:4px solid #98ad64; padding:.55rem .85rem; background:#edf1df; margin:0 0 1rem; border-radius:0 10px 10px 0; }
.town-solved p { font-size:.93rem; }
.town-layout { display:grid; grid-template-columns:minmax(0,2.4fr) minmax(15rem,1fr); align-items:start; gap:1rem; }
.town-map-frame { overflow:hidden; background:#fffef8; border:1px solid #c2cbb7; border-radius:20px; box-shadow:0 5px 16px #2e43230c; }
.town-map-head { padding:.65rem 1.05rem; background:var(--forest); color:#fff; }
.map-title { font-size:1.6rem; letter-spacing:-.035em; }
.map-stage { font-weight:650; font-size:.86rem; background:#ecf2da; color:#284831; padding:.1rem .5rem; border-radius:20px; }
.map-wallet { margin-left:auto; font-size:.92rem; color:#fff4c9; }
.map-wallet strong { font-size:1.2rem; }
.town-map { position:relative; isolation:isolate; aspect-ratio:4/3; background:#bacf90 url(./schaijk.webp) 50% 50%/100% 100% no-repeat; container-type:inline-size; }
.town-tiles { position:absolute; inset:0; display:grid; grid-template-columns:repeat(8,1fr); grid-template-rows:repeat(6,1fr); }
.map-tile { position:relative; display:grid; place-items:center; padding:0; border:0; border-radius:0; min-width:0; min-height:0; background:transparent; color:var(--forest); touch-action:manipulation; }
.map-tile:before { content:""; position:absolute; inset:6%; border-radius:12%; }
.map-tile.owned:not(.built):before { border:1px dashed #486b40; background:#ffedbb24; }
.map-tile:not(.street):is(:hover,:focus-visible,.selected):before { border:2px solid #873150; background:#fff8df30; }
.map-tile:focus-visible { z-index:4; outline:3px solid #632343; outline-offset:-3px; }
.map-tile .sprite { position:absolute; width:var(--footprint,100%); aspect-ratio:1; z-index:1; pointer-events:none; }
.map-tile:nth-child(21) .sprite { --footprint:115%; }
.map-tile:is(:nth-child(36),:nth-child(44)) { --footprint:80%; padding-right:14%; }
.map-tile:is(:nth-child(37),:nth-child(45)) { --footprint:80%; padding-left:14%; }
.map-tile:is(:nth-child(36),:nth-child(44)) .sprite { left:1%; }
.map-tile:is(:nth-child(37),:nth-child(45)) .sprite { right:1%; }
.plot-marker { display:grid; place-items:center; font:750 clamp(14px,2.1cqw,19px)/1 system-ui,sans-serif; width:1.28em; height:1.28em; background:#fff9dded; border:1px solid #5d6d43; color:#405432; border-radius:50%; box-shadow:0 2px 3px #34442b45; }
.owned .plot-marker { color:#703a4f; background:#ffe5ec; border-color:#8f5268; border-radius:4px; }
.road-map { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:2; }
.road-names { fill:#352b25; stroke:#f5e8d5; stroke-width:2px; stroke-linejoin:round; paint-order:stroke fill; font:650 24px system-ui,sans-serif; letter-spacing:.45px; }
.road-highlight,.road-hit { fill:none; }
.road-highlight { opacity:0; stroke:#fff0ba; stroke-width:39px; }
.town-map[data-street="run"] .run-highlight,.town-map[data-street="winkel"] .winkel-highlight { opacity:.4; }
.road-hit { pointer-events:stroke; stroke:transparent; stroke-width:53px; cursor:pointer; }
@container (max-width:520px) { .road-names { font-size:32px; } }
.compass { position:absolute; pointer-events:none; z-index:2; }
.compass { right:2%; top:2%; width:1.8rem; height:2.1rem; display:grid; align-content:start; text-align:center; font:700 .77rem/1.2 Georgia,serif; color:#35533b; }
.compass:after { content:""; margin:auto; width:.75rem; height:1rem; background:linear-gradient(90deg,#33543d 50%,#edf0d5 50%); clip-path:polygon(50% 0,100% 100%,50% 76%,0 100%); }
.map-key { flex-wrap:wrap; color:#536452; padding:.65rem .95rem; font-size:.8rem; gap:.3rem 1rem; }
.map-key span { display:inline-flex; align-items:center; gap:.35rem; }
.map-key i { width:.85rem; height:.85rem; border-radius:3px; }
.map-key .key-for-sale { display:grid; place-items:center; background:#fff9dd; border:1px solid #5d6d43; border-radius:50%; color:#405432; }
.key-for-sale:before { content:"+"; font:800 .73rem/.73rem system-ui; }
.key-owned { background:#ffe5ec; border:1px solid #8f5268; }
.map-key strong { margin-left:auto; }
.town-tools { display:grid; gap:.8rem; }
.town-goal,.plot-card { border:1px solid #ced5c2; border-radius:17px; padding:1.05rem; background:#fffefa; }
.town-goal { background:#e9f1d9; border-color:#c3d3ae; }
.town-tools h2 { font-size:1.1rem; line-height:1.2; margin:0; letter-spacing:-.025em; }
.town-tools p { margin:.5rem 0 0; font-size:.94rem; line-height:1.45; }
.goal-title { display:flex; gap:.4rem; align-items:center; }
.goal-flag { font-size:1.3rem; line-height:1; color:#5f773e; }
.town-goal progress { margin-top:.7rem; display:block; height:7px; color:#618643; background:#cfdcbb; }
.town-goal progress::-webkit-progress-bar { background:#cfdcbb; }
.town-goal progress::-webkit-progress-value { background:#618643; }
.town-goal progress::-moz-progress-bar { background:#618643; }
#plot-actions:not(:empty) { margin-top:.85rem; }
#plot-actions .button { width:100%; }
#plot-actions button:disabled { cursor:default; }
#plot-actions .primary:disabled { background:#e9e5e3; color:#655f64; }
.building-shop { display:grid; gap:.31rem; max-height:22rem; overflow-y:auto; padding:.2rem; }
.building-option { display:flex; align-items:center; gap:.5rem; border:1px solid #b5c59f; border-radius:9px; text-align:left; background:#eff5e6; color:var(--forest); }
.building-option:hover:enabled { border-color:#586f46; background:#e0eccc; }
.building-option:disabled { background:#f6f5f0; border-color:#deded3; color:#63635e; }
.building-option .sprite { width:2.55rem; height:2.55rem; }
.building-option strong,.building-option small { display:block; line-height:1.3; }
.building-option strong { font-size:.93rem; }
.building-option small { font-size:.8rem; }
.town-status:not(:empty) { margin-top:.8rem; padding:.55rem .8rem; border-left:3px solid #7b915c; background:#edf1e2; }
#refresh-town { margin-top:.6rem; }
@media (max-width:780px) {
  .town-layout { grid-template-columns:1fr; }
  .town-tools { grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); align-items:start; }
}
@media (max-width:520px) {
  .town-tools { grid-template-columns:1fr; }
  .plot-card { grid-row:1; }
  .town-map-frame { border-radius:13px; }
  .map-key { font-size:.78rem; padding:.45rem .6rem; gap:.22rem .7rem; }
  .game-strip { gap:.45rem; padding:.55rem .65rem; }
  .game-strip-copy { flex-basis:calc(100% - 4.5rem); }
}

.town-word-reward { display:inline-flex; align-items:center; gap:.3rem; padding:.1rem .42rem; margin-right:.35rem; border-radius:6px; background:#fff0ba; color:#614311; font-weight:750; font-size:.86rem; }
.city-milestones { margin-top:.75rem; }
.city-milestones summary { color:#36573b; font-weight:690; font-size:.9rem; }
.city-milestones ol { padding-left:1.3rem; margin:.5rem 0 0; font-size:.87rem; }
.city-milestones li + li { margin-top:.25rem; }
