/* ═══════════════════════════════════════════════════════════════════
   Wedding Shoots — Global motion & polish layer
   Loaded after custom.css from base.html. Everything here is a
   progressive enhancement: pages render perfectly without JS, and
   every animation is disabled under prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Cross-document View Transitions (Chrome 126+ / Safari 18.2+) ──
   Soft fade + rise between same-origin navigations. The sticky header
   keeps its own transition group so the navbar never "blinks". */
@view-transition { navigation: auto; }
.ws-header-stack { view-transition-name: ws-header; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: wsVtOut .16s ease both; }
  ::view-transition-new(root) { animation: wsVtIn .30s cubic-bezier(.22,.61,.36,1) both; }
}
@keyframes wsVtOut { to { opacity: 0; } }
@keyframes wsVtIn  { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* ── Selection & scrollbars ── */
::selection { background: rgba(196, 168, 130, .38); color: inherit; }
html[data-theme="dark"] ::selection { background: rgba(123, 160, 144, .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 999px;
  border: 2.5px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--color-text-faint); }

/* ── Scroll progress hairline (injected by ws-motion.js) ── */
.ws-scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  z-index: 400;
  background: linear-gradient(90deg, var(--color-brand), var(--color-accent));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
.ws-scroll-progress.is-on { opacity: 1; }

/* ── Back-to-top button (injected by ws-motion.js) ── */
.ws-top-btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 900;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  background: color-mix(in srgb, var(--color-surface) 82%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  color: var(--color-brand-dark);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px -10px rgba(58,82,70,.35);
  opacity: 0;
  transform: translateY(14px) scale(.9);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s cubic-bezier(.22,.61,.36,1),
              background .2s ease, color .2s ease, box-shadow .25s ease;
}
.ws-top-btn.is-on {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.ws-top-btn:hover {
  background: var(--color-brand);
  color: #fff;
  border-color: var(--color-brand);
  box-shadow: 0 4px 18px -4px rgba(58,82,70,.5);
}
.ws-top-btn svg { width: 18px; height: 18px; }
html[data-theme="dark"] .ws-top-btn { color: var(--color-text); }
html[data-theme="dark"] .ws-top-btn:hover { color: #0e120f; }
body.nav-panel-open .ws-top-btn { opacity: 0; pointer-events: none; }
@media print { .ws-top-btn, .ws-scroll-progress { display: none !important; } }

/* ── Flash messages, redesigned ──
   Markup (base.html / admin layout): icon + body + close button.
   Success/info auto-dismiss with a draining progress hairline; errors
   persist until closed. Old single-node flashes keep working: the new
   rules only refine color/radius/shadow on them. */
.flash,
.alert {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .8rem 1rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  font-size: .9rem;
  font-family: var(--font-body);
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 18px -10px rgba(0,0,0,.12);
  position: relative;
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .flash, .alert { animation: wsFlashIn .45s cubic-bezier(.22,.61,.36,1) both; }
}
@keyframes wsFlashIn {
  from { opacity: 0; transform: translateY(-10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.flash-ico {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  margin-top: -1px;
}
.flash-msg { flex: 1 1 auto; min-width: 0; align-self: center; line-height: 1.5; }
.flash-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  margin: -2px -4px 0 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  opacity: .55;
  cursor: pointer;
  padding: 0;
  transition: opacity .15s ease, background .15s ease, transform .15s ease;
}
.flash-close:hover { opacity: 1; background: rgba(0,0,0,.07); transform: rotate(90deg); }

.flash-error,   .alert-error, .alert-danger {
  background: var(--color-error-bg);
  border-color: rgba(220,38,38,.25);
  color: #991B1B;
}
.flash-error .flash-ico { background: rgba(220,38,38,.12); color: var(--color-error); }
.flash-success, .alert-success {
  background: var(--color-success-bg);
  border-color: rgba(22,163,74,.25);
  color: #166534;
}
.flash-success .flash-ico { background: rgba(22,163,74,.12); color: var(--color-success); }
.flash-info,    .flash-message, .alert-info {
  background: var(--color-brand-light);
  border-color: rgba(92,122,107,.28);
  color: var(--color-brand-dark);
}
.flash-info .flash-ico, .flash-message .flash-ico { background: rgba(92,122,107,.14); color: var(--color-brand); }
.flash-warning, .alert-warning {
  background: #FFFBEB;
  border-color: rgba(202,138,4,.3);
  color: #92400E;
}
.flash-warning .flash-ico { background: rgba(202,138,4,.12); color: #CA8A04; }
.flash-debug {
  background: #FEF9C3;
  border-color: rgba(202,138,4,.35);
  color: #713F12;
  font-family: monospace;
  font-size: .85rem;
  word-break: break-all;
}
html[data-theme="dark"] .flash-error,   html[data-theme="dark"] .alert-error, html[data-theme="dark"] .alert-danger { background: #2A1414; color: #FCA5A5; }
html[data-theme="dark"] .flash-success, html[data-theme="dark"] .alert-success { background: #122418; color: #86EFAC; }
html[data-theme="dark"] .flash-info,    html[data-theme="dark"] .flash-message, html[data-theme="dark"] .alert-info { background: #1E2E28; color: #A3C4B5; }
html[data-theme="dark"] .flash-warning, html[data-theme="dark"] .alert-warning { background: #2B2210; color: #FCD34D; }
html[data-theme="dark"] .flash-debug { background: #2B2210; color: #FDE68A; }
html[data-theme="dark"] .flash-close:hover { background: rgba(255,255,255,.1); }

/* Auto-dismiss: draining hairline + exit animation (driven by JS) */
.flash.flash-auto::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 2.5px;
  width: 100%;
  background: currentColor;
  opacity: .3;
  transform-origin: left;
  animation: wsFlashDrain var(--ws-flash-ttl, 6s) linear both;
}
@keyframes wsFlashDrain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* Freeze the hairline while hovered/focused; the JS timer pauses in step. */
.flash.flash-paused.flash-auto::after { animation-play-state: paused; }
.flash.is-leaving {
  animation: wsFlashOut .4s cubic-bezier(.55,.06,.68,.19) both;
}
@keyframes wsFlashOut {
  to { opacity: 0; transform: translateY(-8px) scale(.97); max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .flash, .alert, .flash.is-leaving { animation: none; }
  .flash.flash-auto::after { animation: none; display: none; }
}

/* ── Scroll-reveal engine (ws-motion.js) ──
   Elements get .ws-reveal before first paint, .is-in when they enter
   the viewport, and BOTH classes removed after the transition ends so
   hover transforms, sticky children and stacking contexts return to
   their pristine, untouched state. */
.ws-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s cubic-bezier(.22,.61,.36,1),
              transform .65s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.ws-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ws-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
@media print {
  .ws-reveal, .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ── Button micro-interactions ── */
.btn:active, .button:active { transform: translateY(0) scale(.985); }
.adm-btn, .btn-secondary, .button-outline, .btn-ghost { position: relative; overflow: hidden; }
.ws-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.38);
  transform: scale(0);
  pointer-events: none;
  animation: wsRipple .55s ease-out forwards;
}
.ws-ripple--ink { background: rgba(92,122,107,.18); }
html[data-theme="dark"] .ws-ripple--ink { background: rgba(163,196,181,.2); }
@keyframes wsRipple { to { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ws-ripple { display: none; } }

/* ── Card hover language (soft layered shadows + gentle lift) ── */
.card,
.feature-card,
.metric-card {
  transition: box-shadow .3s cubic-bezier(.22,.61,.36,1),
              transform .3s cubic-bezier(.22,.61,.36,1),
              border-color .25s ease;
}
.card:hover,
.feature-card:hover,
.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 14px -8px rgba(28,25,23,.28);
  border-color: color-mix(in srgb, var(--color-brand) 28%, var(--color-border));
}

/* ── Page titles: animated accent underline ── */
.page-header h1,
.adm-header h1 {
  position: relative;
  padding-bottom: .4rem;
}
.page-header h1::after,
.adm-header h1::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 46px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .page-header h1::after,
  .adm-header h1::after {
    transform-origin: left;
    animation: wsGrowX .8s .15s cubic-bezier(.22,.61,.36,1) both;
  }
}
@keyframes wsGrowX { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ── Auth / form card: entrance + botanical accent ── */
.form-container {
  position: relative;
  overflow: hidden;
}
.form-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-brand), var(--color-accent), var(--color-brand));
  background-size: 200% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .form-container { animation: wsCardIn .55s cubic-bezier(.22,.61,.36,1) both; }
  .form-container::before { animation: wsSheen 6s ease-in-out infinite; }
}
@keyframes wsCardIn {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes wsSheen {
  0%, 100% { background-position: 0% 0; }
  50%      { background-position: 100% 0; }
}
.form-container input:focus,
.form-container select:focus,
.form-container textarea:focus { transform: translateY(-1px); }
.form-container input,
.form-container select,
.form-container textarea { transition: border-color .15s, box-shadow .15s, transform .2s ease; }

/* ── Empty states: gentle float on the icon disc ── */
@keyframes wsFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: no-preference) {
  .ev-empty-icon { animation: wsFloat 5s ease-in-out infinite; }
}

/* ── Skeleton shimmer utility ── */
.ws-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-deep);
  border-radius: var(--radius-md);
  color: transparent !important;
}
.ws-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: wsShimmer 1.4s linear infinite;
}
html[data-theme="dark"] .ws-skeleton::after {
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.07) 50%, transparent 70%);
  background-size: 200% 100%;
}
@keyframes wsShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Gradient display-text utility (error pages, hero numbers) ── */
.ws-gradient-text { color: var(--color-brand); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ws-gradient-text {
    background: linear-gradient(115deg, var(--color-brand) 10%, var(--color-accent) 55%, var(--color-brand-dark) 90%);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
  html[data-theme="dark"] .ws-gradient-text {
    background-image: linear-gradient(115deg, var(--color-brand) 10%, var(--color-accent) 55%, var(--color-brand-hover) 90%);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .ws-gradient-text { animation: wsGradientPan 7s ease-in-out infinite; }
}
@keyframes wsGradientPan {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ── Error pages ── */
.ws-err {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 6rem) 1.25rem 4rem;
  text-align: center;
}
.ws-err-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(26px);
  z-index: 0;
}
.ws-err-orb--a {
  top: 4%; left: -4%;
  width: 220px; height: 220px;
  background: radial-gradient(circle at 30% 30%, rgba(196,168,130,.4), transparent 65%);
}
.ws-err-orb--b {
  bottom: 6%; right: -6%;
  width: 260px; height: 260px;
  background: radial-gradient(circle at 60% 60%, rgba(92,122,107,.32), transparent 65%);
}
@media (prefers-reduced-motion: no-preference) {
  .ws-err-orb--a { animation: wsFloat 8s ease-in-out infinite; }
  .ws-err-orb--b { animation: wsFloat 11s ease-in-out infinite reverse; }
}
.ws-err-code {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(6rem, 22vw, 10rem);
  line-height: 1;
  letter-spacing: .02em;
  margin: 0;
}
.ws-err-code .d {
  display: inline-block;
}
@media (prefers-reduced-motion: no-preference) {
  .ws-err-code .d { animation: wsErrDigit .7s cubic-bezier(.22,.61,.36,1) both; }
  .ws-err-code .d:nth-child(2) { animation-delay: .1s; }
  .ws-err-code .d:nth-child(3) { animation-delay: .2s; }
}
@keyframes wsErrDigit {
  from { opacity: 0; transform: translateY(26px) rotate(3deg); }
  to   { opacity: 1; transform: none; }
}
.ws-err-divider {
  width: 56px; height: 1.5px;
  margin: 1.4rem auto 1.3rem;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  position: relative;
  z-index: 1;
}
.ws-err h2 {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 300;
  color: var(--color-brand-dark);
  margin: 0 0 .7rem;
}
.ws-err p {
  position: relative;
  z-index: 1;
  color: var(--color-text-muted);
  max-width: 420px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}
.ws-err-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: .65rem;
  justify-content: center;
  flex-wrap: wrap;
}
.ws-err-foot {
  position: relative;
  z-index: 1;
  margin-top: 2.25rem;
  font-size: .82rem;
  color: var(--color-text-faint);
}
.ws-err-foot a { color: var(--color-text-muted); text-decoration: underline; text-underline-offset: 3px; }
.ws-err-foot a:hover { color: var(--color-brand-dark); }
@media (prefers-reduced-motion: no-preference) {
  .ws-err h2, .ws-err p, .ws-err-actions, .ws-err-foot, .ws-err-divider {
    animation: wsCardIn .6s cubic-bezier(.22,.61,.36,1) both;
  }
  .ws-err-divider  { animation-delay: .25s; }
  .ws-err h2       { animation-delay: .32s; }
  .ws-err p        { animation-delay: .4s; }
  .ws-err-actions  { animation-delay: .48s; }
  .ws-err-foot     { animation-delay: .6s; }
}

/* ── Status / notice pages (suspended, revoked, locked, cancelled…) ──
   Shared chrome; each page supplies its own icon, copy, accent variant
   and actions. Variants: default (neutral sage), --danger, --warn. */
.ws-status {
  position: relative;
  max-width: 600px;
  margin: clamp(2.5rem, 7vh, 5rem) auto;
  padding: clamp(2rem, 4vw, 3rem) 1.5rem;
  text-align: center;
}
.ws-status-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2.25rem);
}
.ws-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--color-brand-light), var(--color-accent-light));
  color: var(--color-brand-dark);
  box-shadow: 0 8px 24px -8px rgba(58,82,70,.26);
}
html[data-theme="dark"] .ws-status-icon { color: var(--color-text); }
.ws-status--danger .ws-status-icon {
  background: #FEECEC; color: #DC2626;
  box-shadow: 0 8px 24px -10px rgba(220,38,38,.42);
}
.ws-status--warn .ws-status-icon {
  background: #FFF6E6; color: #B45309;
  box-shadow: 0 8px 24px -10px rgba(180,83,9,.4);
}
html[data-theme="dark"] .ws-status--danger .ws-status-icon { background: #2A1414; color: #FCA5A5; }
html[data-theme="dark"] .ws-status--warn   .ws-status-icon { background: #2B2210; color: #FCD34D; }
@media (prefers-reduced-motion: no-preference) {
  .ws-status-icon { animation: wsFloat 5s ease-in-out infinite; }
}
.ws-status h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--color-brand-dark);
  margin: 0 0 .7rem;
  letter-spacing: .01em;
}
.ws-status-lead {
  color: var(--color-text);
  line-height: 1.65;
  margin: 0 auto 1rem;
  max-width: 46ch;
}
.ws-status-sub {
  color: var(--color-text-muted);
  font-size: .92rem;
  line-height: 1.6;
  margin: 0 auto 1rem;
  max-width: 46ch;
}
.ws-status-meta {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  text-align: left;
  max-width: 42ch;
  margin: 1.25rem auto;
  padding: .85rem 1rem;
  font-size: .85rem;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg-deep);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.ws-status-meta .mi { flex-shrink: 0; color: var(--color-brand); margin-top: 1px; }
