:root {
  color-scheme: light;
  --paper: #f4f1e9;
  --paper-deep: #e8e1d3;
  --surface: #fcfaf5;
  --surface-raised: #ffffff;
  --ink: #17211c;
  --muted: #667169;
  --line: #d8d4c9;
  --forest: #204d3d;
  --forest-deep: #13382c;
  --mint: #d6e8df;
  --coral: #e06f51;
  --gold: #dba94a;
  --danger: #a83d36;
  --focus: #007f75;
  --shadow: 0 18px 55px rgba(23, 33, 28, 0.1);
  --radius: 18px;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: Iowan Old Style, Baskerville, 'Times New Roman', serif;
}

:where([hidden]) {
  display: none !important;
}

[data-theme='dark'] {
  color-scheme: dark;
  --paper: #101713;
  --paper-deep: #18221d;
  --surface: #17211c;
  --surface-raised: #1e2a24;
  --ink: #eef2ed;
  --muted: #a6b1aa;
  --line: #344139;
  --forest: #78b89d;
  --forest-deep: #9fd1ba;
  --mint: #243f33;
  --coral: #f18a6f;
  --gold: #e9bd63;
  --danger: #ef8178;
  --focus: #7fd7ce;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  [data-theme='system'] {
    color-scheme: dark;
    --paper: #101713;
    --paper-deep: #18221d;
    --surface: #17211c;
    --surface-raised: #1e2a24;
    --ink: #eef2ed;
    --muted: #a6b1aa;
    --line: #344139;
    --forest: #78b89d;
    --forest-deep: #9fd1ba;
    --mint: #243f33;
    --coral: #f18a6f;
    --gold: #e9bd63;
    --danger: #ef8178;
    --focus: #7fd7ce;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  }
}

/* Preset palettes keep the same layout and honor the selected light/dark mode. */
[data-color-theme='midnight'][data-theme='light'],
[data-color-theme='midnight'][data-theme='system'] {
  --paper: #eef0f7;
  --paper-deep: #dfe3f0;
  --surface: #f9faff;
  --surface-raised: #ffffff;
  --ink: #171b29;
  --muted: #626b7e;
  --line: #cdd3e2;
  --forest: #3f518e;
  --forest-deep: #29396f;
  --mint: #dce3ff;
  --coral: #b45f53;
  --focus: #274ac7;
}
[data-color-theme='warm-archive'][data-theme='light'],
[data-color-theme='warm-archive'][data-theme='system'] {
  --paper: #f2e9da;
  --paper-deep: #e6d6bf;
  --surface: #fbf5eb;
  --surface-raised: #fffaf2;
  --ink: #2b211b;
  --muted: #756458;
  --line: #d8c6af;
  --forest: #764c32;
  --forest-deep: #583522;
  --mint: #ead4b6;
  --coral: #b95e45;
  --focus: #8b491c;
}
[data-color-theme='soft-blue'][data-theme='light'],
[data-color-theme='soft-blue'][data-theme='system'] {
  --paper: #edf5f6;
  --paper-deep: #dcebee;
  --surface: #f8fcfc;
  --surface-raised: #ffffff;
  --ink: #18262b;
  --muted: #62747a;
  --line: #cadbdd;
  --forest: #34677a;
  --forest-deep: #244e5e;
  --mint: #cee8ed;
  --coral: #c46b57;
  --focus: #006d87;
}
[data-color-theme='slate'][data-theme='light'],
[data-color-theme='slate'][data-theme='system'] {
  --paper: #edf0f1;
  --paper-deep: #dde2e4;
  --surface: #f8f9f9;
  --surface-raised: #ffffff;
  --ink: #1e2529;
  --muted: #657078;
  --line: #cbd2d5;
  --forest: #4b5d67;
  --forest-deep: #34454e;
  --mint: #d9e0e3;
  --coral: #a75b50;
  --focus: #285e78;
}
[data-color-theme='high-contrast'][data-theme='light'],
[data-color-theme='high-contrast'][data-theme='system'] {
  --paper: #ffffff;
  --paper-deep: #ecefec;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --ink: #080b09;
  --muted: #3d4540;
  --line: #17211c;
  --forest: #005f4f;
  --forest-deep: #003d33;
  --mint: #c8eee4;
  --coral: #a63c28;
  --danger: #981f18;
  --focus: #005fcc;
  --shadow: 0 0 0 1px #17211c;
}

[data-color-theme='midnight'][data-theme='dark'] {
  --paper: #10131f;
  --paper-deep: #151a29;
  --surface: #181e2e;
  --surface-raised: #20283b;
  --ink: #f2f4fb;
  --muted: #adb6c9;
  --line: #38415a;
  --forest: #aab8ff;
  --forest-deep: #cbd3ff;
  --mint: #27304d;
  --coral: #ee8b79;
  --focus: #afc7ff;
}
[data-color-theme='warm-archive'][data-theme='dark'] {
  --paper: #1c1713;
  --paper-deep: #271e18;
  --surface: #292019;
  --surface-raised: #33271e;
  --ink: #f4eadc;
  --muted: #c2b19f;
  --line: #514235;
  --forest: #d9ad72;
  --forest-deep: #efd2a2;
  --mint: #493523;
  --coral: #eb8667;
  --focus: #f1c27c;
}
[data-color-theme='soft-blue'][data-theme='dark'] {
  --paper: #10191c;
  --paper-deep: #172328;
  --surface: #18272c;
  --surface-raised: #203238;
  --ink: #edf5f6;
  --muted: #a7b9be;
  --line: #354a50;
  --forest: #8cc6d7;
  --forest-deep: #b9e1eb;
  --mint: #24414a;
  --coral: #ef8d75;
  --focus: #8ddcf0;
}
[data-color-theme='slate'][data-theme='dark'] {
  --paper: #15191c;
  --paper-deep: #1d2327;
  --surface: #20272b;
  --surface-raised: #293237;
  --ink: #f0f2f3;
  --muted: #adb7bc;
  --line: #414c52;
  --forest: #aebcc3;
  --forest-deep: #d1d9dd;
  --mint: #344047;
  --coral: #e38978;
  --focus: #a9d7ed;
}
[data-color-theme='high-contrast'][data-theme='dark'] {
  --paper: #000000;
  --paper-deep: #0c100e;
  --surface: #0b100d;
  --surface-raised: #111713;
  --ink: #ffffff;
  --muted: #d6ddd8;
  --line: #e5eee8;
  --forest: #69f0cd;
  --forest-deep: #b1ffe9;
  --mint: #123b31;
  --coral: #ff9b86;
  --danger: #ff8c84;
  --focus: #ffe66d;
  --shadow: 0 0 0 1px #e5eee8;
}

