:root {
  --ink: #17201d;
  --muted: #69736f;
  --line: #dfe4e1;
  --paper: #f5f6f2;
  --white: #fff;
  --green: #1e4d3d;
  --green-dark: #15392e;
  --green-soft: #e7efeb;
  --orange: #dc6b32;
  --shadow: 0 18px 50px rgba(26, 40, 34, .08);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand, .public-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 760;
  letter-spacing: -.03em;
  text-decoration: none;
}

.brand-mark {
  width: 35px;
  height: 35px;
  border-radius: 10px 10px 10px 3px;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  background: var(--green);
  font-size: 17px;
}

.main-nav { display: flex; align-self: stretch; gap: 32px; }
.main-nav svg, .nav-label-short { display: none; }
.main-nav a {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); }
.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 3px;
  border-radius: 4px 4px 0 0;
  background: var(--green);
}

.profile-dot {
  justify-self: end;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 14px;
  font-weight: 750;
}

.manager-main { width: min(1440px, 100%); margin: 0 auto; padding: 54px clamp(20px, 4vw, 64px) 110px; }
.page-heading { margin-bottom: 30px; }
.heading-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 9px; color: var(--orange); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(36px, 5vw, 60px); line-height: .98; letter-spacing: -.055em; }
.subtitle { max-width: 650px; margin: 15px 0 0; color: var(--muted); font-size: 17px; line-height: 1.6; }

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) minmax(170px, 220px) auto;
  gap: 10px;
  padding: 12px;
  margin-bottom: 27px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 8px 30px rgba(22, 42, 34, .04);
}