.ws-status-meta strong { font-weight: 600; }
.ws-status-actions {
  display: flex;
  gap: .65rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}
.ws-status-foot {
  margin-top: 1.5rem;
  font-size: .85rem;
  color: var(--color-text-faint);
}
.ws-status-foot a { color: var(--color-text-muted); text-decoration: underline; text-underline-offset: 3px; }
.ws-status-foot a:hover { color: var(--color-brand-dark); }
@media (prefers-reduced-motion: no-preference) {
  .ws-status-card { animation: wsCardIn .55s cubic-bezier(.22,.61,.36,1) both; }
  .ws-status > :not(.ws-status-card) { animation: wsCardIn .55s cubic-bezier(.22,.61,.36,1) both; }
}

/* ── Maintenance page ── */
.ws-maint {
  position: relative;
  max-width: 560px;
  margin: clamp(2.5rem, 8vh, 5rem) auto;
  padding: 2.75rem 2rem 2.5rem;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.ws-maint::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-brand), var(--color-accent), var(--color-brand));
  background-size: 200% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .ws-maint { animation: wsCardIn .55s cubic-bezier(.22,.61,.36,1) both; }
  .ws-maint::before { animation: wsSheen 5s ease-in-out infinite; }
}
.ws-maint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--color-brand-light), var(--color-accent-light));
  color: var(--color-brand-dark);
  box-shadow: 0 8px 24px -8px rgba(58,82,70,.28);
}
html[data-theme="dark"] .ws-maint-icon { color: var(--color-text); }
@media (prefers-reduced-motion: no-preference) {
  .ws-maint-icon { animation: wsFloat 4.5s ease-in-out infinite; }
}
.ws-maint-dots { display: inline-flex; gap: 6px; margin-top: 1.5rem; }
.ws-maint-dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-brand);
  opacity: .35;
}
@media (prefers-reduced-motion: no-preference) {
  .ws-maint-dots span { animation: wsDotPulse 1.4s ease-in-out infinite; }
  .ws-maint-dots span:nth-child(2) { animation-delay: .2s; }
  .ws-maint-dots span:nth-child(3) { animation-delay: .4s; }
}
@keyframes wsDotPulse {
  0%, 100% { opacity: .25; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.25); }
}