@media (prefers-color-scheme: dark) {
  [data-color-theme='midnight'][data-theme='system'] {
    --paper: #10131f;
    --paper-deep: #151a29;
    --surface: #181e2e;
    --surface-raised: #20283b;
    --ink: #f2f4fb;
    --muted: #adb6c9;
    --line: #38415a;
    --forest: #aab8ff;
    --forest-deep: #cbd3ff;
    --mint: #27304d;
    --coral: #ee8b79;
    --focus: #afc7ff;
  }
  [data-color-theme='warm-archive'][data-theme='system'] {
    --paper: #1c1713;
    --paper-deep: #271e18;
    --surface: #292019;
    --surface-raised: #33271e;
    --ink: #f4eadc;
    --muted: #c2b19f;
    --line: #514235;
    --forest: #d9ad72;
    --forest-deep: #efd2a2;
    --mint: #493523;
    --coral: #eb8667;
    --focus: #f1c27c;
  }
  [data-color-theme='soft-blue'][data-theme='system'] {
    --paper: #10191c;
    --paper-deep: #172328;
    --surface: #18272c;
    --surface-raised: #203238;
    --ink: #edf5f6;
    --muted: #a7b9be;
    --line: #354a50;
    --forest: #8cc6d7;
    --forest-deep: #b9e1eb;
    --mint: #24414a;
    --coral: #ef8d75;
    --focus: #8ddcf0;
  }
  [data-color-theme='slate'][data-theme='system'] {
    --paper: #15191c;
    --paper-deep: #1d2327;
    --surface: #20272b;
    --surface-raised: #293237;
    --ink: #f0f2f3;
    --muted: #adb7bc;
    --line: #414c52;
    --forest: #aebcc3;
    --forest-deep: #d1d9dd;
    --mint: #344047;
    --coral: #e38978;
    --focus: #a9d7ed;
  }
  [data-color-theme='high-contrast'][data-theme='system'] {
    --paper: #000000;
    --paper-deep: #0c100e;
    --surface: #0b100d;
    --surface-raised: #111713;
    --ink: #ffffff;
    --muted: #d6ddd8;
    --line: #e5eee8;
    --forest: #69f0cd;
    --forest-deep: #b1ffe9;
    --mint: #123b31;
    --coral: #ff9b86;
    --danger: #ff8c84;
    --focus: #ffe66d;
    --shadow: 0 0 0 1px #e5eee8;
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image: radial-gradient(rgba(80, 80, 60, 0.12) 0.6px, transparent 0.6px);
  background-size: 5px 5px;
  z-index: -1;
}
a {
  color: var(--forest);
  text-underline-offset: 0.22em;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
summary {
  cursor: pointer;
}
img {
  max-width: 100%;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 1000;
  background: var(--ink);
  color: var(--paper);
  padding: 0.8rem 1rem;
  border-radius: 8px;
}
.skip-link:focus {
  top: 20px;
}
.site-header {
  height: 76px;
  padding: 0 clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 91%, transparent);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand {
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 760;
  letter-spacing: -0.03em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 12%;
  background: var(--forest-deep);
  color: var(--paper);
  font: italic 21px/1 var(--font-serif);
  transform: rotate(-7deg);
}
.brand-note {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
}
.site-announcement-stack {
  position: sticky;
  top: 76px;
  z-index: 49;
  display: grid;
  gap: 1px;
}
.site-announcement-stack:empty {
  display: none;
}
.site-announcement {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding: 11px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  animation: notice-arrive 180ms ease-out both;
}
.site-announcement > div {
  width: min(1100px, 100%);
}
.site-announcement strong,
.site-announcement p {
  display: block;
  margin: 0;
}
.site-announcement p {
  margin-top: 2px;
  font-size: 0.86rem;
  line-height: 1.35;
}
.site-announcement-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 850;
}
.site-announcement.tone-neutral {
  color: var(--ink);
  background: var(--surface);
}
.site-announcement.tone-green {
  color: var(--forest-deep);
  background: var(--mint);
}
.site-announcement.tone-orange {
  color: #4b1d0f;
  background: color-mix(in srgb, var(--coral) 72%, white);
}
.site-announcement.tone-red {
  color: white;
  background: var(--danger);
}
@keyframes notice-arrive {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
}
.main-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
}
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}
.main-nav .admin-link {
  color: var(--coral);
  font-weight: 700;
}
.page-shell {
  width: min(1480px, calc(100% - clamp(28px, 7vw, 110px)));
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: clamp(38px, 6vw, 90px) 0;
}
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px clamp(18px, 4vw, 64px);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer a {
  color: var(--muted);
}
.beta-version-label {
  color: var(--coral);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font: 500 clamp(2.5rem, 6vw, 5.8rem)/0.96 var(--font-serif);
  letter-spacing: -0.055em;
  margin-bottom: 0.28em;
}
h2 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.14;
  letter-spacing: -0.03em;
}
.eyebrow {
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.muted,
small,
.optional {
  color: var(--muted);
}
small {
  display: block;
  font-size: 0.77rem;
  line-height: 1.4;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82em;
  overflow-wrap: anywhere;
}
.fine-print {
  font-size: 0.76rem;
  color: var(--muted);
  max-width: 650px;
}
.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--forest-deep);
  border-radius: 999px;
  padding: 0.7rem 1.3rem;
  background: var(--forest-deep);
  color: var(--paper);
  text-decoration: none;
  font-weight: 720;
  letter-spacing: -0.01em;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(20, 56, 44, 0.17);
}
.button-secondary {
  background: transparent;
  color: var(--forest-deep);
}
.button-small {
  min-height: 36px;
  padding: 0.45rem 0.9rem;
  font-size: 0.84rem;
}
.button-full {
  width: 100%;
}
.button-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.button-row,
.center-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.center-actions {
  justify-content: center;
  margin: 36px 0;
}
.text-button {
  border: 0;
  padding: 0.25rem;
  background: none;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.icon-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  background: var(--surface);
}
.danger-text {
  color: var(--danger) !important;
}
.inline-form {
  display: inline;
  margin: 0;
}
.hero {
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
}
.hero h1 em {
  color: var(--forest);
  font-weight: 400;
}
.hero-lede {
  max-width: 640px;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: var(--muted);
}
.hero .button-row {
  margin: 30px 0 24px;
}
.hero-art {
  min-height: 620px;
  position: relative;
}
.art-card {
  position: absolute;
  border-radius: 5px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-end;
  margin: 0;
  color: #fff;
  overflow: hidden;
}
.art-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.art-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.54));
}
.art-card figcaption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 1;
  font-size: 0.78rem;
}
.art-card-a {
  inset: 3% 21% 39% 4%;
  transform: rotate(-4deg);
}
.art-card-b {
  inset: 32% 2% 8% 44%;
  transform: rotate(5deg);
}
.art-card-c {
  inset: 51% 37% 2% 0;
  transform: rotate(-1deg);
}
.art-note {
  position: absolute;
  right: 4%;
  top: 9%;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 18px 22px;
  box-shadow: var(--shadow);
  transform: rotate(4deg);
  display: grid;
}
.art-note strong {
  font-family: var(--font-serif);
  font-size: 1.25rem;
}
.art-note span {
  color: var(--muted);
  font-size: 0.76rem;
}
.feature-strip {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}
.public-welcome {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(30px, 7vw, 100px);
  margin: 20px 0 80px;
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.public-welcome h2 {
  margin: 4px 0 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
}
.public-welcome p:first-child {
  margin-top: 0;
}
.feature-strip article {
  background: var(--paper);
  padding: clamp(28px, 4vw, 56px);
}
.feature-strip p {
  color: var(--muted);
}
.feature-number,
.section-number {
  color: var(--coral);
  font: italic 1.1rem var(--font-serif);
}
.panel,
.narrow-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 3px 12px rgba(30, 30, 20, 0.025);
}
.narrow-panel {
  max-width: 680px;
  margin: 3vh auto;
}
.auth-layout {
  min-height: 68vh;
  display: grid;
  grid-template-columns: 1fr minmax(400px, 580px);
  align-items: center;
  gap: clamp(40px, 8vw, 140px);
}
.auth-intro h1 {
  max-width: 620px;
}
.auth-intro > p:last-child {
  color: var(--muted);
  font-size: 1.1rem;
}
.compact-auth h1 {
  font-size: clamp(3rem, 5vw, 5rem);
}
.form-stack {
  display: grid;
  gap: 20px;
}
.form-stack > h2 {
  margin-bottom: 4px;
}
.form-stack label,
.form-grid label {
  display: grid;
  gap: 7px;
  font-weight: 680;
  font-size: 0.88rem;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
  padding: 0.76rem 0.86rem;
  min-height: 45px;
}
.code-input {
  font:
    650 1.1rem ui-monospace,
    monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
textarea {
  resize: vertical;
}
.check-row {
  display: flex !important;
  align-items: flex-start;
  gap: 10px !important;
  font-weight: 450 !important;
}
.check-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
  accent-color: var(--forest);
}
.disclosure,
.warning-callout {
  border-left: 4px solid var(--gold);
  padding: 14px 17px;
  background: color-mix(in srgb, var(--gold) 9%, var(--surface));
  border-radius: 0 10px 10px 0;
  font-size: 0.84rem;
}
.disclosure p,
.warning-callout p {
  margin: 3px 0 0;
}
.form-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  margin: 0;
}
.notice {
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 13px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.notice-success {
  background: var(--mint);
}
.notice-error {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
}
.toast-region {
  position: fixed;
  z-index: 120;
  top: 92px;
  right: clamp(14px, 3vw, 34px);
  width: min(390px, calc(100vw - 28px));
  display: grid;
  gap: 12px;
  pointer-events: none;
}
.toast {
  --toast-duration: 5000ms;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
  box-shadow: 0 18px 50px rgba(12, 25, 18, 0.22);
  pointer-events: auto;
  animation: toast-enter 280ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.toast.is-leaving {
  animation: toast-leave 220ms ease-in both;
}
.toast-body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 11px;
  padding: 14px 14px 12px;
}
.toast-body p {
  margin: 1px 0 0;
  font-weight: 650;
}
.toast-icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--surface-raised);
  background: var(--forest);
  font-weight: 900;
}
.toast-error .toast-icon {
  background: var(--danger);
}
.toast-close,
.dialog-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.toast-close:hover,
.dialog-close:hover {
  color: var(--ink);
  background: var(--paper-deep);
}
.toast-timer {
  display: block;
  width: 100%;
  height: 4px;
  transform-origin: left;
  background: var(--forest);
  animation: toast-timer var(--toast-duration) linear forwards;
}
.toast-error .toast-timer {
  background: var(--danger);
}
.toast.is-paused .toast-timer {
  animation-play-state: paused;
}
@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateX(calc(100% + 40px));
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes toast-leave {
  to {
    opacity: 0;
    transform: translateX(calc(100% + 40px));
  }
}
@keyframes toast-timer {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}
.notification-bell {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  list-style: none;
  cursor: pointer;
}
.notification-bell::-webkit-details-marker {
  display: none;
}
.notification-menu {
  position: relative;
}
.notification-flyout {
  position: absolute;
  z-index: 110;
  top: calc(100% + 13px);
  right: 0;
  width: min(410px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 100px));
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-raised);
  box-shadow: 0 22px 65px rgba(10, 20, 15, 0.28);
  animation: notification-panel-in 180ms ease-out both;
}
.notification-panel-head,
.notification-panel-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.notification-panel-head {
  align-items: center;
  padding: 4px 6px 12px;
}
.notification-panel-items {
  display: grid;
  gap: 5px;
}
.notification-panel-item {
  align-items: flex-start;
  padding: 11px;
  border-radius: 11px;
}
.notification-panel-item.is-unread {
  background: color-mix(in srgb, var(--coral) 9%, var(--surface));
}
.notification-panel-item > a {
  min-width: 0;
  display: grid;
  gap: 3px;
  color: inherit;
  text-decoration: none;
}
.notification-panel-item span,
.notification-panel-item small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notification-panel-loading {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
.notification-bell svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.unread-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--surface-raised);
  border-radius: 50%;
  background: #e53935;
}
.notification-list,
.comment-list {
  display: grid;
  gap: 12px;
}
.notification-card,
.comment-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: var(--surface);
}
.notification-card.is-unread,
.notification-item.is-unread {
  border-left: 4px solid var(--coral);
  background: color-mix(in srgb, var(--coral) 5%, var(--surface));
  animation: notification-arrive 220ms ease-out both;
}
.notification-card p,
.comment-card p {
  white-space: pre-wrap;
}
.notification-actions,
.comment-head,
.panel-head,
.section-row,
.section-tabs,
.mention-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.comment-head,
.panel-head,
.section-row {
  justify-content: space-between;
}
.comment-card.is-highlighted {
  outline: 3px solid color-mix(in srgb, var(--coral) 55%, transparent);
  animation: comment-highlight 1.4s ease-out both;
}
.comments-panel,
.report-panel {
  max-width: 900px;
  margin: 36px auto 0;
}
.mention-picker {
  align-items: flex-start;
}
.mention-choice,
.section-tabs a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
  cursor: pointer;
}
.section-tabs a[aria-current='page'] {
  color: var(--surface-raised);
  background: var(--forest);
}
.viewer-stage video {
  width: 100%;
  max-width: 100%;
  max-height: 78vh;
  background: #050807;
}
.video-placeholder {
  position: relative;
  display: grid;
  min-height: 100%;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #13251c, #263a31);
}
.video-placeholder::before {
  content: '▶';
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
}
.upload-guidance {
  margin-bottom: 18px;
  padding: 15px 18px;
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--gold) 9%, var(--surface));
}
.upload-guidance p {
  margin: 5px 0 0;
}
.guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
}
.upload-progress.is-complete {
  animation: upload-complete 300ms ease-out both;
}
.upload-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050807;
}
.is-copied {
  animation: copied-pulse 260ms ease-out;
}
@keyframes notification-arrive {
  from {
    opacity: 0;
    transform: translateY(-7px);
  }
}
@keyframes notification-panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
}
@keyframes comment-highlight {
  from {
    background: color-mix(in srgb, var(--gold) 32%, var(--surface));
  }
}
@keyframes upload-complete {
  50% {
    transform: scale(1.01);
  }
}
@keyframes copied-pulse {
  50% {
    transform: scale(1.04);
  }
}
.welcome-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 40px));
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(10, 20, 15, 0.35);
}
.welcome-dialog::backdrop {
  background: rgba(8, 16, 12, 0.62);
  backdrop-filter: blur(4px);
}
.welcome-dialog-inner {
  position: relative;
  padding: clamp(26px, 5vw, 50px);
}
.welcome-dialog h2 {
  margin-top: 4px;
  font: clamp(2rem, 5vw, 3.4rem)/1.05 var(--font-serif);
}
.welcome-dialog p {
  max-width: 62ch;
}
.welcome-dialog .dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
}
.welcome-signature {
  font: 1.35rem var(--font-serif);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
}
.dashboard-head,
.collection-hero,
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 36px;
}
.dashboard-head h1,
.collection-hero h1,
.admin-head h1,
.form-page-head h1 {
  font-size: clamp(2.7rem, 5vw, 5rem);
}
.dashboard-head p,
.collection-hero p,
.admin-head p,
.form-page-head p {
  color: var(--muted);
  max-width: 760px;
}
.create-menu,
.more-menu {
  position: relative;
}
.create-menu summary,
.more-menu summary {
  list-style: none;
}
.create-menu summary::-webkit-details-marker,
.more-menu summary::-webkit-details-marker {
  display: none;
}
.plus-button {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  padding: 8px 17px 8px 8px;
  font-weight: 750;
  box-shadow: 0 10px 24px rgba(180, 80, 55, 0.2);
}
.plus-button > span:first-child {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.8rem;
  line-height: 1;
}
.menu-popover {
  position: absolute;
  z-index: 30;
  right: 0;
  top: calc(100% + 10px);
  width: 270px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
}
.menu-popover a,
.menu-popover button {
  display: grid;
  width: 100%;
  text-align: left;
  border: 0;
  padding: 12px;
  background: none;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}
