/* ============================================================
   ODPD — OCEAN DRIVE POLICE DEPARTMENT
   Identity: ODPDBlue (#2596be) is the dominant color across the
   whole site; harbor navy + gold are supporting accents. Verdana
   set like government letterhead.
   ============================================================ */

:root {
  --odpd-blue:   #2596be;   /* THE color — used everywhere */
  --odpd-blue-d: #1b7a9e;   /* pressed/hover, darker */
  --odpd-blue-dd:#125f7e;   /* deepest blue for text on tints */
  --odpd-blue-l: #4fb0d2;   /* lighter blue for gradients */
  --harbor:      #0e3a52;   /* dark blue accent */
  --harbor-deep: #082636;
  --gold:        #c9a227;
  --gold-soft:   #e7cf7a;
  --ink:         #0a2531;   /* near-black with a blue cast */
  --paper:       #ffffff;
  --surface:     #eaf6fb;   /* blue-tinted card-on-page surface */
  --mist:        #d8eef7;   /* page background — clearly blue */
  --mist-deep:   #c2e4f1;   /* deeper blue band */
  --line:        #b3dbeb;   /* blue-tinted borders */
  --danger:      #b3261e;

  --hotbar-h: 64px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(18, 95, 126, .16);
  --shadow-blue: 0 14px 34px rgba(37, 150, 190, .28);
  --trans: .16s cubic-bezier(.3, 0, .2, 1);       /* snappy fades/colors */
  --spring: .28s cubic-bezier(.34, 1.4, .4, 1);    /* playful transforms  */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Verdana, Geneva, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -5%, rgba(79, 176, 210, .35), transparent 60%),
    radial-gradient(1000px 500px at 0% 10%, rgba(37, 150, 190, .22), transparent 55%),
    var(--mist);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--odpd-blue-d); }

/* ---------- letterhead type scale ---------- */
.eyebrow {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--odpd-blue-d);
  font-weight: 700;
  margin: 0 0 10px;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 14px; color: var(--harbor); }
h1 { font-size: clamp(26px, 4vw, 42px); letter-spacing: .01em; }
h2 { font-size: clamp(20px, 3vw, 28px); }
h3 { font-size: 16px; }

p { margin: 0 0 14px; }

/* signature gold wave rule */
.wave-rule {
  display: block;
  width: 120px;
  height: 12px;
  margin: 6px 0 22px;
}
.wave-rule.center { margin-left: auto; margin-right: auto; }

/* ============================================================
   HOTBAR (collapsible top bar)
   ============================================================ */
.hotbar-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  transition: transform var(--trans);
}
.hotbar-wrap.collapsed { transform: translateY(calc(-1 * var(--hotbar-h))); }

.hotbar {
  height: var(--hotbar-h);
  background: linear-gradient(180deg, rgba(37,150,190,.82) 0%, rgba(18,95,126,.86) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 6px 24px rgba(18, 95, 126, .28);
  display: flex;
  align-items: stretch;
  padding: 0 14px;
  gap: 6px;
}
/* solidify slightly once the user scrolls, for legibility over content */
.hotbar-wrap.scrolled .hotbar {
  background: linear-gradient(180deg, rgba(27,122,158,.93) 0%, rgba(14,58,82,.95) 100%);
}

.hb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  padding-right: 16px;
  margin-right: 6px;
  border-right: 1px solid rgba(255,255,255,.14);
}
.hb-brand svg { width: 36px; height: 36px; flex: none; }
.hb-brand .t1 { font-size: 12px; font-weight: 700; letter-spacing: .18em; }
.hb-brand .t2 { font-size: 9px; letter-spacing: .26em; color: var(--gold-soft); }

.hb-nav { display: flex; align-items: stretch; flex: 1; min-width: 0; }

.hb-item { position: relative; display: flex; }
.hb-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: #e8f3f8;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 0 18px;
  cursor: pointer;
  position: relative;
  transition: color var(--trans);
  white-space: nowrap;
}
.hb-btn::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px; bottom: 12px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--trans);
}
.hb-item:hover .hb-btn, .hb-item:focus-within .hb-btn { color: #fff; }
.hb-item:hover .hb-btn::after, .hb-item:focus-within .hb-btn::after { transform: scaleX(1); }

/* expansion panel revealed on hover */
.hb-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 0;
  opacity: 0;
  transform: translateY(-10px) scale(.98);
  transform-origin: top;
  pointer-events: none;
  transition: opacity .14s ease, transform var(--spring);
}
.hb-item:hover .hb-panel,
.hb-item:focus-within .hb-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.hb-panel .panel-note {
  padding: 4px 16px 8px;
  font-size: 11px;
  color: #5a6f7c;
}
.hb-panel a, .hb-panel button.linklike {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--harbor);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  transition: background var(--trans);
}
.hb-panel a:hover, .hb-panel button.linklike:hover { background: var(--mist); }

