/* Compact search and categories; additional filters open on demand. */
.discovery-controls{display:block;margin:0 0 24px}
.discovery-controls>form{position:relative;display:grid;grid-template-columns:minmax(240px,.85fr) minmax(0,1.4fr) auto auto;gap:16px;align-items:center;width:100%;margin:0}
.discovery-controls .search{display:flex;align-items:center;gap:10px;min-width:0;max-width:none;height:44px;padding:0 14px;background:#242424bd;border:1px solid #8e958858;border-radius:6px}
.discovery-controls .search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:inherit;font:inherit;padding:10px 0;font-size:15px}
#hall-search-form #world-search{border:0;border-radius:0;background:none;box-shadow:none}
.discovery-controls .filter-tabs{display:flex;min-width:0;gap:7px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding:4px 1px}
.discovery-controls .filter{flex:none;min-height:38px;padding:7px 14px;font-size:14px;line-height:1.5;white-space:nowrap;border-radius:6px;background:#2424248c;border:1px solid #737b694d;color:#d9ded2}
.discovery-controls .filter.active{background:var(--accent);color:#182009;border-color:var(--accent);font-weight:800}
.discovery-controls .story-count{font-size:13px;color:#adb3a4;white-space:nowrap}
.discovery-advanced{position:relative}
.discovery-advanced>summary{display:flex;align-items:center;gap:6px;list-style:none;min-height:40px;padding:8px 10px;border:1px solid #737b694d;border-radius:6px;cursor:pointer;font-size:14px;color:#d9ded2}
.discovery-advanced>summary::-webkit-details-marker{display:none}
.discovery-advanced[open]>summary{border-color:var(--accent);color:var(--accent)}
.discovery-advanced>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.discovery-options{position:absolute;top:calc(100% + 10px);right:0;z-index:12;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;width:min(520px,calc(100vw - 32px));padding:20px;margin:0;background:#202020fd;border:1px solid #737b6980;border-radius:8px;box-shadow:0 14px 40px #0008}
.discovery-options label{display:flex;flex-direction:column;gap:7px;font-size:14px;min-width:0}
.discovery-options select,.discovery-options input{width:100%;box-sizing:border-box;min-height:44px;border:1px solid #64727b77;border-radius:6px;background:#141414;color:#e9e7df;padding:10px 12px;font:inherit}
.discovery-hint{grid-column:1/-1;display:block;line-height:1.7;color:#a2a8ac;margin:0;font-size:12px}
.discovery-preferences{margin-top:24px}
.discovery-preferences .field-row{align-items:start}
.discovery-preferences textarea{min-height:130px}
#p-new-script-form .template-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
.template-workflow{margin:12px 0 0;padding-left:22px;color:#acb3b9;font-size:12px;line-height:1.8}
.template-workflow li+li{margin-top:5px}

body[data-page="home"]{background:radial-gradient(ellipse at 88% 0,#ffffff03,transparent 60%),#141414;font-family:"Microsoft YaHei","PingFang SC","Noto Sans SC",sans-serif}
body[data-page="home"] .main{max-width:none;width:100%;padding:0 24px 40px;margin:0}
body[data-page="home"] .topbar{height:68px;min-height:68px;background:#151515ed;border-bottom:1px solid #45454544}
body[data-page="home"] .site-nav{gap:44px}
body[data-page="home"] .site-nav button{font-size:20px;min-width:58px;font-weight:800}
body[data-page="home"] .top-actions{height:68px;right:18px}
body[data-page="home"] .sidebar{background:linear-gradient(150deg,#111111,#1a1a1a);backdrop-filter:none}
body[data-page="home"] .featured-section{margin:0;padding:0;border-radius:3px;box-shadow:none;background:#131313}
body[data-page="home"] .feature-cycle{gap:12px;padding-right:12px}
body[data-page="home"] .home-manifesto{margin:0;padding:12px 0 14px;gap:22px}
body[data-page="home"] .home-manifesto h1{font-size:clamp(34px,3.9vw,65px);line-height:1.35;letter-spacing:-1px;font-weight:900}
body[data-page="home"] .hall-section{margin-top:26px}
body[data-page="home"] .world-grid.obsidian-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
body[data-page="home"] .hall-section .section-title h2{font-family:inherit;font-weight:800}
body[data-page="home"] .glass-story-card{border-radius:4px;background:#131313;border-color:#6565652a;box-shadow:none}
body[data-page="home"] .glass-story-card:hover{transform:none;border-color:#ff93ab88}
body[data-page="home"] .glass-story-card .shelf-overlay{background:linear-gradient(0deg,#0e0e0ef7 0%,#0e0e0edf 65%,#0e0e0e75 88%,transparent)}
body[data-page="home"] .glass-story-card .shelf-title h2{font-size:21px;line-height:1.35}
body[data-page="home"] .glass-story-card .shelf-description{font-size:14px;line-height:1.65}
body[data-page="home"] .glass-story-card .shelf-genres span{font-size:12px}
@media(max-width:1100px){
 body[data-page="home"] .world-grid.obsidian-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
 .discovery-controls>form{grid-template-columns:minmax(200px,.9fr) minmax(0,1.2fr) auto;gap:10px}
 .discovery-controls .story-count{display:none}
 body[data-page="home"] .site-nav{gap:20px}
 body[data-page="home"] .site-nav button{font-size:18px;min-width:48px}
}
@media(max-width:720px){
 body[data-page="home"] .world-grid.obsidian-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .discovery-controls>form{grid-template-columns:minmax(0,1fr) auto;gap:10px}
 .discovery-controls .search{grid-column:1/-1;height:44px}
 .discovery-controls .search input{font-size:16px}
 .discovery-controls .filter-tabs{grid-column:1}
 .discovery-controls .filter{font-size:14px;padding:7px 12px}
 .discovery-options{width:min(360px,calc(100vw - 32px));padding:16px;gap:12px}
 .discovery-options label{font-size:13px}
 #p-new-script-form .template-grid{grid-template-columns:1fr}
 .template-workflow{font-size:13px}
 body[data-page="home"] .main{padding:0 16px 32px}
 body[data-page="home"] .topbar{height:auto;min-height:102px}
 body[data-page="home"] .site-nav{gap:0;justify-content:space-around}
 body[data-page="home"] .site-nav button{font-size:15px;min-width:0}
 body[data-page="home"] .top-actions{height:52px;right:12px}
 body[data-page="home"] .home-manifesto{padding:16px 0;gap:0}
 body[data-page="home"] .home-manifesto h1{white-space:normal;font-size:clamp(29px,7.8vw,38px);letter-spacing:0}
 body[data-page="home"] .mobile-break{display:block}
 body[data-page="home"] .hall-section{margin-top:22px}
 body[data-page="home"] .glass-story-card .shelf-title h2{font-size:16px}
 body[data-page="home"] .glass-story-card .shelf-description{font-size:12px}
 body[data-page="home"] .glass-story-card .shelf-genres span{font-size:10px}
}
