/* Pixso surfaces and brand colors; readable text shades follow Refactoring UI §5.6.
   Hierarchy: galleries > navigation > metadata. Spacing follows the declared scale (§3.2). */
:root {
  color-scheme: light;
  --paper: #fbf8f2;
  --paper-warm: #fbf6ec;
  --surface: #fffcfc;
  --linen: #f2eada;
  --ink: #5a3343;
  --rose: #895461;
  --rose-hover: #74434d;
  --rose-deep: #5f323a;
  --pink: #fea1ba;
  --pink-soft: #f4ced9;
  --rose-100: #feecf7;
  --rose-200: #e9c7dc;
  --rose-300: #d1a6c0;
  --rose-400: #b8859c;
  --on-accent: #fff;
  --banner-base: #5f323a;
  --video-base: #5a3343;
  --cover-shade: transparent;
  --dialog-backdrop: rgb(90 51 67 / 24%);
  --search-glass: rgb(254 236 247 / 84%);
  --radius-sm: 8px;
  --radius: 16px;
  --shadow-xs: 0 1px 2px rgb(90 51 67 / 8%);
  --shadow-sm: 0 2px 4px rgb(90 51 67 / 8%);
  --shadow-md: 0 4px 8px rgb(90 51 67 / 10%);
  --shadow-lg: 0 8px 24px rgb(90 51 67 / 12%);
  --shadow-xl: 0 16px 48px rgb(90 51 67 / 20%);
  --page-width: 1440px;
  --sidebar-width: 192px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #211b20;
    --paper-warm: #292126;
    --surface: #32282f;
    --linen: #3b3037;
    --ink: #f7eaf0;
    --rose: #e2b5c5;
    --rose-hover: #f2c8d7;
    --rose-deep: #ffdae6;
    --pink: #f5a2ba;
    --pink-soft: #563744;
    --rose-200: #654351;
    --rose-300: #b78f9f;
    --rose-400: #b3899a;
    --on-accent: #302029;
    --video-base: #181318;
    --cover-shade: rgb(24 16 22 / 42%);
    --search-glass: rgb(48 36 44 / 94%);
    --dialog-backdrop: rgb(12 8 11 / 68%);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { display: block; }
button, a, input, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--rose-hover); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
button:disabled { cursor: default; opacity: .45; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .16em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; padding: 12px 16px; color: var(--on-accent); background: var(--rose-deep); z-index: 100; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }
.background-clover { position: fixed; z-index: -1; width: 480px; height: 480px; right: -192px; bottom: 48px; color: #cddcf3; opacity: .2; transform: rotate(-16deg); pointer-events: none; }
.site-header { position: sticky; top: 0; z-index: 30; background: var(--paper-warm); border-bottom: 1px solid var(--pink-soft); }
.header-inner { max-width: 1536px; min-height: 72px; padding: 0 32px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; position: relative; color: var(--rose); font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -.04em; }
.brand > svg { width: 28px; height: 28px; color: var(--pink); }
.brand-signature { position: absolute; left: 144px; top: 4px; white-space: nowrap; font: italic 48px/1 Georgia, serif; letter-spacing: -.08em; color: var(--linen); z-index: -1; }
.site-nav { display: flex; align-self: stretch; align-items: stretch; gap: 4px; }
.site-nav a { position: relative; display: grid; place-items: center; padding: 0 16px; color: var(--rose); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s; }
.site-nav a:hover { background: var(--linen); }
.site-nav a[aria-current="page"] { background: var(--pink-soft); color: var(--ink); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.site-nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: 0; left: 16px; right: 16px; height: 4px; background: var(--rose); border-radius: 4px 4px 0 0; }

.gallery-hero { position: relative; max-width: 1472px; margin: 24px auto 0; overflow: hidden; isolation: isolate; background: var(--banner-base); border-radius: var(--radius-sm); }
.hero-art { position: absolute; inset: 0; z-index: -1; background: url("/assets/gallery-banner.jpg") center / cover no-repeat; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(95 50 58 / 80%), rgb(95 50 58 / 78%) 35%, rgb(95 50 58 / 30%) 65%, rgb(95 50 58 / 64%)); }
.hero-inner { min-height: 248px; display: flex; justify-content: space-between; align-items: center; gap: 48px; padding: 32px 48px; }
.hero-copy { color: #fff; }
.hero-copy .eyebrow { margin-bottom: 8px; }
.hero-copy h1 { display: flex; align-items: baseline; gap: 24px; font-size: 48px; line-height: 1.2; font-weight: 600; letter-spacing: -.04em; }
.hero-signature { font: italic 48px/1 Georgia, serif; letter-spacing: -.08em; }
/* §2.4 / §3.6: the title and artwork lead; a single tinted input sits at the upper right. */
.hero-search { width: 384px; flex-shrink: 0; align-self: flex-start; }
.search-field { display: flex; align-items: center; min-height: 48px; padding-left: 12px; background: var(--search-glass); backdrop-filter: blur(12px); border: 1px solid var(--rose-400); border-radius: var(--radius-sm); }
.search-field:focus-within { outline: 2px solid var(--rose); outline-offset: 2px; }
.search-field > .icon { color: var(--rose); }
.search-field input { min-width: 0; width: 100%; padding: 12px 8px; border: 0; background: transparent; color: var(--ink); font-size: 14px; outline: 0; }
.search-field input::placeholder { color: var(--rose); opacity: 1; }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }

