/* Compact postal buttons and delivery map; home remains open to the scene. */
#masthead{top:calc(18px + var(--safe-top));left:28px;right:28px}
#masthead .brand{gap:9px;min-height:44px;padding:4px 12px 4px 5px;border:1px solid #fff9e9;border-radius:13px;background:linear-gradient(135deg,#fffdf1f0,#f5e5cde8);box-shadow:0 3px 0 #c5ad85,0 5px 12px #23556b19;color:#22594f;font-size:16px;letter-spacing:1px;text-shadow:0 1px #fff9e9}
#masthead .brand small{font-size:7px;letter-spacing:1.4px;margin-top:3px;color:#8a805e}
#masthead .brand-icon{width:34px;height:34px;border-radius:10px;border:1px solid #ddc399;background:linear-gradient(#fff9e5,#f0dbae);box-shadow:inset 0 1px #fffdf0,0 2px 0 #bfa377}
#masthead .brand-icon svg{width:26px;height:26px;fill:#458b71;stroke:#fff5d7}
#masthead .top-tools{gap:8px}
#masthead .icon-button{width:44px;height:44px;border:1px solid #e2cca4;border-radius:13px;background:linear-gradient(#fffdf3,#efdfbf);box-shadow:inset 0 2px #fffaf0,0 3px 0 #bfa47c;color:#376d60}
#masthead .icon-button svg{width:19px;height:19px}
#masthead button:focus-visible,#map button:focus-visible{outline:2px solid #267b6a;outline-offset:4px}
#map .map-shell::before{content:"";position:absolute;inset:0;z-index:-2;border:2px solid #fffaf0;background:radial-gradient(ellipse at 30% 0,#fffdf3,#fdf1dc 70%,#f4e4c8);box-shadow:inset 0 0 0 8px #fff8e8,inset 0 0 0 9px #e2c69866;mask:radial-gradient(6px at 50% 0,#0000 98%,#000) 0 0/24px 100%,radial-gradient(6px at 50% 100%,#0000 98%,#000) 12px 0/24px 100%,radial-gradient(6px at 0 50%,#0000 98%,#000) 0 0/100% 24px,radial-gradient(6px at 100% 50%,#0000 98%,#000) 0 12px/100% 24px;mask-composite:intersect}
#map .map-shell::after{content:"";position:absolute;inset:15px 11px;z-index:-1;border-left:4px solid transparent;border-right:4px solid transparent;border-image:repeating-linear-gradient(135deg,#d87d6190 0 13px,transparent 13px 26px,#75ac988c 26px 39px,transparent 39px 52px) 4;pointer-events:none}