/* ── Footer, redesigned ── */
.ws-footer {
  margin-top: 4.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--color-bg-deep) 55%, transparent));
  font-size: .84rem;
  color: var(--color-text-muted);
  position: relative;
  z-index: 1;
}
.ws-footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 2.75rem 2rem 2rem;
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 1fr));
  gap: 2rem;
}
.ws-footer-brand .footer-wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  letter-spacing: .02em;
}
.ws-footer-tag {
  margin: .55rem 0 0;
  max-width: 280px;
  font-size: .82rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}
.ws-footer-col h6 {
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin: 0 0 .8rem;
}
.ws-footer-col a {
  display: block;
  padding: .22rem 0;
  color: var(--color-text-muted);
  width: fit-content;
  position: relative;
  transition: color .18s ease, transform .18s ease;
}
.ws-footer-col a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 1px;
  width: 100%; height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s cubic-bezier(.22,.61,.36,1);
}
.ws-footer-col a:hover { color: var(--color-brand-dark); transform: translateX(2px); }
html[data-theme="dark"] .ws-footer-col a:hover { color: var(--color-text); }
.ws-footer-col a:hover::after { transform: scaleX(1); }
.ws-footer-bottom {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1.1rem 2rem 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--color-border) 60%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  font-size: .76rem;
  color: var(--color-text-faint);
}
.ws-footer-bottom .heart { color: var(--color-accent); display: inline-flex; vertical-align: -2px; }
@media (prefers-reduced-motion: no-preference) {
  .ws-footer-bottom .heart svg { animation: wsHeartBeat 2.6s ease-in-out infinite; transform-origin: center; }
}
@keyframes wsHeartBeat {
  0%, 30%, 100% { transform: scale(1); }
  10% { transform: scale(1.18); }
  20% { transform: scale(1.05); }
}
@media (max-width: 860px) {
  .ws-footer-inner { grid-template-columns: 1fr 1fr; padding: 2.25rem 1.25rem 1.5rem; }
  .ws-footer-brand { grid-column: 1 / -1; }
  .ws-footer-bottom { padding: 1rem 1.25rem 1.35rem; justify-content: center; text-align: center; }
}
@media (max-width: 420px) {
  .ws-footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ── Upload zones: inviting lift on hover / drag-over ── */
.upload-zone, .upload-area {
  transition: border-color .25s ease, background .25s ease,
              transform .25s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease;
}
.upload-zone:hover, .upload-area:hover,
.upload-zone.drag-over, .upload-area.drag-over {
  transform: scale(1.004);
  box-shadow: 0 10px 30px -16px rgba(92,122,107,.4);
}
@media (prefers-reduced-motion: reduce) {
  .upload-zone:hover, .upload-area:hover,
  .upload-zone.drag-over, .upload-area.drag-over { transform: none; }
}

/* ── Lightbox entrance (replays on every open: display none → flex) ── */
@media (prefers-reduced-motion: no-preference) {
  .lightbox { animation: wsLbFade .22s ease both; }
  .lightbox img { animation: wsLbZoom .3s cubic-bezier(.22,.61,.36,1) both; }
}
@keyframes wsLbFade { from { opacity: 0; } }
@keyframes wsLbZoom { from { opacity: 0; transform: scale(.96); } }

/* ── Theme toggle: playful quarter-spin ── */
.theme-toggle { transition: background .2s ease, border-color .2s ease, transform .25s cubic-bezier(.34,1.56,.64,1); }
.theme-toggle:hover { transform: rotate(-18deg) scale(1.06); }
.theme-toggle:active { transform: rotate(-32deg) scale(.96); }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle:hover, .theme-toggle:active { transform: none; }
}