.gallery-workspace { position: relative; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); gap: 48px; max-width: var(--page-width); padding: 32px 32px 0; margin: 0 auto; }
.gallery-sidebar { min-width: 0; padding-top: 64px; }
.gallery-sidebar > details { position: sticky; top: 104px; }
.gallery-sidebar > details > summary { display: none; }
#gallery-nav { display: grid; gap: 24px; max-height: calc(100dvh - 224px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--rose-200) transparent; }
/* §2.4 / §3.6: model folders are navigation groups; home keeps the original feature list. */
.nav-folder { min-width: 0; }
.nav-folder-summary { display: flex; align-items: center; gap: 4px; list-style: none; cursor: pointer; color: var(--rose); }
.nav-folder-summary::-webkit-details-marker { display: none; }
.nav-folder-link { display: flex; flex: 1; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
.nav-folder-link:hover { background: var(--linen); }
.nav-folder-link[aria-current] { color: var(--ink); }
.nav-folder-summary > .icon, .nav-folder-link > .icon { width: 16px; height: 16px; flex: 0 0 auto; }
.nav-folder-summary > .icon { margin-right: 8px; }
.nav-folder[open] > .nav-folder-summary > .icon { transform: rotate(180deg); }
.nav-folder-children { display: grid; gap: 4px; margin: 4px 0 0 12px; padding-left: 12px; border-left: 1px solid var(--pink-soft); }
.nav-group { display: grid; gap: 4px; }
.nav-group-label { padding: 0 12px 4px; font-size: 12px; color: var(--rose); font-weight: 600; letter-spacing: .08em; }
.gallery-nav-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; padding: 4px 12px; border-radius: var(--radius-sm); color: var(--rose); font-size: 14px; }
.gallery-nav-link:hover { background: var(--linen); }
.gallery-nav-link[aria-current="page"] { color: var(--ink); background: var(--pink-soft); font-weight: 600; }
.gallery-nav-link[aria-current="page"]::before { content: ""; width: 4px; align-self: stretch; margin-left: -12px; margin-right: 4px; background: var(--rose); border-radius: 0 4px 4px 0; }
.gallery-nav-link > span:first-of-type { flex: 1; }
.nav-count { font-size: 12px; font-variant-numeric: tabular-nums; }
.sidebar-signature { margin: 32px 0 8px; padding-left: 8px; color: var(--rose-200); font: italic 48px/1 Georgia, serif; letter-spacing: -.08em; }
.sidebar-note { padding-left: 12px; color: var(--rose); font-size: 12px; line-height: 1.8; }
.sidebar-catalog { display: inline-flex; align-items: center; gap: 4px; margin: 16px 0 0 12px; font-size: 12px; color: var(--rose); }
.sidebar-catalog .icon { width: 16px; height: 16px; }
.sidebar-catalog:hover { text-decoration: underline; }
#gallery-content { min-width: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 32px; color: var(--rose); font-size: 12px; overflow-wrap: anywhere; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); }
.crumb-divider { color: var(--rose-400); }
.gallery-region + .gallery-region { margin-top: 64px; }
.section-heading { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.section-heading::after { content: ""; align-self: center; height: 1px; flex: 1; background: var(--pink-soft); }
.section-heading h2 { font-size: 32px; line-height: 1.25; letter-spacing: -.04em; font-weight: 600; overflow-wrap: anywhere; }
.section-heading > p { color: var(--rose); font-size: 12px; flex-shrink: 0; order: 1; }
.section-description { max-width: 35em; margin: -12px 0 24px; color: var(--rose); font-size: 14px; }
.feature-list { display: grid; gap: 24px; }
.gallery-region + .home-model-group { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--pink-soft); }
.home-model-group .feature-copy { grid-column: span 2; padding-inline-start: var(--space-6); }
.home-model-group h2 { font-weight: 800; }
.feature-card { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr) 42%; min-height: 144px; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s; }
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-number { display: flex; align-items: center; justify-content: center; color: var(--rose-300); font-size: 48px; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.feature-copy { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 24px 16px 24px 8px; }
.feature-copy .eyebrow { color: var(--rose); font-size: 12px; letter-spacing: .08em; overflow-wrap: anywhere; }
.feature-copy time { white-space: nowrap; }
.feature-copy h3 { font-weight: 600; }
.feature-copy :is(h2, h3) { font-size: 24px; line-height: 1.25; }
.feature-description { color: var(--rose); font-size: 14px; margin-top: 4px; }
.feature-count { color: var(--rose); font-size: 12px; }
.feature-cover { position: relative; min-width: 0; align-self: stretch; background: var(--paper-warm); }
.feature-cover::after { content: ""; position: absolute; inset: 0; /* Shade artwork and its matching frame together. */ background: linear-gradient(90deg, var(--surface), transparent 16%), var(--cover-shade); pointer-events: none; }
.feature-cover img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: var(--cover-position, 50% 25%); }
/* Keep the selected band of the original portrait at the same scale on wide and narrow cards. */
.portrait-cover { container-type: size; overflow: hidden; background: var(--cover-background, var(--paper-warm)); }
.portrait-cover img {
  top: 0;
  left: 0;
  width: auto;
  max-width: none;
  height: calc(100% / var(--crop-fraction));
  /* Center the subject, stopping at either edge of the image. */
  --edge-limited-shift: clamp(min(0px, 100cqw - 100%), 50cqw - var(--face-x), max(0px, 100cqw - 100%));
  transform: translate(var(--cover-shift, var(--edge-limited-shift)), var(--crop-top));
}
.feature-arrow { position: absolute; right: 16px; bottom: 16px; display: grid; place-items: center; width: 32px; height: 32px; background: var(--surface); color: var(--rose); border-radius: 50%; }
.folder-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.folder-card, .related-album { min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; transition: transform .18s; }
.folder-card:hover, .related-album:hover { transform: translateY(-2px); }
.folder-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--linen); }
.folder-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transition: transform .25s; }
.folder-card:hover .folder-cover img { transform: scale(1.03); }
.folder-cover > .icon { position: absolute; width: 32px; height: 32px; left: calc(50% - 16px); top: calc(50% - 16px); color: var(--rose); }
.folder-info { position: relative; padding: 16px 48px 16px 16px; }
.folder-info h3, .related-album h4 { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.folder-info > p { margin-top: 4px; color: var(--rose); font-size: 12px; }
.folder-info > .icon { position: absolute; right: 16px; top: 20px; color: var(--rose); }
.related-album .feature-cover { height: clamp(112px, 14vw, 154px); }
.folder-description { color: var(--rose); font-size: 12px; padding: 0 16px 16px; }
/* Pixso 234:6675 / 116:1154: heading + rule, date + copy, artwork, then other content.
   §2.1 / §3.6 / §4.3: preserve that order and the 75% text column; allow the mobile text to fill. */
.outfit-heading { display: flex; align-items: baseline; gap: 24px; margin-bottom: 16px; }
.outfit-heading h2 { color: var(--ink); font-size: 48px; font-weight: 900; line-height: 1.25; letter-spacing: -.04em; }
.outfit-heading-rule { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: flex-end; justify-content: flex-end; padding-bottom: 8px; border-bottom: 2px solid var(--pink-soft); }
.outfit-heading-rule p { font-size: 12px; color: var(--rose); text-align: right; }
.character-profile { width: 75%; margin: 0 0 24px; }
.character-profile:has(> .sr-only:only-child) { margin: 0; }
.character-profile h3, .character-profile .character-debut { margin: 0 0 12px; color: var(--ink); font-size: 22px; font-weight: 600; line-height: 1.5; }
.character-profile p { margin: 0; font-size: 16px; line-height: 1.6; }
.outfit-timeline { padding: 0; list-style: none; }
.outfit-timeline li { position: relative; padding-inline-start: 24px; }
.outfit-timeline li + li { margin-top: 24px; }
.outfit-timeline li::before { content: ""; position: absolute; top: .72em; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); }
.outfit-timeline li:not(:last-child)::after { content: ""; position: absolute; top: calc(.72em + 10px); bottom: calc(-24px - .72em); left: 4px; width: 2px; background: var(--pink-soft); }
.outfit-timeline h2 { margin: 0 0 12px; color: var(--ink); font-size: clamp(20px, 2vw, 26px); font-weight: 600; line-height: 1.5; }
.outfit-timeline time { white-space: nowrap; }
.outfit-timeline p + p { margin-top: 6px; }
.outfit-gallery .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.outfit-gallery .media-open { aspect-ratio: 16 / 10; }
.outfit-gallery .media-open img { position: absolute; inset: 0; }
.outfit-timeline .timeline-image { width: min(100%, 264px); margin-top: 12px; }
.outfit-timeline .media-open { aspect-ratio: auto; }
.outfit-timeline .media-open img { position: static; height: auto; }
.character-other { margin-top: 48px; }
/* §2.1 / §3.6: model credits belong beneath Other Content, before its download card. */
.model-details h4 { margin: 0 0 var(--space-3); color: var(--ink); font-size: 20px; font-weight: 600; line-height: 1.5; }
.outfit-empty { min-height: 144px; }
.related-card { min-width: 0; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; }
.view-intro { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.view-intro > p { font-size: 14px; color: var(--rose); }
.parent-link { display: inline-flex; align-items: center; gap: 8px; color: var(--rose); font-size: 14px; white-space: nowrap; }
.parent-link:hover { text-decoration: underline; }
.filter-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-button { min-height: 40px; padding: 8px 16px; border: 0; border-radius: var(--radius-sm); background: var(--linen); color: var(--rose); font-size: 14px; }
.filter-button[aria-pressed="true"] { background: var(--pink-soft); color: var(--ink); font-weight: 600; }
.filter-button:hover { background: var(--rose-200); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 24px; }
.media-card { min-width: 0; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; }
.media-open { display: grid; place-items: center; position: relative; aspect-ratio: 4 / 3; width: 100%; overflow: hidden; background: var(--linen); }
.media-open img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s; }
.media-open:hover img { transform: scale(1.03); }
.media-open > .icon { color: var(--rose); width: 32px; height: 32px; }
.media-type-overlay { position: absolute; right: 8px; bottom: 8px; padding: 4px 8px; border-radius: 4px; background: var(--paper-warm); color: var(--rose); font-size: 12px; }
.media-caption { padding: 12px; }
.media-caption h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; line-height: 1.5; }
.media-caption > p { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rose); font-size: 12px; }
.media-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; color: var(--rose); font-size: 12px; }
.media-download { display: flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; margin: -8px -8px -8px 0; border-radius: var(--radius-sm); }
.media-download:hover { background: var(--pink-soft); }
.media-download .icon { width: 16px; height: 16px; }
.image-failed::after { content: "预览暂不可用，点击查看原文件"; position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: var(--linen); color: var(--rose); font-size: 12px; text-align: center; }
.empty-state { padding: 48px 24px; background: var(--paper-warm); border-radius: var(--radius); text-align: center; }
.empty-state > .icon { width: 32px; height: 32px; margin: 0 auto 16px; color: var(--rose); }
.empty-state h3 { font-size: 20px; line-height: 1.3; font-weight: 600; }
.empty-state p { max-width: 35em; margin: 8px auto 24px; font-size: 14px; color: var(--rose); }
.notice { margin-top: 24px; padding: 16px; border-left: 4px solid var(--pink); background: var(--paper-warm); font-size: 14px; }
.notice a { text-decoration: underline; }
.static-file-name:hover { text-decoration: underline; }

