/* La Piazza — approved stamp navigation, shared with the existing app shell. */
:root{--nav:88px}
.piazza-brand{display:none;align-items:center;gap:18px;color:var(--ink);text-decoration:none;min-height:64px}
.piazza-brand img{width:62px;height:62px;object-fit:contain;border-radius:50%}
.piazza-brand span{font:700 .79rem 'Barlow Condensed',sans-serif;letter-spacing:.2em}
.piazza-open .topbar{height:96px;padding:16px 20px}
.piazza-open .topbar>.piazza-brand{display:flex}
.piazza-open .topbar>.eyebrow,.piazza-open .topbar>#searchButton,.piazza-open .topbar>#installButton{display:none}
.piazza-heading{padding:16px 20px 20px}
.piazza-heading>small{color:var(--electric);font:700 .8rem Inter,sans-serif;letter-spacing:.32em}
.piazza-heading h1{font:900 clamp(3.2rem,16.2vw,4.4rem)/.96 'Barlow Condensed',sans-serif;letter-spacing:-.02em;margin:14px 0 16px}
.piazza-heading p{font:400 1rem/1.45 Inter,sans-serif;color:#c2cddd;margin:0}
.piazza-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0 10px}
.piazza-entry{min-width:0;min-height:146px;padding:12px 5px 10px;color:var(--ink);text-decoration:none;text-align:center;display:flex;align-items:center;flex-direction:column;position:relative;border-bottom:1px solid var(--line);transition:background .18s ease,color .18s ease}
.piazza-entry:not(:nth-child(3n)){border-right:1px solid var(--line)}
.piazza-entry:nth-last-child(-n+3){border-bottom:0}
.piazza-entry strong{font:700 1.1rem/1.2 'Barlow Condensed',sans-serif;margin-top:6px;white-space:nowrap}
.piazza-entry small{font:400 .69rem/1.2 Inter,sans-serif;color:#a7b8ca;margin-top:4px}
.piazza-entry.piazza-featured{background:#0879ff19;border-radius:9px;color:var(--electric)}
.stamp-icon{display:block;flex:none;width:96px;height:96px;background-image:url('/assets/navigation/stamp-atlas.png');background-size:300% 300%;background-repeat:no-repeat}
.stamp-0{background-position:0 0}.stamp-1{background-position:50% 0}.stamp-2{background-position:100% 0}.stamp-3{background-position:0 50%}.stamp-4{background-position:50% 50%}.stamp-5{background-position:100% 50%}.stamp-6{background-position:0 100%}.stamp-7{background-position:50% 100%}.stamp-8{background-position:100% 100%}
.piazza-entry:active .stamp-icon{transform:rotate(-5deg) scale(.9)}
.piazza-entry .stamp-icon{transition:transform .18s ease}
.piazza-entry:hover{background:#0a2440;color:#40adff}
.piazza-utilities{display:flex;align-items:center;justify-content:center;gap:24px;margin:10px 20px 0;padding:8px 0;border-top:1px solid var(--line)}
.piazza-utilities a,.piazza-utilities button{display:grid;place-items:center;min-height:44px;background:none;border:0;color:#a4bad0;text-decoration:none;font:600 .75rem Inter,sans-serif;padding:4px}
.bottom-nav{height:calc(var(--nav) + env(safe-area-inset-bottom));padding:7px 6px env(safe-area-inset-bottom);border-top:1px solid #176dc0;box-shadow:none;overflow:visible}
.bottom-nav a{min-height:70px;gap:4px;border-radius:0;font:600 .72rem Inter,sans-serif;color:#b3c1d0;background:none!important}
.bottom-nav a.active{color:#27a2ff}
.bottom-nav a.active:before{display:none}
.bottom-nav a .stamp-icon{width:36px;height:36px}
.bottom-nav a .nav-label{font-size:.72rem;line-height:1.3}
.bottom-nav .piazza-launcher{padding-top:32px;position:relative}
.piazza-launcher>img{position:absolute;top:-22px;width:58px;height:58px;padding:16px;background:#0879ff;border:2px solid #32a4ff;border-radius:50%;box-shadow:0 0 20px #0879ff55;filter:none}
.bottom-nav .piazza-launcher .nav-label{color:#fff;font-weight:700}
.bottom-nav .piazza-launcher.active>img{box-shadow:0 0 24px #0879ff77}
.pulse-mini{bottom:calc(var(--nav) + env(safe-area-inset-bottom) + 16px);border-radius:0;width:min(520px,100%);border-left:0;border-right:0;background:#061525;padding:10px 14px 5px;box-shadow:none}
.has-player .app-shell{padding-bottom:calc(var(--nav) + env(safe-area-inset-bottom) + 125px)}
.has-player #piazza{padding-bottom:0}
.filter-row{display:flex;flex-wrap:wrap;overflow:visible;gap:7px;padding:18px 22px 8px}
.filter{min-height:44px;min-width:42px;padding:9px 13px;font-size:.85rem;border-radius:8px}
.archive-count{margin:12px 22px;color:#96afc7;font:400 .8rem/1.5 Inter,sans-serif}
.archive-empty{font-size:.9rem;color:#b3c6d7;padding:20px 0;line-height:1.5}
.piazza-entry:focus-visible,.bottom-nav a:focus-visible,.piazza-utilities :focus-visible,.filter:focus-visible{outline:2px solid #56baff;outline-offset:-3px}
@media(min-width:700px){.piazza-heading{padding-top:20px;padding-bottom:24px}.piazza-grid{margin:0 12px}.piazza-entry{min-height:174px;padding-top:16px}.piazza-entry .stamp-icon{width:116px;height:116px}.piazza-entry strong{font-size:1.3rem}.piazza-brand{gap:20px}.piazza-brand img{width:72px;height:72px}.piazza-open .topbar{height:112px}.piazza-heading h1{font-size:4.7rem}}
@media(max-width:359px){.piazza-brand{gap:12px}.piazza-brand img{width:54px;height:54px}.piazza-brand span{font-size:.69rem}.piazza-entry .stamp-icon{width:80px;height:80px}.piazza-entry{min-height:134px}.piazza-entry strong{font-size:1rem}.piazza-heading h1{font-size:3.2rem}}
@media(prefers-reduced-motion:reduce){.piazza-entry,.piazza-entry .stamp-icon{transition:none}.piazza-entry:active .stamp-icon{transform:none}}
/* Optical atlas crops: each measured stamp uses the same 328px source square. */
.stamp-icon{background-size:382.317% 382.317%}
.stamp-0{background-position:6.59% 8.75%}.stamp-1{background-position:50% 8.75%}.stamp-2{background-position:93.52% 8.75%}.stamp-3{background-position:6.59% 51.4%}.stamp-4{background-position:50% 51.4%}.stamp-5{background-position:93.52% 51.4%}.stamp-6{background-position:6.59% 92.44%}.stamp-7{background-position:50% 92.44%}.stamp-8{background-position:93.52% 92.44%}
@media(max-width:699px){.piazza-open .topbar{height:82px;padding:12px 20px}.piazza-brand img{width:58px;height:58px}.piazza-heading{padding:12px 20px 18px}.piazza-heading h1{font-size:clamp(2.6rem,11.8vw,3.15rem);line-height:.96;margin:10px 0 12px}.piazza-heading p{font-size:.95rem}.piazza-grid .piazza-entry{min-height:142px;padding:10px 5px 8px}.piazza-grid .stamp-icon{width:92px;height:92px}.piazza-entry strong{font-size:1.1rem}.has-player .piazza-grid .piazza-entry{min-height:136px}.has-player .piazza-grid .stamp-icon{width:86px;height:86px}}
/* Size by the app's own width, including the desktop preview shell. */
.app-shell{container-type:inline-size}
.piazza-open .topbar{height:clamp(78px,20cqw,98px);padding:12px 20px}
.piazza-brand img{width:clamp(56px,14.8cqw,74px);height:clamp(56px,14.8cqw,74px)}
.piazza-heading{padding:12px 20px 18px}
.piazza-heading h1{font-size:clamp(44px,12cqw,62px);line-height:.96;margin:10px 0 12px}
.piazza-grid .piazza-entry{min-height:clamp(136px,30cqw,157px);padding:10px 5px 8px}
.piazza-grid .stamp-icon{width:clamp(86px,22cqw,110px);height:clamp(86px,22cqw,110px)}
.piazza-grid .piazza-entry strong{font-size:clamp(17px,4cqw,21px)}
.piazza-open.has-player .topbar{height:clamp(74px,18cqw,90px)}
.has-player .piazza-heading{padding-top:8px;padding-bottom:12px}
.has-player .piazza-heading h1{font-size:clamp(40px,10cqw,52px);margin:8px 0 10px}
.has-player .piazza-grid .piazza-entry{min-height:clamp(130px,28cqw,146px)}
.has-player .piazza-grid .stamp-icon{width:clamp(82px,20cqw,100px);height:clamp(82px,20cqw,100px)}
/* Reserve the subtitle row and keep all nine labels clear of the dock. */
.has-player .piazza-grid .piazza-entry{min-height:clamp(126px,26cqw,136px);padding:8px 5px 6px}
.has-player .piazza-grid .stamp-icon{width:clamp(78px,17cqw,90px);height:clamp(78px,17cqw,90px)}

/* 2.3: one viewport, nine pictograms, and an audio strip with reserved space. */
:root{--player-reserve:0px}
body.has-player{--player-reserve:44px}
body.has-player:not(.player-compact){--player-reserve:92px}
body .app-shell,body.has-player .app-shell{padding-bottom:calc(var(--nav) + env(safe-area-inset-bottom) + var(--player-reserve) + 16px)}
body .pulse-mini,body.has-music-player .pulse-mini{bottom:calc(var(--nav) + env(safe-area-inset-bottom));width:min(520px,100%);height:92px;box-sizing:border-box;padding:6px 10px 2px;grid-template-columns:minmax(0,1fr) 42px 36px 36px;gap:5px;border-radius:0;border-inline:0;background:#061525;box-shadow:none}
.pulse-mini #miniMinimize,.pulse-mini #miniExpand{width:36px;height:36px}
.pulse-mini #miniToggle{width:40px;height:40px}
body.player-compact .pulse-mini{height:44px;padding:2px 8px;gap:4px}
.player-compact .pulse-summary img,.player-compact #miniTime,.player-compact #miniSeek{display:none}
.player-compact .pulse-summary{height:38px}
.player-compact .pulse-summary b{font-size:.75rem}
.player-compact #miniMinimize svg{transform:rotate(180deg)}
body.has-player .piazza-launcher>img{top:3px;width:40px;height:40px;padding:10px;box-shadow:none}
body.piazza-open{padding:0;overflow:hidden}
body.piazza-open .topbar{display:none}
body.piazza-open .app-shell{height:100vh;height:100dvh;min-height:0;display:flex;flex-direction:column;padding:0;border-radius:0}
body.piazza-open main{flex:1;min-height:0}
/* Compact square grid, centered as a whole in the usable content viewport. */
body.piazza-open #piazza.active-view{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;height:100%;padding:24px 16px calc(var(--nav) + env(safe-area-inset-bottom) + var(--player-reserve) + 24px)}
body.piazza-open .piazza-grid{flex:none;min-height:0;margin:0;width:min(100%,400px,calc(100dvh - var(--nav) - env(safe-area-inset-bottom) - var(--player-reserve) - 48px));aspect-ratio:1;grid-template-rows:repeat(3,minmax(0,1fr))}
body.piazza-open .piazza-grid .piazza-entry{min-height:0;min-width:0;padding:5px;align-items:center;justify-content:center}
body.piazza-open .piazza-grid .piazza-entry .stamp-icon{width:76%;height:auto;aspect-ratio:1;max-width:84px;max-height:none}
body.piazza-open .piazza-entry strong{margin:0}

/* 2.6 layout corrections from device review. */
body.piazza-open #piazza{position:relative;isolation:isolate;background:linear-gradient(#04132255,#041322aa),url('/assets/piazza-tre-martiri.png') center/cover no-repeat}
body.piazza-open .piazza-grid .piazza-entry{border:0!important;background:transparent;box-shadow:none}
body.piazza-open .piazza-grid{gap:12px}
body.piazza-open .piazza-entry:hover{background:#06152555;border-radius:18px}
#heroEpisode{position:relative;margin-top:0;padding-top:24px;overflow:visible;isolation:isolate}
.hero-meta{flex-wrap:wrap;gap:8px;line-height:1.5;position:relative;z-index:1}
.hero-title{line-height:1.02;margin-top:18px;overflow-wrap:anywhere}
.episode-description{margin:16px 0;color:#b8c9d8;line-height:1.6;font-size:.92rem}
.episode-description summary{cursor:pointer;min-height:44px;padding:10px 0;color:#65baff;font-weight:600}
.episode-description p{white-space:pre-line;overflow-wrap:anywhere;margin:8px 0 20px;display:block;-webkit-line-clamp:unset}
.episode-title-button,.episode-row .episode-title-button{display:block;width:100%;height:auto;min-height:44px;text-align:left;color:inherit;font:inherit;background:none;border:0;border-radius:0;padding:4px 0}
.pulse-sheet{top:calc(env(safe-area-inset-top) + 8px);bottom:calc(var(--nav) + env(safe-area-inset-bottom) + 8px);height:auto;max-height:none;box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;padding:0 20px 24px;scroll-padding-top:72px}
.pulse-handle{display:none}
.pulse-header{position:sticky;top:0;z-index:2;min-height:64px;margin:0 0 16px;padding:10px 0;background:#071b2c;border-bottom:1px solid #245574;gap:12px}
.pulse-header #collapsePlayer{display:flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto;width:auto;min-height:44px;padding:0 12px;border:1px solid #4288b8;border-radius:24px;background:#0c3150;color:#fff;font:600 .82rem Inter,system-ui,sans-serif}
.pulse-header #collapsePlayer svg{flex:none}

.pulse-track{display:flex;flex-direction:column;text-align:center;gap:18px}
.pulse-track #playerCover{width:min(58vw,230px);height:min(58vw,230px);border-radius:50%;object-fit:cover;border:7px solid #0879ff;outline:2px solid #27668c;box-shadow:0 0 35px #0879ff40}
.pulse-track h2{line-height:1.12;overflow-wrap:anywhere}
.pulse-sheet .pulse-controls{margin-block:24px}
.quotes-filters{gap:12px;margin-bottom:20px;flex-wrap:wrap}
.quote-actions{gap:12px;margin-block:20px 24px}
.quote-deck,.quote-carousel{margin-top:20px}
.content-share img,#quoteShare img,#orbitShare img{filter:brightness(0) invert(1);width:22px;height:22px}
.bottom-nav{column-gap:8px;padding-inline:12px}
.bottom-nav a{min-width:0}
#home .brand-stage{overflow:hidden}
.pulse-track #playerCover{padding:7px;border:0;background:conic-gradient(#32aaff var(--audio-progress,0%),#143752 0);outline-offset:2px}
@media(max-width:360px){.quote-actions{flex-wrap:wrap}.quote-actions button{flex:1 1 135px}.bottom-nav{column-gap:4px;padding-inline:6px}}

@media(max-height:700px){.pulse-track #playerCover{width:min(42vw,160px);height:min(42vw,160px)}.pulse-track{gap:10px}}