/* ── Admin shell motion ── */
.adm-nav-item { position: relative; }
.adm-nav-item::before {
  content: '';
  position: absolute;
  left: -1px; top: 22%;
  height: 56%; width: 3px;
  border-radius: 3px;
  background: var(--color-accent);
  transform: scaleY(0);
  transition: transform .22s cubic-bezier(.22,.61,.36,1);
}
.adm-nav-item.active::before { transform: scaleY(1); }
.adm-nav-item .adm-nav-icon { transition: transform .2s cubic-bezier(.22,.61,.36,1); }
.adm-nav-item:hover .adm-nav-icon { transform: translateX(1px) scale(1.08); }
.adm-nav-item.active {
  background: linear-gradient(120deg, var(--color-brand), var(--color-brand-dark));
}
@media (prefers-reduced-motion: no-preference) {
  .adm-main > * { animation: wsAdmIn .4s ease both; }
}
@keyframes wsAdmIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .adm-nav-item::before, .adm-nav-item .adm-nav-icon { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   Legal / long-form documents — sticky auto table-of-contents
   The TOC is built by ws-motion.js from the document's own <h2> (and
   <h3>) headings; .has-toc is added only when JS succeeds, so without
   JS the document stays a clean single readable column.
   ═══════════════════════════════════════════════════════════════════ */