.menu-popover a:hover,
.menu-popover button:hover {
  background: var(--paper-deep);
}
.menu-popover small {
  font-weight: 400;
}
.menu-right {
  left: auto;
  right: 0;
}
.filter-tabs,
.subnav {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  margin-bottom: 32px;
  padding-bottom: 4px;
}
.filter-tabs a,
.subnav a {
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.87rem;
}
.filter-tabs a[aria-current='page'],
.subnav a:hover {
  color: var(--ink);
  background: var(--surface);
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 38px);
}
.collection-card {
  color: var(--ink);
  text-decoration: none;
}
.collection-cover {
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.collection-card:hover .collection-cover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.collection-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-tone-1 {
  background: linear-gradient(145deg, #ad826b, #e2b76d);
}
.cover-tone-2 {
  background: linear-gradient(145deg, #446457, #8eaf9a);
}
.cover-tone-3 {
  background: linear-gradient(145deg, #566e82, #b69386);
}
.cover-tone-4 {
  background: linear-gradient(145deg, #9b6a55, #d9ca9c);
}
.cover-tone-5 {
  background: linear-gradient(145deg, #604d68, #af8e8c);
}
.cover-monogram {
  font: italic clamp(5rem, 10vw, 9rem)/1 var(--font-serif);
  color: rgba(255, 255, 255, 0.88);
}
.role-badge,
.status-pill,
.admin-mode-pill,
.elevated-pill {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--forest) 50%, var(--line));
  background: var(--surface);
  color: var(--forest);
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: capitalize;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}
.collection-cover .role-badge {
  position: absolute;
  top: 12px;
  right: 12px;
}
.collection-card-body {
  padding: 15px 3px;
}
.collection-card-body h2 {
  margin-bottom: 3px;
}
.collection-card-body p {
  color: var(--muted);
  margin-bottom: 12px;
  text-transform: capitalize;
}
.card-stats,
.meta-row,
.title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
}
.empty-state {
  min-height: 400px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 50px;
}
.empty-state p {
  color: var(--muted);
}
.empty-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--forest);
  font-size: 2rem;
  margin-bottom: 18px;
}
.form-page-head {
  margin-bottom: 38px;
}
.back-link {
  display: inline-block;
  margin-bottom: 24px;
  text-decoration: none;
  color: var(--muted);
}
.wide-form {
  max-width: 1050px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}
.form-section {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.span-2 {
  grid-column: span 2;
}
.toggle-list {
  display: grid;
  gap: 4px;
}
.switch-row {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 22px !important;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.switch-row input {
  width: 42px;
  min-height: 22px;
  accent-color: var(--forest);
}
.sticky-actions {
  position: sticky;
  bottom: 18px;
  z-index: 20;
  margin: 10px auto;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 9px;
  backdrop-filter: blur(12px);
}
.success-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
}
.success-check {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--forest);
  margin: 0 auto 20px;
  font-size: 1.8rem;
}
.invite-reveal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1050px;
  margin: 0 auto 26px;
}
.invite-reveal {
  padding: clamp(26px, 4vw, 50px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.editor-invite {
  border-color: color-mix(in srgb, var(--coral) 55%, var(--line));
}
.secret-code {
  margin: 22px 0 0;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--paper);
}
.secret-code code {
  font-weight: 800;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  letter-spacing: 0.06em;
}
.copy-button {
  border: 0;
  border-radius: 999px;
  background: var(--forest);
  color: var(--paper);
  padding: 7px 12px;
}
.warning-callout {
  max-width: 1050px;
  margin: 0 auto 26px;
}
.collection-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 8px;
}
.photo-tile {
  display: block;
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--paper-deep);
}
.photo-tile:nth-child(9n + 1),
.photo-tile:nth-child(9n + 6) {
  grid-row: span 2;
}
.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.28s ease;
}
.photo-tile:hover img {
  transform: scale(1.025);
}
.photo-tile > span {
  position: absolute;
  inset: auto 0 0;
  padding: 30px 12px 10px;
  color: #fff;
  font-size: 0.76rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
}
.report-panel {
  max-width: 680px;
  margin: 60px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.report-panel summary,
.form-disclosure summary,
.edit-details summary,
.admin-action-panel summary {
  font-weight: 750;
}
.settings-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(30px, 5vw, 80px);
  max-width: 1150px;
}
.settings-nav {
  position: sticky;
  top: 110px;
  align-self: start;
  display: grid;
  gap: 8px;
}
.settings-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 6px 0;
}
.settings-content {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.settings-section {
  display: grid;
  gap: 20px;
  scroll-margin-top: 110px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.settings-section > div > h2,
.settings-section > form > div h2 {
  margin: 2px 0 4px;
}
.settings-links,
.settings-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.settings-links {
  padding: 4px 3px;
}
.settings-callout h3,
.settings-callout p {
  margin: 0;
}
.privacy-note {
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--gold) 10%, var(--surface));
}
.form-feedback {
  min-height: 1.5em;
  margin: 0;
  color: var(--muted);
}
.preserve-lines {
  white-space: pre-wrap;
}
.severity-pill {
  display: inline-flex;
  margin-left: 7px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--paper-deep);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.severity-high,
