:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #06142a;
  color: #e8f1fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(0, 172, 230, 0.16), transparent 60%),
    linear-gradient(180deg, #0b1f3a, #071730 60%, #040d1c);
  color: #e8f1fa;
}

.top {
  position: relative;
  padding: max(8px, env(safe-area-inset-top)) 16px 14px;
  background: transparent;
  color: white;
  text-align: center;
  border-bottom: 1px solid rgba(0, 172, 230, 0.28);
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  margin: 0 0 8px;
}

.header-back,
#nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: white;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

.header-back {
  justify-content: flex-start;
  gap: 2px;
  padding: 0 8px 0 0;
}

.header-back[hidden] { display: none !important; }

#nav-toggle { gap: 6px; }

#nav-toggle svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.header-back svg {
  width: 22px;
  height: 22px;
  flex: none;
}

#nav-toggle { padding: 0 2px; }

.header-back:focus-visible,
#nav-toggle:focus-visible,
.drawer-close:focus-visible,
#drawer a:focus-visible {
  outline: 2px solid #9fd4ff;
  outline-offset: 2px;
}

#scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 20, 40, 0.35);
  z-index: 20;
}

#drawer {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(20rem, 88vw);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: #0b1c33;
  color: #e8f1fa;
  border-right: 1px solid rgba(0, 172, 230, 0.28);
  transform: translateX(-105%);
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
}

.drawer-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.drawer-section + .drawer-section {
  border-top: 1px solid rgba(0, 172, 230, 0.18);
}

#drawer.open { transform: none; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 8px 0 0;
}

.drawer-title {
  margin: 0;
  padding: 12px 0 0 16px;
  font-weight: 750;
}

.drawer-close {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: rgba(0, 172, 230, 0.12);
  color: #d7ecff;
  font: inherit;
  font-weight: 750;
  padding: 0 14px;
}

.pages {
  list-style: none;
  margin: 0;
  padding: 8px;
}

.pages a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  color: inherit;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
}

.pages a:hover,
.pages a:focus-visible,
.pages a[aria-current="page"] {
  background: rgba(0, 172, 230, 0.18);
  color: #fff;
}

.drawer-foot {
  margin-top: auto;
  padding: 8px;
  background: #0b1c33;
  border-top: 1px solid rgba(0, 172, 230, 0.2);
}

.drawer-label {
  margin: 8px 14px 0;
  color: #5c6b80;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.drawer-logout-form { margin: 0; }

.drawer-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: #eef2fb;
  color: #00285c;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0;
}

.wordmark {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.fulfill, .ment { color: #fff; }

.heart { width: 28px; height: 26px; }
.pulse { width: 64px; height: 26px; margin-left: -22px; }

h1 {
  margin: 8px 0 0;
  font-size: 1.05rem;
  font-weight: 650;
}

.login-main {
  padding: 24px 16px 32px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  max-width: 28rem;
  margin: 0 auto 16px;
}

.admin-tabs a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(0, 172, 230, 0.35);
  border-radius: 999px;
  background: rgba(8, 28, 52, 0.72);
  color: #d7ecff;
  font-weight: 750;
  text-decoration: none;
}

.admin-tabs a[aria-selected="true"] {
  background: rgba(8, 28, 52, 0.92);
  border-color: rgba(0, 172, 230, 0.55);
  box-shadow: inset 0 0 0 1px rgba(0, 172, 230, 0.28);
  color: #fff;
}

.brand-lockup .wordmark,
.brand-lockup .heart,
.brand-lockup .pulse { display: none; }

.hb-logo {
  display: block;
  height: 72px;
  width: auto;
  max-width: min(78vw, 280px);
  margin: 0 auto;
  background: transparent;
  animation: hb-logo-glow 4.8s ease-in-out infinite;
}

@media (min-width: 801px) {
  .hb-logo { height: 104px; max-width: 360px; }
  #drawer { width: 22rem; }
}

@keyframes hb-logo-glow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(0, 172, 230, 0.28)); }
  50% { filter: drop-shadow(0 0 10px rgba(0, 172, 230, 0.55)); }
}

@media (prefers-reduced-motion: reduce) {
  .hb-logo { animation: none; }
}

