@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Outfit:wght@400;500;600;700;800;900&display=swap');
/* Dec 2 2026 (owner): live map pages (Towny + Survival) follow the site theme: the site's blue palette and fonts,
   the sidebar docked to the left edge and denser, and the cottage dashed stitches used on the nav and cards.
   Loaded after map.css on /townymap/ and /survivalmap/. Remove the <link> to undo. */

/* Site palette (same values as store/style.css :root and [data-theme=dark]) */
body.tc-map-page{--cream:#f0f9ff;--paper:#f9fcff;--ink:#304453;--muted:#687c8a;--line:#d0e0ec;--brown:#375367;--peach:#f6bb91;--sage:#9cc3a0;
 --stitch:color-mix(in srgb,var(--ink) 32%,transparent);--seam:1.5px dashed var(--stitch);--patch:color-mix(in srgb,var(--brown) 9%,var(--paper));
 --shadow:0 6px 20px #1c2a3426;font-family:'Outfit','DM Sans',system-ui,sans-serif}
[data-theme=dark] body.tc-map-page{--cream:#191e21;--paper:#20262b;--ink:#d7e7f3;--muted:#9eb4c3;--line:#35424b;--brown:#8cc2e9;--shadow:0 6px 20px #0006}
body.tc-map-page :is(button,select,input){font-family:inherit}
.tc-map-page :is(h1,h2,#popup strong,#town-editor strong,#empty strong){font-family:'Lilita One','Outfit',sans-serif;font-weight:400;letter-spacing:.2px}

/* Sidebar: docked to the left edge, full height, stitched seam just inside its edges */
.tc-map-page .panel{left:0;top:0;bottom:0;width:264px;max-height:none;padding:12px 14px 10px 16px;border:0;border-right:2px solid var(--line);border-radius:0;
 background:var(--paper);box-shadow:4px 0 18px #1c2a341f;outline:var(--seam);outline-offset:-6px;
 --map-scroll-thumb:color-mix(in srgb,var(--brown) 45%,transparent);--map-scroll-hover:color-mix(in srgb,var(--brown) 70%,transparent)}
[data-theme=dark] .tc-map-page .panel{--map-scroll-thumb:color-mix(in srgb,var(--brown) 40%,transparent);--map-scroll-hover:color-mix(in srgb,var(--brown) 65%,transparent)}
.tc-map-page .panel #close-panel{right:10px;top:8px;width:28px;height:28px;border-radius:7px;font-size:21px}
.tc-map-page .panel #close-panel:hover{background:var(--patch)}
.tc-map-page .panel h1{font-size:20px;line-height:1.15;margin:2px 34px 10px 0;color:var(--ink)}
.tc-map-page .panel h1>span{color:var(--peach)}
.tc-map-page .panel-row{margin-bottom:4px}
.tc-map-page .panel h2{font-size:14px}
.tc-map-page .count{background:var(--patch);color:var(--brown);border:1px dashed color-mix(in srgb,var(--brown) 45%,transparent);border-radius:6px;font-weight:700;padding:1px 7px}

/* Player roster: tighter rows, room for more players now the panel is full height */
.tc-map-page .panel:not([hidden]){display:flex;flex-direction:column}
.tc-map-page .panel>*{flex-shrink:0}
.tc-map-page #player-list{flex:0 1 auto;min-height:72px;max-height:none;margin:0 -4px;padding-right:2px}
.tc-map-page .panel .map-details{margin-top:auto}
.tc-map-page .panel .map-settings{margin-bottom:10px}
.tc-map-page .player-link{gap:8px;padding:4px 6px;border-radius:7px}
.tc-map-page .player-link:hover,.tc-map-page .player-link.active{background:var(--patch)}
.tc-map-page .player-link.active{outline:1px dashed color-mix(in srgb,var(--brown) 55%,transparent);outline-offset:-3px}
.tc-map-page .player-link img{width:22px;height:27px}
.tc-map-page .player-link .player-info{gap:1px}

/* Sections are split by a stitched seam instead of a solid rule */
.tc-map-page :is(.map-settings,.map-details,.map-me){border-top:var(--seam);margin-top:10px;padding-top:8px}
.tc-map-page .map-settings .toggle{min-height:28px}
.tc-map-page .map-settings .hint{margin:1px 0 8px 22px}
.tc-map-page .map-settings .world-picker{margin-top:6px}
.tc-map-page .panel input{accent-color:var(--brown)}
.tc-map-page .world-option{min-height:30px;padding:5px 9px;border:1.5px solid var(--line);border-radius:7px;background:var(--cream)}
.tc-map-page .world-option:has(input:checked){background:var(--patch);border-color:color-mix(in srgb,var(--brown) 55%,var(--line));
 outline:1px dashed color-mix(in srgb,var(--brown) 60%,transparent);outline-offset:-4px}
.tc-map-page .map-details summary{min-height:24px;line-height:24px}
.tc-map-page .map-details-grid{padding-top:6px;gap:10px}
.tc-map-page #view-border{border-radius:7px;background:var(--patch)}

/* Floating map controls: closer to the edges, stitched like the site's cards */
.tc-map-page .tools{right:12px;top:12px;padding:4px;border-radius:10px;border:1.5px solid var(--line);outline:1px dashed var(--stitch);outline-offset:-4px}
.tc-map-page .tools button{width:34px;height:34px;font-size:22px;border-radius:7px}
.tc-map-page .tools button:hover{background:var(--patch)}
.tc-map-page .bottom-bar{left:12px;right:12px;bottom:10px;gap:8px}
.tc-map-page .bottom-bar>span{padding:5px 10px;border-radius:7px;border:1.5px solid var(--line)}
.tc-map-page main:has(#map-panel:not([hidden])) .bottom-bar{left:276px}
.tc-map-page #mobile-panel{left:12px;top:12px;min-height:38px;padding:8px 14px;border:1.5px solid var(--line);border-radius:9px;font-weight:600;
 outline:1px dashed var(--stitch);outline-offset:-4px}
.tc-map-page .map-compass{right:12px;bottom:50px}
.tc-map-page #empty{left:calc(50% + 132px)}

/* Cards that open over the map share the stitched patch look */
.tc-map-page :is(#popup,#town-editor){border:1.5px solid var(--line);border-radius:12px;outline:var(--seam);outline-offset:-6px}
.tc-map-page #popup{padding:16px 26px 16px 18px}
.tc-map-page #town-editor{right:60px;top:12px;padding:16px 16px 12px}
.tc-map-page :is(.nameplate,.poi-label){border-radius:5px}

@media(max-width:680px){
 .tc-map-page .panel{width:min(280px,calc(100% - 64px));max-height:none;padding:12px 12px 10px 14px}
 .tc-map-page main:has(#map-panel:not([hidden])) .bottom-bar{left:12px}
 .tc-map-page .map-settings .toggle,.tc-map-page .map-details summary{min-height:40px;line-height:40px}
 .tc-map-page #empty{left:50%}
 .tc-map-page #town-editor{left:12px;right:12px}
}

/* Dec 2 2026 (owner): cottage town markers (Towny map): an embroidery hoop (wooden ring, brass clasp, linen centre,
   dashed stitch in the town colour) around two-tone icons with fixed cottage accents (leaves, blossoms, wood, butter yellow). */
.tc-map-page .poi{width:34px;height:34px;margin:-17px 0 0 -17px;border:3px solid #b98654;border-radius:50%;
 background:radial-gradient(circle at 50% 36%,#fffdf6 0 42%,color-mix(in srgb,hsl(var(--h,268) 70% 84%) 28%,#f4e7cf) 100%);
 box-shadow:0 0 0 1px #5e3d22,inset 0 0 0 1px #e9c99c,0 3px 6px #0007}
.tc-map-page .poi::before{content:"";position:absolute;inset:1.5px;border-radius:50%;border:1.3px dashed hsl(var(--h,268) 62% 50%);pointer-events:none}
.tc-map-page .poi::after{content:"";position:absolute;left:50%;top:-7px;width:8px;height:5px;translate:-50% 0;border-radius:2px;
 background:linear-gradient(#f0d9a4,#b48a4c);box-shadow:0 0 0 1px #5e3d22;pointer-events:none}
.tc-map-page .poi svg{width:22px;height:22px;position:relative;z-index:1;color:hsl(var(--h,268) 58% 34%)}
.tc-map-page .poi-outpost{width:26px;height:26px;margin:-13px 0 0 -13px;border-width:2.5px}
.tc-map-page .poi-outpost::after{display:none}
.tc-map-page .poi-outpost svg{width:16px;height:16px}
.tc-map-page .poi-capital{border-color:#ddb04c;box-shadow:0 0 0 1px #6b4a1a,0 0 0 3px #ffe6a6aa,inset 0 0 0 1px #fff0c4,0 3px 6px #0007}
.tc-map-page .poi-capital::after{width:10px;background:linear-gradient(#fff3c2,#d9a93a);box-shadow:0 0 0 1px #6b4a1a}
.tc-map-page .poi-ruined{border-color:#9d9387;filter:grayscale(.85) sepia(.15);opacity:.88}
.tc-map-page .poi-ruined svg{color:#6f685f}
.tc-map-page .poi-key{border:2px solid #b98654;background:#fffaf0;box-shadow:inset 0 0 0 1.5px #fffaf0,inset 0 0 0 2.6px hsl(268 62% 58%)}
/* icon colours (markers and the mayor's icon picker) */
:is(.poi,#icon-grid button) svg{fill:currentColor}
:is(.poi,#icon-grid button) svg .tn{fill:hsl(var(--h,268) 66% 60%)}
:is(.poi,#icon-grid button) svg .tl{fill:hsl(var(--h,268) 85% 84%)}
:is(.poi,#icon-grid button) svg .cr{fill:#fffaf0}
:is(.poi,#icon-grid button) svg .lf{fill:#6f9e4f}
:is(.poi,#icon-grid button) svg .ld{fill:#4e7b38}
:is(.poi,#icon-grid button) svg .bl{fill:#f29ab0}
:is(.poi,#icon-grid button) svg .by{fill:#f2c24a}
:is(.poi,#icon-grid button) svg .wd{fill:#a8724a}
:is(.poi,#icon-grid button) svg .wh{fill:#e2b552}
:is(.poi,#icon-grid button) svg .mr{fill:#de5f55}
:is(.poi,#icon-grid button) svg .sm{fill:#dcc6a2}
:is(.poi,#icon-grid button) svg .fo{fill:#ef8a3a}
:is(.poi,#icon-grid button) svg .dk{fill:#4a3322}
:is(.poi,#icon-grid button) svg .s-lf{fill:none;stroke:#5f8f43}
:is(.poi,#icon-grid button) svg .s-wv{fill:none;stroke:#6aa8cc}
:is(.poi,#icon-grid button) svg .s-rp{fill:none;stroke:#c49a5e}
:is(.poi,#icon-grid button) svg .s-wh{fill:none;stroke:#b7862f}
:is(.poi,#icon-grid button) svg .s-cr{fill:none;stroke:#fffaf0}
:is(.poi,#icon-grid button) svg .s-wd{fill:none;stroke:#a8724a}
/* mayor's icon picker: small hoops too */
.tc-map-page #icon-grid button{background:radial-gradient(circle at 50% 36%,#fffdf6 0 45%,#f4e7cf 100%);border:2.5px solid #c49867;box-shadow:inset 0 0 0 1px #ecd2a8;position:relative}
.tc-map-page #icon-grid button::before{content:"";position:absolute;inset:2px;border-radius:50%;border:1px dashed hsl(var(--h) 55% 62%);pointer-events:none}
.tc-map-page #icon-grid button svg{width:26px;height:26px;position:relative;color:hsl(var(--h) 58% 34%)}
.tc-map-page #icon-grid button:hover{border-color:hsl(var(--h) 60% 62%)}
.tc-map-page #icon-grid button[aria-checked=true]{border-color:hsl(var(--h) 70% 52%);box-shadow:inset 0 0 0 1px #ecd2a8,0 0 0 2px hsl(var(--h) 90% 72% / .5)}