.severity-critical {
  color: var(--danger);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.panel-head h2 {
  margin: 0;
}
.table-wrap {
  overflow-x: auto;
}
.table-wrap.panel {
  padding: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td strong,
td small {
  display: block;
}
.inner-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.member-list,
.queue-list,
.audit-list {
  display: grid;
}
.member-row,
.queue-list article,
.audit-list article {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.avatar,
.session-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--forest);
  font-weight: 800;
}
.member-info,
.queue-list article > div,
.audit-list article > div {
  flex: 1;
  min-width: 0;
}
.member-info strong,
.member-info small {
  display: block;
  overflow-wrap: anywhere;
}
.inline-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.inline-controls select {
  min-height: 34px;
  padding: 4px 8px;
}
.danger-zone {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stats-row div {
  display: grid;
  padding: 20px;
  border-right: 1px solid var(--line);
}
.stats-row div:last-child {
  border: 0;
}
.stats-row strong {
  font: 500 1.7rem var(--font-serif);
}
.stats-row span {
  color: var(--muted);
  font-size: 0.75rem;
}
.upload-panel {
  max-width: 1100px;
  margin: 0 auto;
}
.resumable-recovery {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--coral) 40%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--coral) 7%, var(--surface));
}
.resumable-recovery > div:first-child p {
  margin: 3px 0 12px;
  color: var(--muted);
}
.resumable-recovery [data-upload-recovery-list] article {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.upload-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.danger-text {
  color: var(--danger);
}
.upload-progress[data-state='reconnecting'] {
  border-color: var(--coral);
}
.upload-progress[data-state='failed'] {
  border-color: var(--danger);
}
.drop-zone {
  min-height: 360px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 40px;
  transition:
    background 0.18s,
    border-color 0.18s;
}
.drop-zone.is-dragging {
  background: var(--mint);
  border-color: var(--forest);
}
.upload-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--forest);
  font-size: 2rem;
  margin-bottom: 18px;
}
.drop-zone p {
  color: var(--muted);
}
.drop-zone small {
  margin-top: 14px;
}
.upload-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.upload-preview-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px;
  border-radius: 12px;
  min-width: 0;
}
.upload-preview-item img,
.row-thumb {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
}
.upload-file-kind {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--mint) 35%, var(--surface));
  color: var(--forest);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.upload-preview-item div {
  min-width: 0;
  flex: 1;
}
.upload-preview-item strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8rem;
}
.upload-progress {
  background: var(--surface);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.progress-label {
  display: flex;
  justify-content: space-between;
}
progress {
  width: 100%;
  accent-color: var(--forest);
}
.result-list {
  max-width: 850px;
  margin: 0 auto;
}
.result-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.result-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--forest);
}
.result-icon.rejected,
.result-icon.processing_failed {
  background: color-mix(in srgb, var(--danger) 15%, var(--surface));
  color: var(--danger);
}
.result-row div {
  flex: 1;
}
.result-row strong,
.result-row small {
  display: block;
}
.viewer {
  max-width: 1500px;
  margin: -30px auto 0;
}
.viewer-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.viewer-actions {
  display: flex;
  gap: 8px;
}
.viewer-stage {
  position: relative;
  min-height: 68vh;
  background: #0d100e;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.viewer-stage img {
  max-height: 82vh;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.viewer-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: rgba(20, 25, 22, 0.67);
  color: #fff;
  border-radius: 50%;
  text-decoration: none;
}
.viewer-prev {
  left: 16px;
}
.viewer-next {
  right: 16px;
}
.viewer-details {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 50px;
  padding: 28px 10px;
}
.viewer-details h1 {
  font-size: clamp(2rem, 4vw, 3.7rem);
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-list span {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--forest);
  font-size: 0.75rem;
}
.edit-details form {
  margin-top: 18px;
}
.admin-access-banner {
  position: relative;
  z-index: 45;
  background: var(--coral);
  color: #fff;
  text-align: center;
  padding: 8px 20px;
  font-size: 0.78rem;
}
.subnav {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.admin-mode-pill {
  margin-left: auto;
  color: var(--coral);
  border-color: var(--coral);
}
.elevated-pill {
  color: var(--forest);
  background: var(--mint);
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.admin-stats article {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 18px;
  display: grid;
}
.admin-stats article.attention {
  border-color: color-mix(in srgb, var(--coral) 55%, var(--line));
}
.admin-stats span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.admin-stats strong {
  font: 500 2rem var(--font-serif);
}
.admin-columns,
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.owner-studio-link {
  color: var(--coral) !important;
  font-weight: 800;
}
.owner-studio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.owner-publish-panel {
  border-color: color-mix(in srgb, var(--coral) 38%, var(--line));
}
.owner-announcement-list {
  display: grid;
  gap: 16px;
}
.owner-announcement-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.owner-announcement-card > form,
.owner-announcement-card > small {
  margin: 14px;
}
.owner-announcement-card.is-removed {
  opacity: 0.58;
}
.owner-announcement-card .site-announcement {
  position: static;
}
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.search-bar input {
  flex: 1;
}
.search-bar select {
  width: auto;
}
.status-pill.warning {
  color: var(--danger);
  border-color: var(--danger);
}
.detail-list {
  margin: 0;
}
.detail-list > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.45fr) 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.detail-list dt {
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.admin-action-panel {
  margin-bottom: 24px;
}
.admin-action-panel[open] > summary {
  margin-bottom: 20px;
}
.audit-list article {
  justify-content: space-between;
}
.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.admin-photo-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-raised);
}
.admin-photo-card > a {
  display: block;
  aspect-ratio: 4/3;
  background: var(--paper-deep);
}
.admin-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-photo-card > div {
  padding: 12px;
  display: grid;
  gap: 5px;
}
.missing-image {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.compact-form {
  margin-top: 12px;
  gap: 10px;
}
.compact-form textarea {
  min-height: 70px;
}
.report-list {
  display: grid;
  gap: 16px;
}
.report-card h2 {
  margin-top: 8px;
}
.legal-page {
  max-width: 820px;
  margin: 0 auto;
}
.legal-page h1 {
  margin-bottom: 0.5em;
}
.legal-lede {
  font-size: 1.25rem;
  color: var(--muted);
}
.legal-page h2 {
  margin-top: 2em;
}
.legal-page li {
  margin-bottom: 0.5em;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Account-backed display preferences. */
[data-larger-text='true'] body {
  font-size: 18px;
}
[data-contrast='high'] {
  --muted: color-mix(in srgb, var(--ink) 78%, transparent);
  --line: color-mix(in srgb, var(--ink) 38%, transparent);
}
[data-density='compact'] .page-shell {
  padding-top: clamp(24px, 4vw, 52px);
}
[data-density='compact'] .panel,
[data-density='compact'] .narrow-panel {
  padding: clamp(18px, 2.5vw, 30px);
}
[data-density='compact'] .form-stack,
[data-density='compact'] .settings-content {
  gap: 14px;
}
[data-card-size='compact'] .collection-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}
[data-card-size='compact'] .collection-card-body h2 {
  font-size: 1.1rem;
}
[data-display='simplified'] .secondary-content {
  display: none !important;
}
[data-display='simplified'] .collection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 52px);
}
[data-display='simplified'] .collection-card-body h2 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}
[data-gallery='grid'] .photo-tile:nth-child(9n + 1),
[data-gallery='grid'] .photo-tile:nth-child(9n + 6) {
  grid-row: span 1;
}
[data-gallery='large'] .photo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
[data-gallery='large'] .photo-tile {
  min-height: 420px;
}
[data-gallery='masonry'] .photo-grid {
  display: block;
  columns: 4;
  column-gap: 10px;
}
[data-gallery='masonry'] .photo-tile {
  break-inside: avoid;
  min-height: 0;
  aspect-ratio: 4 / 3;
  margin-bottom: 10px;
}
[data-gallery='masonry'] .photo-tile:nth-child(3n + 1) {
  aspect-ratio: 3 / 4;
}
[data-metadata='hide'] .photo-metadata,
[data-filenames='hide'] .filename-only {
  display: none !important;
}
.preference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.choice-list {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.choice-list legend {
  padding: 0 7px;
  font-weight: 750;
}
.theme-picker {
  border: 0;
  margin: 2px 0 4px;
  padding: 0;
  scroll-margin-top: 110px;
}
.theme-picker legend {
  margin-bottom: 12px;
}
.theme-picker legend span,
.theme-picker legend strong {
  display: block;
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.theme-choice {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
.theme-choice:has(input:checked) {
  border-color: var(--forest);
  box-shadow: inset 0 0 0 1px var(--forest);
}
.theme-choice input {
  position: absolute;
  inset: 9px 9px auto auto;
  width: 18px;
  height: 18px;
  accent-color: var(--forest);
}
.theme-swatch {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  height: 38px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 8px;
}
.theme-swatch i {
  background: var(--surface);
}
.theme-choice-mdm-green .theme-swatch i:nth-child(1) {
  background: #204d3d;
}
.theme-choice-mdm-green .theme-swatch i:nth-child(2) {
  background: #d6e8df;
}
.theme-choice-mdm-green .theme-swatch i:nth-child(3) {
  background: #f4f1e9;
}
.theme-choice-midnight .theme-swatch i:nth-child(1) {
  background: #20284a;
}
.theme-choice-midnight .theme-swatch i:nth-child(2) {
  background: #9fb2ff;
}
.theme-choice-midnight .theme-swatch i:nth-child(3) {
  background: #111525;
}
.theme-choice-warm-archive .theme-swatch i:nth-child(1) {
  background: #6f452d;
}
.theme-choice-warm-archive .theme-swatch i:nth-child(2) {
  background: #d9ad72;
}
.theme-choice-warm-archive .theme-swatch i:nth-child(3) {
  background: #f2e8d7;
}
.theme-choice-soft-blue .theme-swatch i:nth-child(1) {
  background: #315f73;
}
.theme-choice-soft-blue .theme-swatch i:nth-child(2) {
  background: #b9dce7;
}
.theme-choice-soft-blue .theme-swatch i:nth-child(3) {
  background: #edf5f6;
}
.theme-choice-slate .theme-swatch i:nth-child(1) {
  background: #485560;
}
.theme-choice-slate .theme-swatch i:nth-child(2) {
  background: #cad2d7;
}
.theme-choice-slate .theme-swatch i:nth-child(3) {
  background: #edf0f1;
}
.theme-choice-high-contrast .theme-swatch i:nth-child(1) {
  background: #003f35;
}
.theme-choice-high-contrast .theme-swatch i:nth-child(2) {
  background: #00a88f;
}
.theme-choice-high-contrast .theme-swatch i:nth-child(3) {
  background: #ffffff;
}
.theme-choice > strong {
  padding-right: 22px;
  font-size: 0.86rem;
}
.appearance-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 16px;
}
.appearance-preview p {
  margin: 0;
}
.preview-card {
  width: 145px;
  display: grid;
  gap: 3px;
}
.preview-image {
  aspect-ratio: 16 / 10;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--forest), var(--coral));
}
.reset-appearance {
  justify-self: end;
}
[data-motion='reduced'] *,
[data-motion='reduced'] *::before,
[data-motion='reduced'] *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
}

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    min-height: 520px;
  }
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  [data-card-size='compact'] .collection-grid,
  [data-display='simplified'] .collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  [data-gallery='masonry'] .photo-grid {
    columns: 3;
  }
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-intro {
    max-width: 700px;
  }
  .feature-strip {
    grid-template-columns: 1fr;
  }
  .public-welcome {
    grid-template-columns: 1fr;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-nav {
    position: static;
    display: flex;
    overflow-x: auto;
  }
  .upload-preview {
    grid-template-columns: repeat(2, 1fr);
  }
  .owner-studio-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .site-header {
    height: 64px;
    padding-inline: 14px;
    gap: 10px;
  }
  .toast-region {
    top: 76px;
    right: 14px;
  }
  .notification-flyout {
    position: fixed;
    top: 70px;
    right: 14px;
    left: 14px;
    width: auto;
  }
  .guidance-grid {
    grid-template-columns: 1fr;
  }
  .dialog-actions,
  .settings-callout,
  .settings-links {
    align-items: stretch;
    flex-direction: column;
  }
  .brand > span:not(.brand-mark) {
    display: none;
  }
  .brand {
    flex: 0 0 auto;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
  }
  .brand-note {
    display: none;
  }
  .site-announcement-stack {
    top: 64px;
  }
  .site-announcement {
    justify-content: flex-start;
    padding: 10px 14px;
  }
  .main-nav {
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    white-space: nowrap;
  }
  .main-nav::-webkit-scrollbar {
    display: none;
  }
  .main-nav > * {
    flex: 0 0 auto;
  }
  .main-nav a:not(.button) {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding-inline: 6px;
  }
  .main-nav .button {
    padding-inline: 11px;
  }
  .theme-toggle,
  .notification-bell {
    width: 44px;
    height: 44px;
  }
  .main-nav > a:not(.button):first-of-type {
    display: none;
  }
  .text-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
  .page-shell {
    width: min(100% - 28px, 1480px);
    padding: 34px 0 60px;
  }
  .site-footer {
    flex-direction: column;
  }
  .site-footer nav {
    flex-wrap: wrap;
  }
  .site-footer nav a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
  .hero {
    min-height: auto;
  }
  .hero-art {
    min-height: 380px;
  }
  .art-card-a {
    inset: 0 16% 42% 1%;
  }
  .art-card-b {
    inset: 34% 0 8% 43%;
  }
  .art-card-c {
    inset: 55% 35% 0 0;
  }
  .art-note {
    display: none;
  }
  .public-welcome {
    margin-bottom: 44px;
    padding: 24px;
  }
  .dashboard-head,
  .collection-hero,
  .admin-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .create-menu {
    align-self: stretch;
  }
  .plus-button {
    justify-content: center;
  }
  .collection-grid {
    grid-template-columns: 1fr;
  }
  [data-card-size='compact'] .collection-grid,
  [data-display='simplified'] .collection-grid,
  .preference-grid,
  .theme-options {
    grid-template-columns: 1fr;
  }
  [data-gallery='masonry'] .photo-grid {
    columns: 2;
  }
  [data-gallery='large'] .photo-grid {
    grid-template-columns: 1fr;
  }
  [data-gallery='large'] .photo-tile {
    min-height: 300px;
  }
  .collection-cover {
    aspect-ratio: 16/10;
  }
  .form-section {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
  .invite-reveal-grid,
  .admin-columns,
  .detail-grid,
  .viewer-details {
    grid-template-columns: 1fr;
  }
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .photo-tile {
    min-height: 170px;
  }
  .photo-tile:nth-child(9n + 1),
  .photo-tile:nth-child(9n + 6) {
    grid-row: span 1;
  }
  .collection-actions {
    flex-wrap: wrap;
  }
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .stats-row div:nth-child(2) {
    border-right: 0;
  }
  .stats-row div {
    border-bottom: 1px solid var(--line);
  }
  .upload-preview {
    grid-template-columns: 1fr;
  }
  .drop-zone {
    min-height: 300px;
    padding: 26px 18px;
  }
  .upload-controls .button {
    flex: 1 1 130px;
  }
  .sticky-actions {
    bottom: 8px;
    flex-wrap: wrap;
    border-radius: 18px;
  }
  .sticky-actions .button {
    flex: 1 1 130px;
    min-width: 0;
    padding-inline: 12px;
    text-align: center;
  }
  .secret-code {
    align-items: stretch;
    flex-direction: column;
  }
  .secret-code .copy-button {
    min-height: 44px;
  }
  .toast-close,
  .dialog-close {
    width: 44px;
    height: 44px;
  }
  .viewer-stage {
    min-height: 52vh;
    border-radius: 0;
    margin-inline: -14px;
  }
  .viewer-nav {
    width: 40px;
    height: 40px;
  }
  .admin-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .search-bar {
    flex-wrap: wrap;
  }
  .search-bar select {
    width: 100%;
  }
  .member-row {
    flex-wrap: wrap;
  }
  .form-foot {
    flex-direction: column;
  }
  .site-footer {
    padding-inline: 18px;
  }
}

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

.publication-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}

