@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #fff;
  --bg-soft: #f7f7f7;
  --text: rgba(0,0,0,.82);
  --strong: rgba(0,0,0,.94);
  --light: rgba(0,0,0,.56);
  --mute: rgba(0,0,0,.28);
  --line: rgba(0,0,0,.08);
  --accent: #000;
  --danger: #b42318;
  --en-sans: "Helvetica Neue", Helvetica, Arial;
  --sys-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, "Droid Sans", "Helvetica Neue";
  --cjk-sans: "PingFang SC", "Hiragino Sans GB", "Droid Sans Fallback", "Microsoft YaHei";
  --sys-serif: Georgia, Palatino, "Times New Roman", Times;
  --mono: Menlo, Monaco, Consolas, "Courier New", monospace;
  --font-base: var(--sys-sans), var(--cjk-sans), sans-serif;
  --font-text: "Source Sans Pro", "Source Sans 3", var(--font-base);
  --sans: var(--font-base);
  --text-font: var(--font-text);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #2a2b2d;
  --bg-soft: #353638;
  --text: rgba(255,255,255,.82);
  --strong: rgba(255,255,255,.94);
  --light: rgba(255,255,255,.58);
  --mute: rgba(255,255,255,.28);
  --line: rgba(255,255,255,.1);
  --accent: #fff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --bg:#2a2b2d; --bg-soft:#353638; --text:rgba(255,255,255,.82); --strong:rgba(255,255,255,.94); --light:rgba(255,255,255,.58); --mute:rgba(255,255,255,.28); --line:rgba(255,255,255,.1); --accent:#fff; }
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--bg); font: 16px/1.42 var(--font-base); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--accent); }
button, input, textarea, select { font: inherit; }

.site-head { height: 55px; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--bg); }
.head-inner { max-width: 1200px; height: 54px; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; min-width: 0; align-items: center; gap: 10px; color: var(--text); font-weight: 900; text-decoration: none; font-size: 16px; letter-spacing: -.01em; }
.logo img { display: block; width: 30px; height: 30px; flex: 0 0 auto; object-fit: cover; }
.logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head-actions { display: flex; align-items: center; gap: 14px; }
.account-link { display: inline-flex; min-width: 0; max-width: 180px; align-items: center; gap: 8px; color: var(--light); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.account-link:hover { color: var(--strong); }
.account-link-avatar { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; background: #111; font-size: 12px; font-weight: 700; line-height: 1; }
.account-link-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.account-link-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.site-navigation { padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--bg); }
.site-navigation-inner { display: flex; min-height: 46px; max-width: 1200px; align-items: center; gap: 28px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.site-navigation-inner::-webkit-scrollbar { display: none; }
.site-navigation a { position: relative; flex: 0 0 auto; padding: 14px 0 12px; color: var(--light); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.site-navigation a:hover, .site-navigation a.active { color: var(--strong); }
.site-navigation a.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--strong); content: ""; }
.language-menu { position: relative; }
.language-menu summary { cursor: pointer; list-style: none; color: var(--light); font-size: 13px; font-weight: 700; padding: 8px 4px; }
.language-menu summary::-webkit-details-marker { display:none; }
.language-popover { position: absolute; right: 0; top: 38px; min-width: 130px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); box-shadow: 0 12px 32px rgba(0,0,0,.12); z-index: 10; }
.language-popover a { display: block; padding: 7px 10px; border-radius: 5px; color: var(--text); text-decoration: none; white-space: nowrap; }
.language-popover a:hover, .language-popover a.active { background: var(--bg-soft); color: var(--strong); }
.theme-button { position: relative; width: 56px; height: 30px; min-height: 30px; padding: 0 4px; border: 1px solid var(--line); border-radius: 16px; color: var(--light); background: var(--bg-soft); cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.theme-button::before { content: ""; position: absolute; top: 2px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); box-shadow: 0 1px 5px rgba(0,0,0,.18); transition: transform .2s ease, background .2s ease; }
.theme-button span { position: relative; z-index: 1; display: grid; width: 21px; height: 21px; place-items: center; opacity: .38; transition: opacity .2s ease, color .2s ease; }
.theme-button[data-current-theme="light"] .sun { color: var(--strong); opacity: 1; }
.theme-button[data-current-theme="dark"]::before { transform: translateX(25px); }
.theme-button[data-current-theme="dark"] .moon { color: var(--strong); opacity: 1; }
.theme-button:focus-visible { outline: 2px solid var(--strong); outline-offset: 2px; }

