/* Signed-in homepage "全部工具" (Codex design 2026-09-30) inside the workspace frame; colours from theme-dark.css. */
.tools-home{min-width:0;padding-bottom:8px}
.tools-home .th-heading{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:16px;min-height:72px;padding:12px 0 8px}
.tools-home .th-heading h1{font-size:26px;line-height:34px;margin:0}
.tools-home .th-heading p{margin:4px 0 0;color:var(--muted);font-size:14px}
.tools-home .th-cta{flex:none;height:38px;min-height:38px;padding:0 16px;white-space:nowrap}
.th-filterbar{display:flex;align-items:center;gap:12px;margin:8px 0 12px;flex-wrap:wrap}
.th-filters{display:flex;gap:8px;flex-wrap:wrap}
.th-filter{height:36px;padding:0 14px;border:1px solid var(--border);border-radius:6px;background:var(--subtle);color:var(--muted);font:inherit;font-size:14px;cursor:pointer;white-space:nowrap}
.th-filter:hover{color:var(--text);border-color:#737a85}
.th-filter.active{background:var(--text);border-color:var(--text);color:#15171a}
.th-filter span{opacity:.7;padding-left:2px}
.th-search{height:36px;width:240px;max-width:100%;display:flex;align-items:center;gap:8px;margin-left:auto;border:1px solid var(--border);border-radius:6px;background:var(--subtle);padding:0 10px}
.th-search:focus-within{border-color:var(--blue)}
.th-search svg{width:15px;height:15px;flex:none;fill:none;stroke:var(--muted);stroke-width:1.8}
.th-search input{flex:1;min-width:0;height:100%;border:0;outline:0;background:none;padding:0;color:var(--text);font:inherit;font-size:14px;box-shadow:none}
.th-search input::-webkit-search-cancel-button{filter:invert(1)}
.th-categories{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:0 0 20px;padding-bottom:2px;border-bottom:1px solid var(--line)}
.th-categories::-webkit-scrollbar{display:none}
.th-categories a{flex:none;padding:8px 12px 10px;color:var(--muted);font-size:14px;text-decoration:none;white-space:nowrap;border-bottom:2px solid transparent;margin-bottom:-3px}
.th-categories a:hover{color:var(--text);border-bottom-color:var(--blue)}
.th-categories a[hidden]{display:none}
.th-group{margin-bottom:28px;scroll-margin-top:16px}
.th-group[hidden],.th-card[hidden]{display:none!important}
.th-section-head{display:flex;align-items:baseline;gap:12px;margin:0 0 12px;min-width:0}
.th-section-head h2{font-size:19px;line-height:27px;margin:0;flex:none}
.th-section-head span{font-size:13px;color:var(--muted);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:14px}
.th-card{position:relative;display:flex;justify-content:space-between;gap:14px;height:150px;min-width:0;padding:15px;overflow:hidden;background:var(--subtle);border:1px solid var(--line);border-radius:9px;color:var(--text);text-decoration:none}
.th-card.live{border-color:var(--border);transition:background .15s,border-color .15s,transform .15s}
.th-card.live:hover{background:#22252a;border-color:#737a85;transform:translateY(-2px)}
.th-card.planned{cursor:default}
.th-card.featured{background:linear-gradient(110deg,#1e2633,var(--subtle) 70%);border-color:#4d6a94}
.th-card.featured::before{content:"";position:absolute;inset:0 0 auto;height:2px;background:var(--blue)}
.th-card.featured:hover{border-color:var(--blue)}
.th-copy{flex:1;min-width:0;display:flex;flex-direction:column}
.th-top{min-width:0}
.th-card h3{font-size:17px;line-height:23px;margin:0;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.th-badge{display:inline-block;margin-top:5px;padding:0 6px;border-radius:4px;font-size:11px;line-height:19px;white-space:nowrap}
.th-badge.th-live{background:#1c2a23;color:var(--green)}
.th-badge.th-plan{background:#25282e;color:#b8bec7}
.th-card p{margin:6px 0 0;font-size:13px;line-height:19px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.th-link{margin-top:auto;font-size:12px;color:var(--text)}
.th-card.planned .th-link{color:#737b86}
.th-card.planned .th-image img{opacity:.82}
.th-image{flex:none;width:43%;max-width:158px;height:118px;align-self:center;overflow:hidden;border-radius:6px;background:var(--bg);border:1px solid var(--line)}
.th-image img{display:block;width:100%;height:100%;object-fit:cover}
.th-image.left img{object-position:15% center}.th-image.right img{object-position:85% center}.th-image.zoom img{transform:scale(1.28)}
.th-card.featured .th-image{border-color:#4d6a94}
.th-empty{padding:64px 12px;text-align:center;color:var(--muted);border:1px dashed var(--border);border-radius:8px}
.th-note{margin:8px 0 0;padding-top:14px;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}
@media(max-width:900px){.th-cards{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.th-section-head span{display:none}}
@media(max-width:750px){
 .tools-home .th-heading{min-height:0;padding:12px 0 4px}
 .tools-home .th-heading h1{font-size:23px;line-height:30px}
 .tools-home .th-heading p{font-size:13px}
 .th-filterbar{gap:8px}
 .th-filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;max-width:100%}
 .th-filter{height:34px;padding:0 11px;font-size:13px}
 .th-search{width:100%;margin-left:0}
 .th-categories{margin-bottom:16px}
 .th-cards{gap:10px}
 .th-card{height:128px;padding:11px;gap:10px}
 .th-card h3{font-size:15px;line-height:21px}
 .th-badge{font-size:10px;line-height:17px}
 .th-card p{font-size:12px;line-height:17px;margin-top:4px}
 .th-link{font-size:11px}
 .th-image{height:100px;max-width:140px;width:40%}
}
@media(max-width:600px){.th-cards{grid-template-columns:minmax(0,1fr)}}
/* the sidebar already shows "＋ 新建款式" on wide screens; phones hide it there, so the heading carries it */
@media(min-width:751px){.tools-home .th-cta{display:none}}
@media(max-width:420px){.tools-home .th-heading{align-items:flex-start}.tools-home .th-cta{height:34px;min-height:34px;padding:0 12px;font-size:13px;margin-top:2px}}