.publication-card,
.publication-page {
  border: 1px solid var(--line);
  border-top: 5px solid var(--forest);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(20px, 4vw, 42px);
}

.publication-card.tone-orange,
.publication-page.tone-orange {
  border-top-color: var(--coral);
}

.publication-card.tone-red,
.publication-page.tone-red {
  border-top-color: var(--danger);
}

.publication-page {
  max-width: 850px;
  margin-inline: auto;
}

.publication-summary {
  color: var(--muted);
  font-size: 1.15em;
}

.publication-body {
  margin-block: 28px;
  white-space: pre-wrap;
  line-height: 1.75;
}

.gallery-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, auto)) auto auto;
  gap: 12px;
  align-items: end;
  margin-block: 18px;
  padding: 16px;
  position: sticky;
  top: 76px;
  z-index: 20;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--ink) 8%, transparent);
}
.gallery-toolbar label {
  display: grid;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 750;
}
.gallery-result-summary,
.pagination,
.pagination-pages {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gallery-result-summary {
  justify-content: space-between;
  margin: 14px 2px;
  color: var(--muted);
}
.pagination {
  justify-content: center;
  flex-wrap: wrap;
  margin-block: 34px;
}
.pagination-pages {
  flex-wrap: wrap;
  justify-content: center;
}
.pagination-pages a {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  text-decoration: none;
}
.pagination-pages a[aria-current='page'] {
  color: var(--surface-raised);
  background: var(--forest);
  border-color: var(--forest);
}
.photo-tile > .gallery-thumb {
  position: absolute;
  inset: 0;
  padding: 0;
  background: none;
}
.gallery-thumb > .media-kind,
.photo-tile > .photo-metadata {
  position: absolute;
  inset: auto 0 0;
  padding: 30px 12px 10px;
  color: #fff;
  font-size: 0.76rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
}
.gallery-details {
  display: none;
}
.photo-grid.gallery-view-small,
.photo-grid.gallery-view-medium,
.photo-grid.gallery-view-large {
  grid-auto-flow: row;
}
.photo-grid.gallery-view-small {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 7px;
}
.gallery-view-small .photo-tile {
  min-height: 110px;
}
.photo-grid.gallery-view-medium {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.gallery-view-medium .photo-tile {
  min-height: 210px;
}
.photo-grid.gallery-view-large {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 14px;
}
.gallery-view-large .photo-tile {
  min-height: 420px;
}
.photo-grid.gallery-view-small .photo-tile,
.photo-grid.gallery-view-medium .photo-tile,
.photo-grid.gallery-view-large .photo-tile {
  grid-row: span 1;
}
.photo-grid.gallery-view-masonry {
  display: block;
  columns: 4;
  column-gap: 10px;
}
.gallery-view-masonry .photo-tile {
  break-inside: avoid;
  min-height: 0;
  aspect-ratio: 4 / 3;
  margin-bottom: 10px;
}
.gallery-view-masonry .photo-tile:nth-child(3n + 1) {
  aspect-ratio: 3 / 4;
}
.photo-grid.gallery-view-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.gallery-view-list .photo-tile {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  min-height: 92px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.gallery-view-list .gallery-thumb {
  position: relative;
  min-height: 92px;
}
.gallery-view-list .gallery-details {
  position: static;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 12px 16px;
  color: var(--ink);
  background: none;
}
.gallery-view-list .gallery-details strong,
.gallery-view-list .gallery-details small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-view-list .gallery-details small {
  color: var(--muted);
}
.gallery-view-list > .photo-tile > .photo-metadata {
  display: none;
}

@media (max-width: 850px) {
  .gallery-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
    box-shadow: none;
  }
  .gallery-search {
    grid-column: 1 / -1;
  }
  .photo-grid.gallery-view-masonry {
    columns: 2;
  }
}

@media (max-width: 540px) {
  .gallery-toolbar {
    grid-template-columns: 1fr;
  }
  .gallery-search {
    grid-column: auto;
  }
  .gallery-view-large .photo-tile {
    min-height: 300px;
  }
  .gallery-view-list .photo-tile {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .gallery-view-list .gallery-thumb {
    min-height: 82px;
  }
}

/* Restrained visual modernization and motion pass. */
:root {
  --radius-small: 11px;
  --radius-medium: 15px;
  --shadow-soft: 0 8px 24px color-mix(in srgb, var(--ink) 7%, transparent);
  --shadow-float: 0 16px 42px color-mix(in srgb, var(--ink) 13%, transparent);
  --ease-calm: cubic-bezier(0.22, 0.7, 0.2, 1);
}

body {
  letter-spacing: -0.006em;
}

.theme-transitioning body,
.theme-transitioning .site-header,
.theme-transitioning .site-footer,
.theme-transitioning .panel,
.theme-transitioning .photo-tile,
.theme-transitioning input,
.theme-transitioning textarea,
.theme-transitioning select,
.theme-transitioning button {
  transition:
    color 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.motion-ready .page-shell > * {
  animation: content-arrive 260ms var(--ease-calm) backwards;
}

.motion-ready .page-shell > :nth-child(2) {
  animation-delay: 35ms;
}

.motion-ready .page-shell > :nth-child(n + 3) {
  animation-delay: 65ms;
}

@keyframes content-arrive {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

h1 {
  text-wrap: balance;
}

h2,
h3,
p {
  text-wrap: pretty;
}

.page-shell {
  padding-top: clamp(34px, 5vw, 72px);
}

.dashboard-head,
.collection-hero,
.admin-head,
.form-page-head {
  margin-bottom: clamp(26px, 4vw, 44px);
}

.dashboard-head,
.collection-hero {
  position: relative;
  z-index: 12;
}

.create-menu[open],
.more-menu[open] {
  z-index: 40;
}

.dashboard-head h1,
.collection-hero h1,
.admin-head h1,
.form-page-head h1 {
  max-width: 18ch;
  margin-bottom: 0.18em;
}

.panel,
.narrow-panel {
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent);
}

.panel-head {
  align-items: flex-start;
}

.panel-head > div {
  min-width: 0;
}

.panel-head p:last-child {
  margin-bottom: 0;
}

.button,
button.button,
.icon-button,
.notification-bell,
.text-button,
.section-tabs a,
.filter-tabs a,
.subnav a {
  transition:
    transform 150ms var(--ease-calm),
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.button:hover,
button.button:hover {
  box-shadow: 0 8px 22px color-mix(in srgb, var(--forest-deep) 19%, transparent);
}

.button:active,
button.button:active,
.icon-button:active,
.notification-bell:active {
  transform: translateY(0) scale(0.98);
}

.button:disabled,
button.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
  box-shadow: none;
}

.button-secondary:hover {
  color: var(--forest-deep);
  background: color-mix(in srgb, var(--mint) 48%, transparent);
}

.icon-button:hover,
.notification-bell:hover {
  color: var(--forest-deep);
  border-color: color-mix(in srgb, var(--forest) 45%, var(--line));
  background: var(--mint);
}

.main-nav a[aria-current='page'] {
  color: var(--forest-deep);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--forest) 50%, transparent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5em;
}

input,
textarea,
select {
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
}

input:hover,
textarea:hover,
select:hover {
  border-color: color-mix(in srgb, var(--forest) 36%, var(--line));
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--focus);
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 17%, transparent);
}

details > summary {
  border-radius: var(--radius-small);
  transition:
    color 150ms ease,
    background-color 150ms ease;
}

details > summary:hover {
  color: var(--forest-deep);
}

details[open] > :not(summary) {
  animation: disclosure-arrive 180ms var(--ease-calm) both;
}

@keyframes disclosure-arrive {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.menu-popover,
.notification-flyout {
  box-shadow: var(--shadow-float);
}

.menu-popover a:focus-visible,
.menu-popover button:focus-visible,
.notification-panel-item:focus-within {
  background: var(--paper-deep);
}

.welcome-dialog[open] {
  animation: dialog-arrive 210ms var(--ease-calm) both;
}

.welcome-dialog[open]::backdrop {
  animation: backdrop-arrive 180ms ease both;
}

@keyframes dialog-arrive {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
}

@keyframes backdrop-arrive {
  from {
    opacity: 0;
  }
}

.collection-cover,
.photo-tile,
.admin-photo-card,
.theme-choice,
.publication-card {
  border-radius: var(--radius-medium);
}

.collection-card:focus-visible,
.photo-tile:focus-visible,
.publication-card:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.collection-card:focus-visible .collection-cover,
.collection-card:hover .collection-cover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.photo-tile {
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  transition:
    transform 170ms var(--ease-calm),
    border-color 170ms ease,
    box-shadow 170ms ease;
}

.photo-tile:hover,
.photo-tile:focus-visible {
  z-index: 1;
  border-color: color-mix(in srgb, var(--forest) 42%, var(--line));
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.motion-ready .photo-tile img,
.motion-ready .collection-cover img,
.motion-ready .art-card img,
.motion-ready .admin-photo-card img {
  opacity: 0;
}

.photo-tile img.media-loaded,
.collection-cover img.media-loaded,
.art-card img.media-loaded,
.admin-photo-card img.media-loaded,
.viewer-stage img.media-loaded {
  opacity: 1;
  transition:
    opacity 220ms ease,
    transform 280ms ease;
}

.video-placeholder {
  overflow: hidden;
}

.video-placeholder.is-processing::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 36%,
    color-mix(in srgb, white 8%, transparent) 49%,
    transparent 62%
  );
  transform: translateX(-100%);
  animation: placeholder-sheen 2.2s ease-in-out infinite;
}

@keyframes placeholder-sheen {
  55%,
  100% {
    transform: translateX(100%);
  }
}

.gallery-toolbar {
  border-radius: var(--radius-medium);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}

.gallery-toolbar input,
.gallery-toolbar select {
  min-height: 42px;
  background: var(--surface-raised);
}

.gallery-result-summary {
  min-height: 32px;
}

.pagination-pages a {
  transition:
    transform 150ms var(--ease-calm),
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease;
}

.pagination-pages a:hover,
.pagination-pages a:focus-visible {
  color: var(--forest-deep);
  border-color: var(--forest);
  background: var(--mint);
  transform: translateY(-1px);
}

.drop-zone {
  border-color: color-mix(in srgb, var(--forest) 28%, var(--line));
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms var(--ease-calm);
}

.drop-zone:hover,
.drop-zone:focus-within {
  border-color: color-mix(in srgb, var(--forest) 64%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--forest) 10%, transparent);
}