#map{padding:calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));background:#184e5b66;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#174e4c;scrollbar-width:thin;scrollbar-color:#c3a776 #f9efd9}
#map .map-shell{position:relative;isolation:isolate;width:min(820px,100%);margin:auto;padding:26px 28px 24px;filter:drop-shadow(0 3px 0 #d0b080) drop-shadow(0 12px 15px #19495828)}
#map .map-shell::after{inset:21px 11px}
#map .map-heading{gap:12px;margin:0 0 17px;min-height:44px}
#map .map-heading .eyebrow{font-size:9px;font-weight:700;letter-spacing:1.8px;color:#ac8a53;margin:0 0 5px}
#map .map-heading h2{font-size:27px;font-weight:850;letter-spacing:0;line-height:1.2;color:#1e5750;text-shadow:0 1px #fffaf0}
#map #map-close{flex-shrink:0;min-height:44px;margin:0;padding:9px 12px;border:1px solid #d9c6a5;border-radius:12px;background:linear-gradient(#fffdf3,#f1e3c9);box-shadow:inset 0 2px #fffef6,0 3px 0 #cbb18b;color:#597969;font-size:12px;font-weight:700;letter-spacing:0}
#map .chapter-tabs{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:5px;border:1px solid #e3cfaa;border-radius:13px;background:#eae5ce;box-shadow:inset 0 1px 3px #c1b28c26}
#map .chapter-tab{min-width:0;min-height:48px;padding:6px 5px;border:1px solid transparent;border-radius:9px;background:none;color:#7f8b72;font-size:12px;font-weight:750;line-height:1.3}
#map .chapter-tab small{display:block;margin-bottom:3px;font-size:8px;letter-spacing:1px;opacity:.75}
#map .chapter-tab[aria-selected="true"]{border-color:#fff2b9;background:linear-gradient(#448f79,#216d5b);box-shadow:0 0 0 1px #bfaa6b,inset 0 1px #a6c9a2,0 2px 0 #aa9058;color:#fff5d9;text-shadow:0 1px #1d6252}
#map .chapter-tab[aria-selected="true"] small{color:#f2dfab}
#map .chapter-heading{align-items:center;gap:12px;margin:19px 1px 13px}
#map .chapter-heading small{font-size:10px;letter-spacing:.5px;color:#9b8e6d}
#map .chapter-heading h3{margin-top:3px;font-size:20px;line-height:1.3;letter-spacing:0;color:#2a6256}
#map .chapter-heading>span{flex-shrink:0;margin:0;padding:5px 8px;border:1px solid #e3d0a8;border-radius:7px;background:#fcf3db;color:#aa873c;font-size:11px;font-weight:750;white-space:nowrap}
#map .level-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#map .level-card{display:block;min-width:0;padding:0;border:1px solid #e2cda4;border-radius:12px;background:linear-gradient(#fffdf3,#f5e8ce);box-shadow:inset 0 0 0 2px #fff9e9,0 3px 0 #ccb18a,0 6px 10px #526b4d0b;text-align:left;transition:border-color .15s,box-shadow .15s,transform .15s}
#map .level-card:hover{border-color:#6f9e7c;transform:translateY(-2px)!important;box-shadow:0 3px 0 #a8b995,0 7px 12px #3d755b13}
#map .level-card.locked{filter:saturate(.45);opacity:.8}
#map .level-art{height:99px;border-bottom:1px solid #e0cfa8;background-position:center 40%;box-shadow:inset 0 2px 0 #fffaf04d}
#map .level-art .mini-star{width:26px;height:26px;bottom:8px;right:8px;font-size:17px;border-radius:8px;transform:rotate(-7deg);background:linear-gradient(#fff3bc,#e9c16b);box-shadow:0 2px 0 #b48d45;color:#a9761f}
#map .level-card-body{min-width:0;padding:14px 13px 12px;color:#245d53}
#map .level-card-top{gap:7px}
#map .level-card-top small{font-size:9px;letter-spacing:1.3px;color:#9d9274}
#map .card-stars{font-size:14px;letter-spacing:1px;line-height:1;color:#d6a438;white-space:nowrap}
#map .level-card h4{margin:9px 0 8px;font-size:17px;line-height:1.25;color:#245d53}
#map .card-focus{display:flex;align-items:center;gap:5px;min-width:0;margin:0 0 7px;font-size:10px;line-height:1.4;color:#698369}
#map .stage-badge{padding:2px 5px;border:1px solid #c4d1aa;border-radius:5px;background:#e8efda;color:#5f7b4f;font-size:9px;line-height:1.4;letter-spacing:0}
#map .level-card p{min-height:0;margin:0;font-size:10px;line-height:1.65;color:#8b8a71;overflow-wrap:anywhere}
#map .level-card .card-commission{font-size:10px;color:#7b846b}
#map .card-action{gap:5px;margin-top:10px;padding-top:10px;border-top:1px dashed #d8c49c;font-size:11px;line-height:1.4;color:#38715c;font-weight:750}
#map .card-action strong{font-size:8px;letter-spacing:.5px;color:#a6a086}
#map .map-footer{gap:12px;align-items:center;margin-top:17px;font-size:10px;line-height:1.5;color:#9c9379}
#map .map-footer strong{font-size:11px;color:#788365}

