:root {
  color-scheme: dark;
  --charcoal: #0e0e0e;
  --charcoal-2: #151412;
  --charcoal-3: #1e1c18;
  --paper: #e8e0d0;
  --paper-muted: #bfb6a5;
  --amber: #c9a84c;
  --amber-soft: #d2bb73;
  --line: rgba(232, 224, 208, 0.14);
  --line-strong: rgba(201, 168, 76, 0.34);
  --shadow: rgba(0, 0, 0, 0.52);
  --serif: "Cormorant Garamond", "Amiri", "Frank Ruhl Libre", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Sans Hebrew", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(14, 14, 14, 0.86), rgba(14, 14, 14, 0.93)),
    url("assets/textures/grain.png"),
    var(--charcoal);
  background-size: auto, 260px 260px, auto;
  color: var(--paper);
  font-family: var(--sans);
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(201, 168, 76, 0.04), transparent 26%, transparent 74%, rgba(80, 76, 61, 0.06));
  mix-blend-mode: screen;
  opacity: 0.75;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.hidden,
.hebrew-option,
.hebrew-separator {
  display: none !important;
}

body.hebrew-enabled .hebrew-option,
body.hebrew-enabled .hebrew-separator {
  display: inline-flex !important;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(14, 14, 14, 0.86);
  backdrop-filter: blur(16px);
  transition: padding 240ms ease, gap 240ms ease;
}

.brand-symbol,
.brand-word,
.brand-flag {
  transition: height 240ms ease;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-width: max-content;
  color: var(--amber);
}

.brand-symbol {
  width: auto;
  height: 46px;
}

.brand-wordmark {
  display: inline-flex;
  gap: 14px;
  align-items: center;
}

.brand-word {
  display: block;
  width: auto;
  height: 22px;
}

/* The Arabic wordmark's glyphs fill more of their box, so render it
   a little shorter to read at the same visual size as the Latin one. */
.brand-word-ar {
  height: 16px;
}

/* Small Lebanese flag emblem sitting between the Latin and Arabic wordmarks. */
.brand-flag {
  display: block;
  width: auto;
  height: 24px;
  border-radius: 2px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2vw, 30px);
  color: var(--paper-muted);
  font-size: 0.92rem;
}

.main-nav a {
  border-bottom: 1px solid transparent;
  transition: color 260ms ease, border-color 260ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--paper);
  border-color: var(--amber);
  outline: 0;
}

.language-switcher {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--paper-muted);
  font-size: 0.82rem;
}

.language-switcher button,
.quiet-button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 4px 0;
}

.language-switcher button.active,
.language-switcher button:hover,
.quiet-button:hover {
  color: var(--amber);
}

main {
  position: relative;
  z-index: 1;
}

