:root {
  --bg: #0b0c0e;
  --bg-soft: #121418;
  --panel: #16191e;
  --panel-2: #1c2026;
  --line: #2a2f37;
  --line-soft: #20242a;
  --text: #eee9df;
  --muted: #9b9a96;
  --dim: #6f706f;
  --accent: #d7a76c;
  --accent-2: #7bc4b2;
  --danger: #e07a72;
  --radius: 14px;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
:root { --site-cursor: auto; --site-cursor-pointer: pointer; }
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body { cursor: var(--site-cursor); }
a, button, select, summary, [role="button"] { cursor: var(--site-cursor-pointer); }
input[type="text"], input[type="search"], input[type="password"], input[type="number"], textarea { cursor: text; }
button:disabled { cursor: not-allowed; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 861px) { html { scrollbar-gutter: stable; } }
body {
  margin: 0;
  background:
    radial-gradient(1000px 500px at 15% -10%, rgba(215,167,108,.09), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(123,196,178,.05), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
code, pre { font-family: var(--mono); }
pre { white-space: pre-wrap; word-break: break-word; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 11px; letter-spacing: .18em; font-weight: 700; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(11,12,14,.82);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.brand-mark { color: var(--accent); font-size: 23px; line-height: 1; transform: rotate(-12deg); }
.brand-text { font-size: 17px; }
.site-nav { display: flex; gap: 18px; color: var(--muted); font-size: 13px; }
.site-nav a.active, .site-nav a:hover { color: var(--text); }
.site-nav .admin-link { color: var(--accent); }
.search-form {
  margin-left: auto; display: flex; align-items: center; flex: 0 1 300px;
  min-width: 170px; border-bottom: 1px solid var(--line);
  transition: border-color .2s ease, background-color .2s ease;
}
.header-tools { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.header-tool {
  min-width: 30px; height: 30px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 11px; line-height: 1; letter-spacing: .04em;
  cursor: pointer; text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.header-tool:hover, .header-tool:focus-visible { color: var(--text); border-color: var(--line); background: var(--panel); }
.header-tool:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.language-toggle { font-family: var(--mono); font-size: 10.5px; }
.theme-toggle { width: 30px; padding: 0; }
.theme-symbol { display: inline-block; font-size: 14px; line-height: 1; }
.theme-moon { display: none; }
html[data-theme="light"] .theme-sun { display: none; }
html[data-theme="light"] .theme-moon { display: inline-block; }
.search-form:focus-within { border-color: var(--accent); }
.search-form input {
  width: 100%; min-width: 0; background: transparent; border: 0; outline: 0;
  color: var(--text); padding: 7px 4px; font-size: 13px; text-overflow: ellipsis;
}
.search-form input::placeholder { color: var(--dim); overflow: hidden; text-overflow: ellipsis; }
.search-form button { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 19px; padding: 0 4px; }
.notice { margin: 18px auto 0; width: min(1100px, calc(100% - 36px)); padding: 12px 16px; border-radius: 10px; font-size: 13px; }
.notice-ok { background: rgba(123,196,178,.1); border: 1px solid rgba(123,196,178,.28); }
.notice-error { background: rgba(224,122,114,.1); border: 1px solid rgba(224,122,114,.3); }
.site-main { width: min(1400px, calc(100% - 36px)); margin: 0 auto; padding: 20px 0 72px; }
.hero { padding: clamp(30px, 8vw, 92px) 0 46px; border-bottom: 1px solid var(--line-soft); }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(46px, 8vw, 108px); letter-spacing: -.045em; line-height: .95; margin: 0 0 18px; }
.hero-sub { font-family: var(--serif); font-size: clamp(18px, 2.3vw, 28px); color: var(--muted); margin: 0 0 26px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 20px; color: var(--dim); font-size: 12px; letter-spacing: .06em; }
.hero-meta span::before { content: "·"; margin-right: 20px; color: var(--accent); }
.hero-meta span:first-child::before { content: ""; margin: 0; }
.page-heading { padding: 10px 0 24px; border-bottom: 1px solid var(--line-soft); margin-bottom: 24px; }
.page-heading h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 5vw, 62px); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 8px; }
.section { margin-top: 34px; }
.site-main > .section:first-child,
.site-main > .visually-hidden + .section { margin-top: 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { font-family: var(--serif); font-weight: 500; font-size: 25px; margin: 0; }
.text-link { color: var(--muted); font-size: 13px; }
.text-link:hover { color: var(--accent); }
.album-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.album-grid.compact { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.album-card { border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; background: var(--panel); transition: border-color .2s, transform .2s; }
.album-card:hover { border-color: var(--line); transform: translateY(-2px); }
.box-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.box-card { border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; background: var(--panel); transition: border-color .2s, transform .2s; }
.box-card:hover { border-color: var(--line); transform: translateY(-2px); }
.box-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, #1d2228, #111317); }
.box-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .8; transition: transform .5s, opacity .3s; }
.box-card:hover .box-cover img { transform: scale(1.035); opacity: 1; }
.box-glyph { color: var(--accent); font-size: 38px; line-height: 1; opacity: .8; }
.box-card-count { position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 99px; background: rgba(8,9,11,.72); color: #f2eee5; font-size: 10px; letter-spacing: .03em; backdrop-filter: blur(6px); }
.box-card-lock { left: 10px; right: auto; color: #ffd9a8; }
.box-info { padding: 13px 15px 15px; min-width: 0; }
.box-info h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 19px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.box-info p { margin: 0 0 4px; color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.box-meta { color: var(--dim) !important; font-size: 11px !important; }
.box-label { color: var(--accent) !important; font-size: 11px !important; }
html[data-theme="light"] .box-cover { background: linear-gradient(140deg, #ece4d6, #f7f2e8); }
.album-cover { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #1c2026, #121418); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: transform .5s, opacity .3s; }
.album-card:hover .album-cover img { transform: scale(1.035); opacity: 1; }
.album-cover.locked { background: repeating-linear-gradient(45deg, #16191e, #16191e 8px, #191d22 8px, #191d22 16px); }
.album-card.is-nsfw .album-cover img { filter: blur(22px); transform: scale(1.08); opacity: .75; }
.album-card.is-nsfw .album-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11,12,14,.2);
}
.nsfw-note {
  position: absolute;
  z-index: 2;
  bottom: 10px;
  left: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(11,12,14,.78);
  border: 1px solid rgba(224,122,114,.3);
  color: #ffb4ad;
  font-size: 10px;
  text-align: center;
  letter-spacing: .04em;
}
.lock-glyph { font-size: 26px; filter: grayscale(1); opacity: .7; }
.empty-glyph { font-family: var(--serif); font-size: 52px; color: var(--line); }
.album-info { padding: 13px 15px 15px; }
.album-info h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; word-break: break-word; }
.album-info p { margin: 0; color: var(--muted); font-size: 12px; }
.album-rows { display: grid; gap: 14px; }
.album-row {
  display: grid;
  grid-template-columns: minmax(215px, .68fr) minmax(0, 1.32fr);
  min-height: 188px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(120deg, var(--panel), #111419 68%);
  transition: border-color .2s, transform .2s;
}
.album-row:hover { border-color: var(--line); transform: translateY(-2px); }
.album-row-main { min-width: 0; padding: 24px 26px; display: flex; flex-direction: column; gap: 4px; }
.album-row-eyebrow { color: var(--accent); font-size: 9px; letter-spacing: .2em; font-weight: 700; }
.album-row-title { font-family: var(--serif); font-size: clamp(25px, 3vw, 38px); line-height: 1.06; letter-spacing: -.03em; overflow-wrap: anywhere; word-break: break-word; }
.album-row-meta { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.album-row-open { margin-top: auto; padding-top: 16px; color: var(--accent); font-size: 11px; letter-spacing: .04em; }
.album-row-visuals { min-width: 0; display: flex; align-items: center; padding: 14px 16px 14px 0; }
.album-row-strip { display: flex; align-items: stretch; gap: 9px; width: 100%; height: 158px; min-width: 0; }
.album-row-thumb { flex: 1 1 0; min-width: 0; border-radius: 9px; overflow: hidden; background: var(--panel-2); border: 1px solid rgba(255,255,255,.04); }
.album-row-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .84; transition: transform .45s, opacity .25s; }
.album-row-thumb.is-locked { display: grid; place-items: center; background: #0d1115; color: var(--dim); border: 1px dashed rgba(255,255,255,.08); }
.album-row:hover .album-row-thumb img { transform: scale(1.035); opacity: 1; }
.album-row.is-nsfw .album-row-thumb img { filter: blur(20px); transform: scale(1.08); opacity: .7; }
.album-row-more { flex: 0 0 46px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: 11px; }
.album-row-lock, .album-row-empty { width: 100%; height: 158px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: 12px; }
.album-row-empty { font-family: var(--serif); font-size: 64px; color: var(--line); }
.album-compact-list { display: grid; border-top: 1px solid var(--line-soft); }
.album-compact-row { display: flex; align-items: center; gap: 14px; padding: 11px 4px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.album-compact-row:hover { background: rgba(255,255,255,.015); }
.album-compact-cover { flex: 0 0 54px; width: 54px; height: 40px; border-radius: 6px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; }
.album-compact-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.album-compact-row.is-nsfw .album-compact-cover img { filter: blur(10px); }
.album-compact-cover .empty-glyph, .album-compact-cover .lock-glyph { font-size: 19px; }
.album-compact-main { min-width: 0; display: grid; gap: 1px; flex: 1; }
.album-compact-main strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.album-compact-main small { color: var(--dim); font-size: 10.5px; overflow-wrap: anywhere; }
.album-compact-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.album-compact-arrow { color: var(--dim); font-size: 15px; }
.asset-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.asset-grid.is-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
}
.asset-grid.is-masonry.masonry-ready { display: flex; align-items: flex-start; gap: 16px; }
.masonry-column { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.asset-grid.is-masonry.masonry-ready .asset-card { width: 100%; margin: 0; }
.asset-grid.is-masonry .asset-thumb { aspect-ratio: auto; }
.asset-grid.is-masonry .asset-thumb img { width: 100%; height: auto; object-fit: contain; }
.asset-grid.is-masonry .asset-thumb.locked { min-height: 220px; }
.browse-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.stats-heading { margin-bottom: 30px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.stat-card { min-height: 132px; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; padding: 17px 18px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: linear-gradient(145deg, var(--panel), #0f1216); }
.stat-label { margin-bottom: auto; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.stat-card strong { font-family: var(--serif); font-size: clamp(27px, 3vw, 38px); font-weight: 500; line-height: 1; color: var(--text); }
.stat-card strong.stat-date { font-size: clamp(21px, 2.3vw, 29px); }
.stat-card small { color: var(--dim); font-size: 10.5px; }
.stats-section { margin-top: 34px; padding-top: 23px; border-top: 1px solid var(--line-soft); }
.stats-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.stats-section-head h2 { margin: 0; font-family: var(--serif); font-size: 23px; font-weight: 500; }
.stats-bars { display: grid; gap: 12px; max-width: 820px; }
.stats-bar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 45px; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.stats-bar-row strong { color: var(--text); font-weight: 500; text-align: right; }
.stats-bar { height: 7px; overflow: hidden; border-radius: 99px; background: #1a1e24; }
.stats-bar i { display: block; height: 100%; min-width: 0; border-radius: inherit; background: var(--accent); opacity: .82; }
.stats-bar i.is-muted { background: #6b7178; }
.stats-album-list { display: grid; gap: 1px; max-width: 820px; }
.stats-album-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.stats-rank { color: var(--dim); font-family: var(--mono, ui-monospace, monospace); font-size: 10px; }
.stats-album-name { overflow-wrap: anywhere; font-size: 13px; }
.stats-album-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.stats-inline { display: flex; flex-wrap: wrap; gap: 38px; }
.stats-inline div { display: grid; gap: 3px; }
.stats-inline strong { font-family: var(--serif); font-size: 27px; font-weight: 500; }
.stats-inline span { color: var(--muted); font-size: 10.5px; }
.stats-footnote { margin-top: 30px; }
.layout-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel); }
.layout-switch button { border: 0; border-radius: 5px; background: transparent; color: var(--muted); padding: 6px 10px; font: inherit; font-size: 10.5px; cursor: pointer; }
.layout-switch button:hover { color: var(--text); }
.layout-switch button.is-active { background: var(--panel-2); color: var(--accent); }
.asset-grid.compact { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.asset-card { position: relative; min-width: 0; }
.asset-thumb { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 11px; }
.asset-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease, filter .3s; }
.asset-card:hover .asset-thumb img { transform: scale(1.03); }
.asset-thumb.locked { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; background: repeating-linear-gradient(45deg, #15181c, #15181c 8px, #191d22 8px, #191d22 16px); }
.lock-label { color: var(--muted); font-size: 11px; }
.asset-info { padding: 9px 2px 0; }
.asset-title { display: block; font-size: 12.5px; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.asset-meta { display: flex; gap: 8px; color: var(--dim); font-size: 10.5px; margin-top: 2px; align-items: center; }
.asset-actions { display: flex; gap: 10px; color: var(--muted); font-size: 11px; margin-top: 4px; opacity: 0; transition: opacity .2s; }
.asset-card:hover .asset-actions { opacity: 1; }
.asset-actions a:hover { color: var(--accent); }
.badge { position: absolute; top: 9px; left: 9px; padding: 2px 6px; border-radius: 5px; font-size: 9px; letter-spacing: .08em; font-weight: 700; background: rgba(11,12,14,.75); border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(6px); z-index: 1; }
.badge-nsfw { color: #ffb4ad; border-color: rgba(224,122,114,.4); }
.badge-lock { left: auto; right: 9px; color: var(--accent); border-color: rgba(215,167,108,.35); }
.asset-card.is-nsfw .asset-thumb img { filter: blur(24px); transform: scale(1.08); }
.asset-card.revealed .asset-thumb img { filter: none; transform: none; }
.nsfw-cover {
  position: absolute; inset: 0 0 auto; aspect-ratio: 1 / 1; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: rgba(11,12,14,.43); color: var(--text); cursor: pointer; border-radius: 11px;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
.nsfw-cover span { color: #ffb4ad; font-size: 10px; }
.nsfw-cover strong { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.nsfw-cover small { color: var(--muted); font-size: 10px; text-transform: none; }
.asset-card.revealed .nsfw-cover { display: none; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; color: var(--dim); font-size: 12px; margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.album-heading { border: 0; padding-top: 0; }
.image-detail { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .75fr); gap: clamp(26px, 4vw, 64px); align-items: start; }
.detail-visual { position: sticky; top: 87px; align-self: start; min-width: 0; }
.detail-image-wrap { position: relative; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; background: var(--panel); display: flex; align-items: center; justify-content: center; }
.detail-image-wrap img { width: 100%; max-height: calc(100vh - 240px); object-fit: contain; }
@media (max-height: 760px) and (min-width: 861px) {
  .detail-image-wrap img { max-height: calc(100vh - 210px); }
}
.detail-toolbar .muted { overflow-wrap: anywhere; }
.gallery-zone {
  position: absolute; top: 0; bottom: 0; z-index: 4; width: 34%;
  display: flex; align-items: center; opacity: 0; pointer-events: auto;
  transition: opacity .16s ease, background .16s ease;
}
.gallery-zone-prev { left: 0; justify-content: flex-start; padding-left: 12px; }
.gallery-zone-next { right: 0; justify-content: flex-end; padding-right: 12px; }
.gallery-zone-prev:hover, .gallery-zone-prev:focus-within {
  opacity: 1; background: linear-gradient(to right, rgba(4,6,8,.24), transparent 72%);
}
.gallery-zone-next:hover, .gallery-zone-next:focus-within {
  opacity: 1; background: linear-gradient(to left, rgba(4,6,8,.24), transparent 72%);
}
.gallery-arrow {
  position: relative; z-index: 4;
  width: 42px; height: 64px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.2); border-radius: 9px;
  background: rgba(8,10,12,.56); color: var(--text); font-family: var(--serif);
  font-size: 34px; line-height: 1; backdrop-filter: blur(8px); opacity: .9;
  transition: opacity .2s, border-color .2s, color .2s;
}
.gallery-arrow:hover { opacity: 1; color: var(--accent); border-color: var(--accent); }

.detail-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--dim); font-size: 11px; }
.pager-keys { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); }
.pager-keys kbd { min-width: 18px; padding: 1px 4px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; font-family: var(--mono); font-size: 10px; text-align: center; color: var(--muted); }
.detail-visual.is-nsfw .detail-image-wrap img, .image-detail.is-nsfw:not(.revealed) .detail-image-wrap img { filter: blur(30px); transform: scale(1.04); }
.image-detail.revealed .detail-image-wrap img { filter: none; transform: none; }
.image-detail.is-nsfw:not(.revealed) .detail-side { filter: blur(9px); opacity: .55; pointer-events: none; user-select: none; }
.image-detail.is-nsfw:not(.revealed) .nsfw-cover { display: flex; }
.detail-image-wrap .nsfw-cover { aspect-ratio: auto; height: 100%; min-height: 300px; border-radius: 0; }
.image-detail.revealed .detail-image-wrap .nsfw-cover { display: none; }
.detail-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.muted-inline { color: var(--muted); font-size: 11px; margin-left: 4px; }
.detail-side { min-width: 0; }
.detail-back { display: inline-block; margin: 0 0 12px; color: var(--muted); font-size: 11.5px; letter-spacing: .02em; }
.detail-back:hover { color: var(--accent); }
.detail-side h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 4px; overflow-wrap: anywhere; word-break: break-word; }
.detail-side p { overflow-wrap: anywhere; }
.detail-desc { color: var(--muted); }
.detail-intro { margin: 16px 0 20px; padding: 12px 14px; border-left: 2px solid var(--accent); background: rgba(215,167,108,.06); border-radius: 0 8px 8px 0; line-height: 1.8; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-intro.has-quote::before, .detail-intro.has-quote::after { color: var(--accent); font-family: var(--serif); font-size: 1.2em; line-height: 0; }
.detail-intro.has-quote::before { content: "“"; margin-right: 2px; }
.detail-intro.has-quote::after { content: "”"; margin-left: 2px; }
.detail-intro > :first-child { margin-top: 0; }
.detail-intro > :last-child { margin-bottom: 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 24px; }
.tag { display: inline-flex; align-items: center; padding: 3px 9px; border: 1px solid var(--line); border-radius: 99px; font-size: 10.5px; color: var(--muted); }
.tag-danger { color: #ffb4ad; border-color: rgba(224,122,114,.35); }
.tag-link:hover { color: var(--accent); border-color: var(--accent); }
.meta-block { padding: 18px 0; border-top: 1px solid var(--line-soft); }
.meta-block h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 10px; }
.meta-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.meta-heading h2 { margin: 0; }
.copy-btn { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 3px 9px; border-radius: 6px; cursor: pointer; font-size: 10.5px; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.prompt-box { margin: 0; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 9px; padding: 12px 14px; font-family: var(--sans); font-size: 12.5px; line-height: 1.65; color: #d9d3c8; max-height: 240px; overflow: auto; }
.prompt-box.small { font-size: 11.5px; max-height: 130px; }
.json-box { margin: 0; background: #0e1013; border: 1px solid var(--line-soft); border-radius: 9px; padding: 13px; font-size: 11px; line-height: 1.55; color: #b9c7c1; max-height: 360px; overflow: auto; }
.lora-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.lora-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; border: 1px solid var(--line-soft); background: var(--panel); padding: 8px 11px; border-radius: 8px; font-size: 12px; }
.lora-name { min-width: 0; white-space: normal; overflow-wrap: anywhere; word-break: break-word; line-height: 1.45; }
.lora-weight { flex: 0 0 auto; color: var(--accent); font-family: var(--mono); font-size: 11px; padding-top: 1px; }
.sampler-list { display: grid; gap: 8px; }
.sampler-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; border: 1px solid var(--line-soft); border-radius: 9px; overflow: hidden; background: var(--line-soft); }
.sampler-card > div { background: var(--panel); padding: 8px 10px; }
.sampler-card dt { color: var(--dim); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.sampler-card dd { margin: 1px 0 0; font-size: 12px; font-family: var(--mono); }
.model-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.model-list li { display: flex; flex-direction: column; gap: 2px; font-size: 11px; }
.model-list span { color: var(--dim); text-transform: uppercase; letter-spacing: .1em; font-size: 9px; }
.model-list code { color: var(--muted); overflow-wrap: anywhere; }
.nodes-block summary, .warnings-block summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.node-list { list-style: none; padding: 10px 0 0; margin: 0; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.node-list li { display: flex; gap: 8px; font-size: 11px; border-bottom: 1px solid var(--line-soft); padding: 4px 0; }
.node-id { color: var(--accent); font-family: var(--mono); min-width: 38px; }
.node-list small { color: var(--dim); }
.warnings-block ul { color: var(--muted); font-size: 11px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 15px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #17130e; font-size: 12px; font-weight: 600; cursor: pointer; }
.button:hover { background: #e7bd86; color: #17130e; }
.button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.button.ghost:hover { border-color: var(--accent); color: var(--accent); }
.empty-state { border: 1px dashed var(--line); border-radius: var(--radius); padding: 72px 20px; text-align: center; color: var(--muted); }
.empty-title { font-family: var(--serif); font-size: 26px; color: var(--text); margin: 0 0 6px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 34px; color: var(--muted); font-size: 12px; }
.page-unlock { overflow: hidden; }
.unlock-page { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; min-height: 0; padding: 24px; background: rgba(5,7,9,.78); backdrop-filter: blur(10px); }
.unlock-card { position: relative; width: min(440px, 100%); max-height: calc(100vh - 48px); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; background: var(--panel); box-shadow: 0 22px 70px rgba(0,0,0,.55); }
.unlock-cancel { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font-size: 21px; line-height: 1; cursor: pointer; }
.unlock-cancel:hover { border-color: var(--line); color: var(--text); }
.unlock-card h1 { font-family: var(--serif); font-weight: 500; font-size: 30px; margin: 0 0 6px; }
.lock-glyph.large { font-size: 32px; margin-bottom: 16px; }
.stack-form { display: grid; gap: 13px; }
.stack-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.stack-form input, .stack-form select, .stack-form textarea { width: 100%; background: #0e1013; border: 1px solid var(--line); border-radius: 7px; padding: 9px 10px; color: var(--text); outline: 0; font-size: 13px; }
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus { border-color: var(--accent); }
.error-page { text-align: center; padding: 14vh 20px; }
.error-page h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 7vw, 80px); margin: 0 0 12px; }
.error-page .button { margin-top: 18px; }
.site-footer { width: min(1400px, calc(100% - 36px)); margin: 0 auto; padding: 22px 0 34px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; color: var(--dim); font-size: 10.5px; letter-spacing: .05em; }
.footer-left { display: grid; gap: 5px; min-width: 0; }
.footer-icp { color: var(--muted); }
.footer-icp:hover { color: var(--accent); }
.footer-custom { color: var(--muted); }
.footer-custom a { color: var(--accent); }
.footer-powered { white-space: nowrap; }
.brand-icon { width: 25px; height: 25px; object-fit: contain; border-radius: 5px; }
/* The bottom haze belongs to the infinite waterfall only.  Detail, album
   index, about and paginated pages keep a clean, fixed bottom edge. */
.public-body:not(.has-waterfall)::after { content: none; display: none; }

.media-shell { position: relative; }
.guest-candidate img:not(.is-loaded) {
  background: linear-gradient(108deg, #14181d 30%, #232a31 48%, #14181d 66%);
  background-size: 220% 100%;
  animation: media-sweep 1.35s linear infinite;
}
.carousel-slide.media-shell:not(.is-loaded) {
  background: linear-gradient(108deg, #14181d 30%, #20262d 48%, #14181d 66%);
  background-size: 220% 100%;
  animation: media-sweep 1.35s linear infinite;
}
.carousel-slide.media-shell.is-loaded { animation: none; }
.media-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(108deg, transparent 30%, rgba(255,255,255,.12) 48%, transparent 66%);
  background-size: 220% 100%;
  animation: media-sweep 1.35s linear infinite;
}
.media-shell.is-loaded::after { display: none; }
@keyframes media-sweep {
  from { background-position: 180% 0; }
  to { background-position: -80% 0; }
}
[data-feed-status][data-loading="1"]::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 7px;
  vertical-align: -1px;
  border: 1.5px solid rgba(255,255,255,.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cb-spin .75s linear infinite;
}
@keyframes cb-spin { to { transform: rotate(360deg); } }
.loading-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: rgba(5,7,9,.72); backdrop-filter: blur(6px); }
.loading-overlay[hidden] { display: none; }
.loading-card { display: grid; justify-items: center; gap: 13px; min-width: 220px; padding: 25px 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 18px 60px rgba(0,0,0,.5); }
.loading-card p { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.spinner { width: 28px; height: 28px; border: 2px solid rgba(255,255,255,.14); border-top-color: var(--accent); border-radius: 50%; animation: cb-spin .8s linear infinite; }
body.is-busy { cursor: progress; }
.public-body.has-waterfall::after {
  content: "";
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58px;
  pointer-events: none;
  background: linear-gradient(to top, rgba(11,12,14,.78), rgba(11,12,14,0));
  backdrop-filter: blur(3px);
  mask-image: linear-gradient(to top, #000 10%, transparent 100%);
}
.guest-heading { border: 0; padding-bottom: 22px; }
.guest-upload-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); gap: 18px; align-items: start; }
.guest-panel { border: 1px solid var(--line-soft); border-radius: var(--radius); background: linear-gradient(135deg, var(--panel), #111419); padding: 20px; min-width: 0; }
.guest-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.guest-panel-head h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 23px; }
.guest-panel-head p { margin: 2px 0 0; }
.candidate-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.small-button { padding: 5px 9px; font-size: 10.5px; }
.guest-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 150px; padding: 20px; border: 1px dashed var(--line); border-radius: 10px; background: #0e1115; text-align: center; cursor: pointer; position: relative; }
.guest-dropzone:hover, .guest-dropzone.is-dragover { border-color: var(--accent); background: rgba(215,167,108,.04); }
.guest-dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.guest-drop-icon { font-family: var(--serif); font-size: 32px; line-height: 1; color: var(--accent); }
.guest-drop-title { font-size: 13px; }
.guest-candidate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.candidate-empty { grid-column: 1 / -1; margin: 0; padding: 22px 10px; text-align: center; color: var(--dim); font-size: 11.5px; border: 1px dashed var(--line); border-radius: 8px; }
.guest-candidate { position: relative; display: grid; grid-template-columns: 16px 78px minmax(0, 1fr) 22px; align-items: center; gap: 9px; padding: 8px; border: 1px solid var(--line-soft); border-radius: 9px; background: #11151a; min-width: 0; }
.guest-candidate:has(input:checked) { border-color: rgba(215,167,108,.6); }
.guest-candidate > input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.guest-candidate img { width: 78px; height: 78px; object-fit: cover; border-radius: 6px; background: #0a0d10; }
.guest-candidate-meta { display: grid; gap: 2px; min-width: 0; }
.guest-candidate-name { font-size: 10.5px; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.guest-candidate-size { font-size: 9.5px; color: var(--dim); }
.guest-candidate-meta input { width: 100%; margin-top: 4px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 5px; background: #0b0e12; color: var(--text); font-size: 10.5px; }
.guest-candidate.is-unchecked { opacity: .45; }
.candidate-remove { width: 22px; height: 22px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--dim); font-size: 18px; cursor: pointer; }
.candidate-remove:hover { border-color: var(--line); color: var(--danger); }
.guest-options { position: sticky; top: 86px; display: grid; gap: 12px; }
.guest-options label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.guest-options select, .guest-options input, .guest-options textarea { width: 100%; background: #0e1013; border: 1px solid var(--line); border-radius: 7px; padding: 8px 9px; color: var(--text); font-size: 12.5px; }
.guest-options select:focus, .guest-options input:focus, .guest-options textarea:focus { border-color: var(--accent); outline: 0; }
.guest-warning { margin: 0; padding: 8px 10px; border: 1px solid rgba(224,122,114,.35); border-radius: 7px; color: #ffb4ad; background: rgba(224,122,114,.07); font-size: 11px; }
.guest-quota { padding: 11px; border: 1px solid var(--line-soft); border-radius: 8px; background: #0e1115; }
.guest-quota-head { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.guest-quota-head strong { color: var(--accent); font-weight: 600; }
.guest-quota p { margin: 4px 0 0; }
.guest-meter { height: 4px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #20252b; }
.guest-meter span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.guest-capacity-list { display: grid; gap: 7px; max-height: 210px; margin: 9px 0 0; padding: 0 3px 0 0; overflow-y: auto; list-style: none; }
.guest-capacity-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 7px 8px; border: 1px solid var(--line-soft); border-radius: 7px; background: #0b0e12; }
.guest-capacity-label { display: grid; gap: 1px; min-width: 0; }
.guest-capacity-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.guest-capacity-label small { color: var(--dim); font-size: 9.5px; }
.guest-capacity-value { align-self: center; color: var(--accent); font-size: 10px; white-space: nowrap; }
.guest-capacity-value .is-full { color: var(--danger); }
.guest-capacity-row .guest-meter { grid-column: 1 / -1; margin-top: 2px; }
.guest-cycle-note { margin-top: 2px; }
.guest-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 2px; }
@media (max-width: 960px) {
  .guest-upload-layout { grid-template-columns: 1fr; }
  .guest-options { position: static; }
  .guest-candidate-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .guest-panel { padding: 14px; }
  .guest-candidate { grid-template-columns: 16px 60px minmax(0, 1fr) 22px; }
  .guest-candidate img { width: 60px; height: 60px; }
  .guest-submit-row { flex-direction: column; align-items: stretch; }
  .guest-submit-row .button { width: 100%; }
}
.home-carousel {
  position: relative;
  margin: 8px 0 34px;
  aspect-ratio: 21 / 9;
  max-height: 620px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0c0f;
}
.carousel-track { position: absolute; inset: 0; }
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .55s ease; pointer-events: none; }
.carousel-slide.is-active { opacity: 1; pointer-events: auto; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,7,9,.82), rgba(5,7,9,.06) 58%, rgba(5,7,9,.12)); }
.carousel-slide.is-nsfw img { filter: blur(28px); transform: scale(1.06); }
.carousel-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 42px; color: var(--muted); }
.carousel-caption { position: absolute; z-index: 2; left: clamp(18px, 4vw, 46px); right: clamp(18px, 4vw, 46px); bottom: clamp(42px, 6vw, 68px); display: grid; gap: 3px; }
.carousel-caption strong { font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 3.5vw, 46px); letter-spacing: -.02em; }
.carousel-caption small { color: var(--muted); font-size: 12px; }
.carousel-controls { position: absolute; z-index: 3; left: 18px; right: 18px; bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.carousel-controls > button { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: rgba(8,10,12,.55); color: var(--text); cursor: pointer; backdrop-filter: blur(8px); }
.carousel-controls > button:hover { border-color: var(--accent); color: var(--accent); }
.carousel-dots { display: flex; gap: 6px; }
.carousel-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.32); cursor: pointer; }
.carousel-dots button.is-active { background: var(--accent); }
[hidden] { display: none !important; }
.feed-footer { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 30px; }
.feed-footer.is-done { opacity: .65; }
.feed-sentinel { height: 1px; }
.about-hero { display: flex; align-items: center; gap: clamp(22px, 4vw, 48px); padding: clamp(30px, 6vw, 76px) 0 38px; border-bottom: 1px solid var(--line-soft); }
.about-avatar { flex: 0 0 auto; width: clamp(110px, 15vw, 168px); height: clamp(110px, 15vw, 168px); border-radius: 50%; overflow: hidden; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; }
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-avatar span { font-family: var(--serif); font-size: 48px; color: var(--accent); }
.about-intro h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 6vw, 74px); letter-spacing: -.035em; line-height: .98; margin: 0 0 12px; }
.about-bio { max-width: 760px; color: var(--muted); font-size: clamp(15px, 1.8vw, 19px); white-space: pre-wrap; margin: 0 0 18px; }
.about-links { display: flex; flex-wrap: wrap; gap: 9px; }
.about-content { max-width: 900px; padding: 34px 0 18px; line-height: 1.8; }
.about-content h2, .about-content h3 { font-family: var(--serif); font-weight: 500; }
.about-content img { border-radius: 10px; margin: 14px 0; }
.about-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.about-content pre { background: var(--panel); padding: 12px; border-radius: 8px; overflow: auto; }
@media (min-width: 1041px) {
  /* On the detail page the breadcrumb would push the sticky visual down and
     make it jump up on the first scroll.  The side column keeps a back link,
     so the breadcrumb is only needed on the stacked/mobile layout. */
  .page-image .breadcrumb { display: none; }
  .page-image .site-main { padding-top: 18px; }
}
@media (max-width: 1040px) {
  .image-detail { grid-template-columns: 1fr; gap: 26px; }
  .detail-visual { position: static; }
  .detail-image-wrap img { max-height: min(72vh, 760px); }
  .album-row { grid-template-columns: minmax(0, 1fr); }
  .album-row-main { padding: 20px 20px 12px; }
  .album-row-visuals { padding: 0 14px 14px; }
}
@media (max-width: 860px) {
  .home-carousel { aspect-ratio: 4 / 3; }
  .asset-grid.is-masonry { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .browse-head-row { align-items: flex-start; gap: 12px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .asset-grid.is-masonry.masonry-ready,
  .asset-grid.is-masonry.masonry-ready .masonry-column { gap: 10px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-bar-row { grid-template-columns: 92px minmax(0, 1fr) 36px; gap: 8px; }
}
@media (max-width: 1150px) {
  .asset-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .album-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .box-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .site-header { flex-wrap: wrap; gap: 12px 18px; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; }
  .search-form { min-width: 0; flex: 1; }
  .box-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-detail { grid-template-columns: 1fr; }
  .detail-visual { position: static; }
  .album-row { grid-template-columns: 1fr; }
  .album-row-main { padding: 20px 20px 12px; }
  .album-row-visuals { padding: 0 14px 14px; }
  .album-row-strip, .album-row-lock, .album-row-empty { height: 150px; }
  .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .asset-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .album-grid, .album-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (hover: none), (pointer: coarse) {
  .gallery-zone { opacity: .92; width: 28%; }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  .site-main { width: calc(100% - 26px); padding-top: 16px; }
  .site-header { padding: 12px 14px; gap: 10px; }
  .header-tools { gap: 2px; }
  .header-tool { min-width: 28px; height: 28px; padding: 0 6px; }
  .brand-text { font-size: 15px; }
  .hero { padding-top: 26px; }
  .asset-grid, .asset-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .album-grid, .album-grid.compact, .box-grid { gap: 12px; }
  .album-row-strip { gap: 6px; height: 120px; }
  .album-row-visuals { overflow-x: auto; padding-bottom: 12px; }
  .album-row-thumb { flex: 0 0 72px; }
  .album-row-more { flex: 0 0 42px; }
  .gallery-zone { width: 30%; opacity: .92; }
  .gallery-zone-prev { padding-left: 7px; }
  .gallery-zone-next { padding-right: 7px; }
  .gallery-arrow { width: 34px; height: 52px; font-size: 28px; }
  .asset-actions { opacity: 1; }
  .sampler-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { flex-direction: column; }
}
/* ---- external image link ---- */
.external-link-box {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--bg-soft);
}
.external-link-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10.5px; letter-spacing: .06em; }
.copy-field-row { display: flex; gap: 7px; align-items: stretch; min-width: 0; }
.copy-field-row input {
  flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--panel); color: var(--text);
  font-family: var(--mono); font-size: 10.5px;
}
.copy-field-row .copy-btn { flex: 0 0 auto; }
.external-link-box small { display: block; margin-top: 6px; line-height: 1.5; }
.admin-external { margin-top: 12px; }
.meta-note { margin-left: 7px; color: var(--dim); font-family: var(--sans); font-size: 10px; font-weight: 400; letter-spacing: 0; }

/* ---- preference cursors (32px vector, sharp and quiet) ---- */
body.cursor-ink {
  --site-cursor: url("/static/cursors/ink.svg") 4 3, auto;
  --site-cursor-pointer: url("/static/cursors/ink.svg") 4 3, pointer;
}
body.cursor-ring {
  --site-cursor: url("/static/cursors/ring.svg") 16 16, auto;
  --site-cursor-pointer: url("/static/cursors/ring.svg") 16 16, pointer;
}
body.cursor-cross {
  --site-cursor: url("/static/cursors/cross.svg") 16 16, auto;
  --site-cursor-pointer: url("/static/cursors/cross.svg") 16 16, pointer;
}
body.cursor-diamond {
  --site-cursor: url("/static/cursors/diamond.svg") 16 16, auto;
  --site-cursor-pointer: url("/static/cursors/diamond.svg") 16 16, pointer;
}
/* Component rules above use cursor:pointer for hover affordance; route them
   through the user's preference too. Text fields keep a text caret. */
body a,
body button:not(:disabled),
body select,
body summary,
body [role="button"],
body .guest-dropzone,
body .candidate-remove,
body .copy-btn { cursor: var(--site-cursor-pointer) !important; }
body button:disabled { cursor: not-allowed !important; }
body input[type="text"],
body input[type="search"],
body input[type="password"],
body input[type="number"],
body textarea { cursor: text; }

/* ---- back-to-top button (deliberately separate from the theme control) ---- */
.back-to-top {
  position: fixed; z-index: 90;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  width: 40px; height: 40px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease, border-color .2s ease;
}
.back-to-top.is-visible { opacity: .32; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover, .back-to-top:focus-visible { opacity: 1; border-color: var(--accent); }
.back-to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.back-to-top:active { transform: translateY(1px) scale(.97); }
.back-to-top-arrow { font-size: 17px; line-height: 1; font-family: var(--sans); transform: translateY(-1px); }
html[data-theme="light"] .back-to-top { background: color-mix(in srgb, #fff 78%, transparent); }
@media (hover: none), (pointer: coarse) {
  .back-to-top.is-visible { opacity: .5; }
}

/* A circular reveal from the orb, using the View Transition API when present. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) {
  animation: theme-reveal .58s cubic-bezier(.2,.75,.2,1);
  transform-origin: var(--theme-x, 92vw) var(--theme-y, 92vh);
}
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--theme-x, 92vw) var(--theme-y, 92vh)); }
  to { clip-path: circle(150% at var(--theme-x, 92vw) var(--theme-y, 92vh)); }
}
/* ---- light theme ---- */
html[data-theme="light"] {
  --bg: #f3efe6;
  --bg-soft: #ebe4d6;
  --panel: #fbf8f1;
  --panel-2: #f0e9dc;
  --line: #d5ccba;
  --line-soft: #e4dccd;
  --text: #202521;
  --muted: #5d6059;
  --dim: #898378;
  --accent-2: #2f7f70;
  --danger: #b34a42;
}
html[data-theme="light"] body {
  background:
    radial-gradient(1000px 520px at 12% -12%, rgba(154,95,34,.08), transparent 62%),
    radial-gradient(900px 520px at 100% 0%, rgba(47,127,112,.07), transparent 56%),
    var(--bg);
  color: var(--text);
}
html[data-theme="light"] .site-header { background: rgba(248,244,236,.84); border-bottom-color: var(--line-soft); }
html[data-theme="light"] .site-nav a.active, html[data-theme="light"] .site-nav a:hover { color: var(--text); }
html[data-theme="light"] .album-cover { background: linear-gradient(135deg, #ece4d5, #f7f2e8); }
html[data-theme="light"] .album-cover.locked { background: repeating-linear-gradient(45deg, #efe8db, #efe8db 8px, #e9e1d3 8px, #e9e1d3 16px); }
html[data-theme="light"] .album-row { background: linear-gradient(120deg, var(--panel), #f4eee3 68%); }
html[data-theme="light"] .album-row-thumb.is-locked { background: #eee7da; }
html[data-theme="light"] .album-compact-row:hover { background: rgba(32,37,33,.035); }
html[data-theme="light"] .stat-card { background: linear-gradient(145deg, var(--panel), #f2ebde); }
html[data-theme="light"] .stats-bar { background: #e4dccc; }
html[data-theme="light"] .json-box { background: #f4eee3; color: #4d5b53; }
html[data-theme="light"] .prompt-box { color: #3b433d; }
html[data-theme="light"] .stack-form input, html[data-theme="light"] .stack-form select, html[data-theme="light"] .stack-form textarea,
html[data-theme="light"] .guest-options select, html[data-theme="light"] .guest-options input, html[data-theme="light"] .guest-options textarea {
  background: var(--panel); color: var(--text); border-color: var(--line);
}
html[data-theme="light"] .guest-panel { background: linear-gradient(135deg, var(--panel), #f1eadd); }
html[data-theme="light"] .guest-dropzone { background: #f7f1e7; }
html[data-theme="light"] .guest-quota { background: #f4eee3; }
html[data-theme="light"] .guest-capacity-row { background: #fbf7ef; }
html[data-theme="light"] .guest-meter { background: #e2d8c5; }
html[data-theme="light"] .guest-candidate { background: var(--panel); }
html[data-theme="light"] .guest-candidate img { background: #e7dfd1; }
html[data-theme="light"] .loading-card { box-shadow: 0 18px 60px rgba(60,50,35,.18); }
html[data-theme="light"] .spinner { border-color: rgba(32,37,33,.14); border-top-color: var(--accent); }
html[data-theme="light"] .unlock-page { background: rgba(61,53,40,.34); }
html[data-theme="light"] .unlock-card { box-shadow: 0 22px 70px rgba(60,50,35,.22); }
html[data-theme="light"] .public-body.has-waterfall::after {
  background: linear-gradient(to top, rgba(243,239,230,.86), rgba(243,239,230,0));
}
html[data-theme="light"] .gallery-zone-prev:hover { background: linear-gradient(to right, rgba(255,255,255,.18), transparent 72%); }
html[data-theme="light"] .gallery-zone-next:hover { background: linear-gradient(to left, rgba(255,255,255,.18), transparent 72%); }
html[data-theme="light"] .gallery-arrow { border-color: rgba(255,255,255,.5); background: rgba(22,24,22,.52); color: #fff; }
html[data-theme="light"] .carousel-caption strong { color: #f6f1e7; }
html[data-theme="light"] .carousel-caption small { color: rgba(246,241,231,.72); }
html[data-theme="light"] .carousel-controls > button { color: #fff; }
html[data-theme="light"] .carousel-empty { color: #f6f1e7; }
html[data-theme="light"] .carousel-slide.media-shell:not(.is-loaded) { background: linear-gradient(108deg, #e7dfd1 30%, #f7f1e6 48%, #e7dfd1 66%); background-size: 220% 100%; }
html[data-theme="light"] .notice-ok { background: rgba(47,127,112,.09); }
html[data-theme="light"] .notice-error { background: rgba(179,74,66,.08); }
html[data-theme="light"] .search-form { border-color: var(--line); }
html[data-theme="light"] .site-footer { border-color: var(--line-soft); }

/* Soften theme swaps where View Transitions are unavailable. */
body, .site-header, .asset-thumb, .album-cover, .stat-card, .guest-panel, .unlock-card, .loading-card, .back-to-top {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease;
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top, .back-to-top-arrow, body, .site-header, .asset-thumb, .album-cover {
    transition: none !important;
  }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