.login-card {
  max-width: 24rem;
  margin: 0 auto;
  padding: 18px 16px 16px;
  background: rgba(14, 38, 70, 0.72);
  border: 1px solid rgba(0, 172, 230, 0.35);
  border-radius: 16px;
  box-shadow: 0 0 26px rgba(0, 172, 230, 0.12);
}

.login-card h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.login-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 12px;
  color: #9db6cf;
  font-size: 0.82rem;
  font-weight: 700;
}

.login-card input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(0, 172, 230, 0.4);
  border-radius: 12px;
  background: rgba(4, 13, 28, 0.55);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 550;
}

.login-card button {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  background: #00285c;
  color: white;
  font: inherit;
  font-weight: 750;
}

.login-error {
  margin: 0 0 12px;
  color: #dc2626;
  font-weight: 700;
}

.preview-note {
  max-width: 24rem;
  margin: 0 auto 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 172, 230, 0.22);
  border: 1px solid rgba(126, 231, 255, 0.72);
  box-shadow: 0 0 18px rgba(0, 172, 230, 0.2);
  color: #e8f1fa;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.preview-note a {
  color: #7ee7ff;
  font-weight: 750;
}

.hint {
  margin: 0 0 12px;
  color: #5c6b80;
  font-size: 0.82rem;
}

.login-card select {
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(0, 172, 230, 0.4);
  border-radius: 12px;
  background: rgba(4, 13, 28, 0.55);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 550;
}

.login-card a {
  color: #9fd8ff;
  font-weight: 750;
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 24rem;
  margin: 16px auto 0;
}

.user-card {
  padding: 16px;
  background: rgba(14, 38, 70, 0.72);
  border: 1px solid rgba(0, 172, 230, 0.28);
  border-radius: 16px;
}

.user-card h2 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-actions button {
  flex: 1 1 8rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(0, 172, 230, 0.35);
  border-radius: 12px;
  background: rgba(4, 13, 28, 0.55);
  color: #d7ecff;
  font: inherit;
  font-size: 16px;
  font-weight: 750;
}

.people {
  max-width: 28rem;
  margin: 0 auto;
}

.people .login-card,
.people .user-card {
  max-width: none;
  background: rgba(8, 22, 44, 0.72);
  border: 1px solid rgba(0, 172, 230, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.people .hint,
.people .link-expires {
  margin: 0 0 12px;
  color: #c5d7ea;
  font-size: 13px;
  line-height: 1.35;
}

.people .login-error { color: #ff8a8a; }

.people .user-list { max-width: none; }

.people .row-actions {
  flex-direction: column;
  align-items: stretch;
}

.people .row-actions button { flex: none; }

.people .copy-link,
.people .primary {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #024fa3;
  color: #fff;
  font-size: 16px;
  font-weight: 750;
  cursor: pointer;
}

.people .more-menu { margin-top: 8px; }

.people .more-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: #9fd4ff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.people .more-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.people .more-panel button { width: 100%; cursor: pointer; }

.people .more-panel button.danger {
  color: #ff8a8a;
  border-color: rgba(255, 77, 94, 0.55);
  background: rgba(127, 0, 0, 0.28);
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  transform: translateX(-50%);
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid rgba(0, 172, 230, 0.45);
  border-radius: 999px;
  background: rgba(8, 22, 44, 0.94);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.copy-toast[hidden] { display: none; }

.confirm-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 13, 28, 0.72);
}

.confirm-layer[hidden] { display: none; }

.confirm-card {
  width: min(100%, 24rem);
  margin-bottom: max(8px, env(safe-area-inset-bottom));
  padding: 18px 16px 16px;
  border: 1px solid rgba(0, 172, 230, 0.32);
  border-radius: 16px;
  background: rgba(8, 22, 44, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.confirm-card p {
  margin: 0 0 14px;
  color: #e8f1fa;
  font-size: 16px;
  line-height: 1.35;
}

.confirm-card button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: #024fa3;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 750;
  cursor: pointer;
}

.confirm-card [data-no] {
  margin-top: 8px;
  border: 1px solid rgba(0, 172, 230, 0.35);
  background: transparent;
  color: #d7ecff;
}
