/* Home and the public Library share a centered, floating panel layout. */
#library{left:50%;right:auto;transform:translateX(-50%)}
.store-browser{left:50%;transform:translateX(-50%);top:16px;bottom:83px;width:min(1120px,calc(100vw - 24px));padding:18px;display:flex;flex-direction:column;gap:14px;color:var(--ink)}
.store-browser[hidden]{display:none}
.store-browser .popup-heading{margin:0;flex-shrink:0}.store-browser h2{margin:0}
.store-body{display:grid;grid-template-columns:170px minmax(0,1fr);gap:20px;flex:1;min-height:0}
.store-nav{display:flex;flex-direction:column;gap:8px;border-right:1px solid var(--line);padding-right:16px;overflow:auto}
.store-nav button{text-align:left;justify-content:flex-start;min-height:44px}
.store-nav button[aria-pressed=true]{background:var(--selected);color:var(--accent)}
.store-browser a{color:var(--accent);min-height:44px;display:inline-flex;align-items:center;text-decoration:none;padding:8px 0}
.store-main{display:flex;flex-direction:column;min-height:0;min-width:0}
.store-filters{display:flex;gap:10px;flex-shrink:0;margin-bottom:10px}.store-filters input[type=search]{flex:1;min-width:0;margin:0}.store-filters select{max-width:40%;min-height:44px}
.store-filters[hidden]{display:none}.store-status{margin:8px 0;flex-shrink:0}.store-status:empty{margin:0}
.store-content{overflow:auto;min-height:0;flex:1;padding:4px 6px 4px 0;overscroll-behavior:contain}
.store-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.store-card{display:flex;flex-direction:column;align-items:stretch;text-align:left;justify-content:flex-start;min-width:0;padding:0;overflow:hidden;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink)}
.store-card img{width:100%;aspect-ratio:5/3;object-fit:contain;background:var(--page)}
.store-card-copy{display:flex;flex-direction:column;gap:6px;padding:12px;overflow-wrap:anywhere}.store-card strong{font-size:15px}.store-card span,.store-card small{font-size:12px;color:var(--muted)}
.store-featured-row{display:flex;gap:12px;overflow-x:auto;margin-bottom:18px;padding-bottom:8px}.store-featured{flex:0 0 min(400px,90%);background:var(--selected)}
.store-pages{display:flex;align-items:center;justify-content:center;gap:12px;margin:18px 0}.store-pages button{min-height:44px}
.store-detail{display:grid;grid-template-columns:1.1fr 1fr;gap:22px;margin-top:18px}.store-detail>img{width:100%;object-fit:contain;border-radius:14px;background:var(--page)}.store-detail h3{font-size:24px;margin:10px 0}.store-detail p{line-height:1.6;overflow-wrap:anywhere}.store-description{white-space:pre-wrap}.store-detail button{min-height:44px;display:block}.store-empty{padding:30px 10px;text-align:center}
@media(max-width:850px){.store-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.store-body{grid-template-columns:130px minmax(0,1fr);gap:12px}}
@media(max-width:720px){.store-browser{bottom:76px;padding:14px}.store-body{display:flex;flex-direction:column;gap:12px}.store-nav{flex-direction:row;border-right:0;border-bottom:1px solid var(--line);padding:0 0 8px;flex-shrink:0}.store-nav>*{flex-shrink:0;white-space:nowrap}.store-main{flex:1}.store-detail{grid-template-columns:1fr}.store-grid{gap:8px}.store-filters{gap:6px}.store-card-copy{padding:9px}}

.store-nav>a:last-child{margin-top:auto}
.store-slideshow{border:1px solid var(--line);border-radius:16px;background:var(--selected);padding:18px;margin-bottom:18px}
.store-slide{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:center}.store-slide[hidden]{display:none}.store-slide h3{font-size:24px;margin:10px 0}.store-slide p{line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.store-slide img{width:100%;aspect-ratio:5/3;object-fit:contain;border-radius:12px}.store-slide-controls{display:flex;gap:10px;align-items:center;justify-content:flex-end;margin-top:12px}.store-slide-controls[hidden]{display:none}.store-slide-controls button{min-height:44px}.store-add{margin-bottom:10px}
@media(max-width:720px){.store-nav>a:last-child{margin-top:0;margin-left:auto}.store-slide{grid-template-columns:1fr}.store-slide>img{max-height:180px;grid-row:1}.store-slide h3{font-size:20px}.store-slide-controls{gap:6px;justify-content:center}}

.store-filters{flex-wrap:wrap}.store-filters input[type=search]{flex:1 1 220px}.store-filters select{min-width:0;flex:0 1 auto;max-width:100%}@media(max-width:720px){.store-filters input[type=search]{flex-basis:100%}.store-filters select{flex:1 1 130px}}
