/* Shared prototype chrome: proposal switcher, lightbox, field errors, icons.
   Template look lives in each template's own stylesheet. */

.dme-i { display: inline-block; flex: none; vertical-align: middle; }
.dme-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dme-field-error { margin: 2px 0 0; font-size: 14px; line-height: 1.4; color: var(--dme-error, #B3261E); }
.dme-field-error[hidden] { display: none; }
[aria-invalid="true"] { border-color: var(--dme-error, #B3261E) !important; box-shadow: inset 0 0 0 1px var(--dme-error, #B3261E); }

/* ---------- lightbox ---------- */
.dme-lightbox {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(6, 14, 14, 0.94);
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center;
  padding: 56px 16px 24px;
  animation: dmeFade 220ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
.dme-lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.dme-lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; display: block; }
.dme-lightbox figcaption { color: #D9D4C7; font: 500 14px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.dme-lightbox button {
  width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(0, 0, 0, 0.3); color: #fff; cursor: pointer; border-radius: 999px;
  transition: background-color 160ms ease;
}
.dme-lightbox button:hover { background: rgba(255, 255, 255, 0.14); }
.dme-lightbox button:focus-visible { outline: 2px solid #E2B65A; outline-offset: 2px; }
.dme-lightbox .dme-i { width: 24px; height: 24px; }
.dme-lb-close { position: absolute; top: 12px; right: 12px; }
@media (max-width: 640px) {
  .dme-lightbox { grid-template-columns: 1fr; padding: 64px 8px 88px; }
  .dme-lb-prev, .dme-lb-next { position: absolute; bottom: 20px; }
  .dme-lb-prev { left: calc(50% - 64px); }
  .dme-lb-next { right: calc(50% - 64px); }
}
@keyframes dmeFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- proposal switcher (presenter chrome, deliberately neutral) ---------- */
.dme-proto {
  position: fixed; left: 16px; bottom: 16px; z-index: 9000;
  font: 500 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif; color: #F4F3EE;
  display: flex; align-items: center; gap: 4px;
  background: rgba(31, 30, 29, 0.94); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px; padding: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.dme-proto a, .dme-proto button {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border-radius: 999px; border: 0; background: transparent; color: #CFCCC4; text-decoration: none;
  font: inherit; cursor: pointer; white-space: nowrap; transition: background-color 160ms ease, color 160ms ease;
}
.dme-proto a:hover, .dme-proto button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.dme-proto a[aria-current="page"] { background: #F4F3EE; color: #1F1E1D; }
.dme-proto a:focus-visible, .dme-proto button:focus-visible { outline: 2px solid #E2B65A; outline-offset: 1px; }
.dme-proto .dme-proto-home { color: #fff; font-weight: 600; }
.dme-proto .dme-proto-sep { width: 1px; height: 20px; background: rgba(255, 255, 255, 0.16); margin: 0 2px; }
.dme-proto .dme-proto-dot { width: 8px; height: 8px; border-radius: 99px; flex: none; }
.dme-proto[data-collapsed="true"] .dme-proto-list, .dme-proto[data-collapsed="true"] .dme-proto-sep { display: none; }
.dme-proto .dme-i { width: 16px; height: 16px; }
.dme-proto-full { display: inline; }
@media (max-width: 760px) {
  .dme-proto { left: 8px; bottom: 8px; }
  .dme-proto-full { display: none; }
  .dme-proto a, .dme-proto button { padding: 0 10px; }
}
@media print { .dme-proto { display: none; } }
@media (prefers-reduced-motion: reduce) { .dme-lightbox { animation: none; } }
a.dme-sr:focus { position: fixed !important; left: 12px; top: 12px; width: auto; height: auto; margin: 0; clip: auto; padding: 12px 18px; z-index: 10001; background: #fff; color: #111; font: 600 15px/1 system-ui, sans-serif; white-space: normal; }
.dme-proto[hidden] { display: none; }
