/* nunito (aheriez.space) + rr layout + cute pastel palette (cream / pink / lavender / mint) */

@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,700;0,800;1,400&display=swap");

:root {
  --cream: #fff8fb;
  --pink: #ffb8d9;
  --lav: #d4c4ff;
  --mint: #b8f2e6;
  --bg: #fff5f9;
  --bg-elev: rgba(255, 255, 255, 0.78);
  --bg-card: rgba(255, 255, 255, 0.72);
  --text: #4a3f55;
  --muted: #7a6b86;
  --accent: #e85d8c;
  --accent-hot: #ff6b9d;
  --accent-dim: rgba(232, 93, 140, 0.28);
  --border: rgba(255, 255, 255, 0.95);
  --border-soft: rgba(212, 196, 255, 0.55);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 16px 48px rgba(180, 120, 200, 0.18);
  --wrap: min(1120px, 94vw);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  /* cute font from aheriez.space */
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(165deg, #ffe8f3 0%, #e8e4ff 45%, #d5f5ff 100%);
  line-height: 1.5;
  /* all ui copy lowercase (inputs keep normal typing) */
  text-transform: lowercase;
}

/* opt out of lowercase for legal pages */
.proper-case,
.proper-case * {
  text-transform: none;
}

input,
textarea,
select {
  text-transform: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* soft sparkles (aheriez-style on light) */
.bg-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.55) 0, transparent 3px),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.45) 0, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.4) 0, transparent 2px),
    radial-gradient(circle at 90% 70%, rgba(255, 255, 255, 0.5) 0, transparent 3px);
  background-size: 200px 200px, 200px 200px, 200px 200px, 200px 200px;
}

/* main header row */
.rr-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 248, 252, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(180, 120, 200, 0.08);
}

.rr-brand {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.rr-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* buttons — cute gradient primary, soft outline */
.btn {
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: linear-gradient(120deg, var(--pink), var(--lav));
  color: #fff;
  box-shadow: 0 8px 24px rgba(200, 120, 200, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  border: 2px solid var(--border-soft);
}

.btn-outline:hover {
  border-color: var(--pink);
  background: rgba(255, 255, 255, 0.85);
}

.btn-tiny {
  padding: 0.45rem 0.75rem;
  font-size: 0.72rem;
}

.linklike {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.linklike:hover {
  color: #c44b9e;
}

/* separator dot between nav items */
.nav-dot {
  color: var(--muted);
  opacity: 0.4;
  font-size: 1.2rem;
  user-select: none;
}

.inbox-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.05rem;
  padding: 0 0.35rem;
  margin-left: 0.05rem;
  border-radius: 999px;
  background: rgba(255, 120, 150, 0.22);
  border: 1px solid rgba(255, 120, 150, 0.35);
  color: #c44b9e;
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1;
}

.btn.danger {
  background: rgba(255, 120, 150, 0.18);
  border-color: rgba(255, 120, 150, 0.45);
  color: #c44b9e;
}

.btn.danger:hover {
  filter: brightness(1.04);
  border-color: rgba(255, 120, 150, 0.6);
  background: rgba(255, 120, 150, 0.25);
}

.sticky-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0.35rem 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(20, 10, 30, 0.35);
  backdrop-filter: blur(6px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(560px, 96vw);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.15rem 1.25rem;
}

.age-modal {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.86));
  border: 1px solid rgba(255, 184, 217, 0.55);
}

.age-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.age-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.age-kicker {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #c44b9e;
}

.age-text {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
  margin: 0.25rem 0 1rem;
}

.age-cookie-text {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: -0.2rem;
}

.age-checks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.age-terms-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.4;
}

.age-terms-check input[type="checkbox"] {
  /* reset ALL global input styles that make checkboxes huge */
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  padding: 0 !important;
  border-radius: 3px !important;
  border: 1.5px solid rgba(196, 75, 158, 0.45);
  background: rgba(255, 255, 255, 0.75);
  margin-top: 0.2rem;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
  box-shadow: none !important;
}
.age-terms-check input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--pink), var(--lav));
  border-color: rgba(196, 75, 158, 0.7);
}
.age-terms-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0px;
  width: 4px;
  height: 8px;
  border: 1.5px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
/* visually show checkbox is locked until link is visited */
.age-terms-check input[type="checkbox"]:disabled {
  cursor: not-allowed;
  border-color: rgba(196, 75, 158, 0.2);
  background: rgba(255, 255, 255, 0.4);
}

.age-check-link {
  color: #c44b9e;
  font-weight: 800;
  text-decoration: underline;
}