.drop-zone.is-dragging {
  transform: scale(1.005);
}

.upload-icon {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--forest) 12%, transparent);
}

.upload-preview-item,
.upload-progress,
.resumable-recovery {
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent);
}

.upload-progress[data-state='uploading'],
.upload-progress[data-state='finalizing'],
.upload-progress[data-state='processing'] {
  border-color: color-mix(in srgb, var(--forest) 45%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest) 7%, transparent);
}

progress {
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--paper-deep);
}

progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--paper-deep);
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--forest), var(--forest-deep));
  transition: width 180ms ease;
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--forest), var(--forest-deep));
}

.admin-stats {
  gap: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.admin-stats article,
.stat-card {
  min-width: 0;
  border-radius: var(--radius-medium);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent);
}

.stat-card {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.stat-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.stat-card strong {
  font: 500 2rem/1 var(--font-serif);
}

.admin-stats article.attention {
  background: color-mix(in srgb, var(--coral) 5%, var(--surface));
}

.table-wrap {
  border-radius: var(--radius-medium);
  scrollbar-width: thin;
}

tbody tr {
  transition: background-color 130ms ease;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--mint) 24%, transparent);
}

.settings-nav a {
  border-left: 2px solid transparent;
  padding: 7px 10px;
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease;
}

