*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a{touch-action:manipulation}button{color:inherit;cursor:pointer}button{background:none;border:0}a{text-decoration:none}button:disabled{cursor:default}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.fz-skip{top:-50px}.fz-skip:focus{top:0;background:white;padding:12px}.gallery-header{height:56px;border-bottom:1px solid #e7e7ea;position:sticky;top:0;z-index:10;background:white}.gallery-topics{display:flex;gap:3px;align-items:center;padding:7px 40px;height:100%;overflow-x:auto;scrollbar-width:none}.gallery-topics button{padding:9px 13px;border-radius:4px;white-space:nowrap;font-weight:500}.gallery-topics button[aria-pressed=true]{background:#f0f0f2;color:#111;font-weight:650}.gallery-main{padding:12px 55px 28px 40px;min-width:0}.gallery-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:12px;height:40px}.gallery-segment{display:flex;align-items:center;gap:3px;flex-shrink:0}.gallery-segment button{height:36px;padding:0 12px;border-radius:4px;white-space:nowrap;font-size:13px;color:#64646d}.gallery-segment button[aria-pressed=true]{background:#19191b;color:white}.gallery-segment span{opacity:.65;font-size:11px;margin-left:3px}.gallery-search{height:40px;min-width:100px;display:flex;align-items:center;border:1px solid #e5e5e9;border-radius:4px;flex:1;padding:0 12px;gap:9px}.gallery-search>span{font-size:24px;line-height:1;color:#71717a}.gallery-search input{width:100%;min-width:0;border:0;outline:0;background:none;font-size:13px}.gallery-search:focus-within{border-color:#888}.gallery-search small{flex:none;color:#a1a1aa;font-size:11px}.gallery-toolbar select{height:36px;border:1px solid #e5e5e9;background:white;border-radius:4px;font-size:12px;padding:0 8px;color:#64646d}.gallery-layout{height:36px;width:36px;border:1px solid #e5e5e9;border-radius:4px;font-size:23px;flex:none}.gallery-layout[aria-pressed=true]{background:#ededf0}.gallery-grid{position:relative;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:start;gap:14px}.gallery-grid.is-positioned{display:block}.gallery-grid.is-positioned .gallery-card{position:absolute;top:0;left:0}.gallery-card{border:1px solid #e5e5e9;background:white;border-radius:1px;overflow:hidden;min-width:0}.gallery-card:hover{border-color:#a1a1aa}.gallery-card.is-selected{border-color:#111;box-shadow:0 0 0 1px #111}.gallery-open{display:block;width:100%;text-align:left;padding:0}.gallery-open img{display:block;width:100%;height:auto;background:#f8f8f8}.gallery-caption{display:block;padding:9px 10px 10px}.gallery-caption strong{display:block;font-size:14px;font-weight:650;line-height:1.5}.gallery-caption small{display:block;font-size:11px;color:#82828d;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gallery-favorite{position:absolute;right:8px;top:8px;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.93);font-size:23px;line-height:1;opacity:0}.gallery-card:hover .gallery-favorite,.gallery-favorite:focus-visible,.gallery-favorite[aria-pressed=true]{opacity:1}.gallery-favorite[aria-pressed=true]{color:#d14566}.gallery-card{position:relative}.gallery-empty{text-align:center;padding:85px 20px;color:#777}.gallery-empty h2{font-size:20px;color:#29292b}.gallery-empty button{border:1px solid #ddd;padding:8px 14px;border-radius:4px;background:white}.gallery-bottom-note{margin:24px 0 0;color:#aaaab1;font-size:11px}.template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.template-card{border:1px solid #e5e5e9;border-radius:3px;overflow:hidden}.template-card>button{text-align:left;padding:20px;width:100%;height:100%;display:flex;flex-direction:column}.template-card:hover{border-color:#999}.template-category{font-size:11px;color:#8b8b94}.template-card h3{font-size:16px;line-height:1.6;font-weight:650;margin:12px 0}.template-card p{font-size:13px;line-height:1.9;color:#777;margin:0 0 20px}.template-meta{margin-top:auto;font-size:11px;color:#999;display:flex;justify-content:space-between;width:100%}.template-meta>span{color:#555}.gallery-workspace{min-width:0}.gallery-page.has-detail .gallery-workspace{margin-right:var(--detail-width,44vw)}.gallery-page.has-detail .gallery-main{padding-right:24px;padding-left:24px}.gallery-page.has-detail .gallery-topics{padding-left:24px;padding-right:24px}.gallery-page.has-detail .gallery-toolbar{height:auto;flex-wrap:wrap}.gallery-page.has-detail .gallery-search{flex-basis:220px}.gallery-page.has-detail .template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gallery-detail{position:fixed;top:0;right:0;bottom:0;width:var(--detail-width,44vw);background:#fff;border-left:1px solid #dddde2;z-index:40;overflow:auto;box-shadow:-3px 0 12px #00000003}.detail-heading{display:flex;align-items:center;gap:12px;justify-content:space-between;position:sticky;top:0;z-index:1;height:57px;padding:12px 22px;border-bottom:1px solid #e5e5e9;background:white}.detail-heading h2{font-size:20px;line-height:1.4;font-weight:650;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail-heading button{font-size:29px;line-height:1;width:32px;height:32px;flex:none;color:#777}.detail-body{padding:24px}.detail-prompt{border:1px solid #e5e5e9;border-radius:4px;padding:12px 14px}.detail-prompt-heading{display:flex;gap:10px;align-items:center;font-size:12px}.detail-prompt-heading strong{font-size:13px}.detail-prompt-heading>span{color:#a1a1aa;margin-left:auto;white-space:nowrap}.detail-prompt-heading button{font-size:12px;color:#767680;padding:2px 4px}.detail-text{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.9 Arial,'PingFang SC',sans-serif;color:#72727b;margin:12px 0 0;max-height:96px;overflow:hidden;mask-image:linear-gradient(#000 65%,transparent)}.detail-text.is-expanded{max-height:none;mask-image:none}.detail-meta{display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:10px;margin:12px 1px 26px;color:#999}.detail-meta a{color:#777}.detail-sample-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid #efeff1;margin-bottom:12px}.detail-sample-heading h3{font-size:13px;font-weight:600;margin:0;padding-bottom:8px}.detail-sample-heading button{font-size:11px;color:#888;padding-bottom:8px}.detail-sample{width:calc(50% - 7px);border:1px solid #e7e7ea}.detail-sample>button{padding:0;display:block;width:100%;cursor:zoom-in}.detail-sample img{display:block;width:100%;height:auto}.detail-sample-actions{display:flex;justify-content:space-between;align-items:center;padding:8px;font-size:10px;gap:8px;color:#999}.detail-sample-actions a{color:#666}.detail-pending{padding:30px 0;color:#999;font-size:13px}.gallery-lightbox{border:0;padding:0;max-width:94vw;max-height:94vh;background:transparent;overflow:visible}.gallery-lightbox::backdrop{background:#0b0b0bec}.gallery-lightbox img{display:block;max-width:92vw;max-height:90vh;object-fit:contain}.gallery-lightbox button{position:fixed;right:20px;top:14px;color:white;font-size:36px}.gallery-toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:9px 18px;background:#222;color:#fff;font-size:13px;border-radius:5px;z-index:90;pointer-events:none;opacity:0;transition:opacity .15s}.gallery-toast.visible{opacity:1}
@media(min-width:1700px){.gallery-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:1199px){.gallery-toolbar{flex-wrap:wrap;height:auto}.gallery-search{flex-basis:260px}.gallery-main{padding-right:30px;padding-left:30px}.gallery-topics{padding-left:30px}.gallery-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gallery-sort{margin-left:auto}.detail-sample{width:100%}}
@media(max-width:767px){.gallery-page.has-detail .gallery-workspace{margin:0}.gallery-header{height:49px}.gallery-topics{padding:5px 12px;gap:0}.gallery-topics button{font-size:13px;padding:9px 11px}.gallery-main,.gallery-page.has-detail .gallery-main{padding:12px 14px 20px}.gallery-toolbar{gap:8px}.gallery-toolbar .gallery-search{order:3;flex-basis:100%;height:38px}.gallery-toolbar select{margin-left:auto;max-width:100px}.gallery-sort{order:4;margin:0}.gallery-sort button{height:30px;font-size:12px;padding:0 10px}.gallery-layout{order:5;margin-left:auto;height:30px;width:30px}.gallery-segment button{padding:0 10px;font-size:12px}.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gallery-caption{padding:8px}.gallery-caption strong{font-size:13px}.gallery-caption small{font-size:10px}.gallery-favorite{opacity:1;width:26px;height:26px;font-size:21px}.template-grid,.gallery-page.has-detail .template-grid{grid-template-columns:minmax(0,1fr)}.gallery-detail{width:100%;bottom:var(--fz-mobile-nav-height);border:0;z-index:45}.detail-heading{height:54px;padding:12px 16px}.detail-heading h2{font-size:17px}.detail-body{padding:16px}.detail-sample{width:100%}.detail-meta{font-size:10px;flex-wrap:wrap}.gallery-toast{bottom:calc(var(--fz-mobile-nav-height) + 16px);white-space:nowrap}.detail-sample-actions{font-size:12px;padding:10px}.gallery-bottom-note{font-size:10px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.template-card{position:relative}.template-card>.gallery-favorite{padding:0;width:30px;height:30px;text-align:center;display:flex}.template-card:hover .gallery-favorite{opacity:1}.detail-grip{position:absolute;left:0;top:0;bottom:0;width:5px;z-index:5;cursor:col-resize;touch-action:none}.detail-grip:hover,.detail-grip:focus-visible{background:#c8c8cf}.gallery-detail.is-resizing{user-select:none}
@media(max-width:767px){.detail-grip{display:none}.gallery-detail{width:100%}.template-card .gallery-favorite{opacity:1}.template-card>button:not(.gallery-favorite){padding-right:40px}}
@media(max-width:767px){.gallery-page.has-detail{overflow:hidden}}

.detail-adaptation{font-size:11px;line-height:1.7;color:#92929a;margin:-10px 0 22px}

.gallery-search>span,.gallery-layout{display:flex;align-items:center;justify-content:center}

/* Category navigation sits directly below the shared main header. */
.gallery-header{display:flex;align-items:center;min-width:0;top:var(--fz-header-height)}
.gallery-topics{flex:1;min-width:0;padding-left:32px;padding-right:32px}
.gallery-page.has-detail .gallery-topics{padding-left:24px;padding-right:24px}
.gallery-detail{top:var(--fz-header-height)}
.gallery-workspace{overflow-anchor:none}
.detail-heading h2{flex:1;min-width:0}
.detail-text{font-size:14px;line-height:1.85;color:#55555f;max-height:110px}
.detail-prompt-heading>span{color:#767680}
.detail-prompt-heading button{min-height:32px;min-width:32px;color:#55555f}
.detail-meta{font-size:11px;color:#73737c}
.detail-sample-heading button{color:#62626c;min-height:32px}
.detail-adaptation{color:#73737c}
.gallery-caption small{color:#73737c}
.gallery-search small{color:#73737c}
@media(max-width:767px){
  .gallery-topics,.gallery-page.has-detail .gallery-topics{padding-left:12px;padding-right:12px}
  .detail-heading{gap:8px}
  .detail-heading h2{font-size:16px}
  .gallery-caption small{font-size:11px}
}

/* Keep the visual badge small without shrinking its touch target. */
.gallery-favorite,.template-card>.gallery-favorite{width:36px;height:36px;right:4px;top:4px;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;color:#62626b;opacity:1}
.gallery-favorite::before{content:"";position:absolute;width:28px;height:28px;box-sizing:border-box;border:1px solid #00000009;border-radius:50%;background:#fffffff0;box-shadow:0 1px 3px #0000000a}
.gallery-favorite svg{position:relative;display:block;flex:none;width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.gallery-favorite:hover{color:#27272a}
.gallery-favorite:hover::before{background:#fff;border-color:#00000020}
.gallery-favorite[aria-pressed=true]{color:#be3156}
.gallery-favorite[aria-pressed=true]::before{background:#fff4f7;border-color:#be31561a}
.gallery-favorite[aria-pressed=true] svg{fill:currentColor}
.gallery-favorite:focus-visible,.detail-prompt-actions button:focus-visible{outline:2px solid #18181b;outline-offset:3px}
.template-card>button:not(.gallery-favorite){padding-right:44px}
.detail-prompt-heading{flex-wrap:wrap;gap:8px}
.detail-prompt-actions{display:flex;gap:8px;margin-left:8px;flex-shrink:0}
.detail-prompt-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:0 11px;border:1px solid #d9d9df;border-radius:6px;font-size:12px;font-weight:550;white-space:nowrap;color:#37373f;background:#fff}
.detail-prompt-actions #detail-expand{background:#f1f1f4;color:#27272c;border-color:#d8d8df}
.detail-prompt-actions button:hover{background:#e8e8ed;border-color:#aaaab5}
.detail-prompt-actions svg{flex:none}
#detail-expand[aria-expanded=true] svg{transform:rotate(180deg)}
@media(max-width:767px){
  .gallery-favorite,.template-card>.gallery-favorite{width:44px;height:44px;right:0;top:0}
  .detail-prompt-actions{flex-basis:100%;margin:4px 0 0}
  .detail-prompt-actions button{flex:1;min-height:44px;font-size:13px}
}

/* 2026-11 refresh: same masonry, filters and URL history; shared tokens, pill categories,
   consistent 40px controls, softer cards and a clearer detail panel with a primary copy action. */
.gallery-header{height:58px;border-bottom-color:var(--fz-border);background:rgba(255,255,255,.96)}
.gallery-topics{gap:6px}
.gallery-topics button{min-height:36px;padding:6px 15px;border:1px solid transparent;border-radius:999px;color:var(--fz-muted);font-size:14px;font-weight:550;transition:color .16s var(--fz-ease),background-color .16s var(--fz-ease),border-color .16s var(--fz-ease)}
.gallery-topics button:hover{color:var(--fz-ink);background:var(--fz-subtle)}
.gallery-topics button[aria-pressed=true]{color:#fff;background:var(--fz-ink);font-weight:650}
.gallery-topics button:focus-visible,.gallery-segment button:focus-visible,.gallery-layout:focus-visible,.gallery-toolbar select:focus-visible,.gallery-open:focus-visible,.template-card>button:focus-visible,.detail-heading button:focus-visible,.detail-grip:focus-visible,.gallery-empty button:focus-visible{outline:2px solid var(--fz-accent);outline-offset:2px}
.gallery-main{padding-top:16px}
.gallery-toolbar{gap:10px;margin-bottom:16px}
.gallery-segment{gap:2px;padding:2px;border:1px solid var(--fz-border);border-radius:9px;background:var(--fz-paper)}
.gallery-segment button{height:34px;padding:0 12px;border-radius:7px;color:var(--fz-muted);font-weight:550}
.gallery-segment button:hover{color:var(--fz-ink)}
.gallery-segment button[aria-pressed=true]{background:#fff;color:var(--fz-ink);box-shadow:0 1px 2px rgba(20,22,27,.1),0 0 0 1px var(--fz-border);font-weight:650}
.gallery-segment span{color:var(--fz-faint);opacity:1;font-variant-numeric:tabular-nums}
.gallery-search{height:40px;border-color:var(--fz-border-strong);border-radius:9px;background:#fff;transition:border-color .16s var(--fz-ease),box-shadow .16s var(--fz-ease)}
.gallery-search:focus-within{border-color:var(--fz-ink);box-shadow:0 0 0 4px rgba(36,67,181,.12)}
.gallery-search>span{color:var(--fz-faint)}
.gallery-search input{font-size:14px;color:var(--fz-ink)}
.gallery-search input::placeholder{color:var(--fz-faint)}
.gallery-search small{color:var(--fz-muted);font-variant-numeric:tabular-nums}
.gallery-toolbar select{height:40px;padding:0 10px;border-color:var(--fz-border-strong);border-radius:9px;color:var(--fz-text);font-size:13px}
.gallery-layout{height:40px;width:40px;border-color:var(--fz-border-strong);border-radius:9px;color:var(--fz-muted)}
.gallery-layout:hover{color:var(--fz-ink);background:var(--fz-subtle)}
.gallery-layout[aria-pressed=true]{background:var(--fz-ink);border-color:var(--fz-ink);color:#fff}
.gallery-card{border-color:var(--fz-border);border-radius:var(--fz-radius-sm);transition:border-color .16s var(--fz-ease),box-shadow .16s var(--fz-ease)}
.gallery-card:hover{border-color:var(--fz-border-strong);box-shadow:var(--fz-shadow-hover)}
.gallery-card.is-selected{border-color:var(--fz-ink);box-shadow:0 0 0 1px var(--fz-ink)}
.gallery-open img{background:var(--fz-subtle)}
.gallery-caption{padding:10px 11px 11px}
.gallery-caption strong{font-size:13.5px;font-weight:650;color:var(--fz-ink)}
.gallery-caption small{color:var(--fz-muted)}
.template-card{border-color:var(--fz-border);border-radius:var(--fz-radius);background:#fff;transition:border-color .16s var(--fz-ease),box-shadow .16s var(--fz-ease)}
.template-card:hover{border-color:var(--fz-border-strong);box-shadow:var(--fz-shadow-hover)}
.template-category{color:var(--fz-muted);font-weight:550}
.template-card h3{color:var(--fz-ink);font-weight:700}
.template-card p{color:var(--fz-muted)}
.template-meta{color:var(--fz-faint)}
.template-meta>span{color:var(--fz-accent);font-weight:600}
.gallery-empty{border:1px dashed var(--fz-border-strong);border-radius:var(--fz-radius);color:var(--fz-muted)}
.gallery-empty h2{color:var(--fz-ink)}
.gallery-empty button{min-height:40px;padding:8px 16px;border-color:var(--fz-ink);border-radius:8px;background:var(--fz-ink);color:#fff;font-weight:600}
.gallery-bottom-note{color:var(--fz-muted);font-size:12px}
.gallery-bottom-note a{color:var(--fz-text);text-decoration:underline;text-underline-offset:3px}
.gallery-detail{border-left-color:var(--fz-border);box-shadow:-12px 0 32px -24px rgba(20,22,27,.28)}
.detail-heading{height:60px;padding:12px 16px 12px 24px;border-bottom-color:var(--fz-border);background:rgba(255,255,255,.97)}
.detail-heading h2{font-size:18px;font-weight:700;letter-spacing:-.2px;color:var(--fz-ink)}
.detail-heading button{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--fz-border);border-radius:8px;font-size:24px;color:var(--fz-muted);transition:background-color .16s var(--fz-ease),color .16s var(--fz-ease)}
.detail-heading button:hover{background:var(--fz-subtle);color:var(--fz-ink)}
.detail-prompt{padding:14px 16px;border-color:var(--fz-border);border-radius:var(--fz-radius);background:var(--fz-paper)}
.detail-prompt-heading strong{font-size:14px;color:var(--fz-ink)}
.detail-prompt-heading>span{color:var(--fz-muted);font-variant-numeric:tabular-nums}
.detail-text{color:var(--fz-text);font-family:var(--fz-font);font-size:14px;line-height:1.85}
.detail-prompt-actions button{border-color:var(--fz-border-strong);border-radius:8px;color:var(--fz-text);transition:background-color .16s var(--fz-ease),border-color .16s var(--fz-ease)}
.detail-prompt-actions #detail-expand{background:#fff;color:var(--fz-text);border-color:var(--fz-border-strong)}
.detail-prompt-actions #detail-copy{background:var(--fz-ink);border-color:var(--fz-ink);color:#fff}
.detail-prompt-actions button:hover{background:var(--fz-subtle);border-color:#a9a8a1}
.detail-prompt-actions #detail-copy:hover{background:#2f3239;border-color:#2f3239}
.detail-prompt-actions button:focus-visible{outline:2px solid var(--fz-accent);outline-offset:2px}
.detail-meta,.detail-adaptation{color:var(--fz-muted)}
.detail-meta a{color:var(--fz-text)}
.detail-sample-heading{border-bottom-color:var(--fz-border)}
.detail-sample-heading h3{font-size:14px;font-weight:650;color:var(--fz-ink)}
.detail-sample{border-color:var(--fz-border);border-radius:var(--fz-radius-sm);overflow:hidden}
.detail-sample-actions{color:var(--fz-muted);font-size:11.5px}
.detail-sample-actions a{color:var(--fz-accent);font-weight:600}
.detail-grip:hover,.detail-grip:focus-visible{background:var(--fz-border-strong)}
.gallery-toast{border-radius:999px;background:var(--fz-ink);font-weight:550;box-shadow:0 8px 24px -10px rgba(20,22,27,.5)}
@media(max-width:767px){
  .gallery-header{height:52px}
  .gallery-topics{gap:4px}
  .gallery-topics button{min-height:36px;padding:6px 13px;font-size:13.5px}
  .gallery-main,.gallery-page.has-detail .gallery-main{padding:14px 14px 24px}
  .gallery-segment button{height:34px}
  .gallery-toolbar .gallery-search{height:44px}
  .gallery-search input{font-size:16px}
  .gallery-toolbar select{height:40px}
  .gallery-sort button{height:34px}
  .gallery-layout{height:40px;width:40px}
  .detail-heading{height:56px;padding:8px 10px 8px 16px}
  .detail-heading h2{font-size:16px}
}
@media(prefers-reduced-motion:reduce){.gallery-card,.template-card,.gallery-topics button,.gallery-search,.detail-heading button,.detail-prompt-actions button{transition:none}}

/* rs6 component polish: same layout and masonry metrics; layered elevation, tactile controls,
   a tinted empty state and a drawer that reads as a raised panel. */
.gallery-topics button:active,.gallery-segment button:active,.gallery-layout:active,.detail-prompt-actions button:active,.gallery-empty button:active{transform:translateY(.5px) scale(.985)}
.gallery-topics button[aria-pressed=true]{box-shadow:var(--fz-btn-sheen),var(--fz-shadow-xs)}
.gallery-segment{border-radius:10px;background:var(--fz-subtle);box-shadow:inset 0 1px 1px rgba(20,22,27,.04)}
.gallery-segment button{transition:color var(--fz-dur) var(--fz-ease),background-color var(--fz-dur) var(--fz-ease),box-shadow var(--fz-dur) var(--fz-ease),transform .12s var(--fz-ease)}
.gallery-segment button[aria-pressed=true]{box-shadow:0 1px 2px rgba(20,22,27,.08),0 0 0 1px rgba(20,22,27,.06)}
.gallery-search,.gallery-toolbar select,.gallery-layout{border-radius:var(--fz-radius-control);box-shadow:var(--fz-shadow-xs)}
.gallery-search:hover,.gallery-toolbar select:hover{border-color:#b7b6af}
.gallery-search:focus-within{box-shadow:var(--fz-shadow-xs),var(--fz-ring)}
.gallery-search small{display:inline-flex;align-items:center;min-height:20px;padding:0 7px;border-radius:999px;background:var(--fz-subtle);font-size:11.5px}
.gallery-layout{transition:background-color var(--fz-dur) var(--fz-ease),color var(--fz-dur) var(--fz-ease),transform .12s var(--fz-ease)}
.gallery-card{border-radius:var(--fz-radius);box-shadow:var(--fz-shadow-xs)}
.gallery-open img{transition:transform .45s var(--fz-ease)}
.gallery-card:hover .gallery-open img{transform:scale(1.025)}
.gallery-caption{position:relative;background:#fff}
.gallery-card.is-selected{border-color:var(--fz-ink);box-shadow:0 0 0 1px var(--fz-ink),var(--fz-shadow-hover)}
.template-card{box-shadow:var(--fz-shadow-xs)}
.template-category{display:inline-flex;align-self:flex-start;align-items:center;min-height:22px;padding:1px 9px;border-radius:999px;background:var(--fz-subtle);color:var(--fz-text)}
.gallery-empty{margin:8px 0;background:var(--fz-paper);border-radius:var(--fz-radius-lg)}
.gallery-empty::before{content:"";display:block;width:44px;height:44px;margin:0 auto 18px;border-radius:12px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2370747e' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/svg%3E") center/20px 20px no-repeat;box-shadow:var(--fz-shadow-sm),0 0 0 1px var(--fz-border)}
.gallery-empty h2{margin:0 0 6px;font-size:18px;font-weight:700;letter-spacing:-.2px}
.gallery-empty p{margin:0 0 18px;font-size:13.5px}
.gallery-empty button{box-shadow:var(--fz-btn-sheen),var(--fz-shadow-xs);transition:background-color var(--fz-dur) var(--fz-ease),transform .12s var(--fz-ease)}
.gallery-empty button:hover{background:var(--fz-ink-hover)}
.gallery-detail{box-shadow:var(--fz-shadow-pop)}
.detail-heading{-webkit-backdrop-filter:saturate(1.4) blur(10px);backdrop-filter:saturate(1.4) blur(10px);background:rgba(255,255,255,.9)}
.detail-heading button{background:#fff;box-shadow:var(--fz-shadow-xs);transition:background-color var(--fz-dur) var(--fz-ease),color var(--fz-dur) var(--fz-ease),border-color var(--fz-dur) var(--fz-ease)}
.detail-heading button:hover{border-color:var(--fz-border-strong)}
.detail-prompt{box-shadow:var(--fz-shadow-xs)}
.detail-prompt-heading strong::before{content:"";display:inline-block;width:6px;height:6px;margin-right:8px;border-radius:50%;background:var(--fz-accent);vertical-align:2px;opacity:.75}
.detail-prompt-actions button{box-shadow:var(--fz-shadow-xs);transition:background-color var(--fz-dur) var(--fz-ease),border-color var(--fz-dur) var(--fz-ease),box-shadow var(--fz-dur) var(--fz-ease),transform .12s var(--fz-ease)}
.detail-prompt-actions #detail-copy{box-shadow:var(--fz-btn-sheen),var(--fz-shadow-xs)}
.detail-prompt-actions #detail-copy:hover{box-shadow:var(--fz-btn-sheen),0 4px 12px -6px rgba(20,22,27,.45)}
#detail-expand svg{transition:transform var(--fz-dur) var(--fz-ease)}
.detail-sample{box-shadow:var(--fz-shadow-xs);transition:box-shadow var(--fz-dur) var(--fz-ease),border-color var(--fz-dur) var(--fz-ease)}
.detail-sample:hover{border-color:var(--fz-border-strong);box-shadow:var(--fz-shadow-sm)}
.detail-grip::after{content:"";position:absolute;left:1px;top:50%;width:3px;height:36px;margin-top:-18px;border-radius:3px;background:var(--fz-border-strong);opacity:0;transition:opacity var(--fz-dur) var(--fz-ease)}
.gallery-detail:hover .detail-grip::after,.detail-grip:focus-visible::after{opacity:1}
.gallery-toast{padding:10px 18px;box-shadow:var(--fz-shadow-pop);transform:translate(-50%,6px);transition:opacity .18s var(--fz-ease),transform .18s var(--fz-ease)}
.gallery-toast.visible{transform:translate(-50%,0)}
.gallery-lightbox button{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.1);transition:background-color var(--fz-dur) var(--fz-ease)}
.gallery-lightbox button:hover{background:rgba(255,255,255,.2)}
.gallery-lightbox button:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media(hover:none){.gallery-card:hover .gallery-open img{transform:none}}

/* B-12：分页「显示更多」、详情独立页链接与提示词目录。 */
.gallery-more{display:block;margin:20px auto 0;min-height:40px;padding:8px 20px;border:1px solid var(--fz-border-strong);border-radius:8px;background:#fff;color:var(--fz-text);font-size:13px;font-weight:600;box-shadow:var(--fz-shadow-xs)}
.gallery-more:hover{background:var(--fz-subtle)}
.gallery-more:focus-visible,.detail-permalink:focus-visible{outline:2px solid var(--fz-accent);outline-offset:2px}
.detail-permalink{display:inline-block;margin:-14px 1px 22px;font-size:12px;color:var(--fz-accent);font-weight:600}
.gallery-catalog{margin:28px 0 0;font-size:12px;color:var(--fz-muted)}
.gallery-catalog summary{cursor:pointer;color:var(--fz-text)}
.gallery-catalog ul{columns:3 220px;margin:12px 0 0;padding:0;list-style:none}
.gallery-catalog li{margin:0 0 6px;break-inside:avoid}
.gallery-catalog a{color:var(--fz-text)}
@media(prefers-reduced-motion:reduce){
  .gallery-card:hover .gallery-open img{transform:none}
  .gallery-toast,.gallery-toast.visible{transform:translateX(-50%)}
  .gallery-topics button:active,.gallery-segment button:active,.gallery-layout:active,.detail-prompt-actions button:active,.gallery-empty button:active{transform:none}
}