.hb-right { margin-left: auto; }
.hb-right .hb-panel { left: auto; right: 0; }
.hb-user .hb-btn { color: var(--gold-soft); font-weight: 700; }

/* collapse / expand arrow tab */
.hb-tab {
  transition: background .12s ease;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 22px;
  background: var(--harbor-deep);
  border: 1px solid var(--gold);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  color: var(--gold-soft);
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hb-tab:hover { background: var(--harbor); }
.hb-tab svg { transition: transform .22s cubic-bezier(.34,1.4,.4,1); }
.hotbar-wrap.collapsed .hb-tab svg { transform: rotate(180deg); }

/* ============================================================
   ADMIN EDIT control (top-right, admins only)
   ============================================================ */
.admin-edit {
  position: fixed;
  top: calc(var(--hotbar-h) + 12px);
  right: 14px;
  z-index: 850;
  background: var(--gold);
  color: var(--harbor-deep);
  border: 1px solid #a8861d;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 9px 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background .12s ease, transform var(--spring);
}
.admin-edit:hover { transform: translateY(-2px); }
.admin-edit:active { transform: scale(.95); transition-duration: .05s; }
.admin-edit.active { background: var(--harbor); color: var(--gold-soft); border-color: var(--harbor-deep); }

body.editing [data-edit] {
  outline: 2px dashed var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
  cursor: text;
  min-width: 24px;
}
body.editing [data-edit]:focus { outline-color: var(--odpd-blue); background: #fffdf2; }

.edit-only { display: none; }
body.editing .edit-only { display: inline-flex; }

/* ============================================================
   PAGE SHELL
   ============================================================ */
#page {
  padding-top: var(--hotbar-h);
  min-height: 100vh;
}
#page.page-enter > * { animation: page-in .34s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.hotbar-wrap.collapsed ~ #page { padding-top: 0; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.section { padding: 64px 0; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
}
/* alternating section bands so blue carries the whole page rhythm */
.band-tint { background: linear-gradient(180deg, var(--surface), var(--mist-deep)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-blue {
  background: linear-gradient(155deg, var(--odpd-blue) 0%, var(--odpd-blue-d) 60%, var(--harbor) 100%);
  color: #eaf6fb;
}
.band-blue h1, .band-blue h2, .band-blue h3 { color: #fff; }
.band-blue .eyebrow { color: var(--gold-soft); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr; } }

/* buttons */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .12s ease, transform var(--spring), box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(8,38,54,.18); }
.btn:active { transform: translateY(0) scale(.96); transition-duration: .05s; }
.btn-primary { background: var(--odpd-blue); color: #fff; box-shadow: 0 4px 14px rgba(37,150,190,.35); }
.btn-primary:hover { background: var(--odpd-blue-d); box-shadow: var(--shadow-blue); }
.btn-dark { background: var(--harbor); color: #fff; }
.btn-dark:hover { background: var(--harbor-deep); }
.btn-gold { background: var(--gold); color: var(--harbor-deep); }
.btn-ghost { background: transparent; border-color: var(--odpd-blue); color: var(--odpd-blue-d); }
.btn-ghost:hover { background: var(--mist); }
.btn-sm { padding: 7px 14px; font-size: 11px; }

/* forms */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--harbor);
  margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  transition: border-color .12s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--odpd-blue);
  box-shadow: 0 0 0 3px rgba(37, 150, 190, .18);
}

.form-error {
  background: #fdecea;
  border: 1px solid #f3b6b1;
  color: var(--danger);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}
