/* ---- Admin Inline — Curator UI ---- */
/* All parchment-styled, matches the cartouche & photo-panel aesthetic */

/* ---- Cartouche admin section ---- */

.admin-controls { /* wraps guest/user divs after the year filter */ }
.admin-controls.hidden { display: none; }

#adminUser.hidden,
#adminGuest.hidden { display: none !important; }

#adminUser {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cartouche-btn-primary {
  background: var(--ps-iron, #a23e2a);
  color: #fff;
  border: 1px solid var(--ps-iron, #a23e2a);
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.82rem;
  padding: 0.38rem 0.65rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
  letter-spacing: 0.01em;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.35;
}

.cartouche-btn-primary:hover {
  background: var(--ps-iron-hover, #8a3324);
  border-color: var(--ps-iron-hover, #8a3324);
}

/* ---- Login overlay ---- */

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(80,45,15,0.5);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-overlay.hidden { display: none; }

.login-card {
  background-color: #f6f3ec;
  border: 1px solid #0e0e0c;
  outline: 1px solid #0e0e0c;
  outline-offset: -5px;
  padding: 1.5rem 1.75rem;
  max-width: 320px;
  width: calc(100vw - 3rem);
  box-shadow: 4px 6px 24px rgba(14,14,12,0.55);
}

.login-title {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1.45rem;
  font-weight: normal;
  color: #0e0e0c;
  text-align: center;
  line-height: 1.1;
}

.login-card-sub {
  font-size: 0.7rem;
  color: #5a5851;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-style: italic;
  margin-top: 0.25rem;
}

.login-card input[type="password"] {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.95rem;
  background: #fdf8ee;
  border: 1px solid #dcd9c9;
  color: #0e0e0c;
  outline: none;
  margin-top: 0.5rem;
}

.login-card input[type="password"]:focus {
  border-color: #5a5851;
}

.login-error {
  font-size: 0.82rem;
  color: #9a2020;
  font-style: italic;
  margin-top: 0.4rem;
  text-align: center;
}

.login-error.hidden { display: none; }

.login-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.85rem;
  align-items: center;
}


/* ---- Drag highlight (dashed border over map) ---- */

.drag-highlight {
  position: fixed;
  inset: 8px;
  border: 3px dashed rgba(90,56,32,0.6);
  border-radius: 2px;
  z-index: 1050;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.drag-highlight.visible {
  opacity: 1;
}


.step-eyebrow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #5a5851;
  margin-bottom: 0.35rem;
  font-variant: small-caps;
}

.step-heading {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1.2rem;
  font-weight: normal;
  color: #0e0e0c;
  margin-bottom: 0.9rem;
  line-height: 1.3;
}

.step-input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1rem;
  background: #fdf8ee;
  border: 1px solid #dcd9c9;
  color: #0e0e0c;
  outline: none;
}

.step-input:focus { border-color: #5a5851; }

.step-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  align-items: center;
}

/* Date step */
.date-modes {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.date-mode-row {
  display: flex;
  flex-direction: column;
}

.date-mode-label-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.date-mode-label-row input[type="radio"] {
  accent-color: #5a5851;
  cursor: pointer;
  flex-shrink: 0;
}

.date-mode-label {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.95rem;
  color: #0e0e0c;
  cursor: pointer;
}

.date-sub-wrap {
  display: none;
  margin-top: 0.4rem;
  margin-left: 1.45rem;
}

.date-sub-wrap.visible { display: block; }

.date-sub-wrap select,
.date-sub-wrap input[type="number"] {
  width: 100%;
  padding: 0.4rem 0.5rem;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.9rem;
  background: #fdf8ee;
  border: 1px solid #dcd9c9;
  color: #0e0e0c;
  outline: none;
}

.date-sub-wrap select:focus,
.date-sub-wrap input[type="number"]:focus { border-color: #5a5851; }

/* Compass step */
.compass-grid {
  display: grid;
  grid-template-columns: repeat(3, 52px);
  gap: 5px;
  justify-content: center;
  margin: 0.75rem auto 0.5rem;
}

.compass-btn {
  width: 52px;
  height: 42px;
  background: #fdf8ee;
  border: 1px solid #dcd9c9;
  color: #0e0e0c;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
  line-height: 42px;
  padding: 0;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}

.compass-btn.selected {
  background: #0e0e0c;
  color: #f6f3ec;
  border-color: #0e0e0c;
}

.compass-btn:hover:not(.selected) { background: #ecead9; }

.compass-btn.empty {
  visibility: hidden;
  pointer-events: none;
}

/* Step 1 location card — photo thumbnail + hint */
.step-photo-preview {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border: 2px solid #0e0e0c;
  margin-bottom: 0.65rem;
  display: block;
}

.step-hint {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.85rem;
  color: #0e0e0c;
  font-style: italic;
  line-height: 1.45;
  margin-bottom: 0.25rem;
}

/* ---- Pin placement — STU-28 (search + GPS pre-prompt) ---- */

.pp-search-label {
  display: block;
  margin-bottom: 0.45rem;
}

.pp-search {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.95rem;
  background: #fdf8ee;
  border: 1px solid #dcd9c9;
  color: #0e0e0c;
  outline: none;
  border-radius: 2px;
}

.pp-search:focus {
  border-color: #5a5851;
}

.pp-results {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 12rem;
  overflow-y: auto;
  margin: 0.35rem 0 0.5rem;
  padding: 0.15rem 0.1rem 0.15rem 0;
}

.pp-results[hidden] {
  display: none !important;
}

.pp-result {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.45rem;
  font: inherit;
  color: #0e0e0c;
  background: #fdf8ee;
  border: 1px solid #dcd9c9;
  cursor: pointer;
  line-height: 1.35;
  border-radius: 2px;
  transition: background 0.1s, border-color 0.1s;
}

.pp-result:hover,
.pp-result:focus-visible {
  background: #ecead9;
  border-color: #5a5851;
  outline: none;
}

.pp-result__name {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.85rem;
  flex: 1;
  min-width: 0;
}

.pp-result__chip {
  flex-shrink: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a5851;
  border: 1px solid #c0b8a0;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  background: #f6f3ec;
}

.gps-link {
  display: inline-block;
  margin: 0.15rem 0 0.6rem;
  padding: 0.2rem 0;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.8rem;
  font-style: italic;
  color: #5a5851;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gps-link:hover,
.gps-link:focus-visible {
  color: #0e0e0c;
  outline: none;
}

.gps-prompt.paper-card {
  background: #f6f3ec;
  border: 1px solid #0e0e0c;
  outline: 1px solid #0e0e0c;
  outline-offset: -4px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.55rem;
  box-shadow: 2px 3px 12px rgba(14, 14, 12, 0.2);
}

.gps-prompt[hidden] {
  display: none !important;
}

.gps-prompt__copy {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #0e0e0c;
  margin: 0 0 0.65rem;
  font-style: italic;
}

.gps-prompt__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.gps-prompt .btn-secondary,
.gps-prompt .btn-ghost {
  width: 100%;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.82rem;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  text-align: center;
  border-radius: 2px;
  line-height: 1.35;
}

.gps-prompt .btn-secondary {
  background: #5a5851;
  color: #f6f3ec;
  border: 1px solid #3a3530;
}

.gps-prompt .btn-secondary:hover,
.gps-prompt .btn-secondary:focus-visible {
  background: #3a3530;
  outline: none;
}

.gps-prompt .btn-ghost {
  background: transparent;
  color: #5a5851;
  border: 1px dashed #a69b7a;
}

.gps-prompt .btn-ghost:hover,
.gps-prompt .btn-ghost:focus-visible {
  color: #0e0e0c;
  border-color: #5a5851;
  outline: none;
}

.pp-coords-mono {
  font-family: ui-monospace, 'IBM Plex Mono', 'Cascadia Code', monospace;
  font-size: 0.78rem;
  color: #3a3833;
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}

/* STU-63 — camera bearing (optional, pin step) */
.pp-camera-bearing {
  margin: 0.35rem 0 0.6rem;
  padding: 0.45rem 0 0;
  border-top: 1px dashed #c9c4b8;
}
.pp-camera-label {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.82rem;
  color: #3a3a35;
  margin: 0 0 0.35rem;
}
.pp-camera-opt {
  font-size: 0.76rem;
  font-style: italic;
  color: #6d6a62;
}
.pp-camera-device-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}
.pp-camera-device-readout {
  font-family: ui-monospace, 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: #2a4a6a;
}
.pp-camera-rose {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  justify-content: center;
  margin: 0.25rem 0;
}
.pp-camera-rose .pp-cam-card {
  min-width: 2.1rem;
  padding: 0.22rem 0.35rem;
  font-size: 0.72rem;
}
.pp-camera-unknown-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.2rem;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.82rem;
  color: #3a3a35;
  font-style: italic;
  cursor: pointer;
}
.pp-camera-unknown-row input[type="checkbox"] {
  accent-color: #5a5851;
  cursor: pointer;
}

/* Leaflet GPS accuracy circle path */
path.gps-accuracy {
  stroke: rgba(30, 90, 140, 0.85);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  fill: rgba(30, 90, 140, 0.12);
}

.pp-pin-handle {
  pointer-events: auto;
}

.compass-unknown-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.88rem;
  color: #3a3a35;
  font-style: italic;
  cursor: pointer;
}

.compass-unknown-row input[type="checkbox"] {
  accent-color: #5a5851;
  cursor: pointer;
}

/* ---- Collection tab ---- */

.collection-tab {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: #f6f3ec;
  border: 1px solid #0e0e0c;
  border-right: none;
  padding: 0.9rem 0.4rem;
  z-index: 800;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.82rem;
  color: #0e0e0c;
  letter-spacing: 0.05em;
  font-style: italic;
  box-shadow: -2px 0 8px rgba(14,14,12,0.12);
  user-select: none;
  transition: background 0.15s, color 0.15s;
}

.collection-tab.hidden { display: none; }

.collection-tab:hover {
  background: #e6e2cf;
  color: #0e0e0c;
}

/* ---- Collection / admin right panel ---- */

.collection-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 390px;
  height: 100dvh;
  background: #f6f3ec;
  border-left: 1px solid #0e0e0c;
  outline: 1px solid #0e0e0c;
  outline-offset: -5px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 28px rgba(14,14,12,0.35);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1);
  overflow-y: auto;
}