@media(max-width:760px){
 #masthead{top:calc(14px + var(--safe-top));left:17px;right:17px}
 #masthead .brand{font-size:14px;padding-right:10px;gap:7px}
 #masthead .brand small{font-size:6px;letter-spacing:1px}
 #masthead .top-tools{gap:7px}
 #map{padding:calc(15px + var(--safe-top)) 13px calc(15px + var(--safe-bottom))}
 #map .map-shell{width:min(490px,100%);padding:23px 23px 22px}
 #map .map-heading{margin-bottom:14px;gap:8px}
 #map .map-heading h2{font-size:23px}
 #map .map-heading .eyebrow{font-size:8px;letter-spacing:1.2px}
 #map #map-close{padding:9px 10px;font-size:11px}
 #map .chapter-tabs{gap:4px;padding:4px;border-radius:11px}
 #map .chapter-tab{min-height:44px;padding:5px 3px;font-size:11px;border-radius:8px}
 #map .chapter-tab small{font-size:7px;letter-spacing:.4px;margin-bottom:2px}
 #map .chapter-heading{margin:15px 0 11px;gap:9px}
 #map .chapter-heading small{font-size:9px}
 #map .chapter-heading h3{font-size:18px}
 #map .chapter-heading>span{font-size:10px;padding:4px 6px}
 #map .level-cards{grid-template-columns:1fr;gap:10px}
 #map .level-card{display:grid;grid-template-columns:82px minmax(0,1fr);border-radius:11px}
 #map .level-art{height:100%;min-height:128px;border:0;border-right:1px solid #e1cba4;background-position:50% 42%}
 #map .level-art .mini-star{width:24px;height:24px;bottom:9px;right:9px;font-size:15px}
 #map .level-card-body{padding:10px 11px 9px}
 #map .level-card-top small{font-size:8px;letter-spacing:1px}
 #map .card-stars{font-size:12px;letter-spacing:1px}
 #map .level-card h4{font-size:15px;margin:6px 0 5px}
 #map .card-focus{font-size:10px;margin-bottom:5px;gap:5px}
 #map .stage-badge{font-size:8px;padding:1px 5px}
 #map .level-card p,#map .level-card .card-commission{font-size:10px;line-height:1.45}
 #map .card-action{font-size:10px;margin-top:7px;padding-top:7px}
 #map .card-action strong{font-size:7px;letter-spacing:.4px}
 #map .map-footer{gap:8px;align-items:flex-start;margin-top:14px;font-size:9px;line-height:1.5}
 #map .map-footer strong{font-size:10px}
}
@media(max-width:360px){
 #masthead{left:13px;right:13px}
 #masthead .brand{font-size:12px;gap:6px;padding-right:8px}
 #masthead .brand small{font-size:5.5px;letter-spacing:.7px}
 #masthead .brand-icon{width:31px;height:31px}
 #masthead .top-tools{gap:6px}
 #map{padding-left:10px;padding-right:10px}
 #map .map-shell{padding:22px 18px 21px}
 #map .map-heading h2{font-size:21px}
 #map .chapter-tab{font-size:10px}
 #map .chapter-tab small{font-size:6.5px}
 #map .chapter-heading h3{font-size:17px}
 #map .level-card{grid-template-columns:61px minmax(0,1fr)}
 #map .level-card-body{padding:10px 9px 9px}
 #map .level-card h4{font-size:14px}
 #map .card-focus{font-size:9px;gap:4px}
 #map .level-card .card-commission{font-size:9px}
 #map .card-action{font-size:9px}
 #map .card-action strong{font-size:6.5px}
 #map .map-footer{font-size:8px}
}