.form-ok {
  background: #ecf7ee;
  border: 1px solid #b6dfbe;
  color: #1d6b32;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* public lockout: visible but unusable */
.locked { opacity: .55; }
.locked input, .locked textarea, .locked select, .locked .btn, .locked button {
  pointer-events: auto;
  cursor: not-allowed !important;
}
.locked-note {
  font-size: 12px;
  color: #5a6f7c;
  background: var(--mist);
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 14px;
}

/* ============================================================
   LANDING — hero (ambient ocean OR uploaded photo carousel)
   ============================================================ */
.hero {
  position: relative;
  height: min(88vh, 760px);
  min-height: 480px;
  overflow: hidden;
  background: linear-gradient(180deg, #1a6a8c 0%, #0e3a52 55%, #082636 100%);
}
/* ambient canvas ocean fills the hero */
#oceanCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero.has-photos #oceanCanvas { display: none; }

/* uploaded-photo carousel (only shown when assets/hero*.jpg exist) */
.hero .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.1s ease, transform 6s ease;
}
.hero .slide.on { opacity: 1; transform: scale(1); }
.hero .slide img, .hero .slide svg { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,38,54,.10) 0%, rgba(8,38,54,.34) 55%, rgba(8,38,54,.78) 100%);
  pointer-events: none;
}
.hero-copy {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 22px 64px;
  text-align: center;
  color: #fff;
}
/* 3D badge sits above the title */
#badge3d {
  width: 150px; height: 150px;
  margin: 0 auto 10px;
  cursor: grab;
}
#badge3d canvas { display: block; }
#badge3d.fallback { /* if WebGL unavailable, the SVG crest shows instead */ }
.hero-copy .eyebrow { color: var(--gold-soft); }
.hero-copy h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.45); margin-bottom: 6px; }
.hero-copy .motto {
  font-size: 14px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.hero-scrollcue {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  color: rgba(255,255,255,.7); font-size: 10px; letter-spacing: .25em;
  text-transform: uppercase; text-align: center; pointer-events: none;
}
.hero-scrollcue svg { display: block; margin: 6px auto 0; animation: cue-bob 1.8s ease-in-out infinite; }
@keyframes cue-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

.hero-dots {
  display: flex; gap: 8px; justify-content: center; margin-top: 22px;
}
.hero-dots button {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .12s ease, transform var(--spring);
}
.hero-dots button:hover { transform: scale(1.45); }
.hero-dots button.on { background: var(--gold); transform: scale(1.3); }

/* scroll-reveal (used by ScrollTrigger, with a CSS fallback) */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s ease, transform .8s ease; }
.reveal.shown { opacity: 1; transform: none; }

/* ============================================================
   DEPARTMENT ID CARD
   ============================================================ */
.id-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(420px 220px at 85% -10%, rgba(231,207,122,.32), transparent 60%),
    linear-gradient(150deg, var(--odpd-blue) 0%, var(--odpd-blue-d) 52%, var(--harbor) 100%);
  box-shadow: var(--shadow-blue);
  padding: 22px 24px;
  border: 1px solid rgba(255,255,255,.18);
  max-width: 460px;
  isolation: isolate;
}
.id-card::after { /* subtle holographic sheen */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.16) 47%, transparent 64%);
}
.id-card .id-top {
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.22);
  padding-bottom: 14px; margin-bottom: 14px;
}
.id-card .id-top svg { width: 42px; height: 42px; flex: none; }
.id-card .id-dept { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; line-height: 1.4; }
.id-card .id-dept b { display: block; font-size: 13px; letter-spacing: .14em; color: var(--gold-soft); }
.id-card .id-body { display: flex; gap: 18px; align-items: center; }
.id-card .id-photo {
  width: 86px; height: 86px; border-radius: 12px; flex: none;
  border: 2px solid rgba(255,255,255,.5);
  box-shadow: 0 6px 16px rgba(8,38,54,.4); overflow: hidden; background: #0e3a52;
}
.id-card .id-photo .identicon { width: 100%; height: 100%; border-radius: 0; }
.id-card .id-fields { flex: 1; min-width: 0; }
.id-card .id-name { font-size: 22px; font-weight: 700; line-height: 1.1; margin-bottom: 2px; }
.id-card .id-sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); }
.id-card .id-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 12px;
}
.id-card .id-grid div { font-size: 11px; }
.id-card .id-grid .k { color: rgba(255,255,255,.6); letter-spacing: .12em; text-transform: uppercase; font-size: 9px; }
.id-card .id-grid .v { font-weight: 700; letter-spacing: .04em; }
.id-card .id-barcode {
  margin-top: 16px; height: 26px; border-radius: 4px;
  background-image: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 4px, #fff 4px 5px, transparent 5px 9px);
  opacity: .85;
}
.id-card .id-chip {
  position: absolute; top: 20px; right: 22px;
  width: 34px; height: 26px; border-radius: 5px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}
