@font-face{font-family:Kalam;font-style:normal;font-weight:400;font-display:swap;src:url('assets/fonts/Kalam-Regular.ttf') format('truetype')}
@font-face{font-family:Kalam;font-style:normal;font-weight:700;font-display:swap;src:url('assets/fonts/Kalam-Bold.ttf') format('truetype')}
@font-face{font-family:'Space Mono';font-style:normal;font-weight:700;font-display:swap;src:url('assets/fonts/SpaceMono-Bold.ttf') format('truetype')}
.header-end{display:flex;gap:20px;align-items:center}.language-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#language{font:700 13px Arial,sans-serif;border:1px solid #bfa980;background:#fff5df;color:#143947;padding:10px;min-height:44px}.madeira-label{position:absolute;left:25px;bottom:70px;max-width:145px;z-index:450;pointer-events:none;font:700 11px 'Space Mono',monospace;line-height:1.7;letter-spacing:1px;color:#d5f1e6;transform:rotate(-9deg)}#nearby{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px;font-size:12px}#nearby button{font-size:12px;padding:6px 10px}.ferry-marker{background:none;border:0;pointer-events:none}.little-ferry{width:72px;animation:sailing 5s ease-in-out infinite alternate;position:relative}.little-ferry svg{width:65px;height:42px;transform:scaleX(-1);image-rendering:pixelated;filter:drop-shadow(2px 3px 0 #0c5d7770)}.ferry-name{display:block;color:#eef2db;font:700 10px 'Space Mono',monospace;white-space:nowrap;letter-spacing:.3px;text-align:center}.marker-peak svg{width:44px!important;height:44px!important}.marker-view svg{width:28px!important;height:28px!important}.marker-harbour svg{width:30px!important;height:30px!important}.marker-rock svg{width:33px!important;height:33px!important}.marker-button.selected{background:#ffe095b3;outline:2px solid #f5c044;outline-offset:0}.marker-button.selected:hover{background:#ffe095b3}@keyframes sailing{from{transform:translate(3px,0)}to{transform:translate(-3px,2px)}}@media(prefers-reduced-motion:reduce){.little-ferry{animation:none}}@media(max-width:700px){.header-end{align-self:flex-start}#language{font-size:12px;max-width:100px;padding:8px}header{gap:10px}header h1{font-size:30px}.madeira-label{left:14px;bottom:65px;font-size:9px;max-width:100px}.little-ferry{width:60px}.little-ferry svg{width:52px}.ferry-name{font-size:9px}}
:root{--paper:#f5ecd8;--ink:#102c3d;--blue:#006690;--yellow:#ffc54c;--coral:#d26a48;--green:#526c39}*{box-sizing:border-box}body{margin:0;background:#e9dfc8;color:var(--ink);font-family:Arial,sans-serif}.island-guide{max-width:1320px;margin:0 auto;padding:35px 38px 22px;background:var(--paper);background-image:radial-gradient(#bba17b18 1px,transparent 1px);background-size:7px 7px}header{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:24px}.eyebrow{font:700 12px 'Space Mono',monospace;letter-spacing:1.4px}.eyebrow span{color:#b47b00}h1,h2{font-family:'Kalam',Georgia,serif}h1{font-size:clamp(30px,4vw,48px);line-height:1.15;margin:12px 0 8px}header p{margin:0;line-height:1.6;font-size:15px}.stamp{font:700 12px 'Space Mono',monospace;border:2px dashed #a68851;padding:14px;text-align:center;transform:rotate(6deg);color:#8d723b;line-height:1.6;flex-shrink:0}.map-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:15px}.filters{display:flex;flex-wrap:wrap;gap:8px}button,a{ -webkit-tap-highlight-color:transparent}button{font:700 14px 'Kalam',Arial,sans-serif;border:0;background:#e5d8bb;color:var(--ink);padding:10px 16px;min-height:44px;cursor:pointer}button[aria-pressed=true]{background:var(--yellow);box-shadow:3px 3px 0 #a8894940}button:hover{background:#ffdaa0}button:focus-visible,a:focus-visible{outline:3px solid #dc6b3d;outline-offset:3px}#whole-island{background:transparent;border-bottom:2px solid var(--ink);padding-inline:4px;white-space:nowrap}.map-wrap{position:relative;border:8px solid #fff8e9;box-shadow:3px 8px 0 #947a4120;transform:rotate(-.25deg)}#map{height:600px;background:#1682a8;z-index:1}.ocean-label{position:absolute;bottom:60px;left:35px;z-index:450;pointer-events:none;font:700 12px 'Space Mono',monospace;line-height:1.7;letter-spacing:4px;color:#d5f1e6;transform:rotate(-9deg)}.compass{position:absolute;right:22px;top:25px;z-index:450;pointer-events:none;color:#eff2d9;text-align:center;font:700 18px 'Space Mono',monospace}.detail{display:flex;gap:20px;padding:28px 12px 20px;min-height:166px;align-items:flex-start}.detail-symbol{width:62px;height:62px;flex-shrink:0;background:#fbd275;display:grid;place-items:center;transform:rotate(-4deg)}h2{font-size:27px;margin:6px 0;line-height:1.2}.detail p{margin:8px 0;max-width:760px;font-size:15px;line-height:1.6}#detail-links{display:flex;gap:20px;flex-wrap:wrap;margin-top:12px}a{color:var(--blue);text-underline-offset:4px;font-size:13px}.place-list{border-top:1px solid #bea984;margin:12px 0;padding-top:15px}.place-list summary{cursor:pointer;font:700 18px 'Kalam',Georgia,serif;min-height:44px}#destinations{display:flex;flex-wrap:wrap;gap:8px;padding:12px 0}#destinations button{font-family:Arial,sans-serif;font-size:13px}footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:11px;color:#746448;padding-top:16px}footer a{font-size:11px;color:inherit}.leaflet-control-zoom a{background:#fff5da!important;color:var(--ink)!important}.leaflet-control-attribution{background:#fff5da!important;color:var(--ink)!important}.leaflet-control-attribution a{font-size:10px}.pixel-marker{border:0!important;background:transparent!important}.marker-button{position:relative;display:grid;place-items:center;min-height:44px;width:44px;height:44px;padding:0;background:transparent}.marker-button:hover{background:transparent;filter:drop-shadow(0 0 4px #fff3b9)}.marker-button svg{width:34px;height:34px;filter:drop-shadow(2px 3px 0 #123c5188);image-rendering:pixelated}.marker-label{position:absolute;top:40px;left:50%;transform:translateX(-50%);white-space:nowrap;font:700 12px 'Kalam',Arial,sans-serif;color:var(--ink);background:#fff5dfed;padding:2px 6px;box-shadow:2px 2px 0 #19384433;pointer-events:none}.marker-button.selected svg{filter:drop-shadow(0 0 5px #fff) drop-shadow(2px 3px 0 #123c5188)}.leaflet-container .leaflet-control-attribution{font-size:10px}.pixel-canvas{position:absolute;inset:0;pointer-events:none;image-rendering:pixelated;z-index:200}.leaflet-tooltip{font:700 13px 'Kalam',Arial,sans-serif;background:#fff5df;color:var(--ink);border:0;border-radius:0}#map .leaflet-control-attribution a{color:var(--ink)}
@media(max-width:700px){.island-guide{padding:24px 14px 18px}.stamp{display:none}header{margin-bottom:18px}.map-toolbar{align-items:flex-start;flex-wrap:wrap;gap:8px}.filters{gap:6px}.filters button{padding:9px 11px;font-size:13px}#whole-island{font-size:13px;min-height:36px}#map{height:520px}.map-wrap{border-width:5px;transform:none}.marker-label{display:none}.ocean-label{font-size:10px;left:18px;bottom:55px;letter-spacing:2px}.detail{padding:24px 0 14px;gap:13px}.detail-symbol{width:45px;height:45px}h2{font-size:24px}.eyebrow{font-size:10px}.detail p{font-size:14px}footer{line-height:1.6}.compass{right:15px;top:15px}}
.map-wrap .ocean-label{left:auto;right:8%;bottom:22%;max-width:185px;text-align:center;transform:rotate(-8deg);line-height:1.9}.eyebrow #heading-eyebrow{color:inherit}@media(max-width:700px){.map-wrap .ocean-label{right:10px;bottom:19%;max-width:125px;font-size:10px;letter-spacing:1.5px}}
.map-wrap .compass{transform:rotate(42deg)}.marker-button .generated-icon{width:70px;height:50px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(1px 2px 0 #4d493f55);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.marker-ana-ferreira .generated-icon{width:64px;height:46px}.detail-symbol .generated-icon{width:70px;height:50px;object-fit:contain;image-rendering:pixelated}.little-ferry{width:110px}.little-ferry .generated-icon{display:block;width:110px;height:48px;object-fit:contain;image-rendering:pixelated}.ferry-name{margin-top:-2px}.map-wrap .ocean-label{right:5%;bottom:10%}.map-wrap .madeira-label{bottom:48px}#map{height:550px}@media(max-width:700px){#map{height:390px}.little-ferry{width:86px}.little-ferry .generated-icon{width:86px;height:38px}.map-wrap .ocean-label{right:10px;bottom:8%;max-width:105px}.marker-button .generated-icon{width:60px;height:44px}.marker-ana-ferreira .generated-icon{width:54px;height:40px}.madeira-label{max-width:110px}}
.marker-button .generated-icon{width:90px;height:64px}.marker-ana-ferreira .generated-icon{width:80px;height:55px}@media(max-width:700px){.marker-button .generated-icon{width:72px;height:50px}.marker-ana-ferreira .generated-icon{width:65px;height:45px}.little-ferry{width:72px}.little-ferry .generated-icon{width:72px;height:32px}}
.marker-button{border-radius:50%;background:#fff3d8ed;border:1px solid #92784a;box-shadow:0 2px 0 #17394745;width:36px;height:36px;min-height:36px;margin:4px}.marker-button:hover{background:#ffdb81;filter:none;box-shadow:0 2px 0 #17394765}.marker-button.selected{background:#ffcf57;border:2px solid #624d2f;outline:0}.marker-button svg{width:29px;height:29px;filter:none}.marker-button .generated-icon{width:60px;height:42px;filter:drop-shadow(1px 1px 0 #fff3d8)}.marker-ana-ferreira .generated-icon{width:54px;height:38px}.marker-castelo-facho,.marker-ana-ferreira{background:#fff3d8b8;border-radius:5px;width:60px;height:40px;min-height:40px;margin:2px -8px;box-shadow:0 2px 0 #17394730}.marker-ana-ferreira{width:54px;margin-left:-5px}.marker-label{top:38px;background:#fff6e6;padding:3px 7px;box-shadow:1px 2px 0 #19384430}@media(max-width:700px){.marker-button .generated-icon{width:50px;height:35px}.marker-ana-ferreira .generated-icon{width:46px;height:32px}.marker-castelo-facho,.marker-ana-ferreira{width:50px;height:36px;min-height:36px;margin:4px -3px}.marker-ana-ferreira{width:46px;margin-left:-1px}}
.portosan-raster-tile{image-rendering:pixelated}.leaflet-zoom-animated{will-change:transform}@media(prefers-reduced-motion:reduce){.leaflet-zoom-anim .leaflet-zoom-animated{transition:none!important}}

/* One paper-button family, with category artwork and independent transport motifs. */
.marker-button,.marker-castelo-facho,.marker-ana-ferreira{width:40px;height:40px;min-height:40px;margin:2px;border-radius:6px;background:#fff6e4;border:2px solid #836b43;box-shadow:2px 3px 0 #163c4d55;}
.marker-button:hover{background:#ffe1a1;box-shadow:2px 3px 0 #163c4d77;}
.marker-button.selected{background:#ffd267;border-color:#143947;box-shadow:2px 3px 0 #163c4d77;}
.marker-button svg,.marker-view svg,.marker-harbour svg,.marker-rock svg{width:33px!important;height:33px!important;filter:none;}
.marker-castelo-facho,.marker-ana-ferreira{width:48px;height:36px;min-height:36px;margin:4px -2px;}
.marker-button .generated-icon{width:46px;height:34px;filter:none;}
.marker-ana-ferreira .generated-icon{width:43px;height:32px;}
.marker-label{top:40px;}
.detail-symbol svg{width:46px;height:46px;image-rendering:pixelated;}
.zoom-status{font-size:12px;color:#746448;margin:0 0 10px;line-height:1.5;min-height:18px;}
.map-toolbar{align-items:flex-start;}.filters{gap:6px;}.filters button{padding:9px 12px;}
@media(max-width:700px){.marker-button,.marker-castelo-facho,.marker-ana-ferreira{border-width:2px;}.detail-symbol svg{width:36px;height:36px;}.zoom-status{font-size:11px;}.filters button{padding:8px 10px;}}

.filters button{display:flex;align-items:center;gap:5px;}.filters svg{width:22px;height:22px;image-rendering:pixelated;flex-shrink:0;}

/* V7: illustrated paper seals, centred on the unchanged geographical anchor. */
.marker-button,.marker-castelo-facho,.marker-ana-ferreira{
 isolation:isolate;width:54px;height:54px;min-height:54px;margin:0;padding:0;
 border:0;border-radius:0;background:transparent;box-shadow:none;
}
.marker-button::before{
 content:"";position:absolute;z-index:-1;left:50%;top:50%;width:46px;height:46px;
 transform:translate(-50%,-50%) rotate(-6deg);border-radius:46% 53% 48% 52%;
 background:radial-gradient(ellipse at 32% 24%,#fffaf0,#f7e8c9 85%);
 box-shadow:0 1px 0 #fffdf3 inset,0 2px 4px #17394735;
 transition:background-color .15s,box-shadow .15s;
}
.marker-button:hover,.marker-button.selected,.marker-button.selected:hover{
 background:transparent;border:0;box-shadow:none;outline:0;filter:none;
}
.marker-button:hover::before{background:#ffe7ad;box-shadow:0 0 0 2px #fff5d4,0 3px 5px #17394745;}
.marker-button.selected::before{background:#ffda79;box-shadow:0 0 0 2px #b37b27,0 0 0 4px #fff1c7,0 3px 5px #17394745;}
.marker-button:focus-visible::before{box-shadow:0 0 0 3px #153b4e,0 0 0 5px #fff3d6;}
.marker-button .marker-art{display:block;width:42px;height:42px;object-fit:contain;pointer-events:none;image-rendering:auto;filter:drop-shadow(0 1px 0 #6b54322b);}
.marker-button .generated-icon,.marker-ana-ferreira .generated-icon{width:51px;height:36px;filter:none;}
.marker-castelo-facho::before,.marker-ana-ferreira::before{width:53px;height:35px;border-radius:48% 51% 46% 49%;}
.marker-ana-ferreira .generated-icon{width:47px;height:33px;}
.marker-label{top:49px;font:700 12px 'Kalam',Arial,sans-serif;padding:3px 8px;border-radius:3px 7px 4px 6px;background:#fff6e4f2;box-shadow:0 1px 2px #19384425;}
.filters button{gap:7px;border:1px solid #cbb58c60;border-radius:7px 9px 6px 8px;background:#fffaeea6;box-shadow:0 1px 2px #8d734515;font-size:14px;padding:7px 12px;}
.filters button:hover{background:#ffe8b5;}
.filters button[aria-pressed=true]{background:#ffd578;border-color:#d6a94f;box-shadow:0 2px 0 #ac85442a;}
.filters .marker-art{width:29px;height:29px;object-fit:contain;image-rendering:auto;}
.detail-symbol{background:#ffdf93;border-radius:44% 52% 46% 51%;transform:rotate(-3deg);}
.detail-symbol .marker-art{width:57px;height:57px;object-fit:contain;}
#destinations button,#nearby button{border-radius:5px 8px 4px 7px;background:#fffaee;border:1px solid #cbb58c80;}
#destinations button:hover,#nearby button:hover{background:#ffe3a2;}
@media(max-width:700px){.filters{gap:5px;}.filters button{gap:5px;padding:6px 9px;font-size:13px;}.filters .marker-art{width:25px;height:25px;}.detail-symbol .marker-art{width:42px;height:42px;}}
@media(prefers-reduced-motion:reduce){.marker-button::before{transition:none;}}

/* Final 32px sprites, local fonts and a calm responsive frame. */
.stamp{transform:none;border:1px dashed #a68851;padding:12px;line-height:1.5;}body{background:transparent}.island-guide{padding:28px 28px 18px;border-radius:8px;}
.marker-button .marker-art{width:32px;height:32px;image-rendering:pixelated;filter:none;}
.marker-button .generated-icon,.marker-ana-ferreira .generated-icon{width:44px;height:44px;object-fit:contain;image-rendering:pixelated;}
.marker-button::before{width:43px;height:43px;box-shadow:0 1px 0 #fffdf3 inset,0 2px 3px #17394725;}
.marker-castelo-facho::before,.marker-ana-ferreira::before{width:48px;height:32px;}
.filters .marker-art{width:24px;height:24px;image-rendering:pixelated;}
.detail-symbol .marker-art{width:48px;height:48px;image-rendering:pixelated;}
.detail-symbol .generated-icon{width:58px;height:58px;image-rendering:pixelated;}
#map{height:560px}.map-wrap{transform:none;border-radius:4px;border-width:6px;overflow:hidden;}
.detail{min-height:160px}.embedded #language,.embedded .language-label{display:none;}
button{touch-action:manipulation}#zoom-status{font-variant-numeric:tabular-nums;}
@media(max-width:700px){.island-guide{padding:20px 12px 14px;}#map{height:360px}.header-end{gap:0;}.detail-symbol .marker-art{width:32px;height:32px}.detail-symbol .generated-icon{width:44px;height:44px}.map-wrap{border-width:4px}.filters button{font-size:12px;padding:6px 8px;}.filters .marker-art{width:22px;height:22px;}footer{font-size:10px;}}

/* Geographic sea labels: Leaflet controls their position, not the viewport. */
.geographic-label{background:none;border:0;pointer-events:none}.geographic-label .madeira-label,.geographic-label .ocean-label{position:static;display:block;left:auto;right:auto;top:auto;bottom:auto;transform:none;margin:0;white-space:nowrap;text-align:center;color:#d5f1e6;max-width:none;font-size:11px;letter-spacing:1px;line-height:1.7}.geographic-label .madeira-label{white-space:normal}@media(max-width:700px){.geographic-label .madeira-label,.geographic-label .ocean-label{font-size:9px}}

.boat-panel{background:#fff4d9;border:1px solid #ccb88d;padding:14px;margin-top:12px}.boat-panel[hidden]{display:none}.boat-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.boat-actions strong{margin-right:auto}.boat-panel p{font-size:13px;line-height:1.5;margin:10px 0}.boat-controls{display:flex;justify-content:center;gap:10px}.boat-controls button{min-width:52px;min-height:48px;touch-action:none;font:700 22px Arial}.player-boat,.columbus-ship,.boat-destination{background:none;border:0;pointer-events:none}.player-boat svg,.columbus-ship svg{width:100%;height:100%;image-rendering:pixelated}.columbus-ship span,.boat-destination span{display:block;white-space:nowrap;color:#fff4d9;font:700 11px Arial;text-align:center;text-shadow:1px 1px #153e4a}.boat-destination span{padding:8px;background:#143e4c}.boat-mode .pixel-marker,.boat-mode .geographic-label,.boat-mode .ferry-marker{visibility:hidden}.boat-mode{outline:2px solid #f5c044}.boat-start{white-space:nowrap}@media(max-width:700px){.boat-actions button{min-height:44px}}

/* A round directional pad stays within reach while the map follows the boat. */
.map-wrap>.boat-controls{position:absolute;bottom:22px;left:14px;z-index:650;display:grid;grid-template-columns:repeat(3,46px);grid-template-rows:repeat(3,46px);gap:4px;padding:0;background:none;transform:none}
.boat-controls[hidden],.boat-exit[hidden]{display:none}
.map-wrap>.boat-controls button{width:46px;height:46px;min-width:46px;min-height:46px;padding:0;border-radius:50%;border:2px solid #163d4d;background:#fff4d9f5;color:#163d4d;box-shadow:0 2px 4px #163d4d40;display:grid;place-items:center;line-height:1}
.boat-controls [data-boat="forward"]{grid-column:2;grid-row:1}.boat-controls [data-boat="left"]{grid-column:1;grid-row:2}.boat-controls [data-boat="right"]{grid-column:3;grid-row:2}.boat-controls [data-boat="back"]{grid-column:2;grid-row:3}
.boat-controls button:active{background:#f6cc55;transform:scale(.94)}
.boat-exit{position:absolute;top:12px;right:12px;z-index:650;border:2px solid #163d4d;border-radius:999px;padding:10px 16px;min-height:44px;background:#fff4d9;color:#163d4d;font-weight:700;box-shadow:0 2px 4px #163d4d40}
.boat-start,.boat-actions button{border-radius:999px}.boat-heading{width:100%;height:100%}.boat-wake{opacity:0}
.boat-controls button:focus-visible,.boat-exit:focus-visible{outline:3px solid #f6cc55;outline-offset:3px}

/* Final map polish: keep the approved paper palette, simplify small UI details. */
:root{--blue:#246b86}
.filters button{border-radius:999px;background:#ece0c4;border:1px solid #ccb994;min-height:44px;line-height:1.25;box-shadow:none}
.filters button[aria-pressed=true]{background:#ffdc83;border-color:#9b783e;box-shadow:0 2px 0 #a8894930}
.filters button:hover{background:#ffe4a6}.filters .marker-art{width:23px;height:23px}
#whole-island{font-size:14px;border:0;border-radius:999px;background:#fff6e4;padding:9px 14px;min-height:44px}
.boat-start{background:#246b86;color:#fff7e6;border:1px solid #163d4d;box-shadow:0 2px 0 #163d4d30}.boat-start:hover{background:#19556e}
.map-wrap{box-shadow:0 3px 0 #947a4120,0 8px 24px #163d4d0b;border-radius:10px}
.marker-button:focus-visible{outline:3px solid #246b86;outline-offset:2px;border-radius:50%}
.marker-label{white-space:normal;width:max-content;max-width:210px;text-align:center;line-height:1.25;border-radius:5px;font-size:12px}
.detail{padding:22px 18px;margin-top:18px;background:#fff8e980;border:1px solid #d6c4a3;border-radius:10px;gap:16px;min-height:160px}
.detail>div:last-child{min-width:0}.detail-symbol{transform:none;border-radius:50%}.detail h2{font-size:clamp(25px,3vw,32px);line-height:1.25;margin:7px 0 10px}.detail p{line-height:1.7;margin:0;font-size:15px}
#detail-category{font-size:10px;letter-spacing:1.1px;color:#6a593d}
#detail-links{gap:8px;margin-top:14px}#detail-links a{font-size:12px;text-decoration:none;border-bottom:1px solid #246b8640;padding:5px 0;margin-right:12px;line-height:1.4}
#nearby button,#destinations button{border:1px solid #d3c19b;border-radius:999px;background:#fff6e4;font-size:12px;line-height:1.4}
#nearby button:hover,#destinations button:hover{background:#ffe4a6}
.place-list{margin-top:20px}.place-list summary{padding:7px 0}.leaflet-control-zoom{border-radius:8px!important;overflow:hidden}.leaflet-control-zoom a{width:36px!important;height:36px!important;line-height:36px!important}
@media(max-width:700px){#map{height:420px}.island-guide{padding:18px 12px 14px}.map-toolbar{gap:10px}.filters button{padding:8px 10px;font-size:12px}.detail{padding:16px 12px;gap:12px}.detail-symbol{width:44px;height:44px}.detail p{font-size:14px}.detail h2{font-size:26px}.map-wrap{border-radius:8px}.zoom-status{margin-bottom:8px}.marker-label{font-size:11px}}
#detail-links a.map-source-number{font-size:11px;border:0;padding:0;line-height:1}.reference-list li{scroll-margin-top:30px}

/* Native-resolution tiles with a real drawing gutter, including fractional zoom. */
.portosan-raster-tile{image-rendering:auto;width:258px!important;height:258px!important;margin-left:-1px;margin-top:-1px}
