/* ---- Design tokens (lifted from the explorer app) ---- */
:root {
  --bg-deep: #070d16;
  --left-sidebar: #08101a;
  --right-sidebar: whitesmoke;
  --border: #172030;
  --accent-orig: #2dd4b4;
  --accent: #549c8e;
  --accent-dim: rgba(45, 212, 180, 0.15);
  --text-primary: #e4edf5;
  --text-secondary: #7a8fa3;
  --text-muted: #3d5060;

  /* Right "console" rail: a lifted ink surface + a warm brass counter-accent
     borrowed from the cream artifact, so the dark editor reads as the survey
     instrument framing the document rather than generic chrome. */
  --panel: #0c1623;
  --panel-input: rgba(255, 255, 255, 0.04);
  --brass: #c9a25f;
  --mono: ui-monospace, 'SF Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Published-page palette (cream) */
  --page-bg: #f0ebe0;
  --page-ink: #1c1814;
  --page-body: #3d3530;
  --page-muted: #8a7f72;
  --page-faint: #a09080;
  --page-rule: #d8d0c4;
  --img-bg: #e0d9cc;
  --img-border: #c0b0a0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.cms {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---- Left: list ---- */
.cms__list {
  flex: 0 0 20vw;
  min-width: 220px;
  background: var(--left-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.cms__list-head { padding: 18px 16px 12px; border-bottom: 1px solid var(--border); }
.cms__list-head h1 {
  font-size: 16px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-secondary); margin: 0 0 8px;
}
/* Search box mirrors the right-panel field controls (see .ed__control input). */
#site-search {
  width: 100%; padding: 11px 12px; border-radius: 8px;
  background: var(--panel-input); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 14px; font-family: inherit;
  transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
}
#site-search:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: rgba(45, 212, 180, 0.04);
}
#site-search::placeholder { color: var(--text-muted); }
/* Room for the custom clear button; hide the browser's native one (it can't be
   themed and is absent in Firefox anyway). */
.cms__search { position: relative; }
.cms__search #site-search { padding-right: 36px; }
#site-search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.cms__search-clear {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 22px; height: 22px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.08); color: var(--text-secondary);
  font-size: 16px; line-height: 1;
  transition: background 0.12s, color 0.12s;
}
.cms__search-clear:hover { background: rgba(255, 255, 255, 0.16); color: var(--text-primary); }
.cms__count { font-size: 10px; letter-spacing: 0.1em; color: var(--text-muted); margin: 0 2px 10px; }