.collection-panel.open { transform: translateX(0); }

/* Panel toolbar */
.cp-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid #dcd9c9;
  flex-shrink: 0;
  background: #e6e2cf;
}

.cp-toolbar-title {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1rem;
  color: #0e0e0c;
  font-style: italic;
}

.cp-close-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: none;
  color: #0e0e0c;
  font-size: 1.6rem;
  font-family: 'IM Fell English', Georgia, serif;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
  position: relative;
}

.cp-close-btn:hover { color: #0e0e0c; }

/* Curator: CSS tooltip (hover/focus) — icon-only exception per STU-19 */
.cp-close-btn::after {
  content: 'Close';
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  padding: 0.2rem 0.45rem;
  font-size: var(--t-xs);
  font-family: 'Inter', system-ui, sans-serif;
  white-space: nowrap;
  background: var(--ps-paper-soft);
  color: var(--ps-ink);
  border: 1px solid var(--ps-ink);
  opacity: 0;
  pointer-events: none;
  z-index: 9000;
  transition: opacity 0.12s ease;
}
.cp-close-btn:hover::after,
.cp-close-btn:focus-visible::after {
  opacity: 1;
}

/* Collection list view */
.cp-body {
  flex: 1;
  padding: 0.75rem 1rem;
  overflow-y: auto;
}

.cp-empty {
  font-size: 0.95rem;
  color: #5a5851;
  font-style: italic;
  padding: 0.5rem 0;
}

.photo-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #dcd9c9;
}

