.town-main{width:min(100%,1060px);margin:auto;padding:12px}.town-summary{display:flex;justify-content:center;align-items:center;gap:18px;flex-wrap:wrap;font-weight:800}.town-wallet{font-size:1.7rem}.town-hint,.town-status,.town-note{text-align:center;font-weight:800}.town-hint{min-height:2em}.town-layout{display:grid;grid-template-columns:minmax(280px,1fr) 270px;gap:16px;align-items:start}.town-field{padding:10px;background:var(--grain),var(--sage)}.town-board{display:grid;grid-template-columns:repeat(5,minmax(44px,1fr));gap:6px;padding:8px;background:var(--soil);border-radius:18px}.town-plot{min-width:44px;min-height:44px;aspect-ratio:1;position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:2px;gap:0;border:2px solid var(--picked-edge);border-bottom-width:5px;border-radius:12px;background:var(--picked);color:var(--ink);font:900 1rem var(--font);touch-action:none;cursor:pointer;overflow:hidden}.town-plot:focus-visible{outline:4px solid var(--focus);outline-offset:1px}.town-plot.empty{background:var(--grain),var(--sage);border-style:dashed;font-size:1.9rem;color:var(--leaf)}.town-plot.locked{background:var(--cream);border-color:var(--edge);color:var(--muted);font-size:1.2rem}.town-plot.next-land{border-color:var(--gold-edge);box-shadow:inset 0 0 0 2px var(--gold)}.town-plot.selected{background:var(--glow);border-color:var(--picked-edge);outline:3px solid var(--focus);outline-offset:1px}.town-plot.drop-target{outline:4px solid var(--gold-edge);outline-offset:1px}.plot-house{position:absolute;inset:5px 1px 3px;background:url('../houses/assets/paper-cottage-v2.webp') center/contain no-repeat;opacity:.35;pointer-events:none}.plot-figure{display:flex;align-items:center;justify-content:center;width:90%;height:74%;position:relative;pointer-events:none}.plot-figure svg{width:100%;height:100%}.plot-figure .resident{width:100%;height:100%}.plot-number{position:relative;font-size:clamp(.7rem,2.8vw,1.15rem);line-height:1.1;max-width:100%;overflow-wrap:anywhere;background:var(--paper);border-radius:8px;padding:0 4px;pointer-events:none}.plot-figure .bundle{font-size:2rem}.town-actions{display:flex;flex-direction:column;gap:10px;padding:14px}.crate{flex-direction:column}.crate>span{font-size:3rem}.small-actions{display:flex;gap:8px}.small-actions>*{flex:1;min-width:44px;padding:10px}.land-goal{display:flex;flex-direction:column;gap:6px}.land-goal progress{width:100%;height:18px;accent-color:var(--leaf)}.land-goal small,.trade-note{font-size:.85rem;text-align:center;font-weight:700}.trade-note{margin:0}.selection{overflow-wrap:anywhere;min-height:1.5em;text-align:center;font-weight:800;margin:10px 0 0}.town-status{overflow-wrap:anywhere;min-height:2em}.save-warning{padding:12px;border:2px solid var(--gold-edge);border-radius:16px;background:var(--glow);text-align:center;font-weight:800}.discoveries{padding:12px}.discoveries h2{font-size:1.05rem;margin:0 0 10px}.discoveries>div{display:flex;gap:6px;overflow:auto}.discovered{flex:none;padding:6px 12px;border:1px solid var(--edge);border-radius:999px;font-weight:900}.town-note{font-size:.85rem;color:var(--muted)}.drag-ghost{position:fixed;z-index:20;pointer-events:none;opacity:.85;transform:translate(-50%,-50%) scale(1.12);box-shadow:var(--prop-shadow)}.dragging{opacity:.45}.merged{animation:town-pop .35s ease-out}@keyframes town-pop{50%{transform:scale(1.12)}}
@media(max-width:700px){.town-layout{grid-template-columns:1fr}.town-actions{display:grid;grid-template-columns:1fr 1fr}.land-goal{grid-column:1/-1}.crate>span{font-size:2rem}.trade-note{align-self:center}.town-main{padding:10px}.town-field{padding:6px}.town-board{padding:6px;gap:4px}.nb-bar .nb-title{flex:1;min-width:0}.nb-bar>a.nb-btn{font-size:.95rem;padding:10px}.town-summary{gap:8px;font-size:.9rem}.plot-number{font-size:.8rem}}
@media(prefers-reduced-motion:reduce){.merged{animation:none}.drag-ghost{transform:translate(-50%,-50%)}}

.town-main,.town-main *{box-sizing:border-box}.town-layout>*{min-width:0}
/* Plot content never contributes intrinsic size to the spatial grid. */
.town-plot{width:100%;height:auto;min-width:0;aspect-ratio:1;padding:0}.plot-figure{position:absolute;left:5%;right:5%;top:3%;bottom:22%;width:auto;height:auto;min-width:0;min-height:0}.plot-figure .resident,.plot-figure svg{display:block;width:100%;height:100%;min-width:0;min-height:0;max-width:100%;max-height:100%}.plot-number{position:absolute;left:3%;right:3%;bottom:4%;width:max-content;max-width:94%;margin:auto;font-size:clamp(.7rem,2.8vw,1.15rem)}

.friend-shop{min-width:0;display:flex;flex-direction:column;gap:8px}.friend-shop h2{font-size:1.05rem;margin:0;text-align:center}.friend-offers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.friend-offer.nb-btn{min-width:44px;min-height:110px;padding:6px 4px;flex-direction:column;gap:4px;font-size:.95rem;overflow:hidden}.friend-offer-art{display:grid;place-items:center;width:100%;height:64px;min-width:0;overflow:hidden;pointer-events:none}.friend-offer-art .resident,.friend-offer-art svg{display:block;width:100%;height:100%;max-width:100%;max-height:100%;min-width:0;min-height:0}.friend-offer-art .bundle{font-size:2.2rem}.friend-offer-number{max-width:100%;overflow-wrap:anywhere;font-weight:900}.friend-offer-price{font-weight:900;white-space:nowrap}.friend-offer:disabled{opacity:.45;cursor:default}.friend-shop-empty{display:flex;align-items:center;justify-content:center;gap:10px}.friend-unlock-picture{display:block;width:58px;height:66px;flex:none}.friend-unlock-picture .resident,.friend-unlock-picture svg{display:block;width:100%;height:100%}.friend-shop-empty p{font-size:.9rem;font-weight:800;margin:0;max-width:150px}.friend-shop [hidden]{display:none!important}.friend-shop progress{width:100%;height:18px;accent-color:var(--leaf)}.friend-shop small{text-align:center;font-weight:700;font-size:.85rem;line-height:1.4}@media(max-width:700px){.friend-shop{grid-column:1/-1}.friend-offer-art{height:72px}.friend-offer.nb-btn{min-height:120px}}
