/* Geometry taken from the accepted Il Mondo con Me home. Shared by both adapters. */
body.how-world{max-width:1180px;margin:auto;font:14px/1.5 system-ui,-apple-system,Segoe UI,sans-serif}
body.how-world .top,body.how-world .app-head{display:flex;justify-content:space-between;align-items:center;min-height:94px;padding:7px 12px;gap:9px;margin:auto;max-width:1180px}
body.how-world .brand{display:block;flex:1;min-width:0;max-width:230px}
body.how-world .brand-logo,body.how-world .brand img{display:block;width:100%;height:auto;max-height:78px;object-fit:contain;object-position:left center;mix-blend-mode:normal}
body.how-world .app-head>nav{display:none}body.how-world .menu-toggle{display:block}
body.how-world #main{padding:0}body.how-world #main.page{padding:20px 18px 28px;font-size:16px}
body.how-world .hero{margin:0;border:0;border-radius:0;background:var(--world-surface);overflow:hidden}
body.how-world .hero-art{position:relative;width:100%;height:auto;aspect-ratio:12/5;overflow:hidden;background:var(--world-panel)}
body.how-world .hero-art>img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
body.how-world .hero-copy{padding:16px 20px 19px;background:var(--world-surface);text-align:left;min-height:0}
body.how-world .kicker{font-size:11px;letter-spacing:2px;color:var(--world-accent);font-weight:850;line-height:1.5}
body.how-world .hero h1{font:italic 700 clamp(38px,11vw,53px)/1.15 Georgia,serif;margin:4px 0;color:var(--world-text)}
body.how-world .hero p{margin:0;color:var(--world-text);font:14px/1.5 system-ui,-apple-system,Segoe UI,sans-serif}
body.how-world .howbook-family-mark{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:14px;width:100%}
body.how-world .howbook-home-link{display:block;width:125px;flex:none}body.how-world .howbook-signature{display:block;width:100%;height:25px}
body.how-world .howbook-signature path{stroke:var(--world-text)}body.how-world .howbook-signature circle{fill:#ef4e47}
body.how-world .cohumai-link{display:block;flex:none;border-radius:50%;width:48px;height:48px}body.how-world .cohumai-link img{display:block;width:100%;height:100%;border-radius:50%}
body.how-world .home-city-picker{display:flex;justify-content:flex-end;padding:10px 18px 0;background:var(--world-surface)}
body.how-world .home-city-picker select{width:140px;min-width:140px;max-width:140px;padding:8px 12px;font-size:13px;line-height:1.5;margin:0;border:1px solid var(--world-border);background-color:var(--world-panel);color:var(--world-text);border-radius:10px}
body.how-world .main{padding:18px}
body.how-world .intro{width:100%;display:flex;align-items:center;gap:13px;background:var(--world-panel);border:1px solid var(--world-border);border-radius:15px;padding:11px;margin:0 0 8px;text-align:left;text-decoration:none;color:var(--world-text)}
body.how-world .intro .circle{width:75px;height:78px;border-radius:11px;overflow:hidden;flex:none;background:var(--world-surface)}
body.how-world .intro .circle img{width:100%;height:100%;object-fit:cover;object-position:50% 75%}
body.how-world .intro p{margin:0;font-size:12px;line-height:1.5;color:var(--world-muted)}body.how-world .intro strong{display:block;color:var(--world-text);font-size:15px;margin:0 0 3px;line-height:1.5}
body.how-world .section-title{font:700 24px Georgia,serif;margin:23px 0 13px}
body.how-world .menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
body.how-world .menu .tile{background:var(--world-panel);border:1px solid var(--world-border);border-radius:14px;min-height:106px;padding:14px;text-align:left;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:9px;color:var(--world-text);text-decoration:none;box-shadow:none;transition:none}
body.how-world .menu .tile:hover{transform:none}body.how-world .menu .tile svg{color:var(--world-accent);width:27px;height:27px;margin:0;flex:none}
body.how-world .menu .tile strong{font-size:15px;line-height:1.5;margin:0}body.how-world .menu .tile small{display:block;font-size:11px;line-height:1.5;color:var(--world-muted);margin-top:2px}
body.how-world .feature{background:var(--world-panel);border:1px solid var(--world-border);border-radius:15px;padding:18px;margin-top:23px}
body.how-world .feature h3{margin:5px 0;font:700 22px Georgia,serif}body.how-world .feature p{color:var(--world-muted);margin:6px 0 13px}
@media(min-width:560px){body.how-world .menu{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:390px){body.how-world .brand{max-width:190px}body.how-world .brand img,body.how-world .brand-logo{max-height:72px}body.how-world .top,body.how-world .app-head{min-height:84px}body.how-world .main{padding:13px}body.how-world .menu .tile{padding:12px}}
@media(min-width:800px){body.how-world .top,body.how-world .app-head{padding:12px 28px}body.how-world .hero-art{height:320px;aspect-ratio:auto}body.how-world .hero-copy{padding:22px 28px}body.how-world .home-city-picker{padding-right:28px}body.how-world .main{padding:24px 28px}body.how-world .menu{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}body.how-world .menu .tile{min-height:112px;padding:17px}body.how-world .menu .tile strong{font-size:17px}body.how-world .menu .tile small{font-size:13px}body.how-world .intro p{font-size:14px}}

body.how-world .home-city-picker select{height:37.3333px;box-sizing:border-box}

body.how-world .bottom,body.how-world .bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,1180px);height:64px;background:var(--world-panel);border:0;border-top:1px solid var(--world-border);border-radius:0;display:grid;grid-template-columns:repeat(4,1fr);z-index:999;padding:8px 5px 9px;box-shadow:none}body.how-world .bottom button,body.how-world .bottom-nav a{background:none;border:0;border-radius:0;color:var(--world-text);font-size:11px;display:grid;justify-items:center;align-content:center;gap:2px;min-width:62px;padding:0;line-height:1.5}body.how-world .bottom-nav a{font-size:22px;line-height:1}body.how-world .bottom-nav a span{font-size:11px;line-height:1.5}body.how-world .bottom-nav a[aria-current=page]{color:var(--world-accent);background:transparent}