.settings-nav a:hover,
.settings-nav a:focus-visible {
  color: var(--forest-deep);
  border-left-color: var(--forest);
  background: color-mix(in srgb, var(--mint) 38%, transparent);
}

.theme-choice {
  transition:
    transform 150ms var(--ease-calm),
    border-color 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
}

.theme-choice:hover {
  border-color: color-mix(in srgb, var(--forest) 48%, var(--line));
  transform: translateY(-1px);
}

.theme-choice:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.empty-state {
  min-height: min(360px, 48vh);
  background: color-mix(in srgb, var(--surface) 56%, transparent);
}

.unread-dot {
  animation: unread-arrive 420ms var(--ease-calm) both;
}

@keyframes unread-arrive {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
}

@media (hover: none) {
  .button:hover,
  button.button:hover,
  .collection-card:hover .collection-cover,
  .photo-tile:hover,
  .theme-choice:hover {
    transform: none;
  }
}

@media (max-width: 700px) {
  .page-shell {
    padding-top: 28px;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .dashboard-head,
  .collection-hero,
  .admin-head,
  .form-page-head {
    gap: 18px;
    margin-bottom: 26px;
  }

  .panel,
  .narrow-panel {
    padding: 22px 18px;
    border-radius: var(--radius-medium);
  }

  .gallery-toolbar {
    gap: 10px;
    padding: 12px;
  }

  .gallery-toolbar .button,
  .gallery-toolbar .text-button {
    width: 100%;
  }

  .section-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .section-tabs::-webkit-scrollbar {
    display: none;
  }

  .section-tabs a {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    scroll-snap-align: start;
  }

  .photo-grid.gallery-view-small,
  .photo-grid.gallery-view-medium {
    gap: 7px;
  }

  .gallery-view-list .gallery-details {
    padding: 10px 12px;
  }

  .drop-zone {
    min-height: 280px;
  }

  .upload-controls > label.button,
  .upload-controls > button.button {
    min-height: 48px;
  }

  .sticky-actions {
    bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .settings-nav {
    gap: 2px;
    margin-inline: -14px;
    padding: 0 14px 8px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .settings-nav::-webkit-scrollbar {
    display: none;
  }

  .settings-nav a {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 13px;
    scroll-snap-align: start;
  }

  .settings-nav a:hover,
  .settings-nav a:focus-visible {
    border-color: var(--forest);
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-stats article {
    padding: 15px;
  }

  .panel-head {
    gap: 12px;
  }

  .panel-head > .button,
  .panel-head > form {
    flex: 0 0 auto;
  }

  .welcome-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }
}

[data-motion='reduced'] .video-placeholder.is-processing::after {
  display: none;
}

[data-motion='reduced'] *,
[data-motion='reduced'] *::before,
[data-motion='reduced'] *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.app-launcher {
  min-height: min(72vh, 760px);
  display: grid;
  place-content: center;
  gap: 2rem;
  padding-block: clamp(3rem, 9vw, 7rem);
}
.app-launcher-heading {
  max-width: 720px;
}
.app-launcher-heading h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  line-height: 0.98;
}
.app-launcher-heading > p:last-child {
  color: var(--muted);
  font-size: 1.08rem;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.product-card {
  min-height: 180px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.15rem;
  padding: clamp(1.35rem, 3vw, 2rem);
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}
.product-card:hover,
.product-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--forest);
}
.product-stream {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--surface) 88%, #06251a),
    var(--surface)
  );
}
.product-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--mint);
  color: var(--forest);
  font-size: 1.3rem;
}
.product-card strong,
.product-card small {
  display: block;
}
.product-card strong {
  font-size: 1.4rem;
}
.product-card small {
  margin-top: 0.3rem;
  color: var(--muted);
  line-height: 1.4;
}
.product-arrow {
  font-size: 1.45rem;
  color: var(--muted);
}
@media (max-width: 680px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .product-card {
    min-height: 140px;
  }
}