/* links always full opacity regardless of row state */
.age-check-link {
  opacity: 1;
}
/* prefix + checkbox start greyed — js sets opacity directly via .visited class */
.age-terms-check .age-check-prefix {
  opacity: 0.35;
  transition: opacity 0.2s;
}
.age-terms-check.visited .age-check-prefix {
  opacity: 1;
}
/* the free 18+ row is always fully visible */
.age-terms-check--free .age-check-prefix {
  opacity: 1;
}

.age-checks-hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.65;
}

.age-actions {
  display: flex;
  justify-content: flex-start;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.modal-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.inline {
  display: inline;
}

/* global banner — admins set in preferences */
.site-announcement {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 1rem;
  padding-left: 2.4rem;
  background: linear-gradient(120deg, rgba(255, 214, 235, 0.95), rgba(255, 190, 225, 0.92));
  border-bottom: 2px solid rgba(200, 120, 170, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* top left — dismiss (hides until a new announcement / different expiry) */
.site-announcement-close {
  position: absolute;
  top: 0.4rem;
  left: 0.45rem;
  z-index: 2;
  margin: 0;
  padding: 0.1rem 0.45rem 0.2rem;
  line-height: 1;
  font-size: 1.35rem;
  font-weight: 800;
  color: rgba(90, 40, 80, 0.85);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(200, 120, 170, 0.4);
  border-radius: 0.35rem;
  cursor: pointer;
}

.site-announcement-close:hover {
  background: rgba(255, 255, 255, 0.85);
  color: #5a2850;
}

.site-announcement-inner {
  max-width: var(--wrap);
  margin: 0 auto;
}

.site-announcement-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b34f8c;
  margin-bottom: 0.25rem;
}

.site-announcement-text {
  margin: 0;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.site-announcement-until {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(100, 55, 90, 0.75);
}

/* maintenance / freeze — set SITE_READ_ONLY=1 on the server */
.site-readonly-banner {
  position: sticky;
  top: 0;
  z-index: 38;
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 1rem;
  background: linear-gradient(120deg, rgba(180, 210, 255, 0.95), rgba(212, 196, 255, 0.92));
  border-bottom: 2px solid rgba(100, 80, 160, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

/* admin: preview-as-user strip */
.site-preview-banner {
  position: sticky;
  top: 0;
  z-index: 39;
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 1rem;
  background: linear-gradient(120deg, rgba(198, 227, 255, 0.96), rgba(176, 215, 255, 0.93));
  border-bottom: 2px solid rgba(90, 130, 190, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.site-preview-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-weight: 700;
  color: #2a4f7a;
}

.site-readonly-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text);
  text-align: center;
}

/* admin user list table */
.admin-user-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--bg-elev);
}

.admin-user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 640px;
}

.admin-user-table th,
.admin-user-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-soft);
}

.admin-user-table th {
  font-weight: 800;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: lowercase;
}

.admin-user-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-user-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  margin: 0.1rem 0.15rem 0.1rem 0;
}

.admin-user-pill--ban {
  background: rgba(232, 93, 140, 0.35);
  color: var(--text);
}

.admin-user-pill--staff {
  background: rgba(184, 242, 230, 0.85);
  color: var(--text);
}

/* page shell */
.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.wrap--landing {
  padding-top: 2rem;
}

/* landing hero — rr structure */
.rr-hero {
  text-align: center;
  padding: 2rem 0 2.5rem;
}

.rr-hero-title {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 4.25rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.rr-hero-title .line1 {
  display: block;
  color: var(--text);
}

.rr-hero-title .line2 {
  display: block;
  color: #ff5a9a;
  text-shadow: 0 0 36px rgba(255, 90, 154, 0.25);
}

.rr-hero-sub {
  max-width: 560px;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: 1rem;
}

.rr-hero-cta {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.rr-hero-cta .btn {
  padding: 0.85rem 1.35rem;
  font-size: 0.8rem;
  border-radius: 999px;
}

.rr-hero-note {
  margin-top: 1.5rem;
  font-size: 1.6rem;
  color: var(--muted);
}

/* how it works — rr: mono kicker + big title + 4 cards */
.rr-features {
  padding: 2rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.65);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 900px) {
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }
}

.showcase-card {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(155, 107, 181, 0.35);
  color: var(--text);
  text-decoration: none;
}

.showcase-card:hover {
  border-color: rgba(255, 120, 150, 0.45);
  background: rgba(255, 255, 255, 0.7);
}

.showcase-name {
  font-weight: 800;
  line-height: 1.1;
}

.showcase-tags {
  font-size: 0.85rem;
  margin-top: 0.1rem;
}

.rr-features-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.rr-kicker {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #c44b9e;
  letter-spacing: 0.02em;
  margin: 0 0 0.35rem;
}

.rr-section-title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.rr-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.rr-feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.1rem;
  min-height: 140px;
  box-shadow: var(--shadow);
}