.photo-list-item:last-child { border-bottom: none; }

/* Never crop — see §1 Principle 2 */
.photo-list-item picture.list-photo-thumb {
  width: 52px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid #dcd9c9;
  background: var(--ps-paper-soft);
  display: block;
}
.photo-list-item picture.list-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.photo-list-info {
  flex: 1;
  min-width: 0;
}

.photo-list-title {
  font-size: 0.9rem;
  color: #0e0e0c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-list-meta {
  font-size: 0.78rem;
  color: #5a5851;
  font-style: italic;
}

.photo-list-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.icon-action-btn {
  background: transparent;
  border: 1px solid #dcd9c9;
  color: #0e0e0c;
  cursor: pointer;
  font-size: 0.78rem;
  padding: 0.2rem 0.5rem;
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  transition: background 0.1s;
}

.icon-action-btn:hover { background: #ecead9; }

.icon-action-btn.danger:hover {
  background: #f0d8d0;
  color: #9a2020;
  border-color: #d08080;
}

/* Review / edit form */
.review-form {
  padding: 0.85rem 1.1rem 1.5rem;
}

.review-form-heading {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1.05rem;
  font-weight: normal;
  color: #0e0e0c;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #dcd9c9;
}

.rf-field {
  margin-bottom: 0.85rem;
}

.rf-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #5a5851;
  margin-bottom: 0.3rem;
  font-variant: small-caps;
}

