/* Light gallery theme. Layout and typography are deliberately quiet around images. */
body { font-family: var(--font-sans); }
h1, h2, h3, h4 { font-family: var(--font-sans); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
::selection { background: #dbe7ff; color: #234383; }
::-webkit-scrollbar-thumb { background: #c8d0dd; }
::-webkit-scrollbar-thumb:hover { background: #aeb9cb; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 500; background: var(--accent); color: white; padding: 12px 20px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
/* Header */
.site-header { background: #ffffffed; border-bottom: 1px solid var(--border); transition: box-shadow .3s; }
.site-header.scrolled { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 4px 24px #24375a06; }
.header-inner { max-width: var(--container); margin: auto; padding: 0 40px; gap: 28px; }
.brand { gap: 10px; font-size: 23px; font-weight: 700; letter-spacing: -.9px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--accent); color: white; box-shadow: 0 4px 12px #3569e81c; }
.brand-mark svg { width: 24px; height: 24px; }
.brand-wordmark { display: flex; align-items: center; gap: 12px; }
.brand-wordmark small { border-left: 1px solid var(--border-strong); padding-left: 12px; font-size: 12px; letter-spacing: 0; color: var(--text-3); font-weight: 400; }
.header-nav { display: flex; gap: 28px; height: 100%; margin-left: 20px; align-items: center; }
.header-nav a { font-size: 14px; font-weight: 500; color: var(--text-2); height: 100%; display: flex; align-items: center; position: relative; }
.header-nav a.active, .header-nav a:hover { color: var(--accent); }
.header-nav a.active::after { content: ''; position: absolute; height: 3px; border-radius: 3px; width: 16px; bottom: 14px; left: calc(50% - 8px); background: var(--accent); }
.header-search { width: 260px; }
.search-input { height: 40px; font-size: 13px; border: 1px solid transparent; background: #f3f5f8; border-radius: 10px; padding-right: 32px; }
.search-input:focus { background: white; border-color: #b9ccf7; box-shadow: 0 0 0 3px var(--accent-soft); }
.search-btn { top: 10px; }
.search-key { position: absolute; right: 12px; top: 10px; color: var(--text-3); font: 12px/18px var(--font-sans); border: 1px solid var(--border-strong); width: 18px; text-align: center; border-radius: 4px; pointer-events: none; }
.header-user { min-width: 120px; justify-content: flex-end; gap: 8px; }
.header-user .btn { height: 38px; padding: 0 18px; font-size: 13px; }
.header-user .btn-ghost { background: transparent; }
.is-minimal .header-user { margin-left: auto; }
/* Controls */
.btn { border-radius: 9px; transition: transform .3s var(--ease), background .25s, color .25s, box-shadow .3s; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn-primary, .btn-primary:hover:not(:disabled) { background: var(--accent); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); filter: none; box-shadow: 0 5px 14px #3569e821; }
.btn-ghost { background: var(--bg-2); }
.btn-gold, .btn-gold:hover:not(:disabled) { background: var(--accent); color: white; }
.icon-btn { background: transparent; color: var(--text-2); }
.icon-btn:hover { background: var(--bg-3); }
.input, .select, .textarea { background-color: white; font-size: 14px; }
.input:focus, .select:focus, .textarea:focus { background-color: white; box-shadow: 0 0 0 3px var(--accent-soft); }
.suggest-panel { background: white; border-color: var(--border); box-shadow: 0 12px 40px #24375a14; }
.suggest-item { font-size: 13px; }
.suggest-item:hover { background: var(--bg-2); }
.user-name { background: var(--bg-2); }
/* Homepage */
.gallery-page .layout { display: block; max-width: var(--container); margin: auto; min-height: calc(100vh - 100px); }
.main-col { padding: 36px 40px 64px; }
.editorial-hero { isolation: isolate; position: relative; display: grid; grid-template-columns: 49% 51%; min-height: 340px; border-radius: 24px; overflow: hidden; background: linear-gradient(115deg, #edf3ff 0%, #f2f6fd 53%, #eaf0fb 100%); }
.hero-copy { padding: 38px 0 38px 42px; z-index: 2; }
.eyebrow { font-size: 12px; letter-spacing: 1.2px; color: var(--accent); font-weight: 500; }
.hero-copy .eyebrow { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.hero-copy h1 { font-size: clamp(34px, 3.4vw, 48px); font-weight: 650; line-height: 1.38; letter-spacing: -1.8px; margin: 18px 0 14px; }
.hero-copy h1 em { font-style: normal; color: var(--accent); }
.hero-description { font-size: 14px; color: var(--text-2); line-height: 1.9; }
.hero-cta { display: inline-flex; align-items: center; gap: 26px; background: var(--accent); color: white; font-size: 13px; font-weight: 500; border-radius: 10px; padding: 12px 20px; margin-top: 23px; box-shadow: 0 5px 16px #3569e81a; transition: background .25s, transform .4s var(--ease), box-shadow .4s; }
.hero-cta span { font-size: 20px; line-height: 1; transition: transform .4s var(--ease); }
.hero-cta:hover { color: white; background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 20px #3569e830; }
.hero-cta:hover span { transform: translate(2px, -2px); }
.hero-art { position: relative; min-width: 0; }
.hero-fallback { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .4s; }
.hero-fallback svg { width: min(100%, 420px); height: 100%; max-height: 330px; }
.hero-art.has-photos .hero-fallback { opacity: 0; }
.hero-photos { position: absolute; inset: 0; }
.hero-photo { position: absolute; left: 9%; top: 27px; width: 44%; height: 78%; border-radius: 16px; overflow: hidden; background: #dce7f9; box-shadow: 0 12px 30px #2b456e18; transition: transform .7s var(--ease), opacity .4s; }
.hero-photo.secondary { left: 56%; top: 62px; width: 36%; height: 76%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-photo:hover { transform: translateY(-5px); }
.hero-photo-label { position: absolute; inset: auto 0 0; display: flex; align-items: center; justify-content: space-between; padding: 34px 14px 14px; background: linear-gradient(transparent, #10203d70); color: white; font-size: 13px; font-weight: 500; }
.hero-photo-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-photo-label b { font-weight: 400; font-size: 18px; margin-left: 12px; }
.hero-photo.img-broken { opacity: 0; pointer-events: none; }
.hero-controls { position: absolute; left: calc(49% + 5%); bottom: 16px; display: flex; align-items: center; gap: 10px; z-index: 4; }
.hero-controls button { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #cfdbed; border-radius: 50%; background: #ffffffb3; color: #506583; transition: background .2s, border-color .2s; }
.hero-controls button:hover { background: white; border-color: #90ace0; }
.hero-counter { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.collection { scroll-margin-top: calc(var(--header-h) + 20px); }
.list-head { justify-content: space-between; align-items: center; padding: 34px 0 22px; }
.list-title { font-size: 25px; font-weight: 650; letter-spacing: -.6px; overflow-wrap: anywhere; }
.list-heading p { color: var(--text-3); font-size: 13px; margin-top: 8px; }
.list-tools { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.list-sub { font-size: 12px; }
.density-toggle { display: flex; padding: 4px; border: 1px solid var(--border); border-radius: 9px; gap: 2px; background: #f0f3f8; }
.density-toggle button { width: 30px; height: 28px; color: var(--text-3); font-size: 12px; border-radius: 6px; transition: background .25s, color .25s; }
.density-toggle button[aria-pressed="true"] { background: white; color: var(--accent); box-shadow: 0 1px 5px #263b5c0f; }
.category-nav { display: flex; gap: 8px; padding-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.category-nav a { display: flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 9px 16px; border: 1px solid var(--border); border-radius: 9px; color: var(--text-2); background: white; font-size: 13px; transition: background .25s, color .25s, border-color .25s; }
.category-nav a.active { background: var(--accent); border-color: var(--accent); color: white; }
.category-nav a:hover:not(.active) { background: var(--accent-soft); border-color: #d6e2ff; color: var(--accent); }
.category-nav .side-icon { font-size: 12px; }
.category-nav .side-count { font-size: 11px; opacity: .85; }
.tag-nav { padding: 0 0 22px; gap: 8px 18px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.tag-pill { flex-shrink: 0; font-size: 12px; color: var(--text-3); padding: 3px 0; }
.tag-pill.active { color: var(--accent); font-weight: 500; }
.tag-pill .tag-count { font-size: 10px; margin-left: 4px; opacity: 1; }
.post-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 22px; }
.post-grid .post-card { width: auto; min-width: 0; }
.post-grid.compact { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 26px 16px; }
.card-media { border-radius: 14px; aspect-ratio: 3 / 4; background: #edf1f7; }
.card-media::after { content: ''; position: absolute; inset: 0; border: 1px solid #15274a06; border-radius: inherit; pointer-events: none; }
.card-media img { transition: transform .8s var(--ease), opacity .5s var(--ease); }
.post-card:hover .card-media img { transform: scale(1.04); filter: none; }
.card-count { top: 12px; right: 12px; padding: 4px 8px; border: 1px solid #ffffff40; border-radius: 6px; background: #15243e50; color: white; font-size: 11px; font-weight: 400; }
.card-count i { font-size: 10px; margin-right: 5px; }
.card-hover { padding: 18px; background: linear-gradient(transparent 55%, #15243e8c); transition: opacity .4s; }
.card-hover .card-open { align-self: flex-end; display: flex; align-items: center; gap: 10px; font-size: 12px; color: white; transform: translateY(8px); transition: transform .5s var(--ease); }
.card-open b { display: grid; place-items: center; height: 30px; width: 30px; border-radius: 50%; background: #ffffff26; border: 1px solid #ffffff60; font-size: 18px; font-weight: 400; }
.post-card:hover .card-open, .post-card:focus-visible .card-open { transform: translateY(0); }
.post-card:focus-visible .card-hover { opacity: 1; }
.card-title { background: transparent; padding: 12px 1px 0; font-size: 14px; font-weight: 550; line-height: 1.6; letter-spacing: 0; }
.card-sub { background: transparent; padding: 6px 1px 0; font-size: 12px; gap: 8px; }
.card-cat, .card-meta { color: var(--text-3); }
.card-meta { margin-left: auto; font-size: 11px; }
.pagination { margin-top: 44px; gap: 7px; }
.page-btn { background: white; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.page-btn.current { border-color: var(--accent); }
.page-btn.current:disabled { opacity: 1; }
.empty-state { grid-column: 1 / -1; border: 1px dashed var(--border-strong); background: white; border-radius: 16px; }
.empty-state .btn { margin-top: 18px; }
/* Missing local files must not look like broken UI or fabricated content. */
.img-broken { background: #edf1f7 !important; }
.img-broken::before { content: ''; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44' fill='none' stroke='%23b6c3d8' stroke-width='1.3'%3E%3Crect x='7' y='7' width='30' height='30' rx='7'/%3E%3Cpath d='m11 30 9-12 8 10 5-6'/%3E%3Ccircle cx='29' cy='15' r='3'/%3E%3C/svg%3E") center calc(50% - 12px) / 44px no-repeat; }
.img-broken::after { content: '封面暂不可用'; position: absolute; inset: 0; display: grid; place-items: center; padding-top: 58px; font-size: 12px; color: var(--text-3); border: none; }
.g-item.img-broken::after { content: '图片暂不可用'; }
/* Secondary surfaces */
.site-footer { max-width: var(--container); margin-inline: auto; padding: 26px 40px; border-color: var(--border); }
.footer-inner { font-size: 11px; }
.footer-signature { display: flex; align-items: center; gap: 14px; }
.footer-signature b { color: var(--text-2); font-size: 15px; letter-spacing: -.4px; }
.footer-links a { color: var(--text-3); }
.footer-links a:hover { color: var(--accent); }
.back-top { border-radius: 12px; background: #ffffffed; box-shadow: var(--shadow-1); }
.drawer { right: 0; transform: translateX(100%); visibility: hidden; transition: transform .45s var(--ease), visibility .45s; background: white; border-color: var(--border); }
.drawer.open { transform: translateX(0); visibility: visible; }
.drawer-nav a { font-size: 14px; }
.modal-box { background: white; border-color: var(--border); }
.modal.open .modal-box, .suggest-panel.open { animation: surface-in .3s var(--ease); }
.skeleton { background: linear-gradient(105deg, #edf1f7 35%, #f9fbff 50%, #edf1f7 65%); background-size: 220% 100%; animation-duration: 1.8s; }
.grid-skeleton .card-media { border-radius: 14px; }
@keyframes surface-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: surface-in .7s var(--ease) both; }
  .hero-copy h1 { animation-delay: .06s; }
  .hero-description { animation-delay: .12s; }
  .hero-cta { animation-delay: .18s; }
}
/* Account pages */
.auth-page .page { padding: calc(var(--header-h) + 48px) 24px 56px; }
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; width: min(920px, 100%); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; background: white; box-shadow: var(--shadow-2); }
.auth-story { position: relative; padding: 48px 42px; display: flex; flex-direction: column; overflow: hidden; background: #edf3ff; }
.auth-story h2 { font: 650 40px/1.5 var(--font-sans); letter-spacing: -1.2px; margin: 40px 0 18px; z-index: 1; }
.auth-story h2 em { color: var(--accent); font-style: normal; }
.auth-story p { color: var(--text-2); font-size: 14px; line-height: 1.9; z-index: 1; }
.auth-story-art { width: 280px; height: 280px; border: 1px solid #c8d9fb; border-radius: 48px; transform: rotate(30deg); position: absolute; right: -80px; bottom: -80px; }
.auth-story-art::after { content: ''; position: absolute; inset: 30px; border: 1px solid #c8d9fb; border-radius: 32px; }
.auth-story > small { margin-top: auto; padding-top: 70px; font-size: 13px; color: #5f7aab; z-index: 1; }
.auth-page .auth-card { max-width: none; background: white; box-shadow: none; border: none; border-radius: 0; padding: 42px 40px; }
.auth-page .auth-brand { align-items: flex-start; text-align: left; gap: 10px; }
.auth-page .auth-brand .brand-mark { display: none; }
.auth-page .auth-brand h1 { font-size: 24px; font-weight: 600; }
.auth-page .auth-brand p { font-size: 13px; }
.auth-page .auth-tabs { background: #f0f3f8; border: 0; border-radius: 9px; padding: 4px; }
.auth-page .auth-tab { border-radius: 6px; font-weight: 500; }
.auth-page .auth-tab.active { background: white; color: var(--accent); box-shadow: 0 1px 5px #24375a12; }
.auth-page .input { height: 46px; font-size: 14px; }
.auth-page .auth-submit { border-radius: 9px; font-size: 14px; height: 44px; }
.auth-page .auth-tip { font-size: 11px; line-height: 1.9; }
/* Detail reading area */
.side { padding: 32px 16px 24px; background: transparent; }
.side-title { font-size: 12px; padding: 0 12px 18px; letter-spacing: 0; }
.side-nav { gap: 5px; }
.side a { padding: 11px 12px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; }
.side a.active, .side a.on { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.side a:hover { background: var(--bg-3); }
.detail-page .detail-wrap { padding: 26px 26px 48px; }
.detail-page .zuopin { top: var(--header-h); height: calc(100vh - var(--header-h)); padding: 32px 26px; background: white; border-color: var(--border); }
.detail-page .zuopin h1 { font-size: 23px; font-weight: 600; line-height: 1.6; padding: 20px 0; }
.detail-page .z-meta { font-size: 12px; gap: 10px; }
.detail-page .z-cat-row a, .detail-page .z-tags a { font-size: 12px; border-color: var(--border-strong); }
.detail-page .z-cat-row a { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.detail-page .z-download { padding-top: 24px; }
.detail-page .z-download .btn { width: 100%; font-size: 14px; }
.detail-page .z-tip { font-size: 12px; line-height: 1.9; }
.detail-page .gallerypic.single .g-item, .detail-page .gallerypic.single .g-item img { border-radius: 12px; }
.detail-page .gallerypic.single .g-item { margin-bottom: 20px; }
.detail-page .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 14px; }
.detail-page .zuopin-menu { border: 1px solid var(--border-strong); background: #ffffffeb; border-radius: 12px 0 0 12px; box-shadow: var(--shadow-1); }
.detail-page .zuopin-menu button { font-size: 11px; }
.detail-page .zuopin-menu button i { font-size: 16px; }
.detail-page .lightbox.open { animation: surface-in .3s var(--ease); }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.08); }
.detail-page #detailMain > .container { padding-top: calc(var(--header-h) + 40px); min-height: 80vh; }
/* Admin shares light controls; keep image overlays and lightbox dark for contrast. */
.admin-side { background: white; }
.admin-nav button.active, .admin-nav button.active i { color: white; }
.table tbody tr:hover { background: var(--bg-2); }
@media (max-width: 1150px) {
  .header-inner { gap: 20px; padding-inline: 28px; }
  .brand-wordmark small { display: none; }
  .header-nav { margin-left: 12px; }
  .main-col { padding-inline: 28px; }
  .hero-copy { padding-left: 32px; }
  .hero-copy h1 { font-size: 39px; }
  .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .post-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 992px) {
  .header-nav { margin-left: 0; }
  .header-search { width: 220px; }
  .header-inner { gap: 16px; }
  .detail-page .zuopin { position: static; height: auto; padding: calc(var(--header-h) + 28px) 26px 28px; }
  .detail-page .zuopin-menu { border-radius: 0; }
  .detail-page .detail-layout { padding-top: 0; }
  .detail-page .detail-wrap { padding: 20px; }
  .detail-page .site-footer { margin-right: 0; }
}
@media (max-width: 760px) {
  :root { --header-h: 70px; }
  .header-inner { padding-inline: 20px; gap: 14px; }
  .header-nav { display: none; }
  .header-user { display: none; }
  .header-search { width: 240px; }
  .brand { font-size: 21px; }
  .main-col { padding: 24px 20px 44px; }
  .editorial-hero { min-height: 310px; grid-template-columns: 51% 49%; border-radius: 20px; }
  .hero-copy { padding: 30px 0 30px 26px; }
  .hero-copy h1 { font-size: 31px; letter-spacing: -1.2px; }
  .hero-description { font-size: 12px; }
  .hero-cta { font-size: 12px; padding: 11px 16px; margin-top: 20px; gap: 20px; }
  .hero-photo { left: 5%; width: 47%; top: 25px; height: 75%; border-radius: 12px; }
  .hero-photo.secondary { left: 56%; width: 38%; top: 55px; height: 72%; }
  .hero-photo-label { font-size: 11px; padding-inline: 10px; }
  .hero-controls { left: 54%; bottom: 12px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
  .post-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 12px; }
  .list-title { font-size: 23px; }
  .list-heading p { font-size: 12px; }
  .list-tools { gap: 12px; }
  .card-media { aspect-ratio: 3 / 4; border-radius: 12px; }
  .card-title { font-size: 13px; }
  .card-sub { font-size: 11px; }
  .card-meta { font-size: 10px; }
  .auth-shell { grid-template-columns: 1fr; max-width: 440px; }
  .auth-story { display: none; }
  .auth-page .auth-card { padding: 32px 26px; }
  .detail-page .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-fit { inset: 70px 12px; }
  .lb-prev { left: 12px; }
  .lb-next { right: 12px; }
  .lb-btn { width: 38px; height: 38px; }
  .lb-hint { font-size: 10px; padding: 8px 12px; }
  .site-footer { padding: 24px 20px; }
}
@media (max-width: 540px) {
  :root { --header-h: 114px; }
  .header-inner { height: 114px; padding-block: 12px; gap: 10px; flex-wrap: wrap; align-content: center; }
  .header-search { display: block; order: 4; width: 100%; }
  .search-input { height: 34px; font-size: 12px; border-radius: 8px; }
  .search-btn, .search-key { top: 7px; }
  .hamburger { margin-left: auto; }
  .header-inner.is-minimal { height: 70px; }
  .auth-page { --header-h: 70px; }
  .main-col { padding: 20px 16px 40px; }
  .editorial-hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 22px 24px 20px; }
  .hero-copy .eyebrow { display: none; }
  .hero-copy h1 { font-size: 29px; letter-spacing: -1px; margin: 0 0 12px; }
  .hero-description { font-size: 12px; line-height: 1.8; }
  .hero-description br { display: none; }
  .hero-cta { display: none; }
  .hero-art { height: 132px; margin: 0 24px 22px; }
  .hero-fallback svg { max-height: 132px; }
  .hero-photo, .hero-photo.secondary { top: 0; left: 0; width: 57%; height: 100%; }
  .hero-photo.secondary { left: 61%; width: 39%; }
  .hero-photo img { object-position: center 25%; }
  .hero-controls { left: auto; right: 22px; top: 27px; bottom: auto; gap: 7px; }
  .hero-photo-label { font-size: 12px; }
  .list-head { padding-top: 26px; gap: 10px; }
  .list-heading p { display: none; }
  .list-tools { gap: 8px; }
  .list-sub { font-size: 11px; }
  .density-toggle button { width: 25px; }
  .category-nav { padding-bottom: 20px; }
  .category-nav a { font-size: 12px; padding: 8px 12px; }
  .card-sub { flex-wrap: wrap; gap: 4px; }
  .card-meta { margin-left: 0; width: 100%; }
  .card-count { top: 9px; right: 9px; font-size: 10px; }
  .footer-inner { align-items: flex-start; gap: 18px; }
  .footer-signature { flex-direction: column; align-items: flex-start; gap: 6px; }
  .footer-links { gap: 16px; }
}
@media (hover: none) { .card-hover { display: none; } .post-card:hover .card-media img { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