.id-card .id-chip::before {
  content: ""; position: absolute; inset: 6px; border: 1px solid rgba(0,0,0,.25); border-radius: 2px;
}
.identicon { border-radius: 14px; display: block; }

/* count-up stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 720px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; }
.stat .num {
  font-size: clamp(30px, 5vw, 52px); font-weight: 700; color: #fff;
  line-height: 1; letter-spacing: .01em;
}
.stat .lbl {
  display: block; margin-top: 8px; font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold-soft);
}

/* bulletin cycler */
.bulletin-stage { position: relative; }
.bulletin-frame {
  display: flex;
  align-items: stretch;
  gap: 16px;
}
.bulletin-card {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--odpd-blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 34px;
  min-height: 220px;
}
.bulletin-card.slide-left  { animation: bulletin-left  .3s cubic-bezier(.22,1,.36,1); }
.bulletin-card.slide-right { animation: bulletin-right .3s cubic-bezier(.22,1,.36,1); }
@keyframes bulletin-left  { from { opacity: 0; transform: translateX(34px); }  to { opacity: 1; transform: none; } }
@keyframes bulletin-right { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }
.bulletin-nav {
  width: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--harbor);
  font-size: 20px;
  cursor: pointer;
  transition: background .12s ease, transform var(--spring);
  flex: none;
}
.bulletin-nav:hover { background: var(--mist); transform: scale(1.06); }
.bulletin-nav:active { transform: scale(.94); transition-duration: .05s; }
.bulletin-count {
  text-align: center;
  font-size: 11px;
  letter-spacing: .2em;
  color: #5a6f7c;
  margin-top: 14px;
}
.bulletin-tools { display: flex; gap: 8px; margin-top: 16px; }

/* ============================================================
   STATUS PAGES (unauthorized / shame)
   ============================================================ */