.site-footer { position: relative; max-width: var(--page-width); padding: 48px 32px 96px; margin: 64px auto 0; text-align: center; font-size: 12px; color: var(--rose); }
.site-footer::before { content: ""; display: block; width: 64px; height: 2px; margin: 0 auto 24px; background: var(--pink-soft); }
.site-footer > div { display: flex; justify-content: center; align-items: baseline; gap: 12px; }
.site-footer > div > a { color: var(--ink); font-size: 16px; font-weight: 600; }
.site-footer > p { margin-top: 8px; }
.footer-meta { margin-top: 16px !important; }
.site-footer a:hover { text-decoration: underline; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px; border: 0; background: transparent; color: var(--rose); border-radius: var(--radius-sm); }
.icon-button:hover { background: var(--pink-soft); }
.primary-button, .secondary-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 12px 16px; border: 0; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; line-height: 1.4; }
.primary-button { color: var(--on-accent); background: var(--rose); }
.primary-button:hover { background: var(--rose-hover); }
.primary-button:active { background: var(--rose-deep); }
.secondary-button { background: var(--linen); color: var(--rose); }
.secondary-button:hover:not(:disabled) { background: var(--pink-soft); }
.text-link { display: inline-flex; align-items: center; gap: 4px; padding: 8px 0; color: var(--rose); font-size: 14px; }
.text-link .icon { width: 16px; height: 16px; }
.text-link:hover { text-decoration: underline; }