/* Public MDMCloud services portal */
.portal-hero {
  min-height: min(780px, calc(100vh - 82px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
  padding-block: clamp(5rem, 10vw, 9rem);
}
.portal-hero-copy {
  max-width: 760px;
}
.portal-hero h1 {
  margin: 0.45rem 0 1.35rem;
  font-size: clamp(3.6rem, 8vw, 7.7rem);
  line-height: 0.89;
  letter-spacing: -0.065em;
}
.portal-hero h1 em {
  color: var(--forest);
  font-family: var(--font-serif);
  font-weight: 500;
}
.portal-lede {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
  line-height: 1.65;
}
.portal-console {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--forest) 42%, var(--line));
  border-radius: 30px;
  background:
    radial-gradient(
      circle at 50% 42%,
      color-mix(in srgb, var(--forest) 22%, transparent),
      transparent 39%
    ),
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 90%, var(--forest)), var(--surface));
  box-shadow: 0 35px 90px color-mix(in srgb, var(--forest-deep) 20%, transparent);
}
.portal-console::before {
  position: absolute;
  inset: 0;
  content: '';
  opacity: 0.23;
  background-image:
    linear-gradient(color-mix(in srgb, var(--forest) 35%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--forest) 35%, transparent) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.console-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.console-top > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--forest);
  opacity: 0.4;
}
.console-top small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.console-core {
  position: relative;
  z-index: 1;
  min-height: 310px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.5rem;
  text-align: center;
}
.console-mark {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--forest) 60%, var(--line));
  border-radius: 25px;
  background: var(--forest-deep);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 3.5rem;
  box-shadow: 0 18px 50px color-mix(in srgb, var(--forest) 28%, transparent);
}
.console-core strong {
  font-size: 1.6rem;
}
.console-core span {
  color: var(--muted);
}
.console-services {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 1.2rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-raised) 82%, transparent);
}
.console-services span {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0.9rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.console-services span + span {
  border-left: 1px solid var(--line);
}
.console-services b {
  color: var(--forest);
  font-size: 0.68rem;
}
.portal-services {
  padding-block: clamp(5rem, 9vw, 8.5rem);
  border-top: 1px solid var(--line);
}
.portal-section-heading {
  max-width: 780px;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}
.portal-section-heading h2,
.portal-trust h2,
.portal-cta h2 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
.portal-section-heading > p:last-child,
.portal-cta p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}
.portal-service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.service-card {
  position: relative;
  min-height: 285px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}
a.service-card:hover,
a.service-card:focus-visible {
  transform: translateY(-7px);
  border-color: var(--forest);
  box-shadow: var(--shadow);
}
.service-card-featured {
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--mint) 48%, var(--surface)),
    var(--surface) 70%
  );
}
.service-tag {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.service-glyph {
  margin: auto 0 1.25rem;
  color: var(--forest);
  font-size: 2.1rem;
}
.service-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.45rem;
}
.service-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.service-card strong {
  margin-top: 1.3rem;
  color: var(--forest);
}
.service-card strong span {
  display: inline-block;
  transition: transform 180ms ease;
}
a.service-card:hover strong span {
  transform: translateX(5px);
}
.portal-trust {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
  gap: clamp(3rem, 9vw, 9rem);
  padding-block: clamp(5rem, 9vw, 8.5rem);
  border-top: 1px solid var(--line);
}
.trust-points article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.trust-points article > span {
  color: var(--forest);
  font-family: var(--font-serif);
  font-size: 1.2rem;
}
.trust-points h3 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
}
.trust-points p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.portal-cta {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 3rem;
  margin-bottom: clamp(3rem, 8vw, 7rem);
  padding: clamp(2rem, 5vw, 4.5rem);
  border-radius: 28px;
  background: var(--forest-deep);
  color: var(--paper);
}
.portal-cta > div {
  max-width: 760px;
}
.portal-cta .eyebrow,
.portal-cta p {
  color: color-mix(in srgb, var(--paper) 72%, transparent);
}
.portal-cta .button {
  flex: 0 0 auto;
  background: var(--paper);
  color: var(--forest-deep);
}
@media (max-width: 980px) {
  .portal-hero,
  .portal-trust {
    grid-template-columns: 1fr;
  }
  .portal-hero {
    gap: 3rem;
  }
  .portal-console {
    min-height: 410px;
  }
  .portal-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .portal-hero {
    min-height: auto;
    padding-block: 4rem;
  }
  .portal-hero h1 {
    font-size: clamp(3.2rem, 16vw, 5rem);
  }
  .portal-console {
    min-height: 365px;
  }
  .console-core {
    min-height: 255px;
  }
  .console-services {
    grid-template-columns: 1fr;
  }
  .console-services span + span {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .portal-service-grid {
    grid-template-columns: 1fr;
  }
  .service-card {
    min-height: 250px;
  }
  .portal-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}