.status-page {
  min-height: calc(100vh - var(--hotbar-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 22px;
}
.status-page .inner { max-width: 560px; }
.status-art { width: 220px; height: 220px; margin: 0 auto 10px; }

.rank-line {
  display: inline-block;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 13px;
  margin: 6px 0 20px;
}
.rank-line b { color: var(--harbor); }

@keyframes shame-flash {
  0%, 49% { filter: none; }
  50%, 100% { filter: hue-rotate(140deg) saturate(2.2) brightness(1.25); }
}
.flashing { animation: shame-flash 0.9s steps(1) infinite; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-wrap {
  min-height: calc(100vh - var(--hotbar-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 22px;
  background:
    radial-gradient(1100px 520px at 50% -10%, rgba(37,150,190,.45), transparent 62%),
    radial-gradient(700px 400px at 100% 100%, rgba(14,58,82,.18), transparent 60%),
    var(--mist);
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card .crest { width: 74px; height: 74px; margin: 0 auto 12px; display: block; }
.auth-card h1 { text-align: center; font-size: 22px; }
.auth-card .eyebrow { text-align: center; }
.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 12.5px;
}
.auth-links button {
  background: none; border: 0; padding: 0;
  font-family: inherit; font-size: 12.5px;
  color: var(--odpd-blue-d);
  text-decoration: underline;
  cursor: pointer;
}

/* ============================================================
   DIRECTORY PAGES (admin actions / ODPD actions)
   ============================================================ */
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.dir-card {
  display: block;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--odpd-blue);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform var(--spring), border-left-color .15s ease, box-shadow .2s ease;
}
.dir-card:hover { transform: translateY(-5px); border-left-color: var(--gold); box-shadow: var(--shadow-blue); }
.dir-card:active { transform: translateY(-1px) scale(.99); transition-duration: .05s; }
.dir-card h3 { margin-bottom: 6px; }
.dir-card .tagchip { margin-top: 10px; }
.dir-card p { font-size: 13px; color: #44606f; margin: 0; }

.tagchip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  background: var(--mist);
  border: 1px solid var(--line);
  color: var(--harbor);
  border-radius: 999px;
  padding: 3px 10px;
}

/* ============================================================
   ADMIN ACCOUNT MANAGEMENT
   ============================================================ */
.table-wrap { overflow-x: auto; }
table.users {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}
table.users th, table.users td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.users th {
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--harbor);
  background: var(--mist);
}
.role-chip {
  display: inline-block;
  background: var(--odpd-blue);
  color: #fff;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 4px 11px;
  margin: 2px 4px 2px 0;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  transition: background .12s ease, transform var(--spring);
}
.role-chip:hover { background: var(--harbor); transform: translateY(-1px); }
.role-chip:active { transform: scale(.93); transition-duration: .05s; }
.role-chip.add { background: #fff; color: var(--odpd-blue-d); border: 1px dashed var(--odpd-blue); }
.role-chip.none { background: #e7eef2; color: #5a6f7c; cursor: default; }

.role-pop {
  position: absolute;
  z-index: 950;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  width: 230px;
  animation: pop-in .16s cubic-bezier(.34,1.4,.4,1) both;
  transform-origin: top left;
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(.92) translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.role-pop label {
  display: flex; gap: 8px; align-items: center;
  font-size: 12.5px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.role-pop label:hover { background: var(--mist); }
.role-pop .hint { font-size: 10.5px; color: #5a6f7c; padding: 4px 8px 6px; }

.save-flash {
  font-size: 11px; color: #1d6b32; letter-spacing: .1em; text-transform: uppercase;
  opacity: 0; transition: opacity .4s;
}
.save-flash.on { opacity: 1; }

/* audit log modal */
.modal-veil {
  position: fixed; inset: 0;
  background: rgba(8, 38, 54, .55);
  z-index: 990;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: veil-in .15s ease both;
}
@keyframes veil-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  animation: pop-in .22s cubic-bezier(.34,1.4,.4,1) both;
  background: #fff;
  border-radius: var(--radius);
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow);
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.modal header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.modal header h2 { margin: 0; font-size: 18px; }
.modal .modal-body { padding: 16px 22px; overflow-y: auto; }
.modal-close {
  background: none; border: 0; cursor: pointer;
  font-size: 20px; color: var(--harbor);
}
.audit-row {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 13px;
}
.audit-row .when { font-size: 11px; color: #5a6f7c; }
.audit-row b { color: var(--harbor); }

/* ============================================================
   ACCOUNT CREATION CODE PAGE
   ============================================================ */
.code-display {
  font-size: clamp(34px, 7vw, 60px);
  letter-spacing: .35em;
  text-align: center;
  color: var(--harbor);
  background: #fff;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 30px 10px 30px 24px; /* extra left to balance letter-spacing */
  font-weight: 700;
  box-shadow: var(--shadow);
}
.code-countdown {
  text-align: center;
  font-size: 13px;
  color: #44606f;
  margin-top: 14px;
}
.code-countdown b { color: var(--harbor); font-size: 16px; letter-spacing: .08em; }

/* ============================================================
   DOLPHIN MASCOT
   ============================================================ */
#dolphin {
  position: fixed;
  top: 0;
  left: 0;
  width: 92px;
  height: 60px;
  z-index: 800;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform;
  filter: drop-shadow(0 4px 8px rgba(8,38,54,.25));
  transition: filter .3s;
}
#dolphin:hover { filter: drop-shadow(0 4px 14px rgba(37,150,190,.6)); }

/* footer */
.site-footer {
  background: linear-gradient(155deg, var(--odpd-blue-d) 0%, var(--harbor) 70%, var(--harbor-deep) 100%);
  color: #cfeaf5;
  font-size: 12px;
  padding: 34px 0;
  margin-top: 40px;
  border-top: 3px solid var(--gold);
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* loading splash */
#boot {
  position: fixed; inset: 0;
  background: linear-gradient(160deg, var(--odpd-blue) 0%, var(--odpd-blue-d) 45%, var(--harbor-deep) 100%);
  color: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px;
  z-index: 2000;
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flashing { animation: none; filter: hue-rotate(140deg) saturate(1.6); }
  .hero .slide { transition: opacity .4s ease; transform: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .bulletin-card.slide-left, .bulletin-card.slide-right { animation: none; }
  #page.page-enter > * { animation: none; }
  .role-pop, .modal, .modal-veil { animation: none; }
}

@media (max-width: 720px) {
  .hb-brand .t1 { font-size: 10px; }
  .hb-brand .t2 { display: none; }
  .hb-btn { padding: 0 10px; font-size: 11px; }
  .bulletin-card { padding: 22px; }
}

/* ============================================================
   SMART-DOLPHIN ZZZ, TOASTS, VIEW TRANSITIONS, RESPONSIVE ID
   ============================================================ */
.dolphin-zzz {
  position: fixed; top: 0; left: 0; z-index: 801;
  font-family: Verdana, sans-serif; font-weight: 700; font-size: 13px;
  color: var(--gold-soft); letter-spacing: 2px; pointer-events: none;
  text-shadow: 0 2px 6px rgba(8,38,54,.4);
  animation: zzz-float 2.4s ease-in-out infinite;
}
@keyframes zzz-float { 0%,100% { opacity:.4; transform: translateY(0);} 50% { opacity:1; } }

#toastHost {
  position: fixed; right: 18px; bottom: 18px; z-index: 1200;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.toast {
  background: linear-gradient(150deg, var(--odpd-blue), var(--odpd-blue-d));
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 12px 18px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: var(--shadow-blue);
  transform: translateY(16px); opacity: 0;
  transition: transform .3s cubic-bezier(.34,1.4,.4,1), opacity .3s ease;
  max-width: 320px;
}
.toast.in { transform: translateY(0); opacity: 1; }

/* View Transition: gentle cross-dissolve + slight slide */
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(10px); } }
::view-transition-old(root) { animation: vt-out .22s ease both; }
::view-transition-new(root) { animation: vt-in .30s ease both; }

@media (max-width: 820px) {
  .acct-top { grid-template-columns: 1fr !important; }
}
@media (prefers-reduced-motion: reduce) {
  .dolphin-zzz { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  #oceanCanvas { opacity: .9; }
}

/* ============================================================
   PASSWORD REVEAL TOGGLE
   ============================================================ */
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 44px; }
.pw-toggle {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; padding: 6px;
  color: var(--odpd-blue-d); line-height: 0; border-radius: 6px;
  transition: background .12s ease, color .12s ease;
}
.pw-toggle:hover { background: var(--surface); color: var(--harbor); }

/* ============================================================
   MORAG'S CORNER — persistent collapsible left column
   ============================================================ */
:root { --morag-w: 260px; }
#moragCorner {
  position: fixed;
  top: var(--hotbar-h); left: 0; bottom: 0;
  width: var(--morag-w);
  z-index: 700;
  background: linear-gradient(170deg, var(--odpd-blue-d) 0%, var(--harbor) 80%);
  border-right: 2px solid var(--gold);
  box-shadow: 6px 0 24px rgba(8,38,54,.18);
  transition: transform .34s cubic-bezier(.4,0,.2,1);
}
#moragCorner.collapsed { transform: translateX(calc(-1 * var(--morag-w))); }

.morag-inner { height: 100%; overflow-y: auto; padding: 20px 18px 28px; color: #eaf6fb; }
.morag-head h3 { color: #fff; margin: 0 0 8px; font-size: 16px; letter-spacing: .04em; }
.morag-rule { height: 3px; width: 54px; background: var(--gold); border-radius: 2px; margin-bottom: 16px; }
.morag-feed { display: flex; flex-direction: column; gap: 14px; }
.morag-update {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-left: 3px solid var(--gold);
  border-radius: 8px; padding: 12px 13px;
}
.morag-update h4 { margin: 2px 0 6px; font-size: 13.5px; color: #fff; }
.morag-update p { margin: 0; font-size: 12.5px; color: #cfeaf5; line-height: 1.5; white-space: pre-wrap; }
.morag-when { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-soft); }
.morag-del {
  margin-top: 8px; background: none; border: 1px solid rgba(255,255,255,.3);
  color: #ffd; font-size: 10.5px; padding: 4px 9px; border-radius: 5px; cursor: pointer;
  font-family: inherit; transition: background .12s ease;
}
.morag-del:hover { background: rgba(255,255,255,.12); }

/* the open/close tab, hangs off the right edge of the column */
.morag-tab {
  position: absolute; top: 18px; right: -34px;
  width: 34px; height: 96px;
  background: linear-gradient(170deg, var(--odpd-blue-d), var(--harbor));
  border: 2px solid var(--gold); border-left: 0;
  border-radius: 0 10px 10px 0;
  color: var(--gold-soft); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  transition: background .12s ease;
}
.morag-tab:hover { background: var(--harbor); }
.morag-tab svg { transition: transform .34s cubic-bezier(.4,0,.2,1); }
#moragCorner.collapsed .morag-tab svg { transform: rotate(180deg); }
.morag-tab-label {
  writing-mode: vertical-rl; text-orientation: mixed;
  font-size: 9px; letter-spacing: .18em; font-weight: 700;
}

/* shift page + footer content right to make room (desktop) */
@media (min-width: 981px) {
  #page, .site-footer { margin-left: var(--morag-w); transition: margin-left .34s cubic-bezier(.4,0,.2,1); }
  body.morag-collapsed #page, body.morag-collapsed .site-footer { margin-left: 0; }
}
/* on small screens the column floats over content (starts collapsed via JS-less default) */
@media (max-width: 980px) {
  #moragCorner { width: 230px; }
  :root { --morag-w: 230px; }
}

@media (prefers-reduced-motion: reduce) {
  #moragCorner, .morag-tab svg, #page, .site-footer { transition: none; }
}

/* "coming soon" placeholder entries in hotbar menus */
.hb-soon { display:block; padding:9px 16px; font-size:12.5px; color:#9fb8c4; cursor:default; }

/* ============================================================
   ROSTER GRID
   ============================================================ */
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.roster-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--odpd-blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px; text-align: center;
  transition: transform var(--spring), box-shadow .2s ease;
}
.roster-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-blue); }
.roster-photo {
  width: 96px; height: 96px; margin: 0 auto 12px;
  border-radius: 14px; overflow: hidden;
  border: 2px solid var(--line); background: var(--harbor);
}
.roster-photo .identicon { width: 100%; height: 100%; border-radius: 0; }
.roster-name { font-weight: 700; color: var(--harbor); font-size: 14px; }
.roster-rank { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--odpd-blue-d); margin: 3px 0 10px; }
.roster-meta { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

/* privacy warning interstitial badge */
.privacy-warn-badge {
  width: 96px; height: 96px; margin: 0 auto 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff3, transparent 70%), var(--danger);
  color: #fff; font-size: 54px; line-height: 96px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(179,38,30,.4);
  animation: pw-pulse 1.6s ease-in-out infinite;
}
@keyframes pw-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .privacy-warn-badge { animation: none; } }

/* ============================================================
   ROSTER CARD AS BUTTON + EXPANDING DETAIL
   ============================================================ */
button.roster-card {
  font-family: inherit; cursor: pointer; width: 100%;
  display: block; text-align: center; color: var(--ink);
}
button.roster-card:active { transform: translateY(-1px) scale(.99); }

.roster-detail-veil {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(8,38,54,.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; transition: opacity .26s ease;
}
.roster-detail-veil.open { opacity: 1; }
.roster-detail {
  position: relative;
  background: var(--paper);
  border-radius: 16px;
  border-top: 5px solid var(--gold);
  box-shadow: 0 30px 80px rgba(8,38,54,.45);
  max-width: 760px; width: 100%; max-height: 86vh; overflow: hidden;
  display: grid; grid-template-columns: 300px 1fr;
  transform: translateY(20px) scale(.96); opacity: 0;
  transition: transform .3s cubic-bezier(.22,1,.36,1), opacity .3s ease;
}
.roster-detail-veil.open .roster-detail { transform: none; opacity: 1; }
@media (max-width: 680px) {
  .roster-detail { grid-template-columns: 1fr; max-height: 90vh; overflow-y: auto; }
}
.roster-detail-close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  background: rgba(8,38,54,.5); color: #fff; border: 0; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%; font-size: 16px;
}
.roster-detail-close:hover { background: var(--harbor-deep); }

.rd-collage {
  background: var(--harbor-deep); position: relative;
  display: grid; grid-template-columns: 1fr; min-height: 260px;
}
.rd-collage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd-collage .rp-identicon { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.rd-collage .rp-identicon .identicon { width: 70%; height: auto; border-radius: 0; }
/* a real collage when extra photos exist */
.rd-collage.multi { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 2px; }
.rd-collage.multi img:first-child { grid-column: 1 / -1; }
@media (max-width: 680px) { .rd-collage { max-height: 320px; } }

.rd-body { padding: 26px 28px; overflow-y: auto; }
.rd-body h2 { margin: 2px 0 6px; }
.rd-badge {
  display: inline-block; background: var(--surface); border: 1px solid var(--line);
  color: var(--odpd-blue-dd); font-weight: 700; font-size: 12px;
  padding: 4px 12px; border-radius: 999px; letter-spacing: .06em;
}
.rd-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