body.how-world .hero h1[data-how-title]{white-space:nowrap;overflow:visible}

body.how-world .home-city-picker{padding-top:10px;padding-bottom:8px;overflow:visible}body.how-world .home-city-picker select{border:2px solid var(--world-accent);border-radius:12px;height:41px;min-width:145px;max-width:170px;box-shadow:none}body.how-world .home-city-picker select:focus-visible{outline:0;border-color:var(--world-accent);box-shadow:inset 0 0 0 1px var(--world-accent)}

body.how-world .home-city-picker{position:relative}body.how-world .home-city-picker:after{content:"";position:absolute;right:34px;top:25px;width:7px;height:7px;border:solid var(--world-accent);border-width:0 2px 2px 0;transform:rotate(45deg);pointer-events:none}body.how-world .home-city-picker select{width:215px;min-width:190px;max-width:230px;padding:8px 38px 8px 14px;appearance:none;background-image:none!important}@media(min-width:800px){body.how-world .home-city-picker:after{right:44px}}

/* A missing count must not push Mappa's copy below the other tiles. */
body.how-world .menu .tile{justify-content:flex-start}
body.how-world .menu .tile>div{width:100%;min-width:0}
/* Stretch the copy, not the description: counts share the bottom baseline. */
body.how-world .menu .tile>div{display:flex;flex:1;flex-direction:column}
body.how-world .menu .tile small{display:flex;flex:1;flex-direction:column;min-width:0}
body.how-world .menu .tile .demo-local-count{margin-top:auto;padding-top:7px}