@media(orientation:landscape) and (max-height:540px){
 #masthead{top:calc(12px + var(--safe-top));left:19px;right:19px}
 #map{padding:calc(12px + var(--safe-top)) 18px calc(12px + var(--safe-bottom))}
 #map .map-shell{width:min(760px,100%);padding:22px 24px}
 #map .map-heading{margin-bottom:12px}
 #map .map-heading h2{font-size:23px}
 #map .chapter-heading{margin:12px 0 10px}
 #map .level-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 #map .level-card{display:block}
 #map .level-art{height:65px;min-height:0;border:0;border-bottom:1px solid #e1cba4}
 #map .level-card-body{padding:10px}
 #map .level-card h4{font-size:14px}
 #map .card-focus{font-size:9px;gap:4px}
 #map .level-card p,#map .level-card .card-commission{font-size:9px}
 #map .card-action{font-size:9px;flex-wrap:wrap}
 #map .map-footer{margin-top:12px}
}
@media(prefers-reduced-motion:reduce){#map .level-card{transition:none}
#map .level-card:hover{transform:none!important}}

/* Home stays open to the scene. Postal panels are reserved for dialogs and map. */
#home .home-actions .button{min-width:0;min-height:46px;padding:10px 12px;font-size:14px;line-height:1.3;letter-spacing:.4px}
#home #start-button{min-height:48px;justify-content:flex-start;border:2px solid #fff2b9;border-radius:26px;background:radial-gradient(ellipse at 25% 0,#55bda486,transparent 65%),linear-gradient(#158875,#046855 82%,#065343);box-shadow:0 0 0 1px #cf9e4a,0 0 0 3px #f2d68f,inset 0 2px 0 #a3d5b4,inset 0 -3px 0 #035448,0 4px 0 #b08b47,0 7px 10px #8e753b20;color:#fff7dd;font-size:17px;font-weight:850;text-shadow:0 2px 0 #075444}
#home #start-button:hover{filter:brightness(1.08)}
#home .button-number{min-width:26px;margin-left:auto;padding:3px 6px;border:1px solid #e7e1aa66;border-radius:6px;background:#075e4f66;color:#f2d997;font-size:11px;font-weight:700;letter-spacing:1px;opacity:1;text-shadow:none}
#home .home-mode-row{display:grid;grid-template-columns:1fr 1fr;gap:9px}
#home .home-mode-row .button{min-height:49px;gap:5px;padding:8px 10px;border:1px solid #d9c6a5;border-radius:12px;background:linear-gradient(#fffdf3,#f1e3c9);box-shadow:inset 0 2px #fffef6,0 3px 0 #cbb18b;color:#3c6b5c;font-size:12px;font-weight:750;letter-spacing:0}
#home .home-mode-row .button:hover{filter:brightness(1.025)}
#home #map-button{flex-wrap:wrap;align-content:center;gap:3px 6px}
#home .home-mode-row #home-stars{margin:0;color:#94835c;font-size:10px;letter-spacing:0}
#home .home-mode-row .free-mode{border-color:#dcc48d;background:linear-gradient(#fff6d6,#f1dfac);color:#7d663b}
#home .free-mode>span{margin:0;color:inherit;font-size:12px;gap:3px}
#home .free-mode small{font-size:9px;font-weight:500;color:#988156;line-height:1.2}
#home .free-mode b{margin-left:auto;font-size:25px;color:#b18a3c;font-weight:650}
#home::before{background:none}
#home .hero-copy{position:absolute;left:8%;top:24%;width:330px;max-height:none;margin:0;padding:0;border:0;background:none;box-shadow:none;filter:none;transform:none;overflow:visible;isolation:auto;color:#174e4c}
#home .hero-copy::before,#home .hero-copy::after{content:none}
#home .eyebrow{display:flex;gap:7px;padding:0;border:0;background:none;color:#366760;font-size:11px;letter-spacing:1px;font-weight:700;text-shadow:0 1px 3px #fff8e8}
#home .eyebrow>span{width:5px;height:5px;background:#b79243}
#home .hero-copy h1{margin:16px 0 12px;color:#174e4c;font-size:48px;line-height:1.06;font-weight:850;letter-spacing:-1px;text-shadow:0 1px 2px #fff9e8;-webkit-text-stroke:0}
#home .hero-copy h1 span{color:#277a65;-webkit-text-stroke:0;text-shadow:0 1px 2px #fff9e8}
#home .hero-description{font-size:12px;line-height:1.75;font-weight:600;letter-spacing:0;color:#38685e;text-shadow:0 1px 3px #fff8e8}
#home .home-actions{position:absolute;left:8%;right:auto;top:calc(24% + 212px);bottom:auto;width:300px;max-width:none;display:flex;flex-direction:column;gap:12px;margin:0;transform:none;pointer-events:auto}
#home .hero-meta{position:absolute;left:8%;right:auto;top:calc(24% + 345px);bottom:auto;display:flex;justify-content:flex-start;flex-wrap:wrap;gap:5px 7px;margin:0;font-size:10px;line-height:1.4;color:#406e62;text-shadow:0 1px 3px #fff8e8}
#home .hero-meta i{width:2px;height:2px}
#home .scene-caption{right:6%;bottom:15%;padding:8px 11px;border:1px solid #e2cfaa;border-radius:11px;background:linear-gradient(#fffaf0ee,#f3e4c9ee);box-shadow:0 3px 0 #c3a77c80;gap:5px;font-size:10px;color:#5d7b68}
#home .scene-caption b{font-size:11px;color:#366f5d}
#home .home-bottom{position:absolute;left:28px;right:28px;bottom:calc(12px + var(--safe-bottom));gap:20px;font-size:10px;letter-spacing:.5px;color:#25595c;text-shadow:0 1px 3px #fff}
#home .home-bottom #help-button{min-height:44px;margin:0;padding:8px 14px;border:1px solid #d9c6a5;border-radius:12px;background:linear-gradient(#fffdf3f0,#f1e3c9eb);box-shadow:0 3px 0 #cbb18b;color:#597969;font-size:12px;font-weight:700;text-shadow:none}
#home .home-bottom .edition{font-size:9px;letter-spacing:1.2px}
@media(max-width:760px){
 #home .hero-copy{left:24px;top:calc(90px + var(--safe-top));width:calc(100% - 48px);max-height:none;padding:0;transform:none;filter:none;overflow:visible}
 #home .eyebrow{font-size:10px;letter-spacing:.5px;color:#f9f1d9;text-shadow:0 1px 4px #165877}
 #home .hero-copy h1{font-size:38px;line-height:1.12;margin:12px 0 10px;color:#fff9e4;text-shadow:0 2px 0 #1e647c,0 4px 10px #174c7355;-webkit-text-stroke:.5px #2c6472;letter-spacing:-1px}
 #home .hero-copy h1 br{display:none}#home .hero-copy h1 span{color:#fff2be;text-shadow:inherit;-webkit-text-stroke:.5px #2c6472}
 #home .hero-description{font-size:11px;line-height:1.65;color:#fffdf0;text-shadow:0 1px 3px #164f70,0 0 5px #164f7055}
 #home .home-actions{left:50%;right:auto;top:auto;bottom:calc(80px + var(--safe-bottom));width:min(340px,calc(100% - 40px));transform:translateX(-50%);gap:10px;margin:0}
 #home .home-actions .button{min-height:46px}#home #start-button{min-height:48px}
 #home .home-mode-row .button{min-height:46px}
 #home .hero-meta{left:20px;right:20px;top:auto;bottom:calc(55px + var(--safe-bottom));justify-content:center;font-size:10px;color:#285c5b;gap:4px 6px}
 #home .scene-caption{display:none}
 #home .home-bottom{left:20px;right:20px;bottom:calc(4px + var(--safe-bottom));justify-content:flex-end;gap:0}
 #home .home-bottom>span{display:none}#home .home-bottom #help-button{font-size:11px;padding:8px 12px}
}
@media(max-width:360px){
 #home .hero-copy{left:20px;top:calc(82px + var(--safe-top));width:calc(100% - 40px)}
 #home .hero-copy h1{font-size:32px;margin:10px 0 8px}#home .eyebrow{font-size:9px}
 #home .hero-description{font-size:10px}#home .hero-meta{font-size:9px}
 #home .home-actions{width:calc(100% - 36px)}
}
@media(orientation:landscape) and (max-height:540px){
 #home .hero-copy{left:20px;top:calc(75px + var(--safe-top));width:260px;max-height:none;padding:0;overflow:visible;transform:none;filter:none}
 #home .eyebrow{font-size:9px}#home .hero-copy h1{font-size:30px;line-height:1.1;margin:10px 0 8px}#home .hero-copy h1 br{display:none}
 #home .hero-description{font-size:10px;line-height:1.5}
 #home .home-actions{left:20px;right:20px;top:auto;bottom:calc(15px + var(--safe-bottom));width:auto;transform:none;display:grid;grid-template-columns:1fr 1.4fr;gap:12px}
 #home #start-button{min-height:46px;font-size:15px}#home .home-mode-row .button{min-height:46px;padding:6px 9px;font-size:11px}
 #home .hero-meta{left:20px;right:auto;top:auto;bottom:calc(77px + var(--safe-bottom));justify-content:flex-start;font-size:9px}
 #home .home-bottom{left:auto;right:20px;bottom:calc(72px + var(--safe-bottom))}#home .home-bottom>span{display:none}
 #home .scene-caption{display:none}
}