.legal-doc {
  max-width: 820px;
  margin: 2rem auto 3.5rem;
  padding: 0 1.25rem;
}
.legal-doc__body { min-width: 0; }
.legal-doc__body :is(h2, h3) { scroll-margin-top: calc(var(--header-h, 72px) + 1rem); }

.legal-doc.has-toc {
  max-width: 1080px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 2.5rem;
}
@media (min-width: 980px) {
  .legal-doc.has-toc { grid-template-columns: 236px minmax(0, 1fr); }
  .legal-doc.has-toc .legal-doc__body { max-width: 760px; }
}

.legal-toc { min-width: 0; }
.legal-toc:empty { display: none; }
.legal-toc-d {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 980px) {
  .legal-toc {
    position: sticky;
    top: calc(var(--header-h, 72px) + 1rem);
    align-self: start;
    max-height: calc(100dvh - var(--header-h, 72px) - 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .legal-toc-d {
    background: transparent;
    border: none;
    border-left: 1px solid var(--color-border);
    border-radius: 0;
  }
}
.legal-toc-d > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem .9rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  user-select: none;
}
.legal-toc-d > summary::-webkit-details-marker { display: none; }
.legal-toc-chev { margin-left: auto; transition: transform .2s ease; color: var(--color-text-faint); }
.legal-toc-d[open] .legal-toc-chev { transform: rotate(180deg); }
@media (min-width: 980px) {
  /* On desktop the panel is always expanded; the summary becomes a title. */
  .legal-toc-d > summary { cursor: default; padding: 0 .9rem .6rem; }
  .legal-toc-chev { display: none; }
}
.legal-toc-nav {
  display: flex;
  flex-direction: column;
  padding: .35rem .5rem .6rem;
}
.legal-toc-nav a {
  display: block;
  padding: .34rem .6rem;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .83rem;
  line-height: 1.4;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.legal-toc-nav a.lvl-3 { padding-left: 1.4rem; font-size: .8rem; }
.legal-toc-nav a:hover { color: var(--color-brand-dark); background: var(--color-bg-deep); }
.legal-toc-nav a.is-active {
  color: var(--color-brand-dark);
  border-left-color: var(--color-brand);
  background: var(--color-brand-light);
  font-weight: 600;
}
html[data-theme="dark"] .legal-toc-nav a.is-active { color: var(--color-text); }
@media (prefers-reduced-motion: reduce) {
  .legal-toc-chev, .legal-toc-nav a { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   Admin tables — sortable headers, quick filter, zebra (ws-motion.js)
   Enhancements are additive: tables work fully without JS.
   ═══════════════════════════════════════════════════════════════════ */
.adm-table tbody tr:nth-child(even) { background: rgba(28,25,23,.018); }
html[data-theme="dark"] .adm-table tbody tr:nth-child(even) { background: rgba(255,255,255,.022); }

.adm-table thead th[data-sortable] {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  position: relative;
  padding-right: 1.35rem;
  transition: color .15s ease, background .15s ease;
}
.adm-table thead th[data-sortable]:hover { color: var(--color-brand-dark); background: var(--color-brand-light); }
.adm-table thead th[data-sortable]:focus-visible { outline: 2px solid var(--color-brand); outline-offset: -2px; }
.adm-table thead th[data-sortable]::after {
  content: '';
  position: absolute;
  right: .55rem; top: 50%;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .25;
  transform: translateY(-50%);
  transition: opacity .15s ease, transform .15s ease;
}
.adm-table thead th[aria-sort="ascending"]::after  { opacity: .85; transform: translateY(-50%) rotate(180deg); }
.adm-table thead th[aria-sort="descending"]::after { opacity: .85; }
@media (prefers-reduced-motion: reduce) {
  .adm-table thead th[data-sortable], .adm-table thead th[data-sortable]::after { transition: none; }
}

.adm-table-filter {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .7rem;
}
.adm-table-filter input {
  flex: 1 1 240px;
  max-width: 320px;
  padding: .5rem .8rem .5rem 2rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: .85rem;
  font-family: var(--font-body);
  background: var(--color-surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill='none' stroke='%2378716C' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='6.5' cy='6.5' r='4.5'/%3E%3Cpath d='M10 10l4 4'/%3E%3C/svg%3E")
    no-repeat .65rem center;
  color: var(--color-text);
  transition: border-color .15s, box-shadow .15s;
}
.adm-table-filter input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(92,122,107,.16);
}
.adm-table-filter-count { font-size: .78rem; color: var(--color-text-muted); white-space: nowrap; }
.adm-table-noresults td {
  text-align: center;
  padding: 1.5rem 1rem !important;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════
   Contextual note boxes (.ws-note) — design-system replacement for the
   ad-hoc inline-coloured callouts inside dense forms. Theme-aware, so
   they no longer render as light boxes in dark mode.
   ═══════════════════════════════════════════════════════════════════ */
.ws-note {
  display: flex;
  gap: .65rem;
  padding: .85rem 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-deep);
  font-size: .85rem;
  line-height: 1.6;
  color: var(--color-text);
}
.ws-note .ws-note-ico { flex-shrink: 0; margin-top: 1px; color: var(--color-text-muted); }
.ws-note-body { min-width: 0; }
.ws-note-body > :first-child { margin-top: 0; }
.ws-note-body > :last-child { margin-bottom: 0; }
.ws-note-title { display: flex; align-items: center; gap: .4rem; font-weight: 700; margin-bottom: .4rem; }
.ws-note ul { margin: .3rem 0 0; padding-left: 1.15rem; }
.ws-note li { margin-bottom: .2rem; }

.ws-note--ok      { background: var(--color-success-bg); border-color: rgba(22,163,74,.28);  color: #166534; }
.ws-note--ok      .ws-note-ico { color: var(--color-success); }
.ws-note--warn    { background: #FFFBEB; border-color: rgba(202,138,4,.3); color: #8a5a08; }
.ws-note--warn    .ws-note-ico { color: #B45309; }
.ws-note--danger  { background: var(--color-error-bg); border-color: rgba(220,38,38,.28); color: #991B1B; }
.ws-note--danger  .ws-note-ico { color: var(--color-error); }
.ws-note--info    { background: var(--color-brand-light); border-color: rgba(92,122,107,.28); color: var(--color-brand-dark); }
.ws-note--info    .ws-note-ico { color: var(--color-brand); }
html[data-theme="dark"] .ws-note--ok     { background: #122418; color: #86EFAC; }
html[data-theme="dark"] .ws-note--warn   { background: #2B2210; color: #FCD34D; }
html[data-theme="dark"] .ws-note--warn   .ws-note-ico { color: #FCD34D; }
html[data-theme="dark"] .ws-note--danger { background: #2A1414; color: #FCA5A5; }
html[data-theme="dark"] .ws-note--info   { background: #1E2E28; color: #A3C4B5; }

/* Wider URL field for editable card links (pc in-place editor). */
body.pc-editing input.pc-linkfield { width: 13rem; max-width: 90%; }