/* Optional priority treatment uses each world's own palette. */
body.how-world .menu .tile[data-nav-emphasis=primary]{position:relative;background:var(--world-panel);border-color:var(--world-border);color:var(--world-text)}
body.how-world .menu .tile[data-nav-emphasis=primary]::after{content:"";position:absolute;top:0;right:16px;width:16px;height:25px;background:var(--world-accent);clip-path:polygon(0 0,100% 0,100% 100%,50% 77%,0 100%);pointer-events:none}
body.how-world .menu .tile[data-nav-emphasis=primary] :is(svg,.demo-local-count){color:var(--world-accent)}
body.how-world .menu .tile[data-nav-emphasis=primary] strong{color:var(--world-text)}
body.how-world .menu .tile[data-nav-emphasis=primary] small{color:var(--world-muted)}
body.how-world .menu .tile[data-nav-emphasis=primary]:is(:focus,:focus-visible){outline:none;box-shadow:none}
body.how-world .howbook-family-menu .tile{background:var(--world-surface);border-color:var(--world-accent);border-top-width:3px}
body.how-world .howbook-family-menu .tile strong{color:var(--world-accent)}
/* Shared language dropdown: real SVG flags, same interaction as the travel guide. */
body.how-world .language-picker{position:relative;flex:none;margin-left:auto}
body.how-world .language-toggle{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 10px;background:var(--world-panel);color:var(--world-text);border:1px solid var(--world-border);border-radius:11px;font-family:inherit;font-weight:600;font-size:14px;line-height:1.3;cursor:pointer}
body.how-world .language-flag{display:block;flex:none;width:24px;height:16px;box-shadow:0 0 0 1px #ffffff55;border-radius:2px;overflow:hidden}
body.how-world .language-menu{position:absolute;top:calc(100% + 6px);right:0;z-index:2500;min-width:170px;max-width:calc(100vw - 32px);padding:6px;border:1px solid var(--world-border);border-radius:12px;background:var(--world-panel);box-shadow:0 8px 26px #0007}
body.how-world .language-menu[hidden]{display:none}
body.how-world .language-menu button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px;border:0;border-radius:8px;background:transparent;color:var(--world-text);text-align:left;font:inherit;cursor:pointer}
body.how-world .language-menu button:is(:hover,:focus-visible,[aria-checked=true]){background:var(--world-surface)}
@media(max-width:380px){body.how-world .language-toggle{font-size:13px;gap:6px;padding:8px}.world-configurable-demo .brand{max-width:120px}}

body.how-world .hero-art{position:relative}
body.how-world .hero-media-note{position:absolute;bottom:5px;right:8px;left:auto;max-width:calc(100% - 16px);padding:1px 3px;border-radius:0;background:transparent;color:#fff;text-shadow:0 1px 3px #001528,0 0 2px #001528;font-size:11px;line-height:1.3}
body.how-world .demo-visual-credits{margin:8px 0 20px;font-size:13px;line-height:1.6;color:var(--world-muted)}
body.how-world .demo-visual-credits summary{cursor:pointer;width:fit-content}
body.how-world .demo-visual-credits p{margin:10px 0;font-size:13px;line-height:1.6}
body.how-world .demo-visual-credits a{color:var(--world-text)}
/* Route changes open at the top immediately; manual galleries keep their own scrolling. */
html:has(body.how-world){scroll-behavior:auto!important}
body.how-world .language-toggle .language-chevron{display:block;flex:none;width:12px;height:12px;align-self:center;margin:0 1px}
/* Compact common context control: same visual language as the language menu. */
body.how-world .home-city-picker{padding:8px 20px 0}
body.how-world .home-city-picker select{width:202px;min-width:0;max-width:100%;height:44px;padding:8px 34px 8px 12px;border:1px solid var(--world-border);border-radius:11px;font:600 14px/1.3 system-ui,-apple-system,Segoe UI,sans-serif;color:var(--world-text);background-color:var(--world-panel)}
body.how-world .home-city-picker:after{right:34px;top:26px;width:7px;height:7px;transform:translateY(-50%) rotate(45deg);border-color:var(--world-text)}
body.how-world .hero-copy{padding-top:10px;padding-bottom:14px}
@media(min-width:800px){body.how-world .home-city-picker{padding-right:28px}body.how-world .home-city-picker:after{right:42px}}

/* Keep the initial title within its real content width, before hydration. */
body.how-world .hero-copy{container-type:inline-size}
body.how-world .hero h1[data-how-title]{font-size:clamp(20px,min(11cqw,calc(185cqw / var(--world-title-length,18))),53px)}
/* Context picker follows the header menu's right edge on every viewport. */
body.how-world{--world-control-gutter:12px}
body.how-world :is(.top,.app-head,.home-city-picker){padding-right:var(--world-control-gutter)}
body.how-world .home-city-picker:after{right:calc(var(--world-control-gutter) + 14px)}
@media(min-width:800px){body.how-world{--world-control-gutter:28px}}
/* Compact, manual home showcase; source selection remains in each world's JSON. */
body.how-world .world-home-spotlight{position:relative;margin:0 0 12px;padding:8px 12px 10px;border:1px solid var(--world-border);border-radius:15px;background:var(--world-panel);color:var(--world-text)}
body.how-world .world-spotlight-kicker{position:absolute;top:21px;left:14px;margin:0;font-size:14px;line-height:1.3;font-weight:700;color:var(--world-text)}
body.how-world .world-home-spotlight .manual-gallery-controls{min-height:44px;margin:0 0 6px;gap:8px}
body.how-world .world-home-spotlight .manual-gallery-controls button{width:38px;height:38px;font-size:20px}
body.how-world .world-home-spotlight [data-gallery-count]{min-width:38px;font-size:13px}
body.how-world .world-spotlight-item{display:grid;grid-template-columns:68px minmax(0,1fr);align-items:stretch;gap:12px;min-height:68px;padding:0;text-decoration:none;color:var(--world-text)}
body.how-world .world-spotlight-thumb{position:relative;display:grid;place-items:center;width:68px;min-height:68px;align-self:stretch;overflow:hidden;border-radius:10px;background:var(--world-identity-panel,var(--world-panel));color:var(--world-identity-accent,var(--world-accent))}
body.how-world .world-spotlight-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
body.how-world .world-spotlight-thumb svg{width:29px;height:29px}
body.how-world .world-spotlight-copy{display:flex;flex-direction:column;gap:4px;min-width:0;min-height:68px}
body.how-world .world-spotlight-copy small{font-size:11px;line-height:1.4;color:var(--world-muted)}
body.how-world .world-spotlight-copy strong{font-size:18px;line-height:1.35;min-height:0;max-height:2.7em;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
body.how-world .world-spotlight-copy>span{margin-top:auto;font-size:13px;line-height:1.5;min-height:1.5em;max-height:3em;overflow:hidden;color:var(--world-muted)}
body.how-world .world-home-spotlight:has(.world-spotlight-fallback) .manual-gallery{padding-top:43px}
body.how-world .world-spotlight-empty{padding-top:54px}
body.how-world .world-spotlight-empty>a{display:block;min-height:44px;font-size:15px;color:var(--world-text)}

body.how-world .world-home-spotlight[data-spotlight-scope=fallback-all] .world-spotlight-kicker{top:12px;max-width:calc(100% - 155px);line-height:1.35}

/* Locality context sits under HOWBOOK, flush with the bottom of the seals. */
body.how-world .howbook-family-mark:has(.howbook-family-copy){align-items:flex-end}
body.how-world .howbook-family-copy{display:flex;flex:1;min-width:0;flex-direction:column;align-items:flex-start;gap:6px}
body.how-world .hero .world-context-label{margin:0;padding:0;border:0;background:transparent;font:14px/1.5 system-ui,-apple-system,Segoe UI,sans-serif;color:var(--world-identity-accent,var(--world-accent));overflow-wrap:break-word}
/* Header controls share one hit area, independent of glyph line-height. */
body.how-world .app-head :is(.language-toggle,.menu-toggle){box-sizing:border-box;height:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;margin-block:0}
body.how-world .app-head .menu-toggle{width:44px;min-width:44px;flex:0 0 44px;padding:0;line-height:1;border-radius:11px}
/* Reusable themed quick-navigation picker; open list uses the paper reading palette. */
.world-content-picker{position:relative;flex:1;min-width:0;text-align:left}
body.how-world .world-content-picker-toggle{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;padding:10px 14px;border:1px solid var(--world-border);border-radius:11px;background:var(--world-panel);color:var(--world-text);font-family:inherit;font-size:14px;font-weight:600;line-height:1.3;cursor:pointer}
.world-content-picker-toggle span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.world-content-picker-toggle svg{flex:none}
.world-content-picker-menu{position:absolute;z-index:2400;top:calc(100% + 6px);right:0;width:max-content;min-width:100%;max-width:min(320px,calc(100vw - 24px));max-height:60dvh;overflow-y:auto;padding:6px;border:1px solid var(--world-reading-border,#ced9de);border-radius:12px;background:var(--world-reading-surface,#fffcf5);color:var(--world-reading-text,#001c37);box-shadow:0 8px 26px #0005;color-scheme:light}
.world-content-picker-menu[hidden]{display:none}
.world-content-picker-menu button{box-sizing:border-box;display:block;width:100%;min-height:44px;padding:10px 14px;border:0;border-radius:7px;background:transparent;color:inherit;text-align:left;font:500 15px/1.4 system-ui;cursor:pointer}
.world-content-picker-menu button:is(:hover,:focus-visible){background:var(--world-reading-panel,#f1f3f0);outline:2px solid var(--world-reading-accent,#00345b);outline-offset:-2px}
.home-city-picker select[hidden]{display:none!important}

/* Equal implicit rows keep all navigation tiles the same size, including long labels. */
body.how-world .menu{grid-auto-rows:1fr}
body.how-world .menu .tile{box-sizing:border-box;height:100%;text-align:left}
/* Persistent navigation shares the identity chrome and extends through device safe areas. */
body.how-world .bottom-nav{box-sizing:border-box;height:calc(64px + env(safe-area-inset-bottom));padding-bottom:calc(9px + env(safe-area-inset-bottom));background:var(--world-surface)}
body.how-world .bottom-nav a{min-width:0;text-decoration:none}
body.how-world .bottom-nav a[aria-current=page]{background:var(--world-panel);border-radius:11px;color:var(--world-identity-accent,var(--world-accent))}
body.how-world:has(.bottom-nav:not(:empty)) .site-foot{padding-bottom:calc(90px + env(safe-area-inset-bottom))}
/* Menus must escape the hero clipping used for artwork. */
body.how-world .hero:has(.world-content-picker){overflow:visible}
.world-content-picker-menu{box-sizing:border-box;overscroll-behavior:contain;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch}