.rr-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 184, 217, 0.45);
  border: 1px solid rgba(212, 196, 255, 0.75);
  color: #c44b9e;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  font-weight: 800;
}

.rr-feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.25;
  color: var(--text);
}

.rr-feature-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .rr-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .rr-feature-grid {
    grid-template-columns: 1fr;
  }
}

/* generic cards (browse, profile, etc.) */
.card {
  background: var(--bg-elev);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow);
  /* so long text can shrink inside flex column layout */
  min-width: 0;
  max-width: 100%;
}

.card.compact {
  padding: 1.15rem 1.2rem;
}

/* soft rainbow-ish frame for special users (see server CUTE_TINT_NAMES) */
.profile-card-cute {
  background:
    linear-gradient(
      145deg,
      rgba(255, 214, 230, 0.55) 0%,
      rgba(230, 210, 255, 0.45) 35%,
      rgba(200, 240, 255, 0.4) 70%,
      rgba(255, 245, 200, 0.45) 100%
    );
  border: 1px solid rgba(255, 140, 180, 0.55);
  box-shadow:
    0 4px 28px rgba(255, 130, 170, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.65) inset;
}

.showcase-card-cute {
  border-color: rgba(255, 140, 180, 0.65);
  background: linear-gradient(
    160deg,
    rgba(255, 220, 235, 0.75),
    rgba(220, 230, 255, 0.65)
  );
  box-shadow: 0 4px 18px rgba(255, 130, 170, 0.2);
}

.est {
  margin: 0 0 0.35rem;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #c44b9e;
}

.card h1,
.card .h1 {
  margin: 0.2rem 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}

.card h1 em,
.card .h1 em {
  font-style: italic;
  color: #ff5a9a;
}

.panel-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.kicker {
  margin: 0 0 0.25rem;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: #c44b9e;
}

.hero-sub {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tiny-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* map old btn classes to rr */
a.btn,
button.btn {
  text-decoration: none;
}

.card .btn:not(.btn-outline):not(.ghost),
.wrap .btn:not(.btn-outline):not(.ghost) {
  background: linear-gradient(120deg, var(--pink), var(--lav));
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(200, 120, 200, 0.3);
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  padding: 0.65rem 1.1rem;
  border: none;
}

.card .btn.secondary,
.wrap .btn.secondary {
  background: linear-gradient(120deg, var(--mint), #a8e6cf);
  color: var(--text);
  border: none;
  box-shadow: 0 6px 20px rgba(100, 180, 160, 0.22);
}

.card .btn.secondary:hover,
.wrap .btn.secondary:hover {
  filter: brightness(1.04);
}

.card .btn.tiny,
.wrap .btn.tiny {
  padding: 0.5rem 0.85rem;
  font-size: 0.72rem;
}

.card .btn.ghost,
.wrap .btn.ghost {
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid var(--border-soft);
  color: var(--text);
  box-shadow: none;
}

.profile-save-wrap {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

.card .btn.profile-save-btn {
  width: auto;
  max-width: 200px;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(212, 196, 255, 0.65);
  background: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  color: var(--text);
}

.flash.ok {
  border-color: rgba(100, 200, 140, 0.45);
  background: rgba(184, 242, 230, 0.35);
}

.flash.info {
  border-color: rgba(120, 170, 230, 0.5);
  background: rgba(198, 227, 255, 0.45);
}

.flash.warn {
  border-color: rgba(255, 200, 100, 0.5);
  background: rgba(255, 240, 200, 0.45);
}

.flash.error {
  border-color: rgba(255, 120, 150, 0.55);
  background: rgba(255, 220, 230, 0.45);
}

.stack-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.stack-item {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(155, 107, 181, 0.35);
}

.stack-item h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #c44b9e;
}

.stack-item p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.stack-item form {
  margin-top: 0.4rem;
}

/* /enter guest gate — wide buttons like the old layout */
.enter-gate .enter-gate-btn {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
}

.enter-gate-form .form-row input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin-top: 0.35rem;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--text);
}

.check input {
  accent-color: var(--pink);
}

/* dual range age slider */
.age-range-display {
  font-weight: 700;
  color: #c44b9e;
  font-size: 0.9em;
}

.dual-range {
  position: relative;
  height: 2.2rem;
  margin-top: 0.5rem;
}

.dual-range-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(212, 196, 255, 0.55);
  border-radius: 999px;
  transform: translateY(-50%);
  pointer-events: none;
}

.dual-range-fill {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 184, 217, 0.9), rgba(196, 75, 158, 0.85));
  border-radius: 999px;
}

.dual-range-input,
.dual-range-input:focus {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  height: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  pointer-events: none;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  outline: none;
  box-shadow: none;
}

.dual-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: all;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #c44b9e;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(196, 75, 158, 0.35);
}

