.templates-view { background:var(--paper); }
.templates-view .nav { position:sticky; top:0; box-shadow:none; }
.templates-view.scrolled .nav { box-shadow:0 2px 8px rgb(18 34 66 / 7%); }
.templates-view :is(.float-cta,#toTop) { display:none!important; }
.templates-section { padding:60px 0 70px; }
#view-templates .page-head { position:relative; display:grid; align-items:start; justify-content:start; margin:0; gap:20px; }
#templates-title { font-size:40px; line-height:1.25; font-weight:600; }
#view-templates .tpl-toolbar { border:0; box-shadow:none; padding:24px; border-radius:12px; }
#view-templates .toolbar-row { gap:12px; }
#view-templates :is(.search-box input,.tabs button) { height:36px; border-radius:8px; font-weight:400; font-size:14px; }
#view-templates .search-box input { background:#fff; padding:0 12px 0 36px; }
#view-templates .search-box .ic { color:var(--ink-2); width:16px; height:16px; left:12px; }
#view-templates .tabs { border:0; padding:0; gap:12px; background:transparent; flex-wrap:wrap; }
#view-templates .tabs button { border:1px solid var(--line); padding:0 16px; display:grid; place-items:center; background:transparent; }
#view-templates .tabs button.on { border-color:var(--brand); color:var(--brand); box-shadow:none; }
#view-templates .cat-block { margin-top:20px; padding-top:16px; border-top:1px solid #f0f2f5; }
#view-templates .cat-title { font-size:14px; font-weight:600; color:var(--ink); margin-bottom:12px; }
#view-templates .chips { gap:8px 12px; }
#view-templates .chip { padding:4px 12px; font-size:13px; font-weight:400; background:transparent; border-radius:8px; }
#view-templates .chip:hover { border-color:var(--brand); color:var(--brand); }
#view-templates .chip.on { background:#eef3ff; border-color:#dfe8ff; color:#284ed4; }
#view-templates .count-line { margin-block:24px 16px; font-size:14px; }
#view-templates .count-line b { color:inherit; font-weight:600; }
#view-templates .work-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:28px 20px; }
#view-templates .work-card { display:flex; flex-direction:column; max-width:none; margin:0; border-radius:12px; }
#view-templates .work-card:hover { transform:none; box-shadow:0 4px 16px rgb(18 34 66 / 7%); }
#view-templates .work-prev { margin:12px 12px 0; height:auto; aspect-ratio:4/3; background:#f5f7fa; border-radius:8px; }
#view-templates .catalog-box { width:75%; height:75%; object-fit:contain; mix-blend-mode:multiply; }
#view-templates .src-tag { top:20px; left:20px; border:0; font-size:12px; font-weight:400; padding:4px 8px; border-radius:4px; background:#fff; color:var(--ink-2); }
#view-templates .src-tag.official { color:#284ed4; background:#eaf0ff; }
#view-templates .work-info { display:flex; flex-direction:column; flex:1; padding:16px; }
#view-templates .work-info .t { font-size:16px; font-weight:600; white-space:normal; margin-bottom:8px; }
#view-templates .work-info .meta { margin-bottom:12px; }
#view-templates .work-info .meta .tag { padding:4px 8px; border:0; border-radius:4px; background:#f5f7fa; color:#707070; font-size:12px; }
#view-templates .work-creator { margin-bottom:12px; }
#view-templates .work-creator .ava { background:#eaf0ff!important; color:#284ed4!important; }
#view-templates .stat-row { flex-wrap:wrap; gap:4px 12px; color:#707070; font-variant-numeric:tabular-nums; }
#view-templates .stat-row b { font-weight:400; }
#view-templates .stat-row .it:is(.liked,.faved) { color:#284ed4; }
#view-templates .work-actions { margin-top:auto; padding-top:16px; gap:12px; }
#view-templates .work-actions :is(.btn,.icon-mini) { border-radius:8px; }
#view-templates .work-actions .icon-mini:is(:hover,.faved) { color:var(--brand); border-color:var(--brand); }
#view-templates :focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
@media(max-width:1680px) { #templates-title { font-size:32px; } }
@media(max-width:1100px) { #view-templates .work-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:800px) {
  #view-templates .work-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #view-templates .search-box { order:1; flex-basis:100%; min-width:0; }
  .templates-view .nav .wrap { flex-wrap:wrap; height:auto; }
  .templates-view .nav-links { order:1; width:100%; display:flex; flex-wrap:wrap; gap:12px; }
}
@media(max-width:520px) {
  .templates-section { padding-block:40px; }
  #view-templates .tpl-toolbar { padding:16px; }
  #view-templates .work-grid { grid-template-columns:1fr; }
  .templates-view .nav-cta { white-space:normal; }
}
#view-templates .work-actions .btn-ghost:hover { color:var(--brand); border-color:var(--brand); }
.templates-view .avatar-btn:hover { border-color:var(--line); box-shadow:none; }

#view-templates .light-dropdown summary {
  height:36px; border:1px solid #e7ebf0; border-radius:8px;
  background-color:#fff; color:#333; padding-inline:12px; font-size:14px;
}
.sr-only { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; white-space:nowrap; }
.light-dropdown { position:relative; }
#view-templates .light-dropdown summary {
  display:flex; align-items:center; gap:10px; padding-right:34px; cursor:pointer;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23565656' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 12px 12px no-repeat;
}
.light-dropdown summary::-webkit-details-marker { display:none; }
.light-dropdown-options {
  position:absolute; top:calc(100% + 6px); right:0; z-index:3;
  min-width:max(100%, 120px); padding:4px 0; border:1px solid #e7ebf0;
  border-radius:8px; background:#fff; box-shadow:0 4px 16px #152c4d12;
}
.light-dropdown-options label { display:block; position:relative; padding:6px 12px; color:#333; font-size:14px; white-space:nowrap; cursor:pointer; }
.light-dropdown-options input { position:absolute; opacity:0; }
.light-dropdown-options label:hover { background:#f5f7fa; }
.light-dropdown-options label:has(input:checked) { background:#edf3ff; color:var(--jlc-blue); }
.light-dropdown-options label:has(input:focus-visible) { outline:2px solid var(--jlc-blue); outline-offset:-2px; }

.template-hero { background:#dceaf8; overflow:hidden; }
.template-hero-inner { position:relative; height:320px; display:grid; align-items:center; isolation:isolate; }
.template-hero-art { position:absolute; z-index:-1; inset:0 0 0 25%; background:url("assets/template-hero.png") right center / auto 100% no-repeat; mask-image:linear-gradient(90deg,transparent 5%,#000 42%,#000 92%,transparent); }
.template-hero .btn { justify-self:start; }
@media(max-width:600px){
  .template-hero-inner { align-items:start; padding-top:32px; }
  .template-hero-art { inset:105px 0 0; background-size:100% auto; background-position:center bottom; mask-image:linear-gradient(180deg,transparent,#000 56%); }
}

/* 两个作品列表共享官网内容区与作品卡。 */
.templates-view { background:#fff; }
.template-hero { background:linear-gradient(110deg,#e2edff,#f0f5ff 46%,#dce8ff); }
.template-hero-art { background-image:url("assets/template-scene.webp"); inset-inline-start:43%; background-size:contain; mask-image:linear-gradient(90deg,transparent,#000 13%,#000 90%,transparent); }
.works-hero .template-hero-art { background-image:url("assets/design-scene.webp"); }
#view-works .page-head { position:relative; display:grid; justify-content:start; gap:20px; margin:0; }
#works-title { font-size:40px; line-height:1.25; font-weight:600; }
.template-hero .page-head p { font-size:16px; margin:0; color:#333; max-width:620px; }
.hero-note-gap { display:inline-block; width:20px; }
.templates-section { padding-top:0; }
#view-templates .tpl-toolbar { padding:0; margin-bottom:0; border-radius:0; }
#view-templates .toolbar-row,.design-toolbar { padding-block:16px; border-bottom:1px solid #edf0f5; }
#view-templates .tabs { gap:20px; }
#view-templates .tabs button,.design-toolbar .tabs button { border:0; background:transparent; box-shadow:none; padding:0 4px; height:36px; color:#333; font-weight:400; }
#view-templates .tabs button.on,.design-toolbar .tabs button.on { color:var(--brand); background:transparent; box-shadow:none; font-weight:600; }
#view-templates .search-box,.design-toolbar .search-box { flex:0 1 380px; margin-left:auto; }
#view-templates .cat-block { display:flex; align-items:baseline; gap:16px; margin:16px 0 0; padding:0; border:0; }
#view-templates .cat-title { flex:none; margin:0; }
#view-templates .count-line { margin:16px 0 12px; }
#view-templates .work-grid,#view-works .work-grid { gap:32px 24px; }
#view-templates .work-card,#view-works .work-card { background:transparent; border-radius:0; overflow:visible; min-width:0; max-width:none; margin:0; }
#view-templates .work-card:hover,#view-works .work-card:hover { transform:none; box-shadow:none; }
#view-templates .work-prev,#view-works .work-prev { margin:0; aspect-ratio: 4/3; height:auto; border-radius:8px; background:#f5f7fa; }
#view-templates .catalog-box,#view-works .catalog-box { width:76%; height:76%; object-fit:contain; mix-blend-mode:multiply; transition:transform .2s; }
#view-templates .work-card:hover .catalog-box,#view-works .work-card:hover .catalog-box { transform:scale(1.04); }
#view-templates .src-tag,#view-works .src-tag { top:12px; left:12px; padding:4px 8px; border:0; border-radius:4px; font-weight:400; }
#view-templates .work-info,#view-works .work-info { padding:16px 0 0; }
#view-works .work-info .t { font-size:16px; white-space:normal; margin-bottom:8px; }
#view-works .work-info .meta .tag { background:#f5f7fa; color:#707070; border:0; }
#view-works .stat-row { flex-wrap:wrap; color:#707070; }
#view-works .work-actions { gap:8px; flex-wrap:wrap; }
#view-works .work-actions :is(.btn,.icon-mini) { border-radius:8px; }
#view-works .work-actions .btn { white-space:nowrap; }
#view-works .src-tag.official { color:#284ed4; background:#eaf0ff; }
#view-works .src-tag.audit { color:#97510b; background:#fff4e7; }
#view-works .src-tag.rejected { color:#a5232a; background:#fcebed; }
.design-toolbar .tabs { padding:0; border:0; gap:16px; background:transparent; flex-wrap:wrap; }
.design-toolbar .search-box input { height:36px; border-radius:8px; background:#fff; padding-left:36px; }
.design-toolbar .search-box .ic { width:16px; height:16px; left:12px; color:#666; }
#view-works .design-overview { margin-block:20px 0; padding:12px 16px; border-radius:8px; gap:12px; background:#f2f5ff; }
#view-works .design-overview h3 { font-size:14px; }
#view-works .design-overview .calc-nums { margin:0; gap:12px; flex-wrap:wrap; }
#view-works .design-overview .calc-item { background:transparent; padding:0; display:flex; gap:8px; align-items:center; min-width:0; }
#view-works .design-overview .calc-item :is(b,span) { font-size:14px; }
.design-actions { margin-block:16px; font-size:14px; color:var(--brand); }
.design-create { display:grid; place-content:center; justify-items:center; gap:8px; aspect-ratio:4/3; width:100%; border:1px dashed #d9dfe9; background:#f5f7fa; border-radius:8px; color:#333; font-size:16px; }
.design-create span { font-size:26px; line-height:1; }
@media(max-width:1680px){#works-title{font-size:32px}}
@media(max-width:800px){
  #view-templates .search-box,.design-toolbar .search-box { flex:1 1 100%; min-width:0; margin:0; }
  #view-templates .cat-block { display:block; }
  .template-hero .page-head p { max-width:50%; }
}
@media(max-width:600px){
  .template-hero .page-head p { max-width:100%; font-size:14px; }
  .template-hero-art { inset:140px 0 0; background-size:contain; mask-image:linear-gradient(180deg,transparent,#000 45%); }
  #view-works .design-overview { align-items:flex-start; flex-direction:column; }
}
@media(prefers-reduced-motion:reduce){.catalog-box{transition:none!important}}
#view-works .work-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.design-create { align-self:start; min-width:0; }
@media(max-width:1100px){#view-works .work-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){#view-works .work-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){#view-works .work-grid{grid-template-columns:minmax(0,1fr)}}