.cms__sites { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.site-item {
  padding: 10px 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid transparent; transition: background 0.15s, border-color 0.15s;
}
.site-item:hover { background: rgba(45, 212, 180, 0.06); }
.site-item.is-active { background: var(--accent-dim); border-color: rgba(45, 212, 180, 0.4); }
.site-item__name { font-size: 13px; color: var(--text-primary); }
.site-item__meta { font-size: 11px; color: var(--text-secondary); margin-top: 3px; }
/* Published shipwrecks: dark slate row (keeps text legible on the darker bg). */
.site-item.is-published { background-color: #25333f; }
.site-item.is-published:hover { background-color: #2c3d4b; }
.site-item.is-published .site-item__name { color: #eaf1f4; }
.site-item.is-published .site-item__meta { color: #9fb3bf; }
.site-item.is-published.is-active { background-color: #25333f; border-color: rgba(45, 212, 180, 0.55); }
/* In-review shipwrecks: warm brown row. */
.site-item.is-review { background-color: #54421d; }
.site-item.is-review:hover { background-color: #634e24; }
.site-item.is-review .site-item__name { color: #f5ecdd; }
.site-item.is-review .site-item__meta { color: #c2ac86; }
.site-item.is-review.is-active { background-color: #54421d; border-color: rgba(45, 212, 180, 0.55); }

/* "Add Shipwreck" button (list header) */
.cms__add { width: 100%; margin: 0 0 12px; }

/* List footer: pinned beneath the scrolling vessel list (ul is flex:1). */
.cms__foot {
  flex: 0 0 auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 16px 16px; border-top: 1px solid var(--border);
}
.cms__user { font-size: 11px; color: var(--text-secondary); }
.cms__user strong { color: var(--text-primary); font-weight: 600; }
.cms__foot form { margin: 0; }
.cms__logout {
  width: 100%; padding: 9px 12px; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 500;
  background: transparent; border: 1px solid var(--border); color: var(--text-secondary);
  transition: color 0.14s, border-color 0.14s, background 0.14s;
}
.cms__logout:hover { color: var(--text-primary); border-color: var(--text-secondary); background: rgba(255, 255, 255, 0.04); }

/* Per-row delete "×": revealed on hover/focus, top-right. */
.site-item { position: relative; }
.site-item__name { padding-right: 20px; }
.site-item__del {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 20px; height: 20px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); color: var(--text-secondary);
  font-size: 15px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity 0.12s, background 0.12s, color 0.12s;
}
.site-item:hover .site-item__del,
.site-item__del:focus { opacity: 1; }
.site-item__del:hover { background: #b5462f; color: #fff; }

/* ---- Publish / status bar (top of the right edit panel) ---- */
.statusbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.statusbar--empty { padding: 0; border-bottom: none; }
.statusbar__label {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-secondary);
}
.statusbar__seg { display: inline-flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.statusbar__btn {
  appearance: none; border: none; border-right: 1px solid var(--border); cursor: pointer; border-radius: 4px;
  padding: 6px 12px; font-size: 12px; font-family: inherit; line-height: 1;
  background: transparent; color: var(--text-secondary);
  transition: background 0.12s, color 0.12s;
}
.statusbar__btn:last-child { border-right: none; }
.statusbar__btn:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.statusbar__btn.is-on { color: #fff; }
.statusbar__btn--draft.is-on { background: rgba(255, 255, 255, 0.16); }
.statusbar__btn--review.is-on { background: #c9952f; color: #1f1505; }
.statusbar__btn--pub.is-on { background: var(--accent); color: #08130f; }
.statusbar__since { font-size: 10px; color: var(--text-secondary); margin-left: auto; }

/* ---- Snapshots / history (foot of the right panel) ---- */
[x-cloak] { display: none !important; }

.snaps {
  /* Pinned to the bottom third of the panel; scrolls internally if the
     snapshot list grows. */
  flex: 0 0 33.333%;
  min-height: 0;
  overflow-y: auto;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.snaps__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.snaps__title {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-secondary); margin: 0;
}
.snaps__create { display: flex; gap: 8px; margin-bottom: 14px; }
.snaps__input {
  flex: 1; min-width: 0; padding: 7px 10px; border-radius: 6px;
  background: var(--panel-input); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 12px; font-family: inherit;
}
.snaps__input::placeholder { color: var(--text-muted); }
.snaps__create .btn { white-space: nowrap; }

.snaps__list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.snap { display: flex; align-items: stretch; gap: 8px; }
.snap__check { margin-top: 12px; flex: 0 0 auto; accent-color: var(--accent); cursor: pointer; }
.snap__main {
  flex: 1; min-width: 0; text-align: left; cursor: pointer;
  padding: 8px 10px; border-radius: 6px;
  background: var(--panel-input); border: 1px solid var(--border);
  color: var(--text-primary); font-family: inherit;
  transition: background 0.12s, border-color 0.12s;
}
.snap__main:hover { background: rgba(45, 212, 180, 0.08); border-color: rgba(45, 212, 180, 0.4); }
.snap__label { display: block; font-size: 12px; color: var(--text-primary); }
.snap__meta { display: block; font-size: 10px; color: var(--text-secondary); margin-top: 3px; }
.snaps__remove { width: 100%; }
.snaps__empty { font-size: 12px; font-style: italic; color: var(--text-secondary); margin: 4px 0 0; }

/* ---- Modal (rollback confirmation) ---- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4, 8, 14, 0.66); }
.modal__card {
  position: relative; z-index: 1; width: min(420px, calc(100vw - 40px));
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 22px 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.modal__title { margin: 0 0 10px; font-size: 16px; color: var(--text-primary); }
.modal__text { margin: 0 0 18px; font-size: 13px; line-height: 1.55; color: var(--text-secondary); }
.modal__text strong { color: var(--text-primary); }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---- Center: stage (cream page) ---- */
.cms__stage {
  flex: 1 1 60vw;
  min-width: 0;
  overflow-y: auto;
  background: var(--page-bg);
  color: var(--page-ink);
  padding-top: 24px;
}
.cms__empty {
  height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--page-faint); font-style: italic;
}

.page { max-width: 920px; margin: 0 auto; padding: 0 0 60px; }

/* Editable / read-only field affordances */
.f { position: relative; cursor: pointer; border-radius: 4px; transition: box-shadow 0.12s, background 0.12s; }
.f:hover { box-shadow: 0 0 0 2px rgba(45, 212, 180, 0.55); }
.f.is-selected { box-shadow: 0 0 0 2px var(--accent); background: rgba(45, 212, 180, 0.08); }
.f--empty { color: var(--page-faint); font-style: italic; }

/* Hero + images */
.page__hero { aspect-ratio: 21 / 9; }
.imgslot {
  position: relative;
  background: var(--img-bg); border: 1px dashed var(--img-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--page-faint); font-size: 12px; letter-spacing: 0.06em;
  overflow: hidden;
  height: 100%;
}
.imgslot-sm {
  position: relative;
  background: var(--img-bg); border: 1px dashed var(--img-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--page-faint); font-size: 12px; letter-spacing: 0.06em;
  overflow: hidden;
  height: 50%;
}

.imgslot img, .imgslot-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Remove-image control: corner "×" revealed on hover/focus over a filled slot. */
.imgslot__remove {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 24px; height: 24px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(20, 18, 16, 0.6); color: #fff;
  font-size: 17px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity 0.12s ease, background 0.12s ease;
}
.imgslot:hover .imgslot__remove,
.imgslot-sm:hover .imgslot__remove,
.imgslot__remove:focus { opacity: 1; }
.imgslot__remove:hover { background: rgba(20, 18, 16, 0.88); }

.page__title-wrap { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 24px 24px 18px; border-bottom: 1px solid var(--page-rule); }
.page__title { font-family: Georgia, 'Times New Roman', serif; font-size: 38px; line-height: 1.05; letter-spacing: -0.02em; margin: 0; padding: 8px; color: var(--page-ink); }
.page__stats { display: flex; gap: 26px; flex-shrink: 0; }
.stat { text-align: left; padding: 8px; }
.stat__label { display: block; font-size: 9px; letter-spacing: 0.14em; color: var(--page-muted); }
.stat__value { display: block; font-family: Georgia, serif; font-size: 22px; color: var(--page-ink); margin-top: 4px; }

.page__layout { display: grid; grid-template-columns: 1fr 230px; gap: 40px; padding: 24px 24px 0; }
.page__body { font-family: Georgia, 'Times New Roman', serif; color: var(--page-body); }
.lead { font-size: 18px; line-height: 1.55; color: var(--page-ink); margin: 0 0 18px; padding: 8px; }
.bodytext { font-size: 15px; line-height: 1.65; margin: 0 0 14px; padding: 8px;}
.divider { border: none; border-top: 1px solid var(--page-rule); margin: 20px 0; }
.pullquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; margin: 18px 8px; font-size: 19px; font-style: italic; color: #3a3028; border-radius: 0; }
.pullquote cite { display: block; font-size: 12px; font-style: normal; letter-spacing: 0.08em; color: var(--page-muted); margin-top: 10px; }
.bodynote { font-size: 12px; font-style: italic; color: var(--page-faint); margin: 16px 0; padding: 8px; }

.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin: 22px 0 36px; }
.gallery .imgslot:first-child { aspect-ratio: 4 / 3; }
.gallery .imgslot { aspect-ratio: 4 / 3; }

.sidebar { font-family: 'Inter', sans-serif; }
.side-sec { margin-bottom: 22px; }
.side-sec__title { font-size: 10px; letter-spacing: 0.16em; color: var(--accent); margin: 0 0 10px; }
/* Stacked rows: small uppercase label, value beneath (see concept mock). */
.side-row { display: block; padding: 8px; border-bottom: 1px solid var(--page-rule); }
.side-row__label { display: block; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--page-muted); margin-bottom: 4px; }
.side-row__value { display: block; font-size: 14px; color: #2a241e; }

/* ---- Right: edit console ---- */
/* A dark instrument rail (not the old whitesmoke). Together with the left list
   it frames the cream stage as "the document under glass". */
.cms__edit {
  flex: 0 0 22vw;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(45, 212, 180, 0.05), transparent 120px),
    var(--panel);
  border-left: 1px solid var(--border);
  padding: 2px 20px 28px;
  /* Flex column so the snapshots section can pin to the bottom third while the
     status bar + editor fill (and scroll within) the top two thirds. */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.statusbar { flex: 0 0 auto; }
#edit-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.cms__edit-empty {
  color: var(--text-secondary); font-size: 13px; line-height: 1.6;
  font-style: italic; margin-top: 4px;
}

/*
{ animation: ed-in 0.18s ease both; }
@keyframes ed-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ed { animation: none; } }
*/

/* Header: brass catalogue eyebrow + serif title — each field reads like a
   catalogued specimen, echoing the page's serif. */
.ed__head { margin: 0 0 18px; }
.ed__tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--brass);
}
.ed__tag::before { content: ""; width: 16px; height: 1px; background: var(--brass); opacity: 0.8; }
.ed__title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 23px; line-height: 1.15; font-weight: 500;
  color: var(--text-primary); margin: 8px 0 0; letter-spacing: -0.01em;
}
.ed__hint { font-size: 12px; line-height: 1.5; color: var(--text-secondary); margin: 8px 0 0; }

/* Controls */
.ed__control { margin-top: 16px; }
.ed__control input[type="text"],
.ed__control input[type="number"],
.ed__control textarea,
.ed__select select {
  width: 100%; padding: 11px 12px; border-radius: 8px;
  background: var(--panel-input); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 14px; font-family: inherit;
  transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
}
.ed__control input:focus,
.ed__control textarea:focus,
.ed__select select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: rgba(45, 212, 180, 0.04);
}
.ed__control input::placeholder,
.ed__control textarea::placeholder { color: var(--text-muted); }
.ed__control textarea { min-height: 180px; resize: vertical; line-height: 1.6; }

/* Coordinates — a paired survey readout with °N / °W units. */
.ed__coords { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ed__sublabel {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-secondary); margin: 0 0 5px;
}
.ed__sublabel span { color: var(--brass); letter-spacing: 0.08em; }

/* Native select with a custom chevron. */
.ed__select { position: relative; }
.ed__select select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; }
.ed__select::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px;
  border-right: 1.5px solid var(--text-secondary); border-bottom: 1.5px solid var(--text-secondary);
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
}

/* File picker styled as a button (hides the raw input). */
.ed__upload { display: flex; gap: 8px; align-items: stretch; margin: 4px 0 18px; }
.ed__file {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  background: var(--panel-input); border: 1px dashed var(--border);
  color: var(--text-secondary); font-size: 13px; transition: border-color 0.14s, color 0.14s;
}
.ed__file:hover { border-color: var(--accent); color: var(--text-primary); }
.ed__file input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.ed__actions { display: flex; gap: 8px; margin-top: 18px; }
.btn {
  padding: 10px 18px; border-radius: 8px; font-size: 13px; cursor: pointer;
  border: 1px solid transparent; font-family: inherit; font-weight: 500;
  transition: filter 0.14s, color 0.14s, border-color 0.14s, background 0.14s;
}
.btn--save { background: var(--accent); color: #04120f; font-weight: 600; }
.btn--save:hover { filter: brightness(1.08); }
.btn--save:disabled { opacity: 0.5; cursor: default; }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text-secondary); }
.btn--ghost:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.btn--danger { background: #b5462f; color: #fff; font-weight: 600; }
.btn--danger:hover { filter: brightness(1.08); }

.ed__status { font-size: 12px; margin-top: 14px; min-height: 16px; }
.ed__status.is-ok { color: var(--accent); }
.ed__status.is-err { color: #f08a8a; }

/* ---- Stage scrollbar (cream track, dark thumb) ---- */
.cms__stage { scrollbar-width: thin; scrollbar-color: #1b1b1d #d7cfc0; }
.cms__stage::-webkit-scrollbar { width: 12px; }
.cms__stage::-webkit-scrollbar-track { background: #d7cfc0; }
.cms__stage::-webkit-scrollbar-thumb { background: #1b1b1d; border-radius: 6px; border: 3px solid #d7cfc0; }

/* ---- Media library picker (lives in the dark console) ---- */
.medlib { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.medlib__item { display: block; padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; background: rgba(255, 255, 255, 0.03); text-align: left; font: inherit; transition: border-color 0.14s; }
.medlib__item:hover { border-color: var(--accent); }
.medlib__item.is-current { outline: 2px solid var(--accent); outline-offset: -2px; }
.medlib__item img { width: 100%; height: 76px; object-fit: cover; display: block; }
.medlib__name { display: block; font-size: 10px; color: var(--text-secondary); padding: 5px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.medlib__empty { grid-column: 1 / -1; color: var(--text-muted); font-size: 12px; font-style: italic; }

/* ---- Related section (cream stage, concept-002) ---- */
.related { padding: 4px 24px 56px; }
.related__title {
  font-family: Georgia, 'Times New Roman', serif; font-style: italic;
  font-size: 30px; color: var(--page-ink); margin: 28px 0 20px;
}
.related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.related__item { display: block; text-align: left; background: none; border: none; padding: 8px; font: inherit; cursor: pointer; color: inherit; }
.related__img {
  aspect-ratio: 1 / 1; background: var(--img-bg); border: 1px solid var(--img-border);
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.related__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Empty slot: the wireframe "X" from the concept. */
.related__img.is-empty {
  background-image:
    linear-gradient(to top right, transparent calc(50% - 0.5px), var(--img-border) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(to bottom right, transparent calc(50% - 0.5px), var(--img-border) 50%, transparent calc(50% + 0.5px));
}
.related__plus { font-size: 34px; font-weight: 300; color: var(--page-faint); line-height: 1; }
.related__name { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14px; color: var(--page-ink); margin: 14px 0 6px; }
.related__name--add { font-weight: 500; font-style: italic; color: var(--page-muted); }
.related__link { font-family: 'Inter', sans-serif; font-size: 12px; color: var(--page-muted); }

/* ---- Login (the gate to the archive) ----------------------------------------
   Same survey-instrument identity as the editor: deep ink ground, a teal glow
   off the top edge, a brass catalogue eyebrow over a serif title. The sign-in
   card reads as a single instrument panel; the form fields reuse the editor's
   field treatment so logging in already feels like the console behind it. */
.login {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(45, 212, 180, 0.10), transparent 60%),
    var(--bg-deep);
}
.login__card {
  width: min(400px, 100%);
  background:
    linear-gradient(180deg, rgba(45, 212, 180, 0.05), transparent 120px),
    var(--panel);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 36px 34px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.login__tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--brass);
}
.login__tag::before { content: ""; width: 18px; height: 1px; background: var(--brass); opacity: 0.8; }
.login__title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 30px; line-height: 1.1; font-weight: 500; letter-spacing: -0.01em;
  color: var(--text-primary); margin: 12px 0 0;
}
.login__hint { font-size: 13px; line-height: 1.55; color: var(--text-secondary); margin: 8px 0 26px; }

.login__field { margin-bottom: 16px; }
.login__label {
  display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-secondary); margin: 0 0 6px;
}
.login__field input {
  width: 100%; padding: 11px 12px; border-radius: 8px;
  background: var(--panel-input); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 14px; font-family: inherit;
  transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
}
.login__field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim); background: rgba(45, 212, 180, 0.04);
}
.login__field input::placeholder { color: var(--text-muted); }

.login__submit { width: 100%; margin-top: 6px; padding: 12px 18px; }

.login__error {
  display: flex; gap: 8px; margin: 0 0 22px; padding: 11px 13px;
  border-radius: 8px; font-size: 12.5px; line-height: 1.5;
  background: rgba(240, 138, 138, 0.08); border: 1px solid rgba(240, 138, 138, 0.35);
  color: #f0a8a8;
}

/* Survey stamp: a faint mono coordinate readout, echoing the editor's °N/°W
   coordinate fields, sealing the card like a logged dive site. */
.login__stamp {
  margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-muted);
  display: flex; justify-content: center; gap: 12px;
}