.search-field { position: relative; }
.search-icon { position: absolute; top: 50%; left: 15px; transform: translateY(-52%); color: var(--muted); font-size: 25px; line-height: 1; }
input, textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fbfcfa;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-field input { padding-left: 47px; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus { border-color: #6a9585; box-shadow: 0 0 0 3px rgba(50, 112, 89, .12); }

.button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 720;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button-primary { color: var(--white); background: var(--green); }
.button-primary:hover:not(:disabled) { background: var(--green-dark); }
.button-secondary { color: var(--ink); border-color: var(--line); background: var(--white); }
.button-secondary:hover { border-color: #aeb9b4; }
.button-quiet { min-height: 40px; padding: 0 8px; color: var(--green); background: transparent; }

.results-summary { min-height: 32px; display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.results-summary strong { color: var(--ink); }
.results-summary a { color: var(--green); font-weight: 650; }
.works-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.work-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.work-card:hover { transform: translateY(-3px); border-color: #c6ceca; box-shadow: var(--shadow); }
.work-card:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }
.work-card-link { display: block; height: 100%; text-decoration: none; }
.work-select { position: absolute; z-index: 3; top: 13px; left: 13px; cursor: pointer; }
.work-select input { position: absolute; opacity: 0; pointer-events: none; }
.work-select > span[aria-hidden] {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 9px;
  color: transparent;
  background: rgba(20, 30, 26, .25);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: .15s;
}
.work-select input:focus-visible + span { outline: 3px solid var(--white); outline-offset: 2px; }
.work-select input:checked + span { color: var(--white); border-color: var(--green); background: var(--green); }

.work-art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; isolation: isolate; }
.work-art::before, .work-art::after { content: ""; position: absolute; z-index: -1; }
.work-art::before { width: 65%; height: 130%; top: -22%; right: -20%; border-radius: 50%; background: rgba(255,255,255,.22); transform: rotate(22deg); }
.work-art::after { width: 55%; aspect-ratio: 1; left: 12%; bottom: -34%; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; box-shadow: 0 0 0 22px rgba(255,255,255,.08), 0 0 0 46px rgba(255,255,255,.05); }
.art-monogram { position: absolute; left: 19px; bottom: 15px; color: rgba(255,255,255,.94); font-size: 54px; font-weight: 800; letter-spacing: -.08em; }
.image-count { position: absolute; right: 12px; top: 12px; padding: 6px 9px; border-radius: 8px; color: white; background: rgba(20,30,26,.38); backdrop-filter: blur(8px); font-size: 11px; font-weight: 720; }
.theme-amber { background: linear-gradient(135deg, #3b291f, #dc873c 55%, #f1c778); }
.theme-blue { background: linear-gradient(135deg, #162d45, #477a9f 56%, #a8c9d4); }
.theme-mint { background: linear-gradient(135deg, #163d3a, #3e927d 54%, #b5d9c8); }
.theme-coral { background: linear-gradient(135deg, #592b2d, #d76754 58%, #f4b48c); }
.theme-violet { background: linear-gradient(135deg, #29223e, #79649a 55%, #d2b7d1); }
.theme-graphite { background: linear-gradient(135deg, #151b1d, #48565a 60%, #a5b0aa); }
.theme-rose { background: linear-gradient(135deg, #4a2934, #a96172 58%, #e4a8aa); }
.theme-lime { background: linear-gradient(135deg, #263521, #75964b 55%, #c9d88c); }
.work-card-body { padding: 17px 18px 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { padding: 5px 8px; border-radius: 6px; color: var(--green-dark); background: var(--green-soft); font-size: 10px; font-weight: 760; letter-spacing: .02em; text-transform: uppercase; }
.work-card h2 { margin: 13px 0 8px; font-size: 19px; line-height: 1.2; letter-spacing: -.025em; }
.work-card p { margin: 0; color: var(--muted); font-size: 13px; }

.selection-tray {
  position: fixed;
  z-index: 25;
  left: 50%;
  bottom: 24px;
  width: min(620px, calc(100% - 32px));
  padding: 12px 12px 12px 20px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: var(--white);
  background: rgba(23, 32, 29, .96);
  box-shadow: 0 18px 60px rgba(11,20,16,.3);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}
.selection-tray[hidden] { display: none; }
.selection-tray strong { font-size: 14px; }
.link-button { margin-left: 10px; padding: 5px; border: 0; color: #bac7c2; background: transparent; font-size: 12px; text-decoration: underline; cursor: pointer; }

.empty-state { padding: 70px 24px; border: 1px dashed #cbd2ce; border-radius: var(--radius); text-align: center; background: rgba(255,255,255,.5); }
.empty-icon { display: block; margin-bottom: 10px; color: #9ba6a1; font-size: 48px; }
.empty-state h2 { margin: 0 0 8px; font-size: 24px; }
.empty-state p { margin: 0 auto 22px; color: var(--muted); }

.breadcrumbs { display: flex; gap: 9px; margin-bottom: 28px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { color: var(--green); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr); gap: 36px; align-items: start; }
.work-art-large { aspect-ratio: 16 / 11; border-radius: 22px; }
.work-art-large .art-monogram { font-size: clamp(72px, 10vw, 140px); }
.thumbnail-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.thumbnail-row span { display: block; aspect-ratio: 16 / 8; border-radius: 12px; filter: saturate(.7); }
.form-card { padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow); }
.form-card h1 { margin-bottom: 28px; font-size: clamp(32px, 4vw, 48px); }
.stacked-form { display: grid; gap: 20px; }
.stacked-form label { display: grid; gap: 8px; font-size: 13px; font-weight: 720; }
.stacked-form small { color: var(--muted); font-weight: 450; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 7px; }
.notice { padding: 13px 15px; margin-bottom: 20px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.notice.success { color: #1b583f; background: #e4f4eb; }
.notice.error { color: #8b302d; background: #fbe9e7; }
.notice-success { color: #1b583f; background: #e4f4eb; }
.notice-warning { color: #705213; background: #fbf0d5; }
.notice-wide { margin: -8px 0 22px; }

.selection-list { display: grid; gap: 12px; }
.selection-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.selection-stack { position: relative; width: 120px; height: 82px; }
.selection-stack span { position: absolute; width: 86px; height: 64px; border: 3px solid var(--white); border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.selection-stack span:nth-child(1) { left: 0; top: 10px; transform: rotate(-5deg); }
.selection-stack span:nth-child(2) { left: 16px; top: 5px; transform: rotate(1deg); }
.selection-stack span:nth-child(3) { left: 31px; top: 0; transform: rotate(5deg); }
.selection-stack span:nth-child(n+4) { display: none; }
.selection-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ca578; }
.status-muted { background: #9aa39f; }
.selection-info h2 { margin: 0 0 7px; font-size: 21px; letter-spacing: -.025em; }
.selection-info p { max-width: 720px; margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selection-actions { display: flex; align-items: center; gap: 7px; }
.icon-link { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 19px; }
.icon-link:hover { color: var(--ink); background: var(--paper); }

.form-page { max-width: 1120px; margin: 0 auto; }
.form-page-heading { margin-bottom: 27px; }
.selection-builder { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(310px, .7fr); gap: 24px; align-items: start; }
.chosen-works { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.chosen-heading { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--line); }
.chosen-heading h2 { margin: 0; font-size: 16px; }
.chosen-heading span { min-width: 27px; height: 27px; padding: 0 7px; display: grid; place-items: center; border-radius: 8px; color: var(--green); background: var(--green-soft); font-size: 12px; font-weight: 800; }
.compact-work { display: grid; grid-template-columns: auto 48px 1fr; align-items: center; gap: 11px; padding: 12px 18px; border-bottom: 1px solid #edf0ee; font-size: 13px; font-weight: 650; }
.compact-work.static { grid-template-columns: 48px 1fr; }
.compact-work:last-child { border-bottom: 0; }
.compact-work input { width: 17px; min-height: 17px; accent-color: var(--green); }
.compact-work small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 450; }
.mini-art { width: 48px; height: 38px; border-radius: 7px; }
.edit-work-list { max-height: 520px; overflow: auto; }
.optional { color: var(--muted); font-size: 11px; font-weight: 450; }

.profile-actions { justify-self: end; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.profile-actions form { margin: 0; }
.profile-login { max-width: 150px; overflow: hidden; color: var(--muted); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.logout-button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--white); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.logout-button:hover { border-color: #aeb9b3; background: #f7f8f7; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f1f3f1; }
.login-shell { width: min(100%, 440px); }
.login-card { padding: clamp(28px, 6vw, 46px); border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: 0 28px 80px rgba(27, 39, 32, .1); }
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 45px; font-size: 14px; font-weight: 800; }
.login-card h1 { margin: 10px 0 13px; font-size: clamp(32px, 8vw, 45px); line-height: 1; letter-spacing: -.045em; }
.login-copy { margin: 0 0 25px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.login-card .button { width: 100%; margin-top: 4px; }
.notice-error { margin-bottom: 20px; color: #8c2e27; background: #fce9e7; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr); gap: 24px; align-items: start; }
.settings-card { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; }
.settings-card h2, .info-card h2 { margin: 0 0 8px; font-size: 21px; }
.settings-card p, .info-card p { max-width: 620px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.settings-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 15px; font-size: 28px; font-weight: 800; }
.drive-icon { color: #2867d7; background: #e7effe; }
.info-card { padding: 24px; display: flex; gap: 14px; border: 1px solid #d6e2dc; border-radius: 18px; background: var(--green-soft); }
.info-mark { flex: 0 0 auto; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--green); font-size: 12px; font-weight: 800; }
.status-active { background: #3f9b70; }
.drive-settings-card { grid-template-columns: auto minmax(0, 1fr); }
.settings-content { min-width: 0; }
.drive-account { margin-bottom: 16px !important; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.settings-actions form { margin: 0; }
.button-ghost { border: 1px solid var(--line); color: #8b302d; background: transparent; }
.drive-root-card { margin-top: 24px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-heading h2 { margin: 0 0 7px; font-size: 24px; }
.section-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 14px; }
.drive-root-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.drive-root-form label { display: grid; gap: 8px; font-size: 13px; font-weight: 720; }
.drive-runs { margin-top: 34px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.drive-runs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.drive-runs-table th, .drive-runs-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.drive-runs-table tr:last-child td { border-bottom: 0; }
.drive-runs-table th { color: var(--muted); background: #f7f8f7; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.drive-runs-table small { display: block; margin-top: 4px; color: var(--muted); white-space: nowrap; }
.exif-workspace { display: grid; gap: 24px; min-width: 0; }
.exif-workspace #exif-run-title { scroll-margin-top: 96px; }
.exif-workspace .form-card h2 { margin-top: 0; font-size: 22px; }
.exif-workspace .form-card p { max-width: 85ch; color: var(--muted); font-size: 14px; line-height: 1.6; }
.exif-workspace .form-card form { margin: 18px 0; }
.exif-workspace .drive-runs-table td { overflow-wrap: anywhere; }
.exif-workspace .pagination { margin-top: 0; }
.exif-settings-card { margin-top: 24px; }
.sync-status { font-weight: 750; }
.sync-status.success { color: #1b754e; }
.sync-status.failed { color: #a2342f; }
.sync-status.running { color: #8a6514; }
.sync-error { max-width: 360px; margin-top: 5px; color: #8b302d; font-size: 11px; line-height: 1.45; }

.drive-root-actions { margin-top: 0; }
.drive-folders-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.drive-folders-heading .subtitle { max-width: 780px; }
.drive-review-legend { display: flex; flex-wrap: wrap; gap: 11px 22px; padding: 15px 18px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: var(--white); font-size: 12px; }
.drive-review-legend span { display: inline-flex; align-items: center; gap: 8px; }
.status-candidate { background: #dc6b32; }
.status-review { background: #c89a35; }
.drive-folder-list { display: grid; gap: 20px; }
.drive-folder-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 8px 30px rgba(22, 42, 34, .035); }
.drive-folder-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 21px 23px; border-bottom: 1px solid var(--line); background: #fafbf9; }
.drive-folder-title { min-width: 0; }
.drive-folder-title h2 { display: inline; margin: 0; font-size: 21px; }
.drive-folder-path { margin: 0 0 7px; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.drive-folder-depth { margin-left: 8px; color: var(--muted); font-size: 11px; }
.drive-folder-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.folder-badge { padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 780; white-space: nowrap; }
.folder-badge.neutral { color: #3f5560; background: #e7edf0; }
.folder-badge.muted { color: #626b67; background: #ecefed; }
.folder-badge.candidate { color: #884017; background: #fbe9dc; }
.folder-badge.warning { color: #795714; background: #fbf0d5; }
.folder-badge.mapped { color: #1b6548; background: var(--green-soft); }
.drive-folder-mappings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.drive-mapping-card { min-width: 0; padding: 20px 22px; border-right: 1px solid var(--line); }
.drive-mapping-card:last-child { border-right: 0; }
.drive-mapping-heading { min-height: 57px; margin-bottom: 13px; }
.drive-mapping-heading h3 { margin: 0 0 7px; font-size: 13px; letter-spacing: .04em; }
.mapping-current, .mapping-empty { display: block; overflow: hidden; font-size: 13px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.mapping-current { color: var(--green); font-weight: 720; }
.mapping-empty { color: var(--muted); }
.drive-mapping-form { display: grid; gap: 7px; }
.drive-mapping-form label, .drive-rule-controls label { color: var(--muted); font-size: 11px; font-weight: 680; }
.drive-mapping-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.drive-mapping-controls select, .drive-rule-controls select { min-height: 42px; padding-block: 8px; font-size: 12px; }
.drive-mapping-controls .button, .drive-rule-controls .button { min-height: 42px; padding-inline: 12px; font-size: 12px; }
.drive-mapping-hint { min-height: 42px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.drive-clear-form { margin-top: 11px; }
.text-button { padding: 0; border: 0; background: transparent; font: inherit; font-size: 11px; cursor: pointer; }
.drive-folder-rule-form, .drive-folder-rule-state { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 17px 22px; border-top: 1px solid var(--line); background: #fafbf9; }
.drive-folder-rule-form p, .drive-folder-rule-state p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.drive-folder-rule-form strong, .drive-folder-rule-state strong { font-size: 13px; }
.drive-rule-controls { display: grid; grid-template-columns: minmax(145px, 210px) auto; align-items: end; gap: 7px 8px; }
.drive-rule-controls label { grid-column: 1 / -1; }
.drive-folders-empty { margin-top: 22px; }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin-top: 24px; color: var(--muted); font-size: 13px; }
.pagination > :last-child { justify-self: end; }

.upload-card { max-width: 760px; margin-bottom: 32px; }
.field-hint { margin: -4px 0 0; color: var(--muted); font-size: 14px; }
.uploaded-section { display: grid; gap: 18px; }
.uploaded-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.uploaded-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.uploaded-card img { display: block; width: 100%; height: 180px; object-fit: cover; background: var(--paper); }
.uploaded-card-body { padding: 14px; }
.uploaded-card-body > p { overflow: hidden; margin: 0 0 12px; text-overflow: ellipsis; white-space: nowrap; }
.uploaded-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.danger-link { color: #a52a2a; }

.catalog-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px; }
.catalog-heading .button { flex: 0 0 auto; }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.catalog-workspace { min-width: 0; }
.catalog-filters {
  padding: 12px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 8px 30px rgba(22, 42, 34, .04);
}
.catalog-filter-main { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(145px, 190px) auto auto auto; gap: 10px; align-items: center; }
.catalog-full-view-toggle { white-space: nowrap; }
.catalog-full-view-toggle[aria-expanded="true"] { color: var(--white); border-color: var(--green); background: var(--green); }
.catalog-full-view-toggle strong { min-width: 20px; height: 20px; padding: 0 6px; margin-left: 5px; display: inline-grid; place-items: center; border-radius: 10px; color: var(--white); background: var(--orange); font-size: 10px; }
.catalog-full-view-toggle strong[hidden] { display: none; }
.catalog-advanced-filters { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(150px, 220px)); gap: 10px; }
.catalog-advanced-filters[hidden] { display: none; }
.catalog-advanced-filters label > span { margin: 0 0 5px 3px; display: block; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.catalog-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; }
.category-panel { position: sticky; z-index: 20; top: 94px; overflow: visible; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.category-panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.category-panel-heading h2 { margin: 0; font-size: 16px; }
.category-panel-heading > div { display: flex; align-items: center; gap: 9px; }
.category-panel-heading > div > span { min-width: 27px; height: 27px; padding: 0 7px; display: grid; place-items: center; border-radius: 8px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 800; }
.category-panel-heading a { color: var(--green); font-size: 13px; text-decoration: none; }
.category-tree { max-height: calc(100vh - 190px); padding: 8px; overflow-y: auto; overscroll-behavior: contain; }
.category-link { min-height: 39px; padding: 8px 10px; border-radius: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; text-decoration: none; }
.category-link:hover { color: var(--ink); background: #f4f6f3; }
.category-link.selected { color: var(--green-dark); background: var(--green-soft); font-weight: 750; }
.category-link > span { min-width: 0; overflow-wrap: anywhere; }
.category-link > strong { flex: 0 0 auto; color: #87918c; font-size: 10px; }
.category-link-all { margin-bottom: 5px; }
.category-cascade-list { margin: 0; padding: 0; list-style: none; }
.category-cascade-root { padding-top: 5px; border-top: 1px solid #edf0ee; }
.category-cascade-item { position: relative; }
.category-cascade-item + .category-cascade-item { margin-top: 2px; }
.category-cascade-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px; }
.category-cascade-link { min-width: 0; color: var(--ink); font-weight: 680; }
.category-cascade-toggle { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; display: grid; place-items: center; color: var(--muted); background: transparent; cursor: pointer; }
.category-cascade-toggle:hover, .category-cascade-toggle:focus-visible { color: var(--green-dark); background: var(--green-soft); }
.category-cascade-toggle span { display: block; font-size: 23px; line-height: 1; transform: translateY(-1px); }
.category-cascade-item.contains-selected > .category-cascade-row > .category-cascade-link:not(.selected) { color: var(--green-dark); }
.category-cascade-submenu {
  position: fixed;
  z-index: 70;
  left: var(--category-cascade-left, -10000px);
  top: var(--category-cascade-top, 8px);
  width: min(270px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  padding: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(22, 42, 34, .18);
  transform: translateX(-4px);
  transition: opacity .1s ease, transform .1s ease, visibility 0s linear .12s;
}
.category-cascade-submenu.opens-left { transform: translateX(4px); }
.category-cascade-item:hover > .category-cascade-submenu,
.category-cascade-item.is-cascade-open > .category-cascade-submenu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  transition-delay: 0s;
}
.category-cascade-title { margin: 0 3px 5px; padding: 5px 7px 8px; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 760; line-height: 1.3; text-transform: uppercase; letter-spacing: .04em; }
.category-cascade-submenu .category-cascade-link { min-height: 37px; font-size: 12px; font-weight: 620; }
.category-empty { margin: 0; padding: 16px 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.catalog-results { min-width: 0; }
.catalog-results-heading { min-height: 50px; margin-bottom: 15px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.catalog-results-heading .eyebrow { margin-bottom: 4px; }
.catalog-results-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.catalog-results-heading > span { color: var(--muted); font-size: 12px; }
.catalog-heading-actions { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 12px; }
.catalog-heading-actions .text-button { color: var(--green); font-weight: 720; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.catalog-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--white); transition: transform .18s, border-color .18s, box-shadow .18s; }
.catalog-card:hover { transform: translateY(-2px); border-color: #c6ceca; box-shadow: var(--shadow); }
.catalog-card:has([data-image-selector]:checked) { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }
.catalog-select { position: absolute; z-index: 3; top: 10px; left: 10px; cursor: pointer; }
.catalog-select input { position: absolute; opacity: 0; pointer-events: none; }
.catalog-select > span[aria-hidden] { width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.92); border-radius: 9px; color: transparent; background: rgba(20,30,26,.28); box-shadow: 0 2px 8px rgba(0,0,0,.14); transition: .15s; }
.catalog-select input:focus-visible + span { outline: 3px solid var(--white); outline-offset: 2px; }
.catalog-select input:checked + span { color: var(--white); border-color: var(--green); background: var(--green); }
.catalog-image-link { display: block; overflow: hidden; background: #e9ece8; cursor: zoom-in; }
.catalog-image-link img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s; }
.catalog-card:hover .catalog-image-link img { transform: scale(1.015); }
.catalog-image-placeholder { aspect-ratio: 4 / 3; display: grid; place-items: center; color: #8a938f; background: repeating-linear-gradient(135deg, #eef0ed, #eef0ed 12px, #e7eae6 12px, #e7eae6 24px); font-size: 12px; }
.catalog-card-body { padding: 12px 13px 13px; }
.catalog-badges { min-height: 22px; display: flex; flex-wrap: wrap; gap: 5px; }
.catalog-badges span { max-width: 100%; padding: 4px 6px; overflow: hidden; border-radius: 5px; color: var(--green-dark); background: var(--green-soft); font-size: 9px; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.catalog-badges span.public-state { color: #733514; background: #fbe7dc; }
.catalog-object { margin: 8px 0 0; display: grid; gap: 2px; font-size: 12px; }
.catalog-object strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-object span, .catalog-object small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.catalog-exif-link { display: inline-block; margin-top: 8px; color: var(--green); font-size: 10px; font-weight: 750; }
.catalog-card-meta { margin-top: 10px; padding-top: 9px; border-top: 1px solid #edf0ee; display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .035em; }
.catalog-empty { min-height: 420px; display: grid; align-content: center; justify-items: center; }
.bulk-editor { position: fixed; z-index: 25; left: 50%; bottom: 22px; width: min(1120px, calc(100% - 32px)); padding: 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; color: var(--white); background: rgba(23,32,29,.98); box-shadow: 0 18px 60px rgba(11,20,16,.34); transform: translateX(-50%); backdrop-filter: blur(16px); }
.bulk-editor[hidden] { display: none; }
.bulk-editor-heading { margin-bottom: 11px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.bulk-editor-heading > div { display: flex; align-items: baseline; gap: 10px; }
.bulk-editor-heading small { color: #b8c2be; font-size: 11px; }
.bulk-editor-heading .text-button { color: #d8dfdc; }
.bulk-editor-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; }
.bulk-editor-actions form { min-width: 0; margin: 0; }
.bulk-editor-actions > form, .bulk-object-actions { padding: 10px; border-radius: 12px; background: rgba(255,255,255,.07); }
.bulk-editor-actions label { min-width: 0; display: grid; gap: 5px; }
.bulk-editor-actions label > span { color: #d5ddda; font-size: 10px; font-weight: 740; text-transform: uppercase; letter-spacing: .05em; }
.bulk-editor-actions select { min-height: 40px; padding-block: 7px; font-size: 12px; }
.bulk-editor-actions form > div { margin-top: 7px; display: flex; gap: 6px; }
.bulk-editor-actions .button { min-height: 38px; padding-inline: 11px; font-size: 11px; }
.bulk-object-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px; }
.bulk-object-actions > form:first-child { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px; }
.bulk-object-actions > form:first-child label { grid-column: 1 / -1; }
.bulk-clear-object { align-self: end; }
.bulk-editor-actions .bulk-visibility { grid-column: 1 / -1; }
.bulk-visibility > div { margin: 0 !important; display: flex !important; align-items: center; justify-content: flex-end; gap: 7px !important; }
.bulk-visibility > div > span { margin-right: auto; display: grid; gap: 2px; }
.bulk-visibility strong { color: var(--white); font-size: 12px; }
.bulk-visibility small { color: #b8c2be; font-size: 10px; }

.category-management-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.category-management-layout { display: grid; grid-template-columns: minmax(290px, 380px) minmax(0, 1fr); align-items: start; gap: 28px; }
.category-create-card { position: sticky; top: 96px; max-width: none; }
.category-create-card h2, .category-management-list h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.category-form { display: grid; gap: 14px; margin-top: 22px; }
.category-form > label, .category-form-row > label, .category-edit-grid > label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.category-form-row { display: grid; grid-template-columns: minmax(100px, 140px) minmax(0, 1fr); align-items: end; gap: 14px; }
.checkbox-field { min-height: 48px; grid-template-columns: auto 1fr !important; align-items: center; align-content: center; }
.checkbox-field input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--green); }
.checkbox-field span { color: var(--ink); }
.category-management-list { min-width: 0; }
.category-total { min-width: 32px; height: 32px; padding: 0 8px; display: grid; place-items: center; border-radius: 9px; color: var(--green); background: var(--green-soft); font-size: 12px; font-weight: 800; }
.category-editor { overflow: hidden; margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.category-editor summary { min-height: 70px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; list-style: none; }
.category-editor summary::-webkit-details-marker { display: none; }
.category-editor summary::after { content: "+"; flex: 0 0 auto; color: var(--green); font-size: 22px; line-height: 1; }
.category-editor[open] summary::after { content: "−"; }
.category-editor summary > span:first-child { min-width: 0; display: grid; gap: 5px; }
.category-editor summary strong { font-size: 14px; overflow-wrap: anywhere; }
.category-editor summary small { color: var(--muted); font-size: 11px; }
.category-editor-state { flex: 0 0 auto; margin-left: auto; color: var(--muted); font-size: 11px; }
.category-edit-form { margin: 0; padding: 20px 18px; border-top: 1px solid var(--line); background: #fafbf9; }
.category-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.category-edit-form .form-actions { justify-content: flex-end; }
.category-management-empty { min-height: 320px; margin-top: 10px; }
.album-editor summary small { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.45; }
.album-editor .form-actions { justify-content: space-between; }
.coordinate-fields { padding: 14px; margin: 0; border: 1px solid var(--line); border-radius: 12px; }
.coordinate-fields legend { padding: 0 6px; color: var(--ink); font-size: 12px; font-weight: 750; }
.coordinate-fields small { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.object-editor .form-actions { flex-wrap: wrap; }
.objects-map-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow); }
.objects-map { position: relative; min-height: min(68vh, 720px); overflow: hidden; background: #dce5df; }
.objects-map-canvas { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; }
.objects-map-canvas.dragging { cursor: grabbing; }
.objects-map-tiles, .objects-map-markers { position: absolute; inset: 0; }
.objects-map-tiles img { position: absolute; width: 256px; height: 256px; user-select: none; }
.objects-map-marker { position: absolute; z-index: 2; width: 22px; height: 22px; border: 3px solid var(--white); border-radius: 50% 50% 50% 0; display: block; color: var(--white); background: var(--orange); box-shadow: 0 3px 12px rgba(21,35,29,.32); transform: translate(-50%, -100%) rotate(-45deg); }
.objects-map-marker span { position: absolute; left: 20px; bottom: 16px; max-width: 190px; padding: 6px 8px; overflow: hidden; border-radius: 7px; color: var(--ink); background: rgba(255,255,255,.94); box-shadow: 0 3px 12px rgba(21,35,29,.18); font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; transform: rotate(45deg); opacity: 0; pointer-events: none; transition: opacity .15s; }
.objects-map-marker:hover span, .objects-map-marker:focus-visible span { opacity: 1; }
.objects-map-controls { position: absolute; z-index: 4; top: 16px; left: 16px; display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--white); box-shadow: 0 5px 18px rgba(20,35,29,.15); }
.objects-map-controls button { width: 40px; height: 40px; border: 0; color: var(--ink); background: var(--white); font-size: 22px; cursor: pointer; }
.objects-map-controls button + button { border-top: 1px solid var(--line); }
.objects-map-attribution { position: absolute; z-index: 4; right: 6px; bottom: 5px; padding: 3px 5px; color: #3d4742; background: rgba(255,255,255,.84); font-size: 10px; }
.map-object-list { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 9px; }
.map-object-list a { min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 4px; background: var(--white); text-decoration: none; }
.map-object-list strong, .map-object-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-object-list strong { font-size: 13px; }
.map-object-list span { color: var(--muted); font-size: 11px; }
.employee-management-layout { display: grid; grid-template-columns: minmax(310px, 400px) minmax(0, 1fr); align-items: start; gap: 28px; }
.employee-create-card { position: sticky; top: 96px; max-width: none; }
.employee-create-card h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.permission-fields { padding: 14px; margin: 0; border: 1px solid var(--line); border-radius: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.permission-fields legend { padding: 0 6px; color: var(--ink); font-size: 12px; font-weight: 750; }
.permission-fields label { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 650; }
.permission-fields input { width: 17px; min-height: 17px; margin: 0; accent-color: var(--green); }
.employee-owner-note { padding: 18px; border-top: 1px solid var(--line); color: var(--muted); background: #fafbf9; font-size: 12px; line-height: 1.6; }
.employee-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.employee-form-footer small { color: var(--muted); line-height: 1.5; }

.public-page { background: #f1f0eb; }
.public-header, .public-footer { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0; display: flex; align-items: center; justify-content: space-between; color: #66706b; font-size: 12px; }
.public-hero { width: min(1020px, calc(100% - 40px)); margin: clamp(70px, 12vw, 150px) auto clamp(60px, 10vw, 110px); text-align: center; }
.public-hero h1 { max-width: 920px; margin: 0 auto; font-family: Georgia, "Times New Roman", serif; font-size: clamp(46px, 9vw, 104px); font-weight: 450; line-height: .96; letter-spacing: -.055em; }
.public-hero > p:not(.eyebrow) { max-width: 680px; margin: 28px auto 0; color: #5f6964; font-size: clamp(17px, 2vw, 21px); line-height: 1.65; }
.public-meta { margin-top: 31px; display: flex; justify-content: center; gap: 18px; color: #7b837f; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.public-meta span + span::before { content: "•"; margin-right: 18px; }
.public-gallery { width: min(1240px, calc(100% - 40px)); margin: 0 auto; display: grid; gap: clamp(70px, 10vw, 140px); }
.public-work { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: clamp(30px, 6vw, 86px); align-items: center; }
.public-work:nth-child(even) { grid-template-columns: minmax(300px, .55fr) minmax(0, 1.45fr); }
.public-work:nth-child(even) .public-art { order: 2; }
.public-art { aspect-ratio: 4 / 3; border-radius: clamp(16px, 3vw, 30px); box-shadow: 0 30px 80px rgba(31,39,35,.16); }
.public-art .art-monogram { left: 7%; bottom: 2%; font-size: clamp(84px, 15vw, 200px); }
.public-work-copy h2 { margin: 19px 0 17px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 4vw, 54px); font-weight: 450; line-height: 1.04; letter-spacing: -.04em; }
.public-work-copy > p { margin: 0; color: #626c67; font-size: 15px; line-height: 1.75; }
.public-work-copy dl { margin: 30px 0 0; padding-top: 18px; display: flex; gap: 40px; border-top: 1px solid #d2d4d0; }
.public-work-copy dl div { display: grid; gap: 5px; }
.public-work-copy dt { color: #888f8b; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.public-work-copy dd { margin: 0; font-size: 14px; }
.public-footer { margin-top: clamp(100px, 14vw, 190px); padding: 35px 0 55px; border-top: 1px solid #d1d4cf; }
.public-footer p { margin: 0; }

/* Публичная image-first витрина N8. */
.storefront-page { color: #18201d; background: #f3f1ec; }
.storefront-header, .storefront-footer { width: min(1460px, calc(100% - 48px)); margin: 0 auto; }
.storefront-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid rgba(23,32,29,.12); }
.storefront-brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 780; letter-spacing: -.035em; text-decoration: none; }
.storefront-pro-link { color: #626b67; font-size: 12px; font-weight: 680; text-decoration: none; }
.storefront-pro-link:hover { color: var(--green); }
.storefront-hero { width: min(1050px, calc(100% - 40px)); margin: clamp(64px, 10vw, 142px) auto clamp(45px, 7vw, 90px); text-align: center; }
.storefront-hero h1 { max-width: 1000px; margin: 0 auto; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 8vw, 108px); font-weight: 450; line-height: .95; letter-spacing: -.055em; text-wrap: balance; }
.storefront-hero > p:not(.eyebrow) { max-width: 690px; margin: 26px auto 0; color: #65706b; font-size: clamp(16px, 1.8vw, 20px); line-height: 1.65; text-wrap: balance; }
.storefront-categories { width: min(1460px, calc(100% - 48px)); margin: 0 auto 28px; padding: 10px 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.storefront-categories a { flex: 0 0 auto; min-height: 39px; padding: 9px 13px; border: 1px solid rgba(23,32,29,.14); border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; color: #5d6762; background: rgba(255,255,255,.45); font-size: 12px; font-weight: 690; text-decoration: none; }
.storefront-categories a.depth-1::before { content: "↳"; color: #929995; }
.storefront-categories a.depth-2::before, .storefront-categories a.depth-3::before, .storefront-categories a.depth-4::before, .storefront-categories a.depth-5::before, .storefront-categories a.depth-6::before { content: "·"; color: #929995; }
.storefront-categories a span { color: #919995; font-size: 10px; }
.storefront-categories a:hover, .storefront-categories a[aria-current="page"] { color: var(--white); border-color: var(--green); background: var(--green); }
.storefront-categories a[aria-current="page"] span { color: #dce8e3; }
.storefront-gallery-section { width: min(1460px, calc(100% - 24px)); margin: 0 auto; }
.storefront-section-heading { width: calc(100% - 24px); margin: 0 auto 18px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.storefront-section-heading .eyebrow { margin-bottom: 4px; }
.storefront-section-heading h2 { margin: 0; font-size: clamp(22px, 3vw, 34px); letter-spacing: -.035em; }
.storefront-section-heading > span { color: #737c77; font-size: 11px; }
.storefront-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.storefront-grid.is-justified { display: flex; flex-wrap: wrap; align-items: flex-start; }
.storefront-tile { position: relative; min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: 4px; display: block; color: var(--white); background: #d9dcd7; cursor: zoom-in; box-shadow: 0 1px 0 rgba(18,28,23,.06); }
.storefront-open { width: 100%; height: 100%; padding: 0; border: 0; display: block; color: inherit; background: transparent; cursor: zoom-in; }
.storefront-grid:not(.is-justified) .storefront-tile { aspect-ratio: 4 / 3; }
.storefront-tile img { width: 100%; height: 100%; display: block; object-fit: cover; transition: filter .25s, transform .4s; }
.storefront-tile:hover img, .storefront-tile:focus-visible img { filter: brightness(.82); transform: scale(1.015); }
.storefront-tile:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.storefront-tile-copy { position: absolute; z-index: 2; inset: auto 0 0; padding: 34px 14px 12px; display: grid; gap: 4px; text-align: left; background: linear-gradient(transparent, rgba(10,15,13,.74)); opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.storefront-tile-copy { pointer-events: none; }
.storefront-tile:hover .storefront-tile-copy, .storefront-tile:focus-visible .storefront-tile-copy { opacity: 1; transform: translateY(0); }
.storefront-tile-copy small { overflow: hidden; color: rgba(255,255,255,.75); font-size: 9px; font-weight: 680; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.storefront-tile-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.storefront-watermark, .lightbox-watermark { z-index: 3; pointer-events: none; user-select: none; color: rgba(255,255,255,.62); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.storefront-watermark { position: absolute; right: 11px; bottom: 9px; }
.storefront-tile:has(.storefront-tile-copy) .storefront-watermark { bottom: auto; top: 10px; }
.storefront-empty { min-height: min(55vh, 620px); display: grid; align-content: center; justify-items: center; text-align: center; }
.storefront-empty > span { width: 72px; height: 72px; margin-bottom: 20px; border-radius: 24px 24px 24px 7px; display: grid; place-items: center; color: var(--white); background: var(--green); font-family: Georgia, serif; font-size: 32px; }
.storefront-empty h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(32px, 6vw, 58px); font-weight: 450; letter-spacing: -.045em; }
.storefront-empty p { color: #737c77; }
.storefront-pagination { width: calc(100% - 24px); margin: 30px auto 0; padding-top: 20px; border-top: 1px solid rgba(23,32,29,.12); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: #737c77; font-size: 12px; }
.storefront-pagination a { color: var(--green); font-weight: 750; text-decoration: none; }
.storefront-pagination a:last-child { justify-self: end; }
.storefront-footer { margin-top: clamp(80px, 12vw, 170px); padding: 32px 0 50px; border-top: 1px solid rgba(23,32,29,.12); display: flex; justify-content: space-between; gap: 24px; color: #747d78; font-size: 12px; }
.storefront-footer span { color: var(--ink); font-weight: 780; }
.storefront-footer p { margin: 0; }
body.lightbox-open { overflow: hidden; }
.lightbox[hidden] { display: none; }
.lightbox { position: fixed; z-index: 100; inset: 0; display: grid; grid-template-columns: 70px minmax(0, 1fr) 70px; grid-template-rows: auto minmax(0, 1fr) auto; color: var(--white); background: rgba(8,11,10,.97); }
.lightbox-toolbar { grid-column: 1 / -1; min-height: 68px; padding: 10px clamp(14px, 3vw, 38px); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.lightbox-toolbar > div:first-child { min-width: 0; display: grid; gap: 3px; color: #bec5c2; font-size: 11px; }
.lightbox-toolbar small { max-width: min(60vw, 700px); overflow: hidden; color: #818b86; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-actions { display: flex; gap: 6px; }
.lightbox-actions button, .lightbox-nav { border: 1px solid rgba(255,255,255,.14); color: var(--white); background: rgba(255,255,255,.07); cursor: pointer; }
.lightbox-actions button { min-width: 42px; height: 42px; border-radius: 12px; }
.lightbox-actions button:hover, .lightbox-nav:hover { background: rgba(255,255,255,.16); }
.lightbox-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; display: grid; place-items: center; touch-action: none; cursor: grab; }
.lightbox-stage:active { cursor: grabbing; }
.lightbox-stage img { width: 100%; height: 100%; min-width: 0; min-height: 0; display: block; object-fit: contain; object-position: center; will-change: transform; transform-origin: center; transition: transform .08s linear; user-select: none; }
.lightbox-watermark { position: absolute; right: 18px; bottom: 14px; font-size: 10px; }
.lightbox-nav { align-self: center; width: 50px; height: 74px; border-radius: 15px; font-size: 44px; line-height: 1; }
.lightbox-nav.previous { grid-column: 1; grid-row: 2; justify-self: center; }
.lightbox-stage { grid-column: 2; grid-row: 2; }
.lightbox-nav.next { grid-column: 3; grid-row: 2; justify-self: center; }
.lightbox-caption { grid-column: 1 / -1; min-height: 54px; margin: 0; padding: 12px 24px 20px; color: #c8cecb; text-align: center; font-size: 13px; }

/* Приватные сведения: боковая панель на десктопе, нижняя на телефоне. */
.catalog-details-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-top: 4px; color: var(--green); text-decoration: none; font-size: 12px; font-weight: 650; }
.catalog-details-link:hover { text-decoration: underline; }
.catalog-details-link span { color: var(--muted); }
.pro-lightbox { height: 100dvh; background: #0d1210; }
.pro-lightbox .lightbox-info-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; font-size: 12px; }
.lightbox-info-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
[data-pro-details-open][hidden], [data-lightbox-info][hidden] { display: none; }
.pro-lightbox .lightbox-info-toggle[aria-expanded="true"] { color: #17201d; background: #e7efeb; border-color: #e7efeb; }
.pro-lightbox.details-open { grid-template-columns: 70px minmax(0, 1fr) 70px minmax(300px, 360px); }
.pro-lightbox.details-open .lightbox-caption { grid-column: 1 / 4; }
.pro-lightbox .lightbox-caption:empty { display: none; }
.lightbox-details[hidden] { display: none; }
.lightbox-details { grid-column: 4; grid-row: 2 / 4; display: flex; flex-direction: column; min-width: 0; min-height: 0; margin: 0 18px 18px 0; border-radius: 18px; color: var(--ink); background: var(--white); overflow: hidden; }
.lightbox-details-heading { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.lightbox-details-heading h2 { margin: 0; font-size: 16px; font-weight: 650; }
.lightbox-details-heading button { width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 12px; color: var(--muted); background: var(--paper); font-size: 24px; cursor: pointer; }
.lightbox-details-body { min-height: 0; padding: 22px 20px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.photo-details-content { display: grid; gap: 22px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.photo-details-content p { margin: 0; }
.photo-details-label { color: var(--muted); font-size: 12px; }
.photo-details-content .photo-details-date-value { margin: 5px 0 8px; font-size: clamp(18px, 2vw, 22px); font-weight: 650; line-height: 1.35; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.photo-details-timezone { color: var(--green); font-size: 12px; }
.photo-details-content .photo-details-note { margin-top: 10px; color: var(--muted); font-size: 12px; }
.photo-details-status { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.photo-details-status h3 { margin: 0 0 5px; font-size: 13px; }
.photo-details-status p, .photo-details-status ul { color: #535f59; font-size: 12px; }
.photo-details-status ul { margin: 10px 0 0; padding-left: 18px; }
.photo-details-status li + li { margin-top: 4px; }
.photo-details-status.success { border-color: #d1e2d8; background: #edf5ef; }
.photo-details-status.warning { border-color: #efdeba; background: #fffaed; }
.photo-details-analysis { font-size: 12px; }
.photo-details-analysis strong { display: block; margin-bottom: 5px; font-size: 13px; }
.photo-details-analysis p { color: var(--muted); }
.photo-details-analysis a { display: inline-block; padding: 10px 0; color: var(--green); text-underline-offset: 3px; }
.photo-details-file { margin: 0; display: grid; gap: 14px; }
.photo-details-file dt { margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.photo-details-file dd { margin: 0; }
.photo-details-content .photo-details-private { padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.photo-details-loading { color: var(--muted); font-size: 13px; }
.photo-details-fallback { display: block; margin-top: 16px; color: var(--green); font-size: 12px; }
.pro-lightbox :is(button, a):focus-visible, .catalog-details-link:focus-visible { outline: 3px solid #dc6b32; outline-offset: 3px; }
.photo-details-page { max-width: 1120px; margin: 0 auto; }
.photo-details-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--green); text-underline-offset: 3px; font-size: 13px; }
.photo-details-page-heading { margin: 18px 0 28px; }
.photo-details-page-heading h1 { margin: 6px 0 12px; }
.photo-details-page-heading > p:last-child { color: var(--muted); font-size: 14px; }
.photo-details-page-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); align-items: start; gap: 24px; }
.photo-details-preview { padding: 16px; border-radius: 18px; background: #17201d; }
.photo-details-preview img { display: block; width: 100%; max-height: 65vh; object-fit: contain; }
.photo-details-no-preview { min-height: 160px; display: grid; place-content: center; margin: 0; padding: 20px; color: #c8cecb; text-align: center; font-size: 14px; line-height: 1.6; }
.photo-details-surface { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
@media (max-width: 800px) {
  .pro-lightbox.details-open { grid-template-columns: 46px minmax(0, 1fr) 46px; grid-template-rows: auto minmax(110px, 1fr) minmax(0, 1.1fr) auto; }
  .lightbox-details { grid-column: 1 / -1; grid-row: 3; margin: 0 8px; border-radius: 18px 18px 0 0; }
  .pro-lightbox.details-open .lightbox-caption { grid-column: 1 / -1; grid-row: 4; min-height: 0; max-height: 48px; padding: 8px 14px; overflow: hidden; }
  .lightbox-details-heading { padding-block: 6px; }
  .lightbox-details-body { padding: 18px 20px max(18px, env(safe-area-inset-bottom)); }
  .photo-details-page-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .photo-details-preview img { max-height: 45vh; }
}
@media (max-width: 520px) {
  .pro-lightbox .lightbox-info-toggle { min-height: 44px; padding: 0 10px; }
  .pro-lightbox .lightbox-toolbar { gap: 8px; padding: max(7px, env(safe-area-inset-top)) 9px 7px; }
  .pro-lightbox .lightbox-actions button { min-height: 44px; min-width: 44px; }
  .pro-lightbox .lightbox-nav { min-height: 44px; }
  .photo-details-surface { padding: 20px; }
}

/* N9: подборки сотрудников и клиентские избранные */
.bulk-editor-primary { display: flex; align-items: center; gap: 10px; }
.bulk-editor-primary form { margin: 0; }
.selection-filters { margin-bottom: 22px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(150px, .75fr)) auto auto; gap: 10px; align-items: end; background: var(--white); }
.selection-filters label { min-width: 0; display: grid; gap: 5px; }
.selection-filters label > span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.selection-cover, .request-cover { width: 120px; height: 82px; overflow: hidden; border-radius: 11px; display: grid; place-items: center; color: var(--white); background: var(--green); font-family: Georgia, serif; font-size: 28px; }
.selection-cover img, .request-cover img { width: 100%; height: 100%; object-fit: cover; }
.selection-info h2 a { color: inherit; text-decoration: none; }
.status-dot.status-draft { background: #9c958b; }
.status-dot.status-published { background: #2e976b; }
.status-dot.status-revoked, .status-dot.status-archived { background: #bd624e; }
.status-dot.status-new { background: var(--orange); }
.status-dot.status-viewed { background: #4b7a68; }
.selection-image-list { max-height: 610px; overflow: auto; display: grid; gap: 8px; }
.selection-image-item { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 11px; display: grid; grid-template-columns: auto 72px minmax(0, 1fr); align-items: center; gap: 9px; color: inherit; background: var(--white); text-decoration: none; }
.selection-image-item > img { width: 72px; height: 54px; border-radius: 7px; object-fit: cover; }
.selection-image-item > span { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.selection-image-item small { margin-top: 3px; display: block; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; }
.selection-image-list.readonly .selection-image-item { grid-template-columns: 72px minmax(0, 1fr); }
.selection-details { margin: 0; display: grid; gap: 18px; }
.selection-details div { display: grid; gap: 4px; }
.selection-details dt { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.selection-details dd { margin: 0; white-space: pre-wrap; }
.selection-publication { margin-top: 24px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--white); }
.selection-publication h2 { margin: 3px 0 6px; }
.selection-publication p { margin: 0; color: var(--muted); }
.selection-publication-actions, .selection-publication-actions form { display: flex; align-items: center; gap: 8px; margin: 0; }
.request-status-tabs { margin-bottom: 20px; display: flex; gap: 7px; overflow-x: auto; }
.request-status-tabs a { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--white); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.request-status-tabs a[aria-current="page"] { color: var(--white); border-color: var(--green); background: var(--green); }
.request-list { display: grid; gap: 10px; }
.request-row { padding: 14px; border: 1px solid var(--line); border-radius: 14px; display: grid; grid-template-columns: 105px minmax(0, 1fr) auto; align-items: center; gap: 18px; color: inherit; background: var(--white); text-decoration: none; }
.request-cover { width: 105px; height: 76px; }
.request-row h2 { margin: 4px 0; font-size: 19px; }
.request-row p { margin: 0; color: var(--muted); font-size: 12px; }
.request-row > strong { color: var(--green); font-size: 12px; }
.request-contact-card { margin-bottom: 30px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.request-contact-card dl { margin: 0; display: grid; gap: 15px; }
.request-contact-card div { display: grid; gap: 4px; }
.request-contact-card dt { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.request-contact-card dd { margin: 0; white-space: pre-wrap; }
.request-images { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.request-images a { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; display: grid; color: inherit; background: var(--white); text-decoration: none; }
.request-images img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.request-images span { padding: 9px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.request-images small { margin-top: 3px; display: block; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.favorite-button { position: absolute; z-index: 5; top: 10px; right: 10px; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; color: var(--white); background: rgba(8,12,10,.48); box-shadow: 0 3px 16px rgba(0,0,0,.2); font-size: 22px; cursor: pointer; backdrop-filter: blur(8px); }
.favorite-button[aria-pressed="true"], [data-lightbox-favorite][aria-pressed="true"] { color: #ffad8c; background: rgba(107,35,18,.72); }
.favorites-tray { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); bottom: max(18px, env(safe-area-inset-bottom)); min-height: 52px; padding: 10px 18px; border: 0; border-radius: 999px; color: var(--white); background: var(--orange); box-shadow: 0 12px 36px rgba(81,38,18,.3); font-weight: 760; cursor: pointer; }
.scroll-top { position: fixed; right: max(14px, env(safe-area-inset-right)); top: 50%; z-index: 35; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--green); color: white; box-shadow: 0 4px 16px #0003; cursor: pointer; font-size: 24px; }
.scroll-top[hidden] { display: none; }
body.lightbox-open .scroll-top { display: none; }
.request-open { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.favorites-hero-cta { margin-top: 26px; min-height: 52px; padding: 12px 26px; border-radius: 999px; box-shadow: 0 8px 24px rgba(81,38,18,.2); font-size: 18px; }
.favorites-tray[hidden] { display: none; }
.favorites-tray span { margin-right: 5px; font-size: 19px; }
.favorites-tray strong { min-width: 24px; margin-left: 8px; padding: 3px 7px; border-radius: 99px; display: inline-block; color: var(--orange); background: var(--white); }
.favorites-dialog { width: min(520px, calc(100% - 24px)); padding: 28px; border: 0; border-radius: 20px; color: var(--ink); box-shadow: 0 28px 90px rgba(0,0,0,.34); }
.favorites-dialog::backdrop { background: rgba(8,12,10,.72); backdrop-filter: blur(5px); }
.favorites-dialog h2 { margin: 4px 0 8px; font-family: Georgia, serif; font-size: 30px; }
.favorites-dialog > p:not(.eyebrow) { color: var(--muted); }
.favorites-dialog-close { position: absolute; top: 12px; right: 12px; margin: 0; }
.favorites-dialog-close button { width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--muted); background: var(--surface); font-size: 22px; cursor: pointer; }
.favorites-form { display: grid; gap: 13px; }
.favorites-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 720; }
.favorites-summary { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.public-selection-label { color: #737c77; font-size: 11px; font-weight: 760; text-transform: uppercase; letter-spacing: .06em; }
.public-selection-hero { padding-bottom: 12px; }
.request-sent-page { min-height: 100vh; padding: 24px; display: grid; place-items: center; color: var(--ink); background: var(--surface); }
.request-sent-card { width: min(540px, 100%); padding: clamp(28px, 7vw, 58px); border: 1px solid var(--line); border-radius: 24px; text-align: center; background: var(--white); box-shadow: 0 18px 70px rgba(22,34,29,.1); }
.request-sent-card .brand-mark { margin: 0 auto 22px; }
.request-sent-card h1 { margin: 5px 0 12px; font-family: Georgia, serif; font-size: clamp(36px, 8vw, 58px); font-weight: 450; }
.request-sent-card p:not(.eyebrow) { margin: 0 auto 24px; color: var(--muted); line-height: 1.6; }

@media (max-width: 1050px) {
  .selection-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-images { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .selection-cover { width: 90px; height: 68px; }
  .selection-publication { align-items: flex-start; flex-direction: column; }
  .selection-publication-actions { flex-wrap: wrap; }
  .request-row { grid-template-columns: 72px minmax(0, 1fr); }
  .request-cover { width: 72px; height: 60px; }
  .request-row > strong { grid-column: 2; }
  .request-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .selection-filters { grid-template-columns: 1fr; }
  .bulk-editor-primary .button { padding-inline: 10px; }
  .favorite-button { top: 7px; right: 7px; width: 36px; height: 36px; }
  .favorites-dialog { padding: 23px 17px; }
}

@media (max-width: 1100px) {
  .works-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-panel { grid-template-columns: 1fr 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .filter-submit { display: none; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-preview { max-width: 820px; }
  .settings-grid { grid-template-columns: 1fr; }
  .drive-folder-mappings { grid-template-columns: 1fr; }
  .drive-mapping-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .drive-mapping-card:last-child { border-bottom: 0; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-filter-main { grid-template-columns: minmax(0, 1fr) auto auto auto; }
  .catalog-filter-main .search-field { grid-column: 1 / -1; }
  .bulk-editor-actions { grid-template-columns: 1fr 1fr; max-height: 50vh; overflow-y: auto; }
  .bulk-object-actions { grid-column: 1 / -1; }
  .category-management-layout { grid-template-columns: 1fr; }
  .category-create-card { position: static; }
  .employee-management-layout { grid-template-columns: 1fr; }
  .employee-create-card { position: static; }
  .storefront-grid:not(.is-justified) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .topbar { grid-template-columns: auto 1fr; min-height: 64px; padding: 0 18px; }
  .main-nav { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; height: 62px; justify-content: space-around; gap: 0; border-top: 1px solid var(--line); background: rgba(255,255,255,.97); }
  .main-nav a { flex: 1 1 0; width: auto; padding-inline: 8px; font-size: 12px; }
  .main-nav a[aria-current="page"]::after { inset: 0 30% auto; border-radius: 0 0 4px 4px; }
  .profile-actions { gap: 7px; }
  .profile-login { display: none; }
  .logout-button { padding: 6px 8px; }
  .manager-main { padding-top: 38px; padding-bottom: 100px; }
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .selection-row { grid-template-columns: 90px 1fr; }
  .selection-stack { width: 82px; }
  .selection-stack span { width: 62px; height: 50px; }
  .selection-actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
  .selection-builder { grid-template-columns: 1fr; }
  .chosen-works { grid-row: 1; }
  .public-work, .public-work:nth-child(even) { grid-template-columns: 1fr; }
  .public-work:nth-child(even) .public-art { order: 0; }
  .public-work-copy { max-width: 620px; }
  .catalog-layout { grid-template-columns: 1fr; gap: 18px; }
  .category-panel { position: static; }
  .category-tree { max-height: 380px; }
  .storefront-header { min-height: 66px; }
  .storefront-grid:not(.is-justified) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lightbox { grid-template-columns: 46px minmax(0, 1fr) 46px; }
  .lightbox-nav { width: 38px; height: 58px; font-size: 34px; }
}

@media (max-width: 560px) {
  .manager-main { padding-inline: 14px; }
  h1 { font-size: 40px; }
  .heading-row { align-items: stretch; flex-direction: column; }
  .heading-row .button { align-self: flex-start; }
  .filter-panel { grid-template-columns: 1fr; padding: 9px; }
  .search-field { grid-column: auto; }
  .works-grid { grid-template-columns: 1fr; gap: 14px; }
  .work-card { display: grid; grid-template-columns: 42% 58%; }
  .work-card-link { display: contents; }
  .work-art { aspect-ratio: auto; min-height: 170px; }
  .work-card-body { padding: 15px; align-self: center; }
  .art-monogram { font-size: 38px; }
  .tags span:nth-child(n+2) { display: none; }
  .work-card h2 { font-size: 17px; }
  .selection-tray { bottom: 74px; padding-left: 15px; }
  .selection-tray .button { padding-inline: 13px; }
  .selection-row { grid-template-columns: 1fr; padding: 15px; }
  .selection-stack { display: none; }
  .selection-actions { grid-column: auto; justify-content: flex-start; overflow-x: auto; }
  .selection-actions .button { white-space: nowrap; }
  .detail-layout { gap: 18px; }
  .form-card { padding: 22px 17px; }
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .settings-card { grid-template-columns: auto 1fr; padding: 22px; }
  .settings-card .button { grid-column: 1 / -1; }
  .settings-actions .button { grid-column: auto; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .drive-root-form { grid-template-columns: 1fr; }
  .drive-folders-heading, .drive-folder-header, .drive-folder-rule-form, .drive-folder-rule-state { align-items: stretch; flex-direction: column; }
  .drive-folder-badges { justify-content: flex-start; }
  .drive-folder-path { white-space: normal; }
  .drive-mapping-controls { grid-template-columns: 1fr; }
  .drive-rule-controls { grid-template-columns: 1fr; }
  .drive-rule-controls label { grid-column: auto; }
  .public-header { padding-top: 18px; }
  .public-header > span { display: none; }
  .public-hero { margin-top: 70px; }
  .public-hero h1 { font-size: clamp(43px, 15vw, 68px); }
  .public-meta { flex-direction: column; gap: 7px; }
  .public-meta span + span::before { display: none; }
  .public-gallery { width: min(100% - 24px, 1240px); gap: 78px; }
  .public-work { gap: 25px; }
  .public-work-copy { padding: 0 8px; }
  .public-work-copy h2 { font-size: 36px; }
  .public-footer { width: calc(100% - 32px); align-items: flex-start; flex-direction: column; gap: 20px; }
  .catalog-heading { align-items: stretch; flex-direction: column; }
  .catalog-heading .button { align-self: flex-start; }
  .heading-actions { justify-content: flex-start; }
  .category-management-heading { align-items: stretch; flex-direction: column; }
  .category-management-heading .button { align-self: flex-start; }
  .category-form-row, .category-edit-grid { grid-template-columns: 1fr; }
  .category-editor summary { align-items: flex-start; }
  .category-editor-state { display: none; }
  .objects-map { min-height: 58vh; }
  .catalog-filters { padding: 9px; }
  .catalog-filter-main { grid-template-columns: 1fr 1fr; }
  .catalog-filter-main .search-field, .catalog-album-filter { grid-column: 1 / -1; }
  .catalog-advanced-filters { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .catalog-card-body { padding: 9px; }
  .catalog-object { display: none; }
  .catalog-card-meta { flex-direction: column; }
  .catalog-results-heading { align-items: flex-start; flex-direction: column; }
  .bulk-editor { bottom: 72px; padding: 11px; }
  .bulk-editor-heading > div { display: grid; gap: 2px; }
  .bulk-editor-actions { grid-template-columns: 1fr; }
  .bulk-object-actions { grid-column: auto; grid-template-columns: 1fr; }
  .bulk-object-actions > form:first-child { grid-template-columns: 1fr; }
  .bulk-object-actions > form:first-child label { grid-column: auto; }
  .bulk-visibility > div { align-items: stretch; flex-wrap: wrap; }
  .bulk-visibility > div > span { flex: 1 0 100%; }
  .storefront-header, .storefront-footer { width: calc(100% - 28px); }
  .storefront-brand .brand-mark { width: 31px; height: 31px; }
  .storefront-pro-link { font-size: 11px; }
  .storefront-hero { margin-top: 54px; }
  .storefront-hero h1 { font-size: clamp(42px, 14vw, 64px); }
  .storefront-categories { width: calc(100% - 20px); margin-bottom: 18px; }
  .storefront-gallery-section { width: calc(100% - 10px); }
  .storefront-section-heading { width: calc(100% - 10px); align-items: flex-start; flex-direction: column; gap: 8px; }
  .storefront-grid { gap: 6px; }
  .storefront-tile { border-radius: 2px; }
  .storefront-tile-copy { display: none; }
  .storefront-watermark { right: 7px; top: auto !important; bottom: 6px !important; font-size: 7px; }
  .storefront-footer { align-items: flex-start; flex-direction: column; }
  .lightbox { grid-template-columns: 42px minmax(0, 1fr) 42px; }
  .lightbox-toolbar { min-height: 60px; padding: 7px 9px; }
  .lightbox-toolbar > div:first-child small { display: none; }
  .lightbox-actions button { min-width: 36px; height: 36px; border-radius: 10px; }
  .lightbox-actions [data-lightbox-zoom-out], .lightbox-actions [data-lightbox-zoom-in] { display: none; }
  .lightbox-nav { width: 34px; height: 52px; border: 0; background: transparent; }
  .lightbox-caption { min-height: 48px; padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Ручная загрузка: общие категории, очередь и результат каждого файла. */
.upload-workspace { max-width: none; }
.upload-workspace [hidden] { display: none !important; }
.upload-dropzone { padding: 20px; border: 2px dashed #cbd3df; border-radius: 16px; text-align: center; background: var(--paper); transition: border-color .15s, background .15s; }
.upload-dropzone:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 3px; }
.upload-dropzone.is-dragging { border-color: var(--green); background: var(--green-soft); }
.upload-drop-icon { display: block; margin-bottom: 8px; font-size: 32px; color: #65738a; }
.upload-dropzone .upload-file-label { display: inline-flex; padding: 12px 18px; border-radius: 10px; background: var(--green); color: white; font-size: 15px; font-weight: 600; cursor: pointer; }
.upload-native-input { width: 1px; min-height: 0; padding: 0; }
.upload-dropzone p { margin: 6px 0; }
.upload-category-picker { min-width: 0; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.upload-category-picker legend { padding: 0 7px; font-weight: 700; }
.upload-category-picker details > summary { padding: 8px 0; cursor: pointer; font-weight: 600; }
.upload-category-search { display: block; margin: 8px 0; }
.upload-category-list { max-height: 270px; overflow: auto; overscroll-behavior: contain; padding: 4px; background: var(--paper); border-radius: 8px; }
.upload-category-picker .upload-category-choice { display: flex; gap: 10px; align-items: flex-start; padding: 9px 8px; border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
.upload-category-choice:hover, .upload-category-choice:has(input:checked) { background: var(--green-soft); }
.upload-category-choice input[type="checkbox"] { flex-shrink: 0; width: 18px; min-height: 18px; height: 18px; padding: 0; margin: 2px 0 0; }
.upload-category-actions, .upload-submit-actions, .upload-file-actions, .upload-dialog-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.upload-category-actions { margin-top: 14px; }
.upload-queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upload-queue-heading h2 { margin: 0; font-size: 20px; }
.upload-category-picker [data-category-selected] { overflow-wrap: anywhere; }
.upload-queue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-top: 16px; }
.upload-queue-card { min-width: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.upload-thumbnail { height: 155px; background: #edf0f5; }
.upload-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.upload-queue-card-body { display: grid; gap: 8px; padding: 13px; }
.upload-queue-card-body p { margin: 0; }
.upload-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.upload-file-categories { font-size: 12px; color: #58657b; overflow-wrap: anywhere; }
.upload-queue-card .link-button { justify-self: start; text-align: left; }
.upload-file-status { font-size: 13px; }
.upload-queue-card[data-state="done"] { border-color: #81b89e; }
.upload-queue-card[data-state="done"] .upload-file-status { color: #176b41; }
.upload-queue-card[data-state="failed"] { border-color: #e2a8a8; }
.upload-queue-card[data-state="failed"] .upload-file-status { color: #a32d2d; }
.upload-workspace progress { display: block; width: 100%; height: 8px; border: none; border-radius: 8px; overflow: hidden; accent-color: var(--green); }
.upload-workspace progress::-webkit-progress-bar { background: #e5eaf2; }
.upload-workspace progress::-webkit-progress-value { background: var(--green); }
.upload-submit-bar { display: grid; gap: 14px; bottom: 12px; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 18px #17263d12; z-index: 2; }
.has-upload-files .upload-submit-bar { position: sticky; }
.upload-overall p { margin: 0 0 10px; }
.upload-category-dialog { inset: 0; margin: auto; width: min(650px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 40px); padding: 24px; border: 1px solid var(--line); border-radius: 16px; color: inherit; }
.upload-category-dialog::backdrop { background: #17263d80; }
.upload-category-dialog h2 { margin-top: 0; }
.upload-dialog-actions { margin-top: 20px; }
.upload-feedback { white-space: pre-line; overflow-wrap: anywhere; }
.upload-workspace button:disabled { opacity: .5; cursor: default; }
@media (max-width: 640px) {
  .upload-dropzone { padding: 20px 12px; }
  .upload-category-picker { padding: 12px; }
  .upload-queue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .upload-thumbnail { height: 120px; }
  .upload-queue-card-body { padding: 10px; }
  .upload-submit-bar { bottom: 74px; padding: 12px; }
  .upload-submit-actions .button { flex: 1 1 auto; }
  .upload-category-dialog { padding: 16px; }
}

/* Интерфейс PRO: компактная навигация и понятные рабочие сценарии. */
.manager-page [hidden] { display: none !important; }
.manager-page .page-heading h1 { font-size: clamp(32px, 3.7vw, 48px); line-height: 1.08; }
.manager-page .subtitle { max-width: 760px; font-size: 16px; }
.manager-page .page-heading { margin-bottom: 26px; }
.upload-heading, .settings-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.catalog-management-menu { position: relative; }
.catalog-management-menu > summary, .catalog-upload-short { display: none; }
.catalog-management-menu > div { display: flex; flex-wrap: wrap; gap: 10px; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 12px 18px; border-radius: 10px; color: white; background: var(--green); }
.skip-link:focus { top: 12px; }
.manager-page a:focus-visible, .manager-page button:focus-visible, .manager-page summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.manager-main:focus { outline: none; }
.category-panel-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; cursor: pointer; list-style: none; }
.category-panel-heading::-webkit-details-marker { display: none; }
.category-panel-heading > span:first-child { min-width: 0; }
.category-panel-heading strong { display: block; font-size: 16px; }
.category-panel-heading small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-panel-count { padding: 6px 8px; border-radius: 8px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 700; }
.category-panel-heading svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.category-panel details[open] > summary svg { transform: rotate(180deg); }
.category-panel details:not([open]) > summary { border-bottom: 0; }
.category-editor-search { display: block; margin-bottom: 16px; }
.workflow-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 0 0 22px; list-style: none; }
.workflow-steps li { display: flex; align-items: flex-start; gap: 12px; padding: 15px 18px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.workflow-steps li > span, .drive-operation-heading > span { flex-shrink: 0; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--green); background: var(--green-soft); font-size: 13px; font-weight: 750; }
.workflow-steps strong { display: block; font-size: 14px; }
.workflow-steps small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.drive-settings-main { min-width: 0; }
.drive-settings-main .drive-progress { margin-top: 24px; margin-bottom: 0; }
.settings-grid .settings-card:not(.drive-settings-card) { grid-column: 2; grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
.settings-grid .settings-icon { width: 44px; height: 44px; font-size: 23px; }
.settings-grid .settings-card:not(.drive-settings-card) { padding: 24px; align-items: start; }
.settings-grid .settings-card:not(.drive-settings-card) h2 { font-size: 18px; }
.settings-grid .settings-card:not(.drive-settings-card) p { font-size: 13px; }
.settings-grid .settings-card:not(.drive-settings-card) .button { margin-top: 12px; }
.drive-connection-options { margin-top: 16px; }
.drive-connection-options summary, .drive-root-options summary { cursor: pointer; color: var(--green); font-size: 13px; font-weight: 650; }
.drive-connection-options .settings-actions { margin-top: 12px; }
.drive-source-link, .drive-secondary-link { display: inline-block; margin-top: 12px; color: var(--green); font-size: 13px; text-underline-offset: 3px; }
.drive-root-options { margin-bottom: 24px; }
.drive-root-options .drive-root-form { margin-top: 16px; }
.drive-operation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.drive-operation-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.drive-operation-heading { display: flex; gap: 12px; align-items: center; }
.drive-operation-heading h3 { margin: 0; font-size: 20px; }
.drive-operation-card > p { min-height: 44px; margin: 14px 0 20px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.drive-operation-card > .field-hint { min-height: 0; margin: 12px 0 0; font-size: 12px; }
.drive-full-operation { margin-top: 20px; border: 1px solid #eadbce; border-radius: 14px; background: #fffcf8; }
.drive-full-operation > summary { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 20px 22px; cursor: pointer; list-style: none; }
.drive-full-operation > summary::-webkit-details-marker { display: none; }
.drive-full-operation summary strong { display: block; font-size: 16px; }
.drive-full-operation summary small { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.drive-full-operation > summary > span:last-child { font-size: 24px; }
.drive-full-operation[open] > summary > span:last-child { transform: rotate(180deg); }
.drive-full-operation-body { padding: 0 22px 22px; font-size: 14px; line-height: 1.6; }
.drive-confirm { display: flex; align-items: flex-start; gap: 12px; margin: 18px 0; padding: 14px; border: 1px solid #eadbce; border-radius: 10px; background: white; cursor: pointer; }
.drive-confirm input { flex-shrink: 0; width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 2px 0 0; accent-color: var(--green); }
.drive-progress { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; padding: 20px; border: 1px solid #cadfd4; border-radius: 14px; background: var(--green-soft); }
.drive-progress strong { font-size: 16px; }
.drive-progress p { margin: 8px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.drive-progress small { color: var(--green); font-size: 12px; }
.operation-spinner { flex-shrink: 0; width: 22px; height: 22px; border: 2px solid #bdd2c6; border-top-color: var(--green); border-radius: 50%; animation: operation-spin 1s linear infinite; }
@keyframes operation-spin { to { transform: rotate(360deg); } }
.sync-error { overflow-wrap: anywhere; }
.drive-report-summary { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--muted); line-height: 1.5; }
.drive-report-details { margin-top: 8px; color: var(--muted); font-size: 11px; }
.drive-report-details summary { cursor: pointer; }
.drive-report-details p { margin: 8px 0; overflow-wrap: anywhere; }
.drive-report-action { display: inline-block; padding: 6px 9px; border-radius: 8px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 650; }
.drive-report-action.delete { color: #98502d; background: #fbebdf; }
.drive-report-action.blocked { color: #983d35; background: #f8e8e6; }
@media (max-width: 800px) {
  /* backdrop-filter задаёт containing block для fixed-навигации; на телефоне
     нижняя панель должна привязываться к окну, а не к шапке. */
  .topbar { backdrop-filter: none; background: white; }
  .main-nav { height: calc(66px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: white; }
  .main-nav a { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding-inline: 4px; font-size: 11px; white-space: nowrap; }
  .main-nav svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .main-nav .nav-label-wide { display: none; }
  .main-nav .nav-label-short { display: inline; }
  .manager-main { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .catalog-management-menu > summary { display: flex; gap: 10px; list-style: none; }
  .catalog-management-menu > summary::-webkit-details-marker { display: none; }
  .catalog-management-menu > div { position: absolute; top: calc(100% + 8px); left: 0; display: grid; gap: 6px; width: 230px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 8px 24px #17263d12; z-index: 5; }
  .catalog-management-menu > div .button { justify-content: flex-start; }
  .catalog-upload-long { display: none; }
  .catalog-upload-short { display: inline; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid .settings-card { grid-column: 1 !important; grid-row: auto; }
  .bulk-editor { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .upload-submit-bar { bottom: calc(78px + env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
  .catalog-heading .subtitle { font-size: 14px; line-height: 1.5; }
  .catalog-heading .heading-actions { gap: 8px; }
  .catalog-heading .heading-actions > .button, .catalog-management-menu > summary { padding-inline: 13px; font-size: 13px; }
  .upload-heading, .settings-heading { flex-direction: column; gap: 14px; }
  .workflow-steps { gap: 7px; }
  .workflow-steps li { flex-direction: column; gap: 8px; padding: 12px; }
  .workflow-steps strong { font-size: 12px; }
  .workflow-steps small { font-size: 11px; }
  .drive-operation-grid { grid-template-columns: 1fr; }
  .drive-operation-card { padding: 18px; }
  .drive-operation-card > p { min-height: 0; }
  .drive-root-card .section-heading { margin-bottom: 18px; }
  .drive-full-operation > summary { padding: 16px; }
  .drive-full-operation-body { padding: 0 16px 16px; }
  .drive-progress { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .operation-spinner { animation: none; }
}
