@font-face {
  font-family: "PT Sans";
  src: url("/static/fonts/pt-sans-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}
@font-face {
  font-family: "PT Sans";
  src: url("/static/fonts/pt-sans-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  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;
}
@font-face {
  font-family: "PT Sans";
  src: url("/static/fonts/pt-sans-cyrillic-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "PT Sans";
  src: url("/static/fonts/pt-sans-cyrillic-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "PT Serif";
  src: url("/static/fonts/pt-serif-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}
@font-face {
  font-family: "PT Serif";
  src: url("/static/fonts/pt-serif-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  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;
}
@font-face {
  font-family: "PT Serif";
  src: url("/static/fonts/pt-serif-cyrillic-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "PT Serif";
  src: url("/static/fonts/pt-serif-cyrillic-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: #121212;
  --panel: #1c1c1c;
  --stroke: #2c2c2c;
  --text: #ece8e1;
  --muted: #8d8880;
  --accent: #d8cbb6;
  --danger: #c45b52;
  --ok: #7f9a78;
  --warn: #c4a15a;
  --radius: 6px;
  --radius-lg: 8px;
  --space: 8px;
  --page: min(1120px, calc(100% - 40px));
  --font: "PT Sans", "Segoe UI", system-ui, sans-serif;
  --serif: "PT Serif", "Times New Roman", serif;
  font-family: var(--font);
  line-height: 1.45;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: #161616;
  border-bottom: 1px solid var(--stroke);
}
.topbar-inner {
  position: relative;
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.topbar-main {
  display: flex;
  gap: 16px;
  align-items: center;
  min-height: 56px;
  padding: 8px 0;
}
.home {
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.home:hover { text-decoration: none; color: var(--accent); }
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 14px; flex: 1; min-width: 0; }
.crumbs span:last-child { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search {
  position: relative;
  flex: 1;
  max-width: 360px;
  min-width: 140px;
  display: flex;
  align-items: center;
}
.search-submit {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
}
.search-submit:hover { color: var(--text); }
.search input, label input, input, select, button, textarea { font: inherit; color: var(--text); }
.search input[type=search] {
  width: 100%;
  background: #141414;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 8px 14px 8px 38px;
  appearance: none;
  -webkit-appearance: none;
}
input[type=text], input[type=password], input[type=url], select {
  width: 100%; background: #141414; border: 1px solid var(--stroke);
  border-radius: var(--radius); padding: 8px 10px;
}
label { display: grid; gap: 6px; font-size: 14px; }
.btn.icon.menu-toggle { display: none; }
.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}
.top-menu { display: flex; gap: 8px; align-items: center; }
.top-menu form { margin: 0; }
.account {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  margin-left: 4px;
  border-left: 1px solid var(--stroke);
}
.who { color: var(--muted); font-size: 13px; }

.topbar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 0 0 12px;
}
.filter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.filter-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.filter-end { margin-left: auto; }

.seg { display: inline-flex; border: 1px solid var(--stroke); border-radius: 999px; overflow: hidden; background: #141414; }
.seg-btn {
  padding: 5px 12px; color: var(--muted); font-size: 13px; text-decoration: none;
  line-height: 1.2;
}
.seg-btn.icon { padding: 5px 9px; display: inline-flex; align-items: center; }
.seg-btn.on { background: #2a2a2a; color: var(--text); }
.seg-btn:hover { text-decoration: none; color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--stroke); background: transparent;
  color: var(--text); border-radius: var(--radius); padding: 8px 14px; cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: #262626; text-decoration: none; }
.btn.primary { background: var(--accent); color: #161412; border-color: var(--accent); font-weight: 700; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: rgba(196, 91, 82, 0.12); }
.btn.wide { width: 100%; }
.btn.icon { padding: 8px; }
.btn.ghost { color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: transparent; }

.catalog-shell {
  width: var(--page);
  margin: 28px auto 72px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 20px;
  align-items: start;
}
.catalog-shell.no-az { grid-template-columns: 1fr; }
.az {
  position: sticky; top: 72px;
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 4px;
}
.az a {
  color: var(--muted); font-size: 12px; text-align: center;
  padding: 3px 0; text-decoration: none;
}
.az a:hover { color: var(--text); }
.catalog.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.catalog.list { display: flex; flex-direction: column; gap: 8px; }

/* Desktop: letter is only an anchor, the rail already shows it. */
.letter-head {
  grid-column: 1 / -1;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  font-size: 0;
}
.lane-head {
  grid-column: 1 / -1;
  margin: 20px 0 4px;
  font-size: 22px;
  font-weight: 400;
}
.country-head {
  grid-column: 1 / -1;
  margin: 14px 0 0;
  font-size: 18px;
  font-weight: 400;
}
.brand-head {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
}
.lane-badge {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
}

.card {
  overflow: hidden; border-radius: var(--radius-lg); background: var(--panel);
  border: 1px solid var(--stroke);
  display: flex; flex-direction: column;
}
.card:hover { border-color: #3d3d3d; }
.card-hit { color: inherit; text-decoration: none; display: block; flex: 1; }
.card-hit:hover { text-decoration: none; }
.card-shot { display: block; aspect-ratio: 16/10; overflow: hidden; position: relative; background: #0e0e0e; }
.card-shot .lqip {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: blur(12px); transform: scale(1.08);
}
.card-shot img.shot { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.card-body { padding: 12px 14px 4px; }
.card-body h3 { margin: 0 0 6px; font-size: 17px; font-weight: 400; }
.card-body .muted { margin: 0 0 4px; font-size: 13px; }
.card-actions { padding: 8px 14px 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.file-name { margin: 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { position: absolute; top: 8px; right: 8px; z-index: 2; background: #111; padding: 3px 7px; border-radius: 4px; font-size: 11px; }
.shot-ph {
  height: 100%; min-height: 160px; display: grid; place-items: center;
  font-family: var(--serif); font-size: 48px; font-weight: 400;
  background: #191919; color: #3a3a3a;
}
.shot-ph.tall, .shot-skel.tall { min-height: 360px; }
.shot-skel {
  height: 100%; min-height: 160px; display: grid; place-items: center;
  background: #191919;
  color: var(--muted); font-size: 14px; padding: 16px; text-align: center;
}

.catalog.list .card { flex-direction: row; align-items: stretch; min-height: 0; }
.catalog.list .card-hit { display: grid; grid-template-columns: auto 1fr; flex: 1; min-width: 0; }
.catalog.list .card-shots {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 8px 8px;
}
.catalog.list .card-shot {
  margin: 0;
  border-radius: 6px;
  flex-shrink: 0;
  background: #0e0e0e;
}
.catalog.list .card-shot-desk {
  width: 280px;
  flex: 0 0 280px;
  aspect-ratio: 16 / 10;
}
.catalog.list .card-shot-phone {
  width: 180px;
  flex: 0 0 180px;
  aspect-ratio: 390 / 844;
}
.catalog.list .card-shot img.shot,
.catalog.list .card-shot .lqip {
  object-fit: contain;
  object-position: top center;
}
.catalog.list .card-shot-phone img.shot {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.catalog.list .card-shot .lqip { transform: none; }
.catalog.list .shot-ph,
.catalog.list .shot-skel { min-height: 0; }
.catalog.list .card-body { display: flex; flex-direction: column; justify-content: center; padding: 12px 16px 8px; min-width: 0; }
.catalog.list .card-actions { align-self: center; padding: 12px 14px; flex-shrink: 0; }

.muted { color: var(--muted); }
.kicker { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(400px, 100%); padding: 28px; }
.auth-card h1 { margin: 0 0 10px; font-size: 30px; font-weight: 400; }
.auth-card > .muted { margin: 0 0 20px; }
.auth-card .foot { margin: 20px 0 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.alert { background: rgba(196, 91, 82, 0.1); border: 1px solid var(--danger); padding: 10px 12px; border-radius: var(--radius); margin: 0 0 14px; }
.empty { text-align: center; color: var(--muted); padding: 64px 20px; margin: 0; }
.empty.small { padding: 20px 0; }
.foot { margin-top: 18px; }
.hint { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.codes { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.codes code { font-size: 16px; }

.site-page {
  width: min(1280px, calc(100% - 40px));
  margin: 28px auto 72px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
}
.hero-shots {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}
.hero-shot { overflow: hidden; align-self: flex-start; }
.hero-shot-label {
  margin: 0;
  padding: 10px 12px 0;
  font-size: 13px;
  color: var(--muted);
}
.hero-shot img, .hero-open { width: 100%; display: block; border: 0; background: none; padding: 0; cursor: zoom-in; }
.hero-open img { width: 100%; display: block; }
.hero-shot-desktop {
  flex: 0 0 auto;
}
.hero-shot-desktop .hero-open img {
  width: 640px;
  max-width: 100%;
  height: auto;
  display: block;
}
.hero-shot-mobile {
  flex: 0 0 auto;
}
.hero-shot-mobile .hero-open {
  width: auto;
}
.hero-shot-mobile .hero-open img {
  width: auto;
  height: auto;
  display: block;
}
.site-meta { padding: 24px; width: 100%; }
.site-meta h1 { margin: 0 0 10px; font-size: 28px; font-weight: 400; }
.site-meta .muted { margin: 0 0 10px; }
.site-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
  margin: 0 0 16px;
}
.site-edit label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.site-edit select,
.site-edit input[type=text] {
  margin: 0;
  min-width: 160px;
}
.cover-rebuild {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
}
.cover-rebuild-title { margin: 0 0 10px; font-size: 14px; color: var(--text); }
.cover-rebuild-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cover-upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.archive-card {
  display: grid; gap: 12px;
  border: 1px solid var(--stroke); border-radius: var(--radius); padding: 14px; margin-top: 16px;
}
.archive-card-row {
  display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap;
}
.archive-card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.admin { width: var(--page); margin: 28px auto 72px; display: grid; gap: 20px; }
.admin-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; }
.admin-head h1 { margin: 0; font-size: 30px; font-weight: 400; }
.admin-tabs { display: flex; gap: 20px; flex-wrap: wrap; padding-bottom: 4px; }
.admin-tabs a { color: var(--muted); }
.admin-tabs a:hover { color: var(--text); }
.stat-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--stroke); border-radius: var(--radius); padding: 5px 10px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.chip.ok { color: var(--ok); }
.chip.warn { color: var(--warn); }
.disk-meter { width: 72px; height: 6px; }
.pad { padding: 24px; }
.pad h2 { margin: 0 0 14px; font-size: 20px; font-weight: 400; }
.table-wrap { overflow-x: auto; margin-top: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--stroke); vertical-align: top; }
.table th { color: var(--muted); font-weight: 400; }
.inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-actions { display: flex; flex-direction: column; gap: 10px; }
.mobile-cards { display: none; }
.admin-card { padding: 16px; }
.admin-card h3 { margin: 0 0 8px; font-weight: 400; }
.file-btn {
  display: inline-flex; align-items: center; cursor: pointer;
  border: 1px dashed var(--stroke); border-radius: var(--radius); padding: 6px 12px; font-size: 13px;
  background: transparent; color: inherit; font: inherit;
  position: relative;
}
.file-btn input[type=file] {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
}
.dropzone {
  width: 100%; border: 1px dashed var(--stroke); border-radius: var(--radius); padding: 28px 16px; text-align: center;
  margin: 0 0 16px; background: #161616; color: inherit; cursor: pointer;
  display: grid; gap: 8px; justify-items: center;
}
.dropzone.drag { border-color: var(--accent); }
.optional-name { margin: 0 0 12px; }
.progress { height: auto; background: transparent; margin-top: 12px; }
.progress-svg { width: 100%; height: 4px; display: block; background: #111; }
.progress-svg rect { fill: var(--accent); }
.hidden { display: none !important; }

.drop-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(18, 18, 18, 0.82);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 28px; color: var(--text);
  pointer-events: none;
}
.upload-dock {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 55;
  max-width: 560px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--stroke);
  border-radius: var(--radius); padding: 12px 14px;
}
.upload-dock .progress-svg { margin-bottom: 8px; }

.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.88);
  display: grid; place-items: center; z-index: 50; padding: 24px;
}
.lightbox img { max-width: calc(100% - 48px); max-height: calc(100% - 72px); }
.lightbox-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
  border: 1px solid var(--stroke); border-radius: var(--radius); background: #161616; color: var(--text); font-size: 22px; cursor: pointer;
}
.toast-root {
  position: fixed; top: 16px; right: 16px; bottom: auto;
  display: flex; flex-direction: column; gap: 8px; z-index: 80;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: #1b1b1b; border: 1px solid var(--stroke);
  padding: 12px 16px; border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  color: var(--text); font-size: 14px; line-height: 1.4;
}
.toast a { margin-left: 8px; color: var(--accent); }
.toast-success { border-color: #3d9a5f; }
.toast-error { border-color: #d4534f; }
.toast-warning { border-color: #e0b33c; }
.cover-progress { min-width: 240px; }
.cover-progress-title { margin: 0 0 8px; font-size: 14px; }
.cover-progress-bar {
  height: 4px; background: #111; border-radius: 2px; overflow: hidden; margin: 0 0 8px;
}
.cover-progress-bar i {
  display: block; height: 100%; width: 0; background: var(--accent);
  transition: width 0.4s ease;
}
.cover-progress-stage { margin: 0; color: var(--muted); font-size: 13px; }
.cover-progress .cover-open { display: inline-block; margin: 8px 0 0; }

.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,0.62); z-index: 70;
  display: grid; place-items: center; padding: 20px;
}
.modal {
  width: min(420px, 100%);
  padding: 24px;
}
.modal h2 { margin: 0 0 12px; font-size: 22px; font-weight: 400; }
.modal p { margin: 0 0 16px; line-height: 1.5; color: var(--muted); }
.modal input[type=text], .modal input[type=password], .modal select { margin: 0 0 20px; }
.site-pick {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
  color: var(--text);
}
.site-pick select { margin: 0; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.modal-actions .btn { min-width: 104px; }
.brand-badge {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.brand-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.brand-filter select {
  width: auto;
  min-width: 140px;
  max-width: 200px;
  margin: 0;
  padding: 5px 10px;
  border-radius: 999px;
}
.entry-pick { margin-top: 10px; }
.entry-option { display: flex; gap: 8px; align-items: flex-start; }
.modal select, .modal textarea { width: 100%; margin: 0 0 12px; }
.modal label { display: grid; gap: 6px; margin: 0 0 12px; font-size: 14px; }
.modal .hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }

@media (max-width: 800px) {
  .brand-filter { width: auto; flex: 1 1 160px; }
  .brand-filter select { max-width: none; width: 100%; }
  .entry-pick { max-width: 100%; overflow-wrap: anywhere; }
  .modal { width: min(480px, 100%); }
  .btn.icon.menu-toggle { display: inline-flex; }
  .topbar-actions, .top-menu {
    display: none;
    position: absolute;
    top: 56px;
    right: 0;
    left: auto;
    min-width: 220px;
    background: #161616;
    border: 1px solid var(--stroke);
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    z-index: 30;
  }
  .topbar { position: sticky; }
  .top-menu.open, .topbar-actions.open { display: flex; }
  .account {
    border-left: 0;
    padding-left: 0;
    margin-left: 0;
    justify-content: space-between;
  }
  .topbar-filters { padding-bottom: 14px; }
  .search { max-width: none; }
  .desktop-only { display: none; }
  .mobile-cards { display: grid; gap: 12px; }
  .toast-root { top: 12px; right: 12px; left: auto; bottom: auto; }
  .admin-head h1 { font-size: 26px; }
  .pad { padding: 18px; }
}
.dup-list button { width: 100%; text-align: left; }
.zip-batch-list {
  margin: 0 0 12px;
  padding-left: 1.2em;
  max-height: 160px;
  overflow: auto;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .filter-end { margin-left: 0; }
  .az { display: none; }
  .catalog-shell { grid-template-columns: 1fr; }
  .letter-head {
    height: auto;
    overflow: visible;
    margin: 8px 0 4px;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--stroke);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--muted);
  }
  .letter-head:first-of-type { margin-top: 0; }
}
@media (max-width: 900px) {
  .hero-shot-desktop .hero-open img { width: min(640px, 100%); }
  .catalog.list .card-shot-desk { width: 200px; flex-basis: 200px; }
  .catalog.list .card-shot-phone { width: 130px; flex-basis: 130px; }
  :root { --page: min(1120px, calc(100% - 24px)); }
}
@media (prefers-reduced-motion: reduce) {
  .card:hover { border-color: var(--stroke); }
}

html:has(body.page-editor), body.page-editor { height: 100%; overflow: hidden; }
body.page-editor .topbar-inner { width: calc(100% - 32px); max-width: none; }
.editor-page {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  height: calc(100vh - 57px);
  min-height: 0;
}
.editor-tree-panel {
  border-right: 1px solid var(--stroke);
  background: #161616;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.editor-tree-head { padding: 12px; display: grid; gap: 8px; }
.editor-tree-title { margin: 0; font-size: 13px; color: var(--muted); }
.editor-tree-head input[type=search] {
  width: 100%; background: #141414; border: 1px solid var(--stroke);
  border-radius: var(--radius); padding: 6px 8px;
}
.editor-tree { overflow: auto; padding: 0 8px 16px; flex: 1; font-size: 13px; }
.tree-folder { margin: 0; }
.tree-folder > summary {
  cursor: pointer; color: var(--muted); padding: 4px 6px; border-radius: 4px; list-style: none;
}
.tree-folder > summary::-webkit-details-marker { display: none; }
.tree-folder > summary::before { content: "▸ "; }
.tree-folder[open] > summary::before { content: "▾ "; }
.tree-children { display: grid; margin-left: 10px; border-left: 1px solid var(--stroke); padding-left: 6px; }
.tree-file {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; color: var(--text); padding: 4px 6px; border-radius: 4px; cursor: pointer;
}
.tree-file:hover { background: #262626; }
.tree-file.is-open { background: #2a2a2a; color: var(--accent); }
.tree-file:disabled { color: var(--muted); cursor: not-allowed; }
.tree-file.kind-php { color: #c4a15a; }
.tree-file.kind-css { color: #8da8c4; }
.tree-file.kind-js { color: #c4b48a; }
.tree-file-wrap { display: grid; }
.tree-hit {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; color: var(--muted);
  padding: 2px 6px 2px 14px; font-size: 12px; cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tree-hit:hover { color: var(--text); background: #262626; }
.editor-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.editor-bar {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid var(--stroke); flex-wrap: wrap;
}
.editor-bar-path { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
#editor-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.editor-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.editor-status { font-size: 12px; color: var(--muted); }
.editor-status.is-warn { color: var(--warn); }
.editor-status.is-ok { color: var(--ok); }
.editor-wrap {
  display: grid;
  grid-template-columns: 52px 1fr;
  flex: 1;
  min-height: 0;
  background: #141414;
}
.editor-gutter {
  margin: 0; padding: 12px 8px;
  overflow: hidden; text-align: right;
  color: #5c5852; background: #121212;
  border-right: 1px solid var(--stroke);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  user-select: none;
}
#editor-code {
  width: 100%; height: 100%; margin: 0; padding: 12px;
  border: 0; resize: none; background: #141414; color: var(--text);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  tab-size: 2; white-space: pre; overflow: auto;
}
#editor-code:disabled { color: var(--muted); }
.photo-search { width: min(1280px, calc(100% - 40px)); margin: 28px auto 72px; }
.photo-search h1 { margin: 0 0 8px; font-size: 28px; font-weight: 400; }
.photo-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0 24px; }
.photo-drop {
  display: grid; place-items: center; min-height: 88px; min-width: min(420px, 100%);
  padding: 16px 20px; border: 1px dashed var(--stroke); border-radius: var(--radius);
  cursor: pointer; color: var(--muted);
}
.photo-drop.on { border-color: var(--text); color: var(--text); }
.photo-query img { max-height: 120px; border-radius: 6px; display: block; }
.match-badge { margin: 0 0 6px; font-size: 13px; color: var(--ok, #8fd19e); }
@media (max-width: 800px) {
  .editor-page { grid-template-columns: 1fr; grid-template-rows: minmax(120px, 28vh) 1fr; height: calc(100dvh - 57px); }
  .editor-tree-panel { border-right: 0; border-bottom: 1px solid var(--stroke); }
}