.inner { max-width: 680px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.main { min-height: calc(100vh - 100px); padding-top: 64px; padding-bottom: 32px; font-family: var(--text-font); }
.post { position: relative; padding: 30px 0 20px; }
.content-layout-page.inner { max-width: 1248px; padding-right: 24px; padding-left: 24px; }
.content-layout-page.main { padding-top: 24px; }
.content-layout-page .post { padding-top: 20px; }
.standard-content { width: 100%; max-width: 1200px; }
.post h1 { margin: 0 0 .1em; color: var(--strong); font: 700 1.8em/1.1 var(--font-text); letter-spacing: .02em; }
.post h1 a { text-decoration: none; }
.prose { margin-top: 2em; font-family: var(--font-base); line-height: 1.72; overflow-wrap: break-word; }
.prose h2, .prose h3 { color: var(--strong); margin: 1.8em 0 .6em; line-height: 1.25; }
.prose p { margin: 1.2em 0; }
.prose strong, .prose b, .prose em, .prose i { color: var(--strong); }
:lang(zh) .prose em, :lang(zh-hans) .prose em, :lang(zh-hant) .prose em, :lang(ja) .prose em { font-style: normal; text-emphasis: filled dot var(--light); text-emphasis-position: under; }
.prose em:lang(en) { font-style: italic; text-emphasis: none; }
.prose img { display: block; max-width: 100%; height: auto; margin: 2em auto; }
.prose .image-stack { display: grid; gap: 14px; margin: 1.64em auto; }
.prose .image-stack:has(+ .image-stack) { margin-bottom: 0; }
.prose .image-stack + .image-stack { margin-top: 14px; }
.prose .image-row { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 14px; }
.prose .image-row img { flex: 1 1 0; min-width: 0; width: auto; max-width: 100%; height: auto; margin: 0; object-fit: contain; }
.prose .image-row img:only-child { width: 100%; max-width: 100%; flex: 1 1 0; }
.prose blockquote { position: relative; margin: 0 0 1.64em; padding: 34px 1em .1em 20px; border-left: 4px solid var(--accent); color: var(--text); font-family: var(--font-base); font-size: 1.12em; }
.prose blockquote::before { content: "“"; position: absolute; top: 0; left: 20px; color: var(--accent); font: 700 48px/1 var(--sys-serif); }
.prose hr { display: block; width: 90%; max-width: 100px; margin: 2.4em auto; border: 0; border-top: 5px solid var(--line); }
.prose pre { overflow-x: auto; padding: 16px; border-radius: 6px; background: var(--bg-soft); }
.prose code { font-family: var(--mono); }
.post-detail .prose { line-height: 1.64; }
.post-detail .prose p { margin-top: 0; margin-bottom: 1.12em; }
.post-detail .prose h2 { margin: 1.42em 0 .4em; font-size: 1.42em; }
.post-detail .prose h3 { margin: 1.62em 0 1em; font-size: 1.17em; }
.post-detail .prose h4,
.post-detail .prose h5,
.post-detail .prose h6 { margin: 1.4em 0 .8em; font-size: 1em; }
.post-detail .prose h6 { font-weight: 500; }
.post-detail .prose ul,
.post-detail .prose ol { margin: 0 0 24px 6px; padding-left: 16px; }
.post-detail .prose li + li { margin-top: .2em; }
.post-detail .prose figure { margin: 0; }
.post-detail .prose figcaption { margin-top: 4px; color: var(--light); font-size: 13px; text-align: center; }
.article-signature { display: flex; align-items: center; flex-direction: column; margin-top: 42px; text-align: center; }
.article-signature img { display: block; width: 42px; height: 42px; object-fit: cover; }
.article-signature p { margin: 11px 0 0; color: var(--mute); font: 500 11px/1.4 var(--sans); letter-spacing: .04em; }
.published { color: var(--light); font-weight: 500; text-decoration: none; }
.published:hover { color: var(--strong); text-decoration: underline; }
.published.static { display: block; margin-top: 2em; }
.content-date { display: block; margin-top: 8px; color: var(--mute); font: 400 12px/1.4 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.content-date:hover { color: var(--light); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 0; margin-top: 10px; color: var(--mute); font: 400 12px/1.5 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .015em; }
.post-meta > * { display: inline-flex; align-items: center; }
.meta-separator { display: inline-flex; margin: 0 9px; color: var(--light); opacity: .55; text-decoration: none; user-select: none; }
.post-meta a { color: inherit; text-decoration: none; }
.post-meta a:hover { color: var(--strong); text-decoration: underline; }
.post-meta.compact { margin-top: 8px; }
.fallback-note { margin: 1.4em 0 0; padding: 10px 12px; border-radius: 5px; color: var(--light); background: var(--bg-soft); font-size: 14px; }
.post-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.post-title-row h1 { flex: 1; }
.post-languages { display: flex; gap: 4px; padding-top: 1px; }
.post-languages a { min-width: 34px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 16px; color: var(--light); text-align: center; text-decoration: none; font: 700 11px/1 var(--sans); }
.post-languages a:hover, .post-languages a.active { color: var(--bg); border-color: var(--strong); background: var(--strong); }
.draft-preview-note { display: inline-block; margin: 14px 0 0; padding: 5px 9px; border-radius: 4px; color: #9a6700; background: #fff3cd; font: 600 12px/1.2 var(--sans); }
.post-detail .prose img { cursor: zoom-in; }
.post-detail .prose img:focus-visible { outline: 2px solid var(--strong); outline-offset: 4px; }
body.image-lightbox-open { overflow: hidden; }
.image-lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 40px; background: rgba(0,0,0,.84); backdrop-filter: blur(2px); }
.image-lightbox[hidden] { display: none; }
.image-lightbox img { display: block; width: auto; height: auto; max-width: 80vw; max-height: 86vh; object-fit: contain; box-shadow: 0 18px 70px rgba(0,0,0,.38); }
.image-lightbox-close { position: fixed; top: 18px; right: 18px; width: 34px; height: 34px; min-height: 34px; padding: 0; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; background: rgba(0,0,0,.28); }
.image-lightbox-close::before, .image-lightbox-close::after { content: ""; position: absolute; top: 50%; left: 50%; width: 15px; height: 1.5px; border-radius: 2px; background: #fff; transform: translate(-50%, -50%) rotate(45deg); }
.image-lightbox-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.image-lightbox-nav { position: fixed; top: 50%; width: 42px; height: 42px; min-height: 42px; padding: 0; border: 1px solid rgba(255,255,255,.36); border-radius: 50%; background: rgba(0,0,0,.3); transform: translateY(-50%); }
.image-lightbox-nav[hidden], .image-lightbox-counter[hidden] { display: none; }
.image-lightbox-nav::before { content: ""; position: absolute; top: 50%; left: 52%; width: 10px; height: 10px; border-bottom: 1.5px solid #fff; border-left: 1.5px solid #fff; transform: translate(-50%, -50%) rotate(45deg); }
.image-lightbox-previous { left: 22px; }
.image-lightbox-next { right: 22px; }
.image-lightbox-next::before { left: 48%; transform: translate(-50%, -50%) rotate(225deg); }
.image-lightbox-counter { position: fixed; bottom: 18px; left: 50%; padding: 5px 9px; border-radius: 12px; color: rgba(255,255,255,.82); background: rgba(0,0,0,.3); font: 600 11px/1 var(--sans); letter-spacing: .08em; transform: translateX(-50%); }
.image-lightbox-close:hover, .image-lightbox-close:focus-visible, .image-lightbox-nav:hover, .image-lightbox-nav:focus-visible { border-color: #fff; background: rgba(255,255,255,.14); outline: none; }
.post-item { position: relative; max-width: 1200px; padding: 30px 0; border-top: 1px solid var(--line); }
.post-item h2 { margin: 0; font-size: 1.5em; }
.post-item h2 a { text-decoration: none; }
.post-item h2 a::after { content: "→"; opacity: 0; margin-left: 0; transition: .2s; }
.post-item h2 a:hover::after { opacity: 1; margin-left: 10px; }
.post-item p { margin: 14px 0 1em; color: var(--text); }
.home-introduction { margin-top: 54px; padding: 30px 0 8px; border-top: 1px solid var(--line); text-align: right; }
.home-introduction h2 { margin: 0; color: var(--strong); font-size: 17px; letter-spacing: .01em; }
.home-introduction p { max-width: 640px; margin: 14px 0 10px auto; color: var(--light); font-size: 15px; line-height: 1.7; }
.home-introduction a { color: var(--text); font-size: 13px; text-underline-offset: 4px; }
.home-pagination { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 28px; padding: 22px 0 4px; border-top: 1px solid var(--line); }
.home-pagination a { color: var(--text); font: 600 13px/1.4 var(--sans); letter-spacing: .02em; text-decoration: none; }
.home-pagination a:hover, .home-pagination a:focus-visible { color: var(--strong); text-decoration: underline; text-underline-offset: 5px; }
.home-pagination .next { margin-left: auto; text-align: right; }
.related-posts { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); }
.related-posts ul { margin: 15px 0 0; padding: 0; list-style: none; }
.related-posts li + li { border-top: 1px solid var(--line); }
.related-posts a { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 12px 0; color: var(--text); text-decoration: none; }
.related-posts a:hover span { text-decoration: underline; text-underline-offset: 4px; }
.related-posts time { flex: 0 0 auto; color: var(--mute); font-size: 11px; }
.taxonomy-main { min-height: calc(100vh - 100px); padding: 42px 24px 60px; font-family: var(--font-base); }
.taxonomy-inner { width: min(1200px, 100%); margin: 0 auto; }
.taxonomy-header { max-width: 760px; margin-bottom: 34px; }
.taxonomy-header h1 { margin: 5px 0 0; color: var(--strong); font: 750 clamp(36px, 5vw, 62px)/1.04 var(--font-text); letter-spacing: -.035em; }
.taxonomy-header > p:last-child { margin: 18px 0 0; color: var(--light); font-size: 16px; line-height: 1.65; }
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.topic-grid a { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 18px; padding: 25px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.topic-grid a:nth-child(odd) { padding-right: 22px; }
.topic-grid a:nth-child(even) { padding-left: 22px; border-left: 1px solid var(--line); }
.topic-grid h2 { margin: 0; color: var(--strong); font-size: 22px; }
.topic-grid span { flex: 0 0 auto; color: var(--mute); font-size: 11px; }
.topic-grid a:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.collection-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 24px 0 4px; }
.collection-pagination span:last-child { text-align: right; }
.collection-pagination a { color: var(--text); font: 600 13px/1.4 var(--sans); letter-spacing: .02em; text-decoration: none; }
.collection-pagination a:hover, .collection-pagination a:focus-visible { color: var(--strong); text-decoration: underline; text-underline-offset: 5px; }
.collection-pagination small { color: var(--mute); font: 500 11px/1.4 var(--sans); font-variant-numeric: tabular-nums; }
.taxonomy-empty { padding: 42px 0; border-top: 1px solid var(--line); color: var(--light); }
.gallery-index-main { min-height: calc(100vh - 100px); padding: 42px 24px 64px; font-family: var(--font-base); }
.gallery-index { width: min(1200px, 100%); margin: 0 auto; }
.gallery-index-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; margin-bottom: 34px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.gallery-index-header h1 { margin: 0; color: var(--strong); font: 750 clamp(36px, 4.5vw, 62px)/1 var(--font-text); letter-spacing: -.035em; }
.gallery-index-header > p:last-child { margin: 0 0 5px; color: var(--mute); font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.gallery-index-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 58px; }
.gallery-index-card { display: block; min-width: 0; color: inherit; text-decoration: none; }
.gallery-index-preview { display: grid; height: auto; aspect-ratio: 2 / 1; gap: 4px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.gallery-index-preview img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; }
.gallery-index-preview-1 { grid-template-columns: 1fr; }
.gallery-index-preview-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-index-preview-3 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.gallery-index-preview-3 img:first-child { grid-row: 1 / -1; }
.gallery-index-preview-0 { place-items: center; color: var(--mute); border-style: dashed; font: 700 10px/1 var(--sans); letter-spacing: .15em; }
.gallery-index-card-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 16px; }
.gallery-index-card h2 { margin: 0; color: var(--strong); font: 700 25px/1.15 var(--font-text); letter-spacing: -.015em; }
.gallery-index-card h2 a { color: inherit; text-decoration: none; }
.gallery-index-card h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.gallery-index-meta { display: flex; flex-wrap: wrap; margin: 9px 0 0; color: var(--mute); font: 500 11px/1.45 var(--sans); letter-spacing: .025em; }
.gallery-index-meta .meta-separator { margin: 0 8px; }
.gallery-index-meta a, .gallery-detail-meta a { color: inherit; text-decoration: none; }
.gallery-index-meta a:hover, .gallery-detail-meta a:hover { color: var(--strong); text-decoration: underline; text-underline-offset: 3px; }
.gallery-index-arrow { flex: 0 0 auto; padding-top: 2px; color: var(--mute); font-size: 20px; line-height: 1; text-decoration: none; }
.gallery-index-description { display: -webkit-box; max-width: 560px; margin: 13px 0 0; overflow: hidden; color: var(--light); font-size: 14px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.gallery-index-card a:focus-visible { outline: 2px solid var(--strong); outline-offset: 4px; }
.gallery-index-empty { display: grid; min-height: 320px; place-items: center; align-content: center; color: var(--light); border: 1px dashed var(--line); text-align: center; }
.gallery-index-empty span { font-size: 34px; }
.gallery-index-empty p { margin: 12px 0 0; }
.gallery-main { min-height: calc(100vh - 100px); padding: 42px 24px 56px; font-family: var(--font-base); }
.gallery-detail { width: min(1200px, 100%); margin: 0 auto; }
.gallery-detail-header { max-width: 860px; margin-bottom: 42px; }
.gallery-detail-header h1 { margin: 0; color: var(--strong); font: 750 clamp(36px, 5vw, 72px)/1.02 var(--font-text); letter-spacing: -.035em; }
.gallery-detail-meta { display: flex; flex-wrap: wrap; margin-top: 17px; color: var(--mute); font: 500 12px/1.5 var(--sans); letter-spacing: .025em; }
.gallery-detail-meta .meta-separator { margin: 0 10px; }
.gallery-detail-description { max-width: 720px; margin: 24px 0 0; color: var(--text); font-size: 17px; line-height: 1.7; white-space: pre-line; }
.gallery-render { width: 100%; }
.gallery-public-photo { min-width: 0; margin: 0; }
.gallery-public-image { position: relative; min-width: 0; overflow: hidden; background: var(--bg-soft); }
.gallery-public-image img, .gallery-fade-slide > img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.gallery-public-image img:focus-visible, .gallery-fade-slide > img:focus-visible { outline: 2px solid var(--strong); outline-offset: -4px; }
.gallery-public-photo figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 1px 3px; color: var(--light); font-size: 12px; line-height: 1.45; }
.gallery-public-photo figcaption span { color: var(--text); }
.gallery-public-photo figcaption time { flex: 0 0 auto; color: var(--mute); font-size: 11px; }
.gallery-render-masonry { column-count: var(--gallery-columns-desktop); column-gap: var(--gallery-gap); }
.gallery-render-masonry .gallery-public-photo { break-inside: avoid; margin-bottom: var(--gallery-gap); }
.gallery-render-grid { display: grid; grid-template-columns: repeat(var(--gallery-columns-desktop), minmax(0, 1fr)); align-items: start; gap: var(--gallery-gap); }
.gallery-render-grid .gallery-public-image { aspect-ratio: 3 / 2; }
.gallery-render-grid.gallery-aspect-natural .gallery-public-image { aspect-ratio: auto; }
.gallery-render-grid.gallery-aspect-1-1 .gallery-public-image { aspect-ratio: 1; }
.gallery-render-grid.gallery-aspect-4-3 .gallery-public-image { aspect-ratio: 4 / 3; }
.gallery-render-grid.gallery-aspect-16-9 .gallery-public-image { aspect-ratio: 16 / 9; }
.gallery-render-grid:not(.gallery-aspect-natural) .gallery-public-image img { width: 100%; height: 100%; object-fit: cover; }
.gallery-render-grid.gallery-fit-contain .gallery-public-image img { object-fit: contain; }
.gallery-render-fade { position: relative; }
.gallery-fade-stage { position: relative; height: min(76vh, 820px); min-height: 460px; background: #111; overflow: hidden; outline: none; }
.gallery-fade-slide { position: absolute; inset: 0; margin: 0; opacity: 0; pointer-events: none; transition: opacity var(--gallery-fade-duration) ease; }
.gallery-fade-slide.is-active { z-index: 1; opacity: 1; pointer-events: auto; }
.gallery-fade-slide > img { width: 100%; height: 100%; object-fit: contain; }
.gallery-render-fade.gallery-fit-cover .gallery-fade-slide > img { object-fit: cover; }
.gallery-fade-slide figcaption { position: absolute; right: 0; bottom: 0; left: 0; display: flex; z-index: 2; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 70px 26px 22px; color: rgba(255,255,255,.72); background: linear-gradient(transparent, rgba(0,0,0,.64)); font-size: 12px; pointer-events: none; }
.gallery-fade-slide figcaption span { max-width: 760px; color: #fff; font-size: 14px; }
.gallery-fade-arrow { position: absolute; top: 50%; z-index: 3; width: 42px; height: 42px; min-height: 42px; padding: 0; border-color: rgba(255,255,255,.35); border-radius: 50%; background: rgba(0,0,0,.22); transform: translateY(-50%); backdrop-filter: blur(4px); }
.gallery-fade-arrow::before { position: absolute; top: 50%; left: 53%; width: 10px; height: 10px; border-bottom: 1.5px solid #fff; border-left: 1.5px solid #fff; content: ""; transform: translate(-50%,-50%) rotate(45deg); }
.gallery-fade-arrow:hover, .gallery-fade-arrow:focus-visible { border-color: #fff; background: rgba(0,0,0,.45); outline: none; }
.gallery-fade-arrow[hidden], .gallery-fade-count[hidden] { display: none; }
.gallery-fade-previous { left: 20px; }
.gallery-fade-next { right: 20px; }
.gallery-fade-next::before { left: 47%; transform: translate(-50%,-50%) rotate(225deg); }
.gallery-fade-count { position: absolute; top: 18px; right: 20px; z-index: 3; padding: 6px 9px; border-radius: 14px; color: rgba(255,255,255,.84); background: rgba(0,0,0,.34); font: 700 10px/1 var(--sans); letter-spacing: .08em; backdrop-filter: blur(4px); }
.gallery-fade-thumbnails { display: flex; gap: 7px; margin-top: 10px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
.gallery-fade-thumbnails button { width: 84px; height: 58px; min-height: 58px; flex: 0 0 auto; padding: 3px; border-color: transparent; border-radius: 3px; background: transparent; opacity: .48; }
.gallery-fade-thumbnails button.is-active { border-color: var(--strong); opacity: 1; }
.gallery-fade-thumbnails img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-render-justified { display: flex; flex-wrap: wrap; gap: var(--gallery-gap); }
.gallery-render-justified .gallery-justified-item { width: calc(var(--photo-ratio) * var(--gallery-target-row-height)); flex: 1 1 calc(var(--photo-ratio) * var(--gallery-target-row-height)); }
.gallery-render-justified .gallery-public-image { height: var(--photo-height, var(--gallery-target-row-height)); max-height: var(--gallery-max-row-height); }
.gallery-render-justified .gallery-public-image img { width: 100%; height: 100%; object-fit: cover; }
.gallery-render-justified.gallery-last-row-left { justify-content: flex-start; }
.gallery-render-justified.gallery-last-row-center { justify-content: center; }
.gallery-render-justified.gallery-last-row-justify { justify-content: space-between; }
.gallery-public-empty { display: grid; min-height: 360px; place-items: center; align-content: center; color: var(--light); border: 1px solid var(--line); background: var(--bg-soft); text-align: center; }
.gallery-public-empty span { font-size: 36px; }
.gallery-public-empty p { margin: 12px 0 0; }
.gallery-related-articles { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.gallery-related-articles ul { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.gallery-related-articles li { min-width: 0; }
.gallery-related-articles a { display: inline-block; max-width: 100%; color: var(--text); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; text-underline-offset: 4px; }
.gallery-related-articles a:hover { color: var(--strong); }
.gallery-signature { margin-top: 54px; }
.archive-main { min-height: calc(100vh - 146px); padding: 24px 24px 48px; font-family: var(--text-font); }
.archive-inner { max-width: 1200px; margin: 0 auto; }
.topic-archive-header { max-width: none; margin: 18px 0 34px; }
.archive-list { border-top: 1px solid var(--line); }
.archive-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 24px; padding: 36px 0 38px; border-bottom: 1px solid var(--line); }
.archive-item time { padding-top: 3px; color: var(--light); font-size: 18px; font-weight: 400; font-variant-numeric: tabular-nums; }
.archive-item h2 { margin: 0; color: var(--strong); font-size: 27px; line-height: 1.2; letter-spacing: .01em; }
.archive-item h2 a { color: inherit; text-decoration: none; }
.archive-item h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.archive-item p { margin: 24px 0 0; color: var(--text); font-family: var(--font-base); font-size: 18px; line-height: 1.65; }
.archive-empty { padding: 48px 0; color: var(--light); }
.back { display: inline-block; margin: 20px 0; color: var(--light); text-decoration: none; }
.back:hover { color: var(--strong); }
.empty-state { padding-top: 120px; text-align: center; }
.empty-state h1 { font-size: 36px; }
.site-foot { min-height: 46px; padding: 12px 24px; border-top: 1px solid var(--line); color: var(--mute); display:flex; justify-content:center; gap:12px; font-size: 13px; }
.site-foot a { color: var(--mute); }

.admin-shell { width: min(960px, calc(100% - 32px)); min-height: calc(100vh - 101px); margin: 0 auto; padding: 60px 0; }
.admin-shell.narrow { width: min(420px, calc(100% - 32px)); display:grid; place-items:center; }
.panel { padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.admin-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:24px; }
.admin-heading h1 { margin: 4px 0 0; color: var(--strong); font-size: 34px; }
.eyebrow { margin: 0; color: var(--light); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.button-row { display:flex; align-items:center; gap:8px; }
.button, button { display:inline-flex; min-height:38px; align-items:center; justify-content:center; padding:8px 14px; border:1px solid var(--line); border-radius:6px; color:var(--text); background:var(--bg); text-decoration:none; cursor:pointer; }
.primary { border-color: var(--accent); color: var(--bg); background: var(--accent); }
.danger { color: var(--danger); }
.login-form { width:100%; }
.login-form h1 { margin:6px 0 24px; }
label { display:block; color:var(--strong); font-size:14px; font-weight:600; }
input, textarea, select { width:100%; margin-top:7px; padding:10px 11px; border:1px solid var(--line); border-radius:6px; color:var(--strong); background:var(--bg); outline:none; }
input:focus, textarea:focus, select:focus { border-color:var(--light); box-shadow:0 0 0 3px var(--line); }
.login-form button { width:100%; margin-top:18px; }
.login-help { margin: -10px 0 22px; color: var(--light); font-size: 14px; line-height: 1.6; }
.login-code { font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: .35em; text-align: center; }
.login-countdown { min-height: 20px; margin: 12px 0 0; color: var(--light); font-size: 13px; text-align: center; }
.login-reset { width: 100%; margin-top: -44px; padding: 0 24px 24px; }
.login-reset button { width: 100%; border: 0; color: var(--light); background: transparent; }
button:disabled { cursor: not-allowed; opacity: .55; }
.account-shell { min-height: calc(100vh - 147px); padding: 72px 20px; }
.account-card { width: min(460px, 100%); margin: 0 auto; padding: 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 28px; padding: 4px; border-radius: 9px; background: var(--bg-soft); }
.account-tabs a { padding: 10px; border-radius: 7px; color: var(--light); font-size: 14px; font-weight: 650; text-align: center; text-decoration: none; }
.account-tabs a.active { color: var(--strong); background: var(--bg); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.account-form h1 { margin: 0; color: var(--strong); font-size: 30px; }
.account-lead { margin: 8px 0 26px; color: var(--light); font-size: 14px; }
.field-label { display: flex; align-items: center; gap: 4px; }
.field-required { color: #d9363e; font-size: 16px; font-weight: 700; line-height: 1; transform: translateY(-1px); }
:root[data-theme="dark"] .field-required { color: #ff6b73; }
.membership-promo { margin: -2px 0 26px; padding: 14px 16px; border-left: 2px solid var(--strong); color: var(--light); background: var(--bg-soft); font-size: 13px; line-height: 1.7; }
.account-form label + label { margin-top: 18px; }
.account-form label small { display: block; margin-top: 6px; color: var(--light); font-size: 12px; font-weight: 400; line-height: 1.45; }
.avatar-file-field { position: relative; display: flex; min-height: 44px; align-items: center; gap: 12px; margin-top: 7px; padding: 6px; border: 1px dashed var(--line); border-radius: 7px; color: var(--light); background: var(--bg-soft); overflow: hidden; cursor: pointer; }
.avatar-file-field:hover, .avatar-file-field:focus-within { border-color: var(--light); background: var(--bg); box-shadow: 0 0 0 3px var(--line); }
.avatar-file-field input[type="file"] { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.avatar-file-button { flex: 0 0 auto; padding: 7px 11px; border: 1px solid var(--line); border-radius: 5px; color: var(--strong); background: var(--bg); font-size: 13px; font-weight: 600; }
.avatar-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 400; }
.remember-field { display: flex; align-items: center; gap: 9px; color: var(--light); cursor: pointer; font-size: 13px; font-weight: 500; }
.remember-field input { width: 16px; height: 16px; flex: 0 0 16px; margin: 0; padding: 0; border-radius: 4px; accent-color: var(--strong); }
.remember-field span { line-height: 1.3; }
.account-form > .primary { width: 100%; margin-top: 24px; }
.account-switch { margin: 22px 0 0; color: var(--light); font-size: 13px; text-align: center; }
.account-switch a { color: var(--strong); text-underline-offset: 3px; }
.registration-code-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 10px; margin-top: 18px; }
.registration-code-row button { margin-bottom: 0; white-space: nowrap; }
.registration-code-status { min-height: 20px; margin: 9px 0 0; color: var(--light); font-size: 12px; line-height: 1.5; }
.account-profile { text-align: center; }
.account-profile h1 { margin: 8px 0 0; color: var(--strong); font-size: 28px; }
.account-avatar { display: grid; width: 88px; height: 88px; margin: 0 auto 22px; border-radius: 50%; object-fit: cover; }
.account-avatar-fallback { place-items: center; color: var(--strong); background: var(--bg-soft); font-size: 30px; }
.account-username { margin: 8px 0 24px; color: var(--light); }
.account-meta { margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: 9px; text-align: left; }
.account-meta div { display: flex; justify-content: space-between; }
.account-meta div + div { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.account-meta dt { color: var(--light); }
.account-meta dd { margin: 0 0 0 18px; color: var(--strong); font-variant-numeric: tabular-nums; text-align: right; }
.account-tenure { margin: -9px 0 0; color: var(--light); font-size: 13px; line-height: 1.6; }
.account-preference-form { margin-top: 24px; padding: 17px; border: 1px solid var(--line); border-radius: 9px; text-align: left; }
.account-preference-heading strong, .account-preference-heading small { display: block; }
.account-preference-heading strong { color: var(--strong); font-size: 14px; font-weight: 650; }
.account-preference-heading small { margin-top: 5px; color: var(--light); font-size: 12px; font-weight: 400; line-height: 1.55; }
.account-preference-form select { margin-top: 12px; background: var(--bg); }
.account-preference-form button { width: 100%; margin-top: 10px; }
.account-profile-actions { display: grid; gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.account-profile-actions form { margin: 0; }
.account-profile-actions form button, .account-subscribe-link { width: 100%; margin: 0; }
.account-subscribe-link { color: var(--strong); background: var(--bg-soft); font-weight: 650; }
.account-subscribe-link:hover { background: var(--bg); border-color: var(--light); }
.subscribe-shell { min-height: calc(100vh - 147px); padding: 72px 20px; }
.subscribe-card { width: min(460px, 100%); margin: 0 auto; padding: 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.subscribe-back { display: inline-block; margin-bottom: 28px; color: var(--light); font-size: 13px; text-decoration: none; }
.subscribe-back:hover { color: var(--strong); }
.subscribe-card h1 { margin: 8px 0 10px; color: var(--strong); font-size: 28px; font-weight: 650; }
.subscribe-lead { margin: 0 0 10px; color: var(--light); font-size: 14px; line-height: 1.65; }
.subscribe-default-note { margin: 0 0 22px; color: var(--mute); font-size: 12px; line-height: 1.55; }
.subscribe-email { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 9px; color: var(--light); font-size: 13px; }
.subscribe-email strong { min-width: 0; overflow: hidden; color: var(--strong); text-overflow: ellipsis; white-space: nowrap; }
.subscribe-options { border-top: 1px solid var(--line); }
.subscribe-option { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.subscribe-option > span:first-child { min-width: 0; }
.subscribe-option strong, .subscribe-option small { display: block; }
.subscribe-option strong { color: var(--strong); font-size: 15px; font-weight: 650; }
.subscribe-option small { margin-top: 5px; color: var(--light); font-size: 12px; font-weight: 400; line-height: 1.5; }
.subscribe-option em { display: inline-block; margin-top: 8px; padding: 3px 7px; border-radius: 20px; color: var(--light); background: var(--bg-soft); font-size: 10px; font-style: normal; font-weight: 600; }
.switch-control { position: relative; width: 46px; height: 26px; flex: 0 0 46px; }
.switch-control input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.switch-control i { position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-soft); transition: .2s ease; }
.switch-control i::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--light); content: ''; transition: .2s ease; }
.switch-control input:checked + i { border-color: var(--strong); background: var(--strong); }
.switch-control input:checked + i::after { left: 23px; background: var(--bg); }
.switch-control input:focus-visible + i { box-shadow: 0 0 0 3px var(--line); }
.subscribe-save { width: 100%; margin-top: 24px; }
.form-success { padding: 10px 12px; border-radius: 7px; color: #087a3f; background: #e8f7ee; font-size: 13px; }
.post-list { padding:0; overflow:hidden; }
.admin-post { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:18px 20px; color:var(--text); text-decoration:none; border-bottom:1px solid var(--line); }
.admin-post:last-child { border-bottom:0; }
.admin-post:hover { background:var(--bg-soft); }
.admin-post strong, .admin-post small { display:block; }
.admin-post small { margin-top:4px; color:var(--light); }
.admin-post-meta { display:flex; align-items:center; gap:12px; color:var(--light); font-size:13px; }
.admin-post-with-action { min-height: 86px; padding: 0 16px 0 0; }
.admin-post-main { display: flex; min-width: 0; flex: 1; align-self: stretch; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; color: var(--text); text-decoration: none; }
.admin-post-main:hover, .admin-post-main:focus-visible, .admin-post-main strong, .admin-post-main small { text-decoration: none; }
.admin-post-copy { min-width: 0; }
.admin-post-copy strong, .admin-post-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-post-copy strong { color: var(--strong); font-size: 15px; }
.admin-delivery-link { min-width: 94px; flex: 0 0 auto; gap: 7px; white-space: nowrap; }
.admin-delivery-link small { display: inline; margin: 0; padding-left: 7px; border-left: 1px solid var(--line); color: var(--light); font-size: 11px; font-variant-numeric: tabular-nums; }
.delivery-summary { display: grid; grid-template-columns: minmax(140px, .65fr) minmax(140px, .65fr) minmax(220px, 1fr); align-items: center; gap: 28px; margin-bottom: 18px; padding: 24px; }
.delivery-summary div span, .delivery-summary div strong { display: block; }
.delivery-summary div span { color: var(--light); font-size: 12px; }
.delivery-summary div strong { margin-top: 5px; color: var(--strong); font-size: 25px; }
.delivery-summary form { justify-self: end; }
.delivery-list { padding: 0; overflow: hidden; }
.delivery-user { display: grid; grid-template-columns: 30px minmax(220px, 1fr) minmax(220px, auto) auto; align-items: center; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.delivery-user:last-child { border-bottom: 0; }
.delivery-state { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--light); background: var(--bg-soft); font-weight: 700; }
.delivery-state.sent { color: #087a3f; background: #e8f7ee; }
.delivery-user-info strong, .delivery-user-info span { display: block; }
.delivery-user-info strong { color: var(--strong); }
.delivery-user-info strong small { color: var(--light); font-weight: 400; }
.delivery-user-info span, .delivery-history { margin-top: 4px; color: var(--light); font-size: 12px; }
.status { padding:4px 8px; border-radius:20px; font-style:normal; background:var(--bg-soft); }
.status.published { color:#087a3f; background:#e8f7ee; }
.settings-grid { display:grid; grid-template-columns:2fr 1fr 1fr; gap:18px; }
.slug-input { display:flex; align-items:center; margin-top:7px; border:1px solid var(--line); border-radius:6px; overflow:hidden; }
.slug-input span { padding-left:11px; color:var(--light); font-weight:400; }
.slug-input input { margin:0; padding-left:0; border:0; box-shadow:none; }
.translation-tabs { display:flex; gap:4px; margin:26px 0 10px; overflow-x:auto; }
.translation-tabs button { border:0; color:var(--light); background:transparent; }
.translation-tabs button.active { color:var(--strong); background:var(--bg-soft); }
.translation-panel { display:none; }
.translation-panel.active { display:block; }
.translation-panel label + label { margin-top:18px; }
.body-editor { min-height:420px; resize:vertical; font:14px/1.6 var(--mono); }
.editor-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:18px; }
.editor-actions .danger { margin-right:auto; }
.form-error, .form-success { padding:12px 14px; border-radius:6px; }
.form-error { color:#8a1c13; background:#feeceb; }
.form-success { color:#087a3f; background:#e8f7ee; }
.muted { color:var(--light); }

@media (max-width: 960px) {
  .gallery-render-masonry { column-count: var(--gallery-columns-tablet); }
  .gallery-render-grid { grid-template-columns: repeat(var(--gallery-columns-tablet), minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .site-head { padding:0 16px; }
  .head-actions { gap: 8px; }
  .account-link { max-width: 112px; }
  .site-navigation { padding: 0 16px; }
  .site-navigation-inner { min-height: 43px; gap: 20px; }
  .site-navigation a { padding-top: 13px; padding-bottom: 11px; font-size: 13px; }
  .logo { max-width:48vw; gap: 8px; }
  .logo img { width: 27px; height: 27px; }
  .main { padding-top:36px; }
  .content-layout-page.inner { padding-right: 16px; padding-left: 16px; }
  .content-layout-page.main { padding-top: 20px; }
  .content-layout-page .post { padding-top: 18px; }
  .article-signature { margin-top: 32px; }
  .archive-main { padding: 20px 16px 32px; }
  .archive-item { grid-template-columns: 1fr; gap: 10px; padding: 26px 0 28px; }
  .archive-item time { font-size: 14px; }
  .archive-item h2 { font-size: 23px; }
  .archive-item p { margin-top: 16px; font-size: 16px; }
  .admin-shell { padding-top:36px; }
  .admin-heading { align-items:flex-start; flex-direction:column; }
  .settings-grid { grid-template-columns:1fr; }
  .admin-post { align-items:flex-start; }
  .admin-post-meta { align-items:flex-end; flex-direction:column; }
  .account-shell { padding: 36px 14px; }
  .account-card { padding: 22px 18px; }
  .subscribe-shell { padding: 36px 14px; }
  .subscribe-card { padding: 22px 18px; }
  .subscribe-back { margin-bottom: 24px; }
  .subscribe-email { align-items: flex-start; flex-direction: column; gap: 5px; }
  .subscribe-option { gap: 16px; padding: 17px 0; }
  .delivery-summary { grid-template-columns: 1fr 1fr; }
  .delivery-summary form { grid-column: 1 / -1; }
  .delivery-summary button { width: 100%; }
  .delivery-user { grid-template-columns: 30px 1fr; }
  .delivery-history, .delivery-user form { grid-column: 2; }
  .delivery-user form button { width: 100%; }
  .registration-code-row { grid-template-columns: 1fr; }
  .registration-code-row button { width: 100%; }
  .post-title-row { gap: 12px; }
  .post-languages { max-width: 42%; flex-wrap: wrap; justify-content: flex-end; }
  .prose .image-stack, .prose .image-row { gap: 14px; }
  .image-lightbox { padding: 24px; }
  .image-lightbox-previous { left: 10px; }
  .image-lightbox-next { right: 10px; }
  .gallery-index-main { padding: 30px 16px 44px; }
  .gallery-index-header { margin-bottom: 24px; padding-bottom: 17px; }
  .gallery-index-header h1 { font-size: 42px; }
  .gallery-index-header > p:last-child { margin-bottom: 4px; font-size: 9px; }
  .gallery-index-grid { grid-template-columns: 1fr; gap: 38px; }
  .gallery-index-card-body { padding-bottom: 13px; }
  .gallery-index-card h2 { font-size: 23px; }
  .gallery-index-description { margin-top: 10px; font-size: 13px; }
  .home-introduction { margin-top: 38px; padding-top: 24px; }
  .related-posts { margin-top: 38px; }
  .taxonomy-main { padding: 30px 16px 44px; }
  .taxonomy-header { margin-bottom: 26px; }
  .taxonomy-header h1 { font-size: 42px; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-grid a:nth-child(n) { padding: 20px 0; border-left: 0; }
  .gallery-main { padding: 30px 16px 40px; }
  .gallery-detail-header { margin-bottom: 30px; }
  .gallery-detail-header h1 { font-size: clamp(34px, 12vw, 50px); }
  .gallery-detail-description { margin-top: 19px; font-size: 15px; }
  .gallery-render-masonry { column-count: 1; }
  .gallery-render-grid { grid-template-columns: 1fr; }
  .gallery-fade-stage { height: 64vh; min-height: 360px; }
  .gallery-fade-arrow { width: 36px; height: 36px; min-height: 36px; }
  .gallery-fade-previous { left: 10px; }
  .gallery-fade-next { right: 10px; }
  .gallery-fade-slide figcaption { padding: 58px 16px 15px; }
  .gallery-fade-thumbnails button { width: 70px; height: 49px; min-height: 49px; }
  .gallery-render-justified .gallery-justified-item { min-width: 100%; }
  .gallery-render-justified .gallery-public-image { height: auto !important; max-height: none; }
  .gallery-render-justified .gallery-public-image img { height: auto; object-fit: contain; }
  .gallery-related-articles { margin-top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-fade-slide { transition-duration: 0ms; }
}

/* Guestbook */
.guestbook-main { min-height: calc(100vh - 100px); padding: 24px 24px 80px; }
.guestbook-inner { width: min(1200px, 100%); margin: 0 auto; }
.guestbook-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 30px 0 24px; border-bottom: 1px solid var(--line); }
.guestbook-header h1 { margin: 0 0 8px; color: var(--strong); font: 700 clamp(32px, 4vw, 46px)/1.08 var(--font-text); letter-spacing: -.035em; }
.guestbook-header div > p:last-child { max-width: 620px; margin: 0; color: var(--light); font-size: 15px; line-height: 1.7; }
.guestbook-header > span { flex: 0 0 auto; padding-bottom: 5px; color: var(--mute); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.guestbook-list { display: grid; margin: 0; padding: 0; list-style: none; }
.guestbook-message { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: start; gap: 18px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.guestbook-avatar { display: grid; width: 46px; height: 46px; place-items: center; overflow: hidden; border-radius: 50%; color: var(--light); background: var(--bg-soft); font-size: 15px; font-weight: 700; line-height: 1; }
.guestbook-avatar.member:not(:has(img)) { color: var(--bg); background: var(--strong); }
.guestbook-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.guestbook-message-body { min-width: 0; }
.guestbook-message-body header { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.guestbook-message header strong { color: var(--strong); font-size: 15px; }
.guestbook-message header time { flex: 0 0 auto; color: var(--mute); font-size: 11px; font-variant-numeric: tabular-nums; }
.guestbook-message-body > p { margin: 9px 0 0; color: var(--text); font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; white-space: pre-wrap; }
.guestbook-empty { margin: 0; padding: 48px 0; border-bottom: 1px solid var(--line); color: var(--light); }
.guestbook-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.guestbook-pagination a { color: var(--text); font-size: 13px; font-weight: 650; text-decoration: none; }
.guestbook-pagination a:hover { color: var(--strong); text-decoration: underline; text-underline-offset: 5px; }
.guestbook-pagination .next { text-align: right; }
.guestbook-pagination span { color: var(--mute); font-size: 11px; font-variant-numeric: tabular-nums; }
.guestbook-form-section { width: 100%; margin: 58px 0 0; }
.guestbook-form-heading h2 { margin: 6px 0 7px; color: var(--strong); font-size: 26px; letter-spacing: -.025em; }
.guestbook-form-heading > p:last-child { margin: 0; color: var(--light); font-size: 13px; }
.guestbook-form-section > .form-success, .guestbook-form-section > .form-error { margin-top: 22px; }
.guestbook-form { margin-top: 24px; }
.guestbook-form label + label { display: block; margin-top: 18px; }
.guestbook-form textarea { min-height: 150px; resize: vertical; }
.guestbook-submit { display: flex; justify-content: flex-end; margin-top: 18px; }
.guestbook-submit button { flex: 0 0 auto; }

.admin-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; margin-top: 18px; padding: 18px 4px 0; border-top: 1px solid var(--line); }
.admin-pagination a { color: var(--text); font-size: 13px; font-weight: 650; text-decoration: none; }
.admin-pagination a:hover, .admin-pagination a:focus-visible { color: var(--strong); text-decoration: underline; text-underline-offset: 5px; }
.admin-pagination small { color: var(--mute); font-size: 11px; font-variant-numeric: tabular-nums; }
.admin-pagination .next { text-align: right; }

/* Admin workspace */
body.is-admin { background: var(--bg-soft); }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px; border-right: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; }
.admin-sidebar-head { display: flex; align-items: flex-start; gap: 6px; }
.admin-brand { display: flex; flex: 1; align-items: center; gap: 11px; padding: 4px 8px 28px; color: var(--strong); text-decoration: none; text-transform: uppercase; letter-spacing: .04em; overflow: hidden; }
.admin-brand span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: var(--bg); background: var(--strong); font-weight: 900; }
.admin-brand strong { font-size: 14px; }
.sidebar-toggle { min-width: 28px; min-height: 28px; padding: 0; border: 0; color: var(--light); background: transparent; font-size: 22px; }
.admin-nav p { margin: 8px 10px; color: var(--mute); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.admin-nav a { display: flex; align-items: center; gap: 10px; margin: 3px 0; padding: 10px 12px; border-radius: 8px; color: var(--light); text-decoration: none; font-size: 14px; font-weight: 600; }
.admin-nav a:hover, .admin-nav a.active { color: var(--strong); background: var(--bg-soft); }
.nav-icon { width: 20px; color: var(--light); font-size: 17px; text-align: center; }
.admin-sidebar-foot { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--line); }
.admin-sidebar-foot a, .admin-sidebar-foot button { display: block; width: 100%; min-height: 0; padding: 8px 4px; border: 0; color: var(--light); background: transparent; text-align: left; text-decoration: none; font-size: 13px; }
.admin-sidebar-foot a:hover, .admin-sidebar-foot button:hover { color: var(--strong); }
.admin-sidebar-foot input { display: none; }
.admin-content { width: 100%; min-width: 0; padding: 48px clamp(28px, 5vw, 76px) 80px; }
.admin-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.admin-page-head h1 { margin: 5px 0 6px; color: var(--strong); font-size: clamp(30px, 4vw, 42px); letter-spacing: -.04em; }
.admin-page-head > div > p:last-child { margin: 0; color: var(--light); }
.admin-card { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 1px 2px rgba(0,0,0,.02); }
.admin-empty { padding: 80px 24px; text-align: center; }
.admin-empty > span { color: var(--mute); font-size: 30px; }
.admin-empty h2 { margin: 12px 0 4px; }
.admin-empty p { margin: 0 0 20px; color: var(--light); }
.navigation-admin-layout { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(420px, 1.28fr); align-items: start; gap: 24px; }
.navigation-editor-card, .navigation-list-card { overflow: hidden; }
.navigation-editor-card { padding: 24px; }
.navigation-card-heading { margin-bottom: 22px; }
.navigation-card-heading h2 { margin: 5px 0 0; color: var(--strong); font-size: 21px; }
.navigation-editor-card label + label { display: block; margin-top: 18px; }
.navigation-editor-card label small { display: block; margin-top: 7px; color: var(--light); font-weight: 400; line-height: 1.45; }
.navigation-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.navigation-delete-form { margin-top: 10px; }
.navigation-delete-form button { width: 100%; }
.navigation-list-card > .navigation-card-heading { margin: 0; padding: 24px 22px 18px; border-bottom: 1px solid var(--line); }
.navigation-list { overflow: hidden; }
.navigation-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.navigation-item:last-child { border-bottom: 0; }
.navigation-item:hover, .navigation-item.active { background: var(--bg-soft); }
.navigation-position { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; color: var(--light); background: var(--bg-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.navigation-item-copy { min-width: 0; }
.navigation-item-copy strong, .navigation-item-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navigation-item-copy small { margin-top: 4px; color: var(--light); }
.navigation-target { color: var(--light); font-size: 12px; white-space: nowrap; }
.navigation-item b { color: var(--mute); font-size: 20px; }
.navigation-empty { padding: 64px 24px; color: var(--light); text-align: center; }
.navigation-empty span { color: var(--mute); font-size: 28px; }
.navigation-empty p { max-width: 320px; margin: 12px auto 0; }
.user-list { overflow: hidden; }
.user-list-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.user-list-item:last-child { border-bottom: 0; }
.user-list-item:hover { background: var(--bg-soft); }
.user-list-item img, .user-list-avatar { width: 42px; height: 42px; border-radius: 50%; }
.user-list-item img { object-fit: cover; }
.user-list-avatar { display: grid; place-items: center; color: var(--strong); background: var(--bg-soft); font-weight: 700; }
.user-list-copy { min-width: 0; }
.user-list-copy strong, .user-list-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-list-copy small { margin-top: 3px; color: var(--light); }
.user-list-copy .user-registered-at { margin-top: 6px; color: var(--mute); font-size: 11px; }
.user-list-meta { display: flex; align-items: center; gap: 10px; color: var(--light); font-size: 13px; }
.user-list-meta b { font-weight: 600; font-variant-numeric: tabular-nums; }
.user-list-meta i { font-size: 20px; font-style: normal; }
.status.disabled { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.user-admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 24px; }
.user-editor-card, .user-security-card { padding: 24px; }
.user-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.user-form-grid label small { display: block; margin-top: 7px; color: var(--light); font-weight: 400; line-height: 1.45; }
.user-email-field { grid-column: 1 / -1; }
.user-security-card { position: sticky; top: 24px; }
.user-security-card h2 { margin: 5px 0 12px; color: var(--strong); font-size: 21px; }
.user-security-card > p:not(.eyebrow) { margin: 0; color: var(--light); font-size: 14px; line-height: 1.65; }
.user-admin-meta { margin: 0 0 22px; }
.user-admin-meta div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.user-admin-meta dt { color: var(--light); font-size: 12px; }
.user-admin-meta dd { margin: 4px 0 0; color: var(--strong); font-size: 13px; }
.user-security-card form button { width: 100%; }
.user-security-note { display: block; margin-top: 10px; color: var(--light); line-height: 1.5; }
.guestbook-admin-list { overflow: hidden; }
.guestbook-admin-item { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.guestbook-admin-item:last-child { border-bottom: 0; }
.guestbook-admin-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.guestbook-admin-meta > div:last-child { display: flex; align-items: center; gap: 12px; }
.guestbook-admin-meta strong, .guestbook-admin-meta small { display: block; }
.guestbook-admin-meta strong { color: var(--strong); }
.guestbook-admin-meta small, .guestbook-admin-meta time { margin-top: 4px; color: var(--light); font-size: 12px; }
.guestbook-admin-item > p { margin: 18px 0 0; color: var(--text); font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; white-space: pre-wrap; }
.guestbook-admin-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.guestbook-admin-actions form { margin: 0; }
.guestbook-admin-actions button { min-height: 34px; padding: 6px 12px; }
.admin-editor-page { max-width: none; }
.admin-layout, .admin-sidebar, .admin-brand strong, .admin-nav .nav-label { transition: .2s ease; }
.admin-layout.sidebar-collapsed { grid-template-columns: 72px minmax(0, 1fr); }
.sidebar-collapsed .admin-sidebar { padding-left: 11px; padding-right: 11px; }
.sidebar-collapsed .admin-brand { padding-left: 9px; padding-right: 0; }
.sidebar-collapsed .admin-brand strong, .sidebar-collapsed .admin-nav p, .sidebar-collapsed .admin-nav .nav-label, .sidebar-collapsed .admin-sidebar-foot { display: none; }
.sidebar-collapsed .admin-nav a { justify-content: center; padding-left: 8px; padding-right: 8px; }
.sidebar-collapsed .sidebar-toggle { position: absolute; top: 66px; left: 22px; transform: rotate(180deg); }
.editor-page-head { margin-bottom: 22px; }
.editor-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 24px; transition: .2s ease; }
.editor-primary { min-width: 0; }
.url-card { padding: 20px 22px; }
.editor-inspector { position: sticky; top: 24px; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 1px 2px rgba(0,0,0,.02); }
.inspector-toggle { position: absolute; top: 18px; left: -15px; width: 30px; min-height: 30px; padding: 0; border-radius: 50%; color: var(--light); background: var(--bg); font-size: 20px; }
.inspector-heading { margin-bottom: 22px; }
.inspector-heading h2 { margin: 4px 0 0; color: var(--strong); font-size: 21px; }
.inspector-content > label + label { display: block; margin-top: 18px; }
.inspector-actions { display: grid; gap: 9px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.inspector-actions .button, .inspector-actions button { width: 100%; }
.editor-detail-layout.inspector-collapsed { grid-template-columns: minmax(0, 1fr) 44px; }
.inspector-collapsed .editor-inspector { height: 68px; padding: 0; background: transparent; border-color: transparent; box-shadow: none; }
.inspector-collapsed .inspector-content { display: none; }
.inspector-collapsed .inspector-toggle { top: 18px; left: 7px; transform: rotate(180deg); }
.admin-editor-page .settings-grid { padding: 22px; grid-template-columns: minmax(320px, 2fr) minmax(150px, .7fr) minmax(210px, .9fr); }
.slug-setting small { display: block; margin-top: 7px; color: var(--light); font-weight: 400; }
.language-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 26px 0 10px; }
.language-toolbar .translation-tabs { margin: 0; }
.add-language-button { flex: 0 0 auto; border-style: dashed; color: var(--light); }
.language-adder { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 12px; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); }
.language-adder[hidden] { display: none; }
.language-adder label { width: min(420px, 100%); }
.language-adder p { margin: 0 0 9px 8px; color: var(--danger); font-size: 13px; }
.admin-editor-page .translation-panel { padding: 24px; }
.content-label { margin-top: 18px; }
.translation-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.translation-heading span, .translation-heading strong { display: block; }
.translation-heading span { margin-bottom: 3px; color: var(--light); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.translation-heading strong { color: var(--strong); }
.translation-summary { margin-top: 18px; }
.translation-summary textarea { min-height: 112px; resize: vertical; }
.remove-language { min-height: 32px; padding: 5px 9px; border: 0; color: var(--danger); background: transparent; font-size: 12px; }
.markdown-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; margin-top: 18px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.markdown-source { position: relative; min-width: 0; display: flex; flex-direction: column; }
.markdown-toolbar { display: flex; height: 43px; align-items: center; gap: 10px; padding: 7px 10px 7px 16px; }
.markdown-toolbar strong { color: var(--strong); font-size: 14px; font-weight: 600; }
.markdown-toolbar > span { min-width: 0; margin-left: auto; color: var(--mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.markdown-toolbar .upload-status.uploading { color: var(--light); }
.markdown-toolbar .upload-status.success { color: #087a3f; }
.markdown-toolbar .upload-status.error { color: var(--danger); }
.image-upload-button { flex: 0 0 auto; min-height: 28px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--strong); background: var(--bg); cursor: pointer; font-size: 12px; font-weight: 600; }
.image-upload-button:hover { background: var(--bg-soft); }
.image-upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.markdown-source .body-editor { flex: 1 1 auto; min-height: 520px; width: 100%; height: auto; margin: 0; padding: 18px 16px; border: 0; border-top: 1px solid var(--line); border-radius: 0; resize: vertical; box-shadow: none; }
.markdown-source.is-dragging { background: var(--bg-soft); box-shadow: inset 0 0 0 2px var(--strong); }
.markdown-source.is-dragging .body-editor { opacity: .55; }
.markdown-preview-shell { min-width: 0; border-left: 1px solid var(--line); background: var(--bg); }
.preview-label { display: block; height: 43px; padding: 14px 16px 0; color: var(--strong); font-size: 14px; font-weight: 600; }
.markdown-preview { min-height: 520px; margin: 0; padding: 18px 22px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.markdown-preview.prose { line-height: 1.65; }
.markdown-preview.prose > :first-child { margin-top: 0; }
.preview-placeholder { color: var(--mute); }
.gallery-admin-list { display: grid; gap: 12px; }
.gallery-list-item { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto 18px; align-items: center; gap: 18px; padding: 12px; color: var(--text); text-decoration: none; }
.gallery-list-item:hover { background: var(--bg); box-shadow: 0 8px 24px rgba(0,0,0,.06); transform: translateY(-1px); }
.gallery-list-cover { display: grid; width: 112px; height: 76px; place-items: center; border-radius: 8px; color: var(--mute); background: var(--bg-soft); overflow: hidden; font-size: 12px; }
.gallery-list-cover img { width: 100%; height: 100%; object-fit: cover; }
.gallery-list-copy { min-width: 0; }
.gallery-list-copy strong, .gallery-list-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-list-copy strong { color: var(--strong); font-size: 17px; }
.gallery-list-copy small { margin-top: 7px; color: var(--light); }
.gallery-list-count { min-width: 54px; text-align: center; }
.gallery-list-count b, .gallery-list-count small { display: block; }
.gallery-list-count b { color: var(--strong); font-size: 20px; }
.gallery-list-count small { margin-top: 2px; color: var(--light); font-size: 11px; }
.gallery-list-arrow { color: var(--mute); font-size: 24px; }
.gallery-editor-form { display: grid; gap: 22px; }
.gallery-details-card, .gallery-theme-card, .gallery-photos-card { padding: 24px; }
.gallery-settings-grid { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(200px, 1fr) minmax(150px, .7fr) minmax(190px, .8fr); gap: 20px; }
.gallery-description-field, .gallery-related-field { grid-column: 1 / -1; }
.gallery-description-field textarea { min-height: 104px; resize: vertical; }
.gallery-related-field textarea { min-height: 92px; resize: vertical; font-family: var(--mono); font-size: 13px; }
.gallery-related-field small { display: block; margin-top: 7px; color: var(--light); font-weight: 400; line-height: 1.5; }
.gallery-theme-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.gallery-theme-heading h2 { margin: 5px 0; color: var(--strong); }
.gallery-theme-heading p:last-child { margin: 0; color: var(--light); }
.gallery-theme-badge { flex: 0 0 auto; padding: 7px 11px; border-radius: 99px; color: var(--strong); background: var(--bg-soft); font-size: 12px; font-weight: 700; }
.gallery-theme-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.gallery-theme-choice { position: relative; min-width: 0; padding: 8px 8px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-soft); cursor: pointer; transition: border-color .16s, box-shadow .16s, transform .16s; }
.gallery-theme-choice:hover { border-color: var(--mute); transform: translateY(-1px); }
.gallery-theme-choice.is-selected { border-color: var(--strong); background: var(--bg); box-shadow: 0 0 0 1px var(--strong), 0 10px 26px rgba(0,0,0,.07); }
.gallery-theme-choice > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gallery-theme-choice:focus-within { outline: 2px solid var(--strong); outline-offset: 2px; }
.gallery-theme-preview { position: relative; display: grid; width: 100%; height: 112px; gap: 4px; padding: 7px; border-radius: 7px; background: #17191d; overflow: hidden; }
.gallery-theme-preview i { display: block; min-width: 0; min-height: 0; border-radius: 2px; background: linear-gradient(145deg, #d4bea3, #726659); }
.gallery-theme-preview i:nth-child(2n) { background: linear-gradient(145deg, #91a5aa, #394b56); }
.gallery-theme-preview i:nth-child(3n) { background: linear-gradient(145deg, #b58a6c, #50443f); }
.theme-preview-grid { grid-template: repeat(2, 1fr) / repeat(3, 1fr); }
.theme-preview-grid i { aspect-ratio: 3 / 2; }
.theme-preview-masonry { grid-template: repeat(6, 1fr) / repeat(3, 1fr); }
.theme-preview-masonry i:nth-child(1) { grid-row: span 4; }
.theme-preview-masonry i:nth-child(2) { grid-row: span 3; }
.theme-preview-masonry i:nth-child(3) { grid-row: span 4; }
.theme-preview-masonry i:nth-child(4) { grid-row: span 2; }
.theme-preview-masonry i:nth-child(5) { grid-row: span 3; }
.theme-preview-masonry i:nth-child(6) { grid-row: span 2; }
.theme-preview-fade { display: block; }
.theme-preview-fade i { position: absolute; inset: 7px; background: linear-gradient(125deg, #b2c4c7 0%, #56666a 46%, #282d30 100%); }
.theme-preview-fade i:nth-child(n+2) { right: auto; top: auto; bottom: 12px; z-index: 1; width: 28px; height: 19px; border: 1px solid rgba(255,255,255,.6); }
.theme-preview-fade i:nth-child(2) { left: 14px; }
.theme-preview-fade i:nth-child(3) { left: 46px; opacity: .65; }
.theme-preview-fade b { position: absolute; right: 13px; bottom: 12px; z-index: 1; color: rgba(255,255,255,.8); font-size: 8px; letter-spacing: .08em; }
.theme-preview-justified { grid-template: repeat(3, 1fr) / repeat(12, 1fr); }
.theme-preview-justified i:nth-child(1) { grid-column: span 4; }
.theme-preview-justified i:nth-child(2) { grid-column: span 8; }
.theme-preview-justified i:nth-child(3) { grid-column: span 6; }
.theme-preview-justified i:nth-child(4) { grid-column: span 3; }
.theme-preview-justified i:nth-child(5) { grid-column: span 3; }
.theme-preview-justified i:nth-child(6) { grid-column: span 9; }
.gallery-theme-copy { display: block; min-width: 0; padding: 11px 2px 0; }
.gallery-theme-copy strong, .gallery-theme-copy small { display: block; }
.gallery-theme-copy strong { color: var(--strong); font-size: 14px; }
.gallery-theme-copy small { min-height: 34px; margin-top: 4px; color: var(--light); font-size: 11px; font-weight: 400; line-height: 1.5; }
.gallery-theme-check { position: absolute; top: 15px; right: 15px; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #111; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); opacity: 0; transform: scale(.7); transition: opacity .16s, transform .16s; }
.gallery-theme-choice.is-selected .gallery-theme-check { opacity: 1; transform: scale(1); }
.gallery-theme-parameters { margin-top: 18px; padding: 20px; border-radius: 10px; background: var(--bg-soft); }
.gallery-theme-panel[hidden] { display: none; }
.gallery-theme-panel > header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.gallery-theme-panel > header strong { color: var(--strong); font-size: 14px; }
.gallery-theme-panel > header span { color: var(--light); font-size: 12px; }
.gallery-parameter-grid { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); align-items: end; gap: 14px; }
.gallery-parameter-grid > label { font-size: 12px; }
.gallery-parameter-grid input, .gallery-parameter-grid select { margin-top: 7px; background: var(--bg); font-size: 13px; }
.gallery-switch { display: flex !important; min-height: 39px; align-items: center; gap: 8px; padding-bottom: 8px; color: var(--strong); cursor: pointer; }
.gallery-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gallery-switch span { position: relative; width: 34px; height: 20px; flex: 0 0 auto; border-radius: 10px; background: var(--mute); transition: background .16s; }
.gallery-switch span::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); content: ""; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .16s; }
.gallery-switch input:checked + span { background: #218358; }
.gallery-switch input:checked + span::after { transform: translateX(14px); }
.gallery-switch input:focus-visible + span { outline: 2px solid var(--strong); outline-offset: 2px; }
.gallery-photos-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.gallery-photos-heading h2 { margin: 5px 0; color: var(--strong); }
.gallery-photos-heading h2 span { color: var(--light); font-size: .72em; }
.gallery-photos-heading p:last-child { margin: 0; color: var(--light); }
.gallery-upload-button { position: relative; flex: 0 0 auto; }
.gallery-upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gallery-upload-status { min-height: 20px; margin: 12px 0; color: var(--light); font-size: 13px; }
.gallery-upload-status.uploading, .gallery-upload-status.notice { color: var(--light); }
.gallery-upload-status.success { color: #087a3f; }
.gallery-upload-status.error { color: var(--danger); }
.gallery-no-cover { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px; color: var(--light); font-size: 13px; }
.gallery-no-cover input, .gallery-cover-choice input { width: auto; margin: 0; box-shadow: none; }
.gallery-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-items: start; gap: 14px; }
.gallery-photo-card { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); transition: opacity .15s, transform .15s, box-shadow .15s; }
.gallery-photo-card.is-dragging { opacity: .42; box-shadow: 0 12px 28px rgba(0,0,0,.16); transform: scale(.98); }
.gallery-photo-preview { position: relative; height: 200px; border-radius: 7px; background: var(--bg); overflow: hidden; cursor: grab; }
.gallery-photo-preview:active { cursor: grabbing; }
.gallery-photo-preview img { display: block; width: 100%; height: 200px; object-fit: cover; pointer-events: none; }
.gallery-drag-handle, .gallery-position { position: absolute; top: 8px; display: grid; height: 28px; place-items: center; border-radius: 14px; color: #fff; background: rgba(0,0,0,.58); backdrop-filter: blur(3px); }
.gallery-drag-handle { left: 8px; width: 28px; font-size: 19px; }
.gallery-position { right: 8px; min-width: 28px; padding: 0 8px; font: 700 11px/1 var(--sans); }
.gallery-cover-choice { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 16px; color: #fff; background: rgba(0,0,0,.66); backdrop-filter: blur(3px); font-size: 12px; cursor: pointer; }
.gallery-photo-card > label { margin-top: 12px; font-size: 12px; }
.gallery-photo-card textarea { min-height: 70px; resize: vertical; }
.gallery-photo-card input, .gallery-photo-card textarea { background: var(--bg); font-size: 13px; }
.gallery-remove-photo { width: 100%; min-height: 32px; margin-top: 12px; padding: 5px 8px; border-color: transparent; color: var(--danger); background: transparent; font-size: 12px; }
.gallery-remove-photo:hover { border-color: var(--line); background: var(--bg); }
.gallery-empty-photos { padding: 70px 20px; color: var(--light); text-align: center; }
.gallery-empty-photos[hidden] { display: none; }
.gallery-empty-photos span { color: var(--mute); font-size: 30px; }
.gallery-empty-photos p { margin: 10px 0 0; }
.gallery-form-actions { position: sticky; bottom: 0; z-index: 6; display: flex; justify-content: flex-end; gap: 10px; padding: 18px 0 6px; background: linear-gradient(transparent, var(--bg-soft) 26%); }
.gallery-form-actions .danger { margin-right: auto; }
.admin-editor-page .editor-actions { position: sticky; bottom: 0; z-index: 5; margin: 22px -12px -28px; padding: 14px 12px 28px; background: linear-gradient(transparent, var(--bg-soft) 22%); }
.is-admin .admin-shell.narrow { min-height: 100vh; }

@media (max-width: 960px) {
  .admin-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .admin-content { padding: 36px 24px 64px; }
  .admin-editor-page .settings-grid { grid-template-columns: 1fr 1fr; }
  .editor-detail-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; }
  .slug-setting { grid-column: 1 / -1; }
  .markdown-workspace { grid-template-columns: 1fr; }
  .navigation-admin-layout { grid-template-columns: 1fr; }
  .user-admin-layout { grid-template-columns: 1fr; }
  .user-security-card { position: static; }
  .gallery-settings-grid { grid-template-columns: 1fr 1fr; }
  .gallery-settings-grid > label:first-child, .gallery-description-field, .gallery-related-field { grid-column: 1 / -1; }
  .gallery-theme-choices { grid-template-columns: 1fr 1fr; }
  .gallery-parameter-grid { grid-template-columns: repeat(3, minmax(110px, 1fr)); }
  .markdown-preview-shell { border-left: 0; border-top: 1px solid var(--line); }
  .markdown-source .body-editor, .markdown-preview { min-height: 360px; }
}

@media (max-width: 700px) {
  .guestbook-main { padding: 20px 16px 64px; }
  .guestbook-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .guestbook-header > span { padding: 0; }
  .guestbook-message { grid-template-columns: 40px minmax(0, 1fr); gap: 13px; padding: 24px 0; }
  .guestbook-avatar { width: 40px; height: 40px; }
  .guestbook-message-body header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .guestbook-form-section { margin-top: 48px; }
  .guestbook-submit button { width: 100%; }
  .admin-pagination { grid-template-columns: 1fr 1fr; }
  .admin-pagination small { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .admin-layout { display: block; }
  .admin-sidebar { position: static; width: 100%; height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center; gap: 8px; }
  .admin-brand { padding: 0; margin-right: auto; }
  .admin-brand strong, .admin-nav p, .admin-sidebar-foot { display: none; }
  .admin-nav { display: flex; }
  .admin-nav a { margin: 0; padding: 8px; font-size: 0; }
  .admin-nav .nav-icon { font-size: 18px; }
  .admin-content { padding: 28px 16px 56px; }
  .sidebar-toggle { display: none; }
  .admin-layout.sidebar-collapsed { display: block; }
  .sidebar-collapsed .admin-brand strong, .sidebar-collapsed .admin-sidebar-foot { display: none; }
  .admin-page-head { align-items: flex-start; flex-direction: column; }
  .admin-page-head .button-row { width: 100%; flex-wrap: wrap; }
  .admin-page-head .button-row .button { flex: 1 1 150px; }
  .admin-post-with-action { align-items: stretch; flex-direction: column; gap: 0; padding: 0; }
  .admin-post-main { align-items: flex-start; flex-direction: column; gap: 12px; padding: 16px; }
  .admin-post-meta { align-items: center; flex-direction: row; }
  .admin-delivery-link { min-width: 0; margin: 0 16px 16px; }
  .delivery-page .admin-page-head { margin-bottom: 22px; }
  .admin-editor-page .settings-grid { grid-template-columns: 1fr; }
  .editor-detail-layout, .editor-detail-layout.inspector-collapsed { display: block; }
  .editor-inspector, .inspector-collapsed .editor-inspector { position: static; height: auto; margin-top: 16px; padding: 20px; border-color: var(--line); background: var(--bg); box-shadow: 0 1px 2px rgba(0,0,0,.02); }
  .inspector-content, .inspector-collapsed .inspector-content { display: block; }
  .inspector-toggle { display: none; }
  .slug-setting { grid-column: auto; }
  .language-toolbar { align-items: flex-start; flex-direction: column; }
  .language-adder { align-items: stretch; flex-direction: column; }
  .navigation-item { grid-template-columns: 34px minmax(0, 1fr) 16px; gap: 9px; padding: 14px 12px; }
  .navigation-target { display: none; }
  .user-form-grid { grid-template-columns: 1fr; }
  .user-email-field { grid-column: auto; }
  .user-list-item { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 14px 12px; }
  .user-list-item img, .user-list-avatar { width: 38px; height: 38px; }
  .user-list-meta b { display: none; }
  .guestbook-admin-meta { flex-direction: column; gap: 10px; }
  .guestbook-admin-meta > div:last-child { width: 100%; justify-content: space-between; }
  .guestbook-admin-actions { justify-content: stretch; }
  .guestbook-admin-actions form, .guestbook-admin-actions button { flex: 1 1 0; width: 100%; }
  .gallery-list-item { grid-template-columns: 78px minmax(0, 1fr) auto; gap: 12px; }
  .gallery-list-cover { width: 78px; height: 62px; }
  .gallery-list-count { display: none; }
  .gallery-list-arrow { grid-column: 3; grid-row: 1; }
  .gallery-settings-grid { grid-template-columns: 1fr; }
  .gallery-settings-grid > label:first-child, .gallery-description-field, .gallery-related-field { grid-column: auto; }
  .gallery-theme-heading { flex-direction: column; }
  .gallery-theme-choices { grid-template-columns: 1fr; }
  .gallery-theme-preview { height: 134px; }
  .gallery-theme-parameters { padding: 16px; }
  .gallery-theme-panel > header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .gallery-parameter-grid { grid-template-columns: 1fr 1fr; }
  .gallery-photos-heading { align-items: flex-start; flex-direction: column; }
  .gallery-photo-grid { grid-template-columns: 1fr; }
  .admin-editor-page .translation-panel { padding: 18px; }
}