.rf-input,
.rf-textarea,
.rf-select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.9rem;
  background: #fdf8ee;
  border: 1px solid #dcd9c9;
  color: #0e0e0c;
  outline: none;
}

.rf-input:focus,
.rf-textarea:focus,
.rf-select:focus { border-color: #5a5851; }

.rf-textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
}

/* Date selector (three-mode) */
.date-selector {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.date-option-row {
  display: flex;
  flex-direction: column;
}

.date-option-label-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.date-option-label-row input[type="radio"] {
  accent-color: #5a5851;
  cursor: pointer;
  flex-shrink: 0;
}

.date-option-text {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.9rem;
  color: #0e0e0c;
  cursor: pointer;
}

.date-sub {
  display: none;
  margin-top: 0.35rem;
  margin-left: 1.4rem;
}

.date-sub.visible { display: block; }

.date-sub select,
.date-sub input[type="number"] {
  width: 100%;
  padding: 0.4rem 0.5rem;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.88rem;
  background: #fdf8ee;
  border: 1px solid #dcd9c9;
  color: #0e0e0c;
  outline: none;
}

.date-sub select:focus,
.date-sub input[type="number"]:focus { border-color: #5a5851; }

/* Submit button */
.review-submit-btn {
  width: 100%;
  background: #0e0e0c;
  color: #f6f3ec;
  border: none;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1rem;
  padding: 0.65rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.15s;
  line-height: 1.3;
}

.review-submit-btn:hover { background: #0e0e0c; }

.review-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.review-cancel-btn {
  display: block;
  text-align: center;
  margin-top: 0.6rem;
  background: transparent;
  border: none;
  color: #5a5851;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.85rem;
  cursor: pointer;
  font-style: italic;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.review-cancel-btn:hover { color: #0e0e0c; }

.review-error {
  font-size: 0.85rem;
  color: #9a2020;
  font-style: italic;
  margin-top: 0.5rem;
  display: none;
  line-height: 1.4;
}

.review-error.visible { display: block; }

/* Never crop — see §1 Principle 2 */
.review-form picture.review-photo-frame {
  width: 100%;
  max-height: 200px;
  margin-bottom: 1rem;
  display: block;
  border: 2px solid #0e0e0c;
  background: var(--ps-paper-soft);
}
.review-form picture.review-photo-frame img.review-photo-preview {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
}

/* Admin actions at base of photo view panel */
.panel-admin-actions {
  padding: 0.75rem 1.3rem 1rem;
  border-top: 1px solid #dcd9c9;
  display: flex;
  gap: 0.75rem;
}

.panel-admin-btn {
  flex: 1;
  background: transparent;
  border: 1px solid #dcd9c9;
  color: #0e0e0c;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.88rem;
  padding: 0.42rem;
  cursor: pointer;
  font-style: italic;
  transition: background 0.1s;
}

.panel-admin-btn:hover { background: #ecead9; }

.panel-admin-btn.danger:hover {
  background: #f0d8d0;
  color: #9a2020;
  border-color: #d08080;
}

/* ---- Upload wizard inside cartouche ---- */

#uploadWizard { display: block; }
#uploadWizard.hidden { display: none; }

.wizard-instruction {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.92rem;
  color: #0e0e0c;
  font-style: italic;
  line-height: 1.45;
  margin: 0.35rem 0 0.15rem;
}

.wizard-hint {
  font-size: 0.76rem;
  color: #5a5851;
  font-style: italic;
  margin-bottom: 0.1rem;
}

/* Step 1 photo preview — compact height to fit cartouche */
.step-photo-preview {
  height: 80px !important;
}

/* Tighten step heading and actions inside cartouche */
.step-heading {
  font-size: 0.95rem !important;
  margin-bottom: 0.55rem !important;
}

.step-actions {
  margin-top: 0.65rem !important;
}

/* Date step tighter inside cartouche */
.date-modes {
  gap: 0.45rem !important;
}

/* ---- Panel resize handle ---- */

.panel-resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
  background: transparent;
  z-index: 10;
  transition: background 0.15s;
}

.panel-resize-handle:hover,
.panel-resize-handle.dragging {
  background: rgba(90,56,32,0.18);
}

/* ---- Responsive ---- */
@media (max-width: 719px) {
  .panel-resize-handle {
    display: none; /* bottom-sheet on mobile; no left-edge resize */
  }

  .collection-panel {
    width: 100%;
    height: 80dvh;
    top: auto;
    bottom: 0;
    transform: translateY(100%);
    border-left: none;
    border-top: 2px solid #0e0e0c;
    box-shadow: 0 -4px 28px rgba(14,14,12,0.35);
    outline: none;
  }

  .collection-panel.open { transform: translateY(0); }

  .collection-tab {
    top: auto;
    bottom: 0;
    right: 1rem;
    transform: none;
    writing-mode: horizontal-tb;
    border: 1px solid #0e0e0c;
    border-bottom: none;
    padding: 0.4rem 0.75rem;
  }

}

/* ---- STU-33 — two-pane curator (submission queue + detail) ---- */

.collection-panel.collection-panel--wide {
  width: min(96vw, 920px);
}

.cp-body.cp-body--curator {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0.45rem 0.55rem;
  overflow: hidden;
}

.curator-pane {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0.65rem;
  align-items: stretch;
  flex: 1;
  min-height: 520px;
}

.cp-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  outline: none;
}

.cp-list:focus-visible {
  outline: 2px solid var(--ps-ink);
  outline-offset: 2px;
}

.cp-list-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper-soft);
}

.cp-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  height: 56px;
  box-sizing: border-box;
  padding: 0 0.4rem;
  border-bottom: 1px solid #e5e1d4;
  cursor: pointer;
  transition:
    background-color var(--m-quick, 180ms) ease,
    border-color var(--m-quick, 180ms) ease,
    box-shadow var(--m-quick, 180ms) ease;
}

.cp-row:hover {
  background: rgba(14, 14, 12, 0.05);
}

.cp-row.is-focused {
  box-shadow: inset 3px 0 0 0 var(--ps-ink);
  background: rgba(14, 14, 12, 0.04);
}

.cp-row.is-selected {
  background: var(--ps-iron-soft, #ddd8cc);
}

.cp-row.is-focused.is-selected {
  box-shadow: inset 3px 0 0 0 var(--ps-ink);
  background: var(--ps-iron-soft, #ddd8cc);
}

.cp-row.is-processing {
  opacity: 0.65;
  filter: saturate(0.85);
}

.cp-row picture.cp-row-thumb {
  width: 56px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper-soft);
  display: block;
}

.cp-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.cp-row-meta {
  flex: 1;
  min-width: 0;
}

.cp-row-title {
  font-size: 0.82rem;
  color: var(--ps-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-row-sub {
  font-size: 0.72rem;
  color: #5a5851;
  font-style: italic;
}

.cp-detail {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--ps-rule);
  background: #fdf8ee;
}

.cp-detail-hd {
  flex-shrink: 0;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--ps-rule);
}

.cp-detail-title {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 400;
  margin: 0 0 0.25rem;
  color: var(--ps-ink);
}

.cp-detail-idline {
  margin: 0;
  font-size: 0.82rem;
  color: #5a5851;
}

.cp-detail-idline .mono {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.85rem;
}

.cp-detail-count {
  margin-left: 0.35rem;
}

.cp-detail-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cp-photo-wrap {
  flex-shrink: 0;
}

.curator-zoom-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  min-height: 220px;
  max-height: 42vh;
  background: #1a1a18;
  border: 1px solid var(--ps-rule);
}

.curator-zoom-stage.is-dragging {
  cursor: grabbing;
}

.curator-zoom-photo-host {
  position: relative;
  transform-origin: center center;
  will-change: transform;
}

.cp-zoom-img {
  display: block;
  vertical-align: middle;
}

.cp-zoom-resolution {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-family: ui-monospace, monospace;
  pointer-events: none;
}

.cp-mini-map {
  height: 140px;
  border: 1px solid var(--ps-rule);
  background: #cad8c6;
  z-index: 0;
}

.cp-meta-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cp-meta-row {
  display: grid;
  grid-template-columns: 5.25rem 1fr;
  gap: 0.5rem;
  font-size: 0.85rem;
  align-items: baseline;
  padding-bottom: 0.3rem;
  border-bottom: 1px dashed #dcd9c9;
}

.cp-meta-k {
  color: #5a5851;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

.cp-meta-v {
  color: var(--ps-ink);
  word-break: break-word;
}

.cp-email-hint {
  color: #5a5851;
  font-size: 0.88em;
}

.cp-detail-actions {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0.65rem;
  border-top: 1px solid var(--ps-rule);
  background: #e6e2cf;
}

/* ---- STU-34 — reject-reason templates card ---- */

.reject-card-root {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.reject-card-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 14, 12, 0.45);
}

.reject-card {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(92vh, 640px);
  overflow: auto;
  border: 1px solid var(--ps-ink);
  background: var(--ps-paper, #f6f3ec);
  box-shadow: 2px 5px 24px rgba(14, 14, 12, 0.28);
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.reject-card-hd {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  font-style: normal;
  margin: 0;
  color: var(--ps-ink);
  line-height: 1.35;
}

.reject-card-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

.reject-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.reject-template {
  appearance: none;
  font: inherit;
  font-size: 0.78rem;
  padding: 0.28rem 0.5rem;
  border-radius: 3px;
  border: 1px solid #8a8880;
  background: rgba(255, 255, 255, 0.35);
  color: var(--ps-ink);
  cursor: pointer;
  line-height: 1.25;
}

.reject-template:hover {
  border-color: var(--ps-ink);
}

.reject-template:focus-visible {
  outline: 2px solid var(--ps-ink);
  outline-offset: 2px;
}

.reject-template[aria-pressed='true'] {
  border-color: #6e5648;
  background: rgba(110, 86, 72, 0.18);
  box-shadow: inset 0 0 0 1px rgba(110, 86, 72, 0.25);
}

.reject-reason-label {
  display: block;
  margin: 0;
}

.reject-reason-text {
  width: 100%;
  box-sizing: border-box;
  min-height: 9rem;
  resize: vertical;
  font-size: 0.88rem;
  line-height: 1.45;
}

.reject-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  margin-top: 0.15rem;
}

.cp-kbd {
  display: inline-block;
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  padding: 0.05rem 0.32rem;
  border: 1px solid #8a8880;
  border-radius: 2px;
  margin-right: 0.2rem;
  vertical-align: baseline;
  background: rgba(255, 255, 255, 0.35);
}

.cp-edit-strip.hidden,
.cp-edit-strip[hidden] {
  display: none !important;
}

.cp-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.cp-edit-field.cp-edit-span2 {
  grid-column: span 2;
}

.cp-edit-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a5851;
  margin-bottom: 0.12rem;
}

.cp-edit-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
}

/* STU-18 — reduced transparency & forced-colors (curator chrome) */
@media (prefers-reduced-transparency: reduce) {
  .login-overlay {
    background: var(--ps-ink);
  }

  .collection-panel {
    box-shadow: none !important;
  }

  .panel-resize-handle:hover,
  .panel-resize-handle.dragging {
    background: var(--ps-rule);
  }
}

@media (forced-colors: active) {
  .login-overlay .login-card,
  .collection-panel {
    border: 2px solid ButtonText;
    outline: 2px solid ButtonText;
    outline-offset: -4px;
    box-shadow: none !important;
    background-color: Canvas !important;
    background-image: none !important;
  }

  .cp-toolbar {
    background-color: Canvas !important;
    border-bottom-color: ButtonText !important;
  }

  .cp-close-btn:focus-visible,
  .collection-tab:focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 2px;
  }
}