.preview-open { overflow: hidden; }
.preview-dialog { position: fixed; inset: 16px; width: 480px; max-width: calc(100% - 32px); height: calc(100dvh - 32px); max-height: none; margin: 0 0 0 auto; padding: 0; overflow: auto; overscroll-behavior: contain; border: 0; border-radius: var(--radius); background: var(--paper-warm); color: var(--ink); box-shadow: var(--shadow-xl); }
.preview-dialog::backdrop { background: var(--dialog-backdrop); backdrop-filter: blur(2px); }
.preview-dialog.expanded { width: 1088px; }
.preview-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; background: var(--paper-warm); }
.preview-signature { font: italic 48px/1 Georgia, serif; color: var(--rose-300); letter-spacing: -.08em; }
.preview-header-actions { display: flex; gap: 4px; }
.preview-media { position: relative; display: grid; place-items: center; min-height: 240px; margin: 0 16px; background: var(--linen); border-radius: var(--radius-sm); overflow: hidden; }
.preview-media > img { width: 100%; max-height: 56dvh; object-fit: contain; }
.preview-media > video { width: 100%; max-height: 56dvh; background: var(--video-base); }
.preview-media > audio { width: calc(100% - 32px); }
.preview-media > .icon { width: 64px; height: 64px; color: var(--rose-400); }
.preview-file { display: grid; justify-items: center; gap: 16px; padding: 32px; }
.preview-file > .icon { width: 48px; height: 48px; color: var(--rose); }
.preview-file > p { font-size: 14px; }
.preview-info { padding: 24px 24px 16px; }
.preview-info .eyebrow { color: var(--rose); letter-spacing: .08em; }
.preview-info h2 { margin-top: 8px; font-size: 20px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.preview-path { margin-top: 8px; font-size: 12px; color: var(--rose); overflow-wrap: anywhere; }
.preview-dimensions { margin-top: 8px; font-size: 12px; color: var(--rose); }
.product-source { margin-top: 12px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.product-source dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; }
.product-source dt { color: var(--rose); }
.product-source dd { margin: 0; }
.product-source a { color: var(--rose-deep); text-decoration: underline; text-underline-offset: .15em; }
.preview-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 0 24px 24px; }
.preview-paging { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 24px; border-top: 1px solid var(--rose-200); }
.preview-paging > span { color: var(--rose); font-size: 12px; font-variant-numeric: tabular-nums; }
.preview-help { padding: 0 24px 24px; color: var(--rose); font-size: 12px; }
.toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); padding: 12px 24px; color: var(--on-accent); background: var(--rose-deep); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: 14px; }