/* Honeypot: off-screen, never shown to humans, skipped by tab/AT. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-notice {
  width: min(1480px, calc(100% - 32px));
  margin: 18px auto 0;
  border: 1px solid var(--line-strong);
  background: rgba(201, 168, 76, 0.1);
  color: var(--paper);
  padding: 12px 14px;
}

.memorial-view {
  min-height: 100vh;
  padding: clamp(24px, 5vw, 64px) clamp(14px, 3.6vw, 44px) 72px;
}

.section-heading {
  width: min(1480px, 100%);
  margin: 0 auto 22px;
}

.archive-topline {
  width: 100%;
  margin: 0 0 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

.topline-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.grid-size {
  width: 130px;
  accent-color: var(--amber);
  cursor: pointer;
}

.counter,
.eyebrow {
  margin: 0 0 6px;
  color: var(--amber);
  font-size: clamp(0.84rem, 1vw, 0.96rem);
  font-weight: 600;
}

h1,
h2,
h3,
h4,
legend {
  margin: 0;
  font-family: var(--serif);
  color: var(--paper);
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.9rem, 3.2vw, 3.4rem);
  line-height: 1.16;
  max-width: none;
  white-space: pre-line;
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.filter-shell {
  width: 100%;
  margin: 0 0 22px;
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) 0fr;
  gap: 0;
  align-items: end;
  border: 1px solid var(--line);
  background: rgba(21, 20, 18, 0.74);
  transition: grid-template-columns 420ms ease, border-color 320ms ease;
}

.filter-shell:focus-within,
.filter-shell.expanded {
  grid-template-columns: minmax(220px, 0.85fr) 2fr;
  border-color: var(--line-strong);
}

.filter-shell label {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  color: var(--paper-muted);
  font-size: 0.78rem;
}

.filter-shell input,
.submission-form input,
.submission-form textarea,
.admin-login input,
.template-editor input,
.template-editor select,
.request-note,
.private-reason-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(14, 14, 14, 0.42);
  color: var(--paper);
  padding: 10px 2px;
  outline: 0;
}

.filter-shell input:focus,
.submission-form input:focus,
.submission-form textarea:focus,
.admin-login input:focus,
.template-editor input:focus,
.template-editor select:focus,
.request-note:focus,
.private-reason-input:focus {
  border-color: var(--amber);
}

.filter-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  min-width: 0;
  overflow: hidden;
  border-inline-start: 1px solid var(--line);
}

.memorial-grid {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(232, 224, 208, 0.08);
}

.face-card {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: var(--charcoal-2);
  color: var(--paper);
}

.face-card--enter {
  opacity: 0;
  transform: translateY(12px);
  animation: candleIn 900ms ease forwards;
}

.face-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.82) saturate(0.58) contrast(0.92) brightness(0.78);
  transition: filter 700ms ease, transform 900ms ease;
}

.face-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.72));
}

.face-card:hover img,
.face-card:focus-visible img {
  filter: grayscale(0.52) saturate(0.76) contrast(0.98) brightness(0.88);
  transform: scale(1.025);
}

.face-card:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}

.face-card--skeleton {
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(232, 224, 208, 0.04) 8%, rgba(201, 168, 76, 0.1) 18%, rgba(232, 224, 208, 0.04) 33%),
    var(--charcoal-2);
  background-size: 220% 100%;
  animation: skeletonSweep 1.6s ease-in-out infinite;
}

.face-caption {
  position: absolute;
  z-index: 1;
  inset-inline: 14px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  text-align: start;
}

.face-name {
  font-family: var(--serif);
  color: var(--amber);
  font-size: clamp(1.05rem, 1.8vw, 1.5rem);
  line-height: 1.1;
  text-shadow: 0 0 18px rgba(201, 168, 76, 0.2);
}

.face-age {
  color: var(--paper);
  font-size: 0.92rem;
  white-space: nowrap;
}

.no-results,
.grid-message {
  grid-column: 1 / -1;
  padding: 52px 20px;
  color: var(--paper-muted);
  text-align: center;
  background: var(--charcoal-2);
}

.grid-message {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.grid-message p {
  margin: 0;
}

.grid-message--error {
  border: 1px solid rgba(169, 91, 75, 0.5);
}

.submission-view,
.admin-view {
  min-height: 100vh;
  padding: 86px clamp(18px, 6vw, 80px);
  border-top: 1px solid var(--line);
}

.submission-form {
  width: min(960px, 100%);
  margin: 0 auto;
  padding-top: 10px;
}

.step-indicator {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 26px;
}

.step-dot {
  height: 3px;
  background: rgba(232, 224, 208, 0.16);
}

.step-dot.active {
  background: var(--amber);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: quietFade 520ms ease both;
}

.form-step legend {
  margin-bottom: 20px;
  font-size: clamp(1.4rem, 2.8vw, 2.4rem);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.submission-form label,
.admin-login label,
.template-editor label {
  display: grid;
  gap: 8px;
  color: var(--paper-muted);
  font-size: 0.88rem;
}

.full-width {
  grid-column: 1 / -1;
}

.form-note,
.confirmation-copy,
.admin-note,
.submitted-by {
  color: var(--paper-muted);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
  align-items: center;
  flex-wrap: wrap;
}

.form-status {
  flex: 1 1 260px;
  margin: 0;
  color: var(--paper-muted);
  text-align: start;
}

.form-status.is-error {
  color: #dca08f;
}

.gold-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 10px 18px;
  transition: background 240ms ease, color 240ms ease, border-color 240ms ease;
}

.gold-button {
  background: var(--amber);
  color: #16130b;
}

.ghost-button {
  background: transparent;
  color: var(--paper);
}

.gold-button:hover,
.ghost-button:hover {
  border-color: var(--amber-soft);
  background: var(--amber-soft);
  color: #16130b;
}

.gold-button:disabled,
.ghost-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.danger-button {
  border-color: rgba(169, 91, 75, 0.55);
  color: #dca08f;
}

.danger-button:hover {
  background: rgba(169, 91, 75, 0.16);
}

.testimonials-admin {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.testimonials-admin h4 {
  margin: 0;
}

.testimonial-rows {
  display: grid;
  gap: 10px;
}

.testimonial-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(232, 224, 208, 0.03);
}

.testimonial-row-body {
  margin: 0 0 4px;
  color: var(--paper);
}

.testimonial-row .t-delete {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 12px;
}

.admin-view {
  background: rgba(232, 224, 208, 0.035);
}

.admin-login,
.admin-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.admin-login {
  display: grid;
  gap: 18px;
  max-width: 520px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 26px;
  align-items: start;
}

.admin-tabs {
  display: grid;
  border: 1px solid var(--line);
  background: #151515;
}

.admin-tabs button {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--paper-muted);
  padding: 14px;
  text-align: start;
}

.admin-tabs button.active {
  color: var(--amber);
  background: rgba(201, 168, 76, 0.08);
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: grid;
  gap: 18px;
}

.review-card,
.published-row,
.template-editor {
  border: 1px solid var(--line);
  background: rgba(14, 14, 14, 0.58);
  padding: 16px;
}

.review-card summary {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  cursor: pointer;
}

.review-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  filter: grayscale(0.85);
}

.review-card h4,
.published-row h4 {
  color: var(--amber);
}

.proof-count,
.review-meta,
.private-reason,
.audit-log {
  color: var(--paper-muted);
  font-size: 0.9rem;
}

.review-detail {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.review-detail label {
  display: grid;
  gap: 6px;
  color: var(--paper-muted);
  font-size: 0.88rem;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.decline-button {
  border-color: rgba(169, 91, 75, 0.5);
}

.toggle-row {
  display: flex !important;
  flex-direction: row;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.toggle-row input {
  width: 46px;
  height: 24px;
  accent-color: var(--amber);
}

.template-editor {
  display: grid;
  gap: 16px;
  max-width: 560px;
}

.published-editor {
  display: grid;
  gap: 12px;
}

.published-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
}

.published-row img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  filter: grayscale(0.75);
}

.profile-dialog {
  width: min(1160px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 1px solid var(--line-strong);
  padding: 0;
  background: var(--charcoal);
  color: var(--paper);
  box-shadow: 0 34px 80px var(--shadow);
}

/* Smooth entrance when a face card opens the profile (showModal adds [open]). */
.profile-dialog[open] {
  animation: dialogIn 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.profile-dialog::backdrop {
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(8px);
}

.profile-dialog[open]::backdrop {
  animation: backdropIn 320ms ease;
}

@keyframes dialogIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes backdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.profile-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.3fr);
  min-height: min(760px, calc(100vh - 34px));
}