.dual-range-input::-moz-range-thumb {
  pointer-events: all;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #c44b9e;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(196, 75, 158, 0.35);
}

/* preference bubble pills */
.pref-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.pref-pill {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid rgba(212, 196, 255, 0.75);
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  user-select: none;
  font-family: inherit;
  line-height: 1.4;
}

/* hide the actual radio/checkbox inputs inside pills */
.pref-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.pref-pill:hover {
  border-color: rgba(196, 75, 158, 0.45);
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
}

.pref-pill.active {
  background: linear-gradient(135deg, rgba(255, 184, 217, 0.75), rgba(212, 196, 255, 0.75));
  border-color: rgba(196, 75, 158, 0.5);
  color: var(--text);
}

.divider {
  text-align: center;
  color: var(--muted);
  margin: 0.75rem 0;
  letter-spacing: 0.2em;
  font-weight: 700;
}

.notice {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 200, 100, 0.35);
  background: rgba(255, 200, 100, 0.08);
}

.notice-title {
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.notice-text {
  color: var(--muted);
  font-size: 0.95rem;
}

.form {
  display: grid;
  gap: 1rem;
}

.form-row label {
  display: block;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 2px solid rgba(212, 196, 255, 0.85);
  background: var(--cream);
  font: inherit;
  color: var(--text);
  outline: none;
}

textarea {
  border-radius: var(--radius);
  resize: vertical;
  min-height: 120px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 184, 217, 0.45);
}

.hint {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.browse-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.browse-mode-toggle {
  display: flex;
  gap: 0.35rem;
}

/* tourney-specific tag colours */
.tag-mod {
  background: rgba(255, 184, 217, 0.45);
  border: 1.5px solid rgba(255, 140, 180, 0.5);
  color: #c44b9e;
  font-weight: 800;
}
.tag-skill {
  background: rgba(212, 196, 255, 0.4);
  border: 1.5px solid rgba(180, 160, 255, 0.5);
  color: #6b4fc8;
  font-weight: 800;
}
.tag-rank {
  background: rgba(184, 242, 230, 0.5);
  border: 1.5px solid rgba(100, 200, 170, 0.5);
  color: #2a7a5a;
  font-weight: 800;
}
.pager {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pager-text {
  font-weight: 800;
  color: #c44b9e;
  min-width: 3.5rem;
  text-align: center;
}

.profile-block {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  min-width: 0;
  max-width: 100%;
}

.profile-block > div:last-child {
  min-width: 0;
  flex: 1;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 2px solid rgba(212, 196, 255, 0.65);
  background: var(--cream);
  object-fit: cover;
}

.avatar.big {
  width: 80px;
  height: 80px;
  border-radius: 14px;
}

.avatar.smol {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.user-name {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.user-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.tag {
  font-size: 0.72rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 196, 255, 0.75);
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.bio {
  margin: 0.75rem 0;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.bio.big {
  font-size: 1rem;
}

.softlink {
  display: inline-block;
  margin-top: 0.35rem;
  color: #9b4d9e;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mini-label {
  display: block;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: var(--text);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.messagebox textarea {
  margin-bottom: 0.65rem;
  max-width: 100%;
  box-sizing: border-box;
}

.rules-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .rules-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.rule-box h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: #c44b9e;
  letter-spacing: 0.06em;
}

.rule-box ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.inbox {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.msg {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.55);
  min-width: 0;
  max-width: 100%;
}

.msg--row {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.msg-link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.msg-actions {
  margin: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.msg.unread {
  border-color: rgba(255, 184, 217, 0.85);
  background: rgba(255, 248, 252, 0.95);
}

.msg-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.msg-from b {
  color: var(--text);
}

.msg-time {
  font-size: 0.8rem;
  color: var(--muted);
}

.msg-body {
  margin-top: 0.35rem;
  white-space: pre-wrap;
  color: var(--text);
  /* dont force lowercase for messages */
  text-transform: none;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.empty {
  color: var(--muted);
  font-weight: 600;
}

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer .footer-credit {
  margin-top: 0.5rem;
}

.site-footer .footer-madeby {
  margin-top: 0.75rem;
}

.site-footer .footer-legal {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  opacity: 0.7;
}

.site-footer a {
  color: #9b4d9e;
  font-weight: 800;
}

/* scores feed */
.feed-compose {
  margin-top: 0.75rem;
}

.feed-card {
  margin-top: 0.75rem;
}

.feed-card-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.feed-score-img {
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  display: block;
}

.feed-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.feed-comment-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.feed-comment {
  font-size: 0.9rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--border-soft);
}

.feed-comment-user {
  font-weight: 800;
  margin-right: 0.35rem;
}

.feed-comment-time {
  display: block;
  font-size: 0.72rem;
  margin-top: 0.2rem;
}