@media (max-width: 1536px) {
  .gallery-hero { margin-left: 32px; margin-right: 32px; }
}
@media (max-width: 1100px) {
  .header-inner { gap: 16px; padding: 0 24px; }
  .brand { font-size: 20px; gap: 8px; }
  .brand-signature { display: none; }
  .site-nav a { padding: 0 12px; }
  .hero-inner { gap: 32px; padding: 32px; }
  .hero-search { width: 352px; }
  .gallery-workspace { grid-template-columns: 160px minmax(0, 1fr); gap: 32px; }
  .feature-card { grid-template-columns: 64px minmax(0, 1fr) 38%; }
  .feature-number { font-size: 32px; }
  .folder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 128px; }
  .header-inner { min-height: 0; display: block; padding: 16px 16px 0; }
  .brand { font-size: 20px; width: fit-content; }
  .brand > svg { width: 24px; height: 24px; }
  .site-nav { gap: 0; margin: 12px -16px 0; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { flex: 0 0 auto; min-height: 44px; padding: 8px 16px; font-size: 14px; }
  .site-nav a[aria-current="page"] { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
  .gallery-hero { margin: 16px 16px 0; }
  .hero-inner { display: flex; flex-direction: column; align-items: stretch; gap: 32px; padding: 24px; }
  .hero-copy .eyebrow { font-size: 12px; }
  .hero-copy h1 { font-size: 32px; gap: 16px; }
  .hero-signature { font-size: 32px; }
  .hero-search { width: 100%; align-self: flex-end; order: -1; }
  .search-field input { font-size: 16px; }
  .hero-art::after { background: rgb(95 50 58 / 74%); }
  .gallery-workspace { display: block; padding: 24px 16px 0; }
  .gallery-sidebar { padding: 0; margin-bottom: 24px; }
  .gallery-sidebar > details { position: static; max-height: none; overflow: visible; border-bottom: 1px solid var(--pink-soft); }
  .gallery-sidebar > details > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 0; color: var(--rose); font-size: 14px; cursor: pointer; list-style: none; }
  .gallery-sidebar > details > summary::-webkit-details-marker { display: none; }
  .gallery-sidebar > details[open] > summary > svg { transform: rotate(180deg); }
  #gallery-nav { padding: 12px 0 24px; max-height: none; overflow: visible; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  #gallery-nav > .nav-home { grid-column: 1 / -1; }
  .sidebar-signature, .sidebar-note, .sidebar-catalog { display: none; }
  .breadcrumbs { margin-bottom: 24px; }
  .section-heading { gap: 12px; margin-bottom: 24px; }
  .section-heading h2 { font-size: 24px; }
  .outfit-heading { display: block; }
  .outfit-heading h2 { font-size: 32px; }
  .outfit-heading-rule { margin-top: 12px; padding-bottom: 8px; }
  .character-profile { width: 100%; }
  .character-profile h3, .character-profile .character-debut { font-size: 20px; }
  .outfit-gallery .media-grid { grid-template-columns: 1fr; }
  .character-other { margin-top: 32px; }
  .section-heading > p { font-size: 12px; }
  .section-description { margin: -12px 0 24px; font-size: 14px; }
  .feature-list { gap: 16px; }
  .feature-card { min-height: 112px; grid-template-columns: 48px minmax(0, 1fr) 32%; border-radius: var(--radius-sm); }
  .feature-number { font-size: 24px; }
  .feature-copy { gap: 4px; padding: 16px 8px 16px 0; }
  .feature-copy .eyebrow { font-size: 12px; letter-spacing: .04em; }
  .feature-copy :is(h2, h3) { font-size: 20px; }
  .feature-description { display: none; }
  .feature-arrow { width: 24px; height: 24px; bottom: 8px; right: 8px; }
  .feature-arrow .icon { width: 16px; height: 16px; }
  .folder-grid { gap: 16px; }
  .folder-info { padding: 12px 32px 12px 12px; }
  .folder-info h3, .related-album h4 { font-size: 14px; }
  .folder-info > .icon { width: 16px; height: 16px; right: 8px; top: 16px; }
  .folder-description { padding: 0 12px 12px; }
  .gallery-region + .gallery-region { margin-top: 48px; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .media-caption { padding: 12px 8px; }
  .media-caption h3 { font-size: 12px; min-height: 40px; }
  .media-meta { font-size: 12px; }
  .view-intro { gap: 12px; flex-wrap: wrap; }
  .view-intro > p, .parent-link { font-size: 12px; }
  .filter-toolbar { gap: 8px; }
  .filter-button { padding: 8px 12px; font-size: 12px; }
  .site-footer { padding: 32px 16px 96px; margin-top: 48px; }
  .site-footer > div { flex-direction: column; align-items: center; gap: 4px; }
  .preview-dialog { inset: 8px; max-width: calc(100% - 16px); width: calc(100% - 16px); height: calc(100dvh - 16px); }
  .preview-header { padding: 16px; }
  .preview-media { margin: 0 12px; }
  .preview-media > img, .preview-media > video { max-height: 48dvh; }
  .preview-info { padding: 24px 16px 16px; }
  .preview-actions { padding: 0 16px 24px; }
  .preview-paging { padding: 24px 16px; }
  .preview-help { padding: 0 16px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Enhancement-only controls stay out of the static browsing experience. */
.requires-js { display: none; }
.has-js .filter-toolbar.requires-js { display: flex; }
.has-js button.requires-js { display: inline-flex; }
.icon { fill: currentColor; stroke: none; }
.gallery-nav-link[aria-current="true"] { color: var(--ink); background: var(--pink-soft); font-weight: 600; }

.filter-button:hover, .secondary-button:hover:not(:disabled) { color: var(--ink); }

@media (min-width: 761px) and (max-height: 920px) {
  .sidebar-note, .sidebar-catalog { display: none; }
}
@media (min-width: 761px) and (max-height: 860px) {
  .sidebar-signature { display: none; }
}
@media (max-width: 760px) {
  .gallery-nav-link { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
}

/* Reserve the lower-left version control area instead of covering gallery navigation. */
.sidebar-no-signature .sidebar-signature { display: none; }
.sidebar-no-notes .sidebar-note, .sidebar-no-notes .sidebar-catalog { display: none; }
@media (max-width: 760px) {
  html { scroll-padding-bottom: 80px; }
}

.directory-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 24px; align-items: start; }
.directory-group { background: var(--paper-warm); border: 1px solid var(--rose-300); border-radius: var(--radius-sm); padding: 16px; }
.directory-group ul { padding-left: 1.25rem; }
.directory-group a { display: inline-block; padding-block: 3px; overflow-wrap: anywhere; }
.directory-group a:hover { text-decoration: underline; }