.close-button,
.icon-button {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(14, 14, 14, 0.65);
  color: var(--paper);
}

.close-button {
  position: absolute;
  z-index: 3;
  inset-block-start: 14px;
  inset-inline-end: 14px;
  width: 42px;
  height: 42px;
  font-size: 1.6rem;
}

.profile-portrait-wrap {
  display: grid;
  place-items: start center;
  min-height: 100%;
  padding: clamp(18px, 3vw, 42px);
  border-inline-end: 1px solid var(--line);
  background: #090909;
}

.profile-portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(201, 168, 76, 0.26);
  filter: grayscale(0.75) saturate(0.62) brightness(0.78);
}

.profile-content {
  display: grid;
  gap: 24px;
  align-content: start;
  padding: clamp(26px, 4vw, 48px);
  overflow: auto;
}

.profile-title-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.profile-name {
  color: var(--amber);
}

.profile-transliteration {
  margin: 0 0 6px;
  color: var(--paper-muted);
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.profile-meta div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.profile-meta dt {
  color: var(--paper-muted);
  font-size: 0.78rem;
}

.profile-meta dd {
  margin: 2px 0 0;
  color: var(--paper);
}

.profile-story {
  color: var(--paper);
  font-size: 1.04rem;
}

.testimonial {
  margin: 0 0 14px;
  border-inline-start: 3px solid var(--amber);
  padding-inline-start: 16px;
  color: var(--paper);
  font-family: var(--serif);
  font-style: italic;
}

.testimonial-text {
  margin: 0;
}

.testimonial-by {
  display: block;
  margin-top: 6px;
  color: var(--paper-muted);
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.82rem;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photo-gallery img {
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(0.78) saturate(0.58);
}

.share-sheet {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

[dir="rtl"] .main-nav,
[dir="rtl"] .language-switcher {
  direction: ltr;
}

[dir="rtl"] .face-caption,
[dir="rtl"] .admin-tabs button {
  text-align: right;
}

@keyframes candleIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes quietFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes skeletonSweep {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@media (min-width: 700px) {
  .memorial-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .memorial-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1500px) {
  .memorial-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1900px) {
  .memorial-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

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

@media (max-width: 880px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 0;
  }

  /* Lift the language switcher up beside the brand so the mobile header is two
     rows (brand + switcher, then nav), and a single slim row once condensed. */
  .language-switcher {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    gap: 6px;
    font-size: 0.78rem;
  }

  /* Collapse the header into a slim bar once the visitor scrolls, freeing the
     screen for the faces. The class is toggled from script.js on scroll. */
  .site-header.is-condensed {
    padding-top: 7px;
    padding-bottom: 7px;
    gap: 8px;
  }

  .site-header.is-condensed .main-nav {
    display: none;
  }

  .site-header.is-condensed .brand-symbol {
    height: 30px;
  }

  .site-header.is-condensed .brand-word {
    height: 15px;
  }

  .site-header.is-condensed .brand-word-ar {
    height: 12px;
  }

  .site-header.is-condensed .brand-flag {
    height: 16px;
  }

  .filter-shell,
  .filter-shell:focus-within,
  .filter-shell.expanded {
    grid-template-columns: 1fr;
  }

  /* Keep the filter compact: only Search shows until the shell is tapped open,
     and the extra fields sit in a tidy two-column grid. */
  .filter-shell label {
    padding: 9px 11px;
    font-size: 0.72rem;
  }

  .filter-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-inline-start: 0;
    border-top: 1px solid var(--line);
    display: none;
  }

  .filter-shell.expanded .filter-fields,
  .filter-shell:focus-within .filter-fields {
    display: grid;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-portrait-wrap {
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
  }

  .profile-portrait {
    max-height: 46vh;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

@media (max-width: 600px) {
  .brand-wordmark {
    gap: 10px;
  }

  .brand-word {
    height: 17px;
  }

  .brand-word-ar {
    height: 13px;
  }

  .brand-flag {
    height: 20px;
  }

  .brand-symbol {
    width: auto;
    height: 38px;
  }

  h1 {
    font-size: 1.75rem;
  }

  .archive-topline {
    align-items: start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
  }

  .form-grid,
  .profile-meta,
  .photo-gallery,
  .published-row,
  .review-card summary {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .face-caption {
    inset-inline: 10px;
    bottom: 10px;
    flex-direction: column;
    align-items: start;
    gap: 4px;
  }
}

#ember-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

/* Discreet, almost-invisible admin entry point in the top corner. */
.admin-gateway {
  position: fixed;
  top: 4px;
  left: 5px;
  z-index: 40;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--amber);
  opacity: 0.05;
  transition: opacity 320ms ease;
}

.admin-gateway:hover,
.admin-gateway:focus-visible {
  opacity: 0.5;
  outline: none;
}

/* Sneaky visit tally, top-right corner (sibling to the admin gateway). */
.visit-meter {
  position: fixed;
  top: 7px;
  right: 10px;
  z-index: 40;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.09em;
  font-variant-numeric: tabular-nums;
  color: var(--paper-muted);
  opacity: 0.2;
  user-select: none;
  transition: opacity 320ms ease;
}

.visit-meter:hover {
  opacity: 0.6;
}

.crop-dialog {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line-strong);
  background: var(--charcoal);
  color: var(--paper);
  padding: 18px;
}

.crop-dialog::backdrop {
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(6px);
}

.crop-stage {
  width: 360px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #090909;
  touch-action: none;
}

.crop-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.crop-canvas:active {
  cursor: grabbing;
}

.crop-zoom {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  color: var(--paper-muted);
  font-size: 0.85rem;
}

.crop-zoom-input {
  width: 100%;
  accent-color: var(--amber);
}

.crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.admin-form {
  display: grid;
  gap: 16px;
  max-width: 880px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--paper-muted);
  font-size: 0.88rem;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 14, 14, 0.42);
  color: var(--paper);
  padding: 10px 2px;
  outline: 0;
}

.admin-form input:focus,
.admin-form textarea:focus {
  border-color: var(--amber);
}
