/* ==========================================================================
   GTA VI ÍSLAND — hub.css
   User-hub layer: crew finder (áhafnaleit), crew pages, sign-up and profile.
   Loaded AFTER site.css on the hub pages only. Strictly additive — every
   colour here is an existing token or an rgba() of one; nothing new.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Utilities
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* JS toggles state via the hidden attribute; author display rules
   (e.g. .empty-tile / .finder-empty { display:flex }) must never win
   over it, so re-assert the UA default with priority. */
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   2. Finder toolbar — search field + filter pills
   -------------------------------------------------------------------------- */
.finder-bar { max-width: 860px; margin: 0 auto; }

.hub-search { position: relative; }
.hub-search input {
  width: 100%;
  padding: 15px 52px 15px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .05);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 15.5px;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.hub-search input::placeholder { color: rgba(255, 255, 255, .45); }
.hub-search input:hover { border-color: rgba(255, 255, 255, .32); }
/* plain :focus, not :focus-visible — a text field should always show focus */
.hub-search input:focus {
  outline: none;
  border-color: var(--pink);
  background: rgba(255, 255, 255, .07);
}
.hub-search .search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, .55);
  pointer-events: none;
}

.filter-groups {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 34px;
  margin-top: 22px;
}
.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.filter-label {
  font-family: var(--font-heavy);
  font-weight: 700;
  font-stretch: semi-condensed;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .5);
  margin-right: 2px;
}
.filter-pill {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .8);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.filter-pill:hover { border-color: rgba(249, 201, 212, .6); color: #FFFFFF; }
.filter-pill[aria-pressed="true"] {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--cta-ink);
}

.finder-count {
  margin: 30px 0 18px;
  text-align: center;
  font-family: var(--font-heavy);
  font-weight: 700;
  font-stretch: semi-condensed;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .6);
}

/* --------------------------------------------------------------------------
   3. Crew cards — emblem left, identity right, accent baseline below
      (the baseline is the Social-Club-style colour signature, in the crew's
      own accent pulled from the site palette)
   -------------------------------------------------------------------------- */
.crew-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.crew-card {
  --crew-accent: var(--pink);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 24px 28px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  overflow: hidden;
  transition: transform 180ms ease-out, background-color 180ms ease-out,
              border-color 180ms ease-out;
}
.crew-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--crew-accent);
  opacity: .9;
  pointer-events: none;
}
.crew-card:hover,
.crew-card:focus-within {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, .06);
  border-color: rgba(249, 201, 212, .4);
}
.crew-card:focus-within { outline: 2px solid var(--pink); outline-offset: 3px; }
.crew-card:focus-within .crew-open:focus-visible { outline: none; }

.crew-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
}
.crew-emblem { flex: none; width: 64px; height: 64px; }
.crew-emblem svg { width: 100%; height: 100%; }

.crew-name {
  font-family: var(--font-heavy);
  font-weight: 700;
  font-stretch: semi-condensed;
  text-transform: uppercase;
  font-size: 20px;
  line-height: 1.12;
  letter-spacing: .01em;
  color: #FFFFFF;
}
.crew-name a { transition: color 160ms ease; }
.crew-card:hover .crew-name a { color: var(--pink-hover); }
.crew-open::after {                 /* stretched link over the whole card */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.crew-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.crew-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-bottom: 2px solid var(--crew-accent);
  background: rgba(25, 23, 53, .55);
  font-family: var(--font-heavy);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .2em;
  color: #FFFFFF;
  white-space: nowrap;
}

.crew-motto {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .72);
}

.crew-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-heavy);
  font-weight: 700;
  font-stretch: semi-condensed;
  text-transform: uppercase;
  font-size: 12.5px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .62);
}
.crew-meta .dot { opacity: .45; }
.crew-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.crew-count svg { color: rgba(255, 255, 255, .5); }

.crew-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}
.crew-join { position: relative; z-index: 2; }
.pill--joined {
  background: rgba(71, 214, 174, .14);
  color: var(--ok-text);
  box-shadow: inset 0 0 0 1px rgba(71, 214, 174, .5);
}
.pill--joined:hover { background: rgba(71, 214, 174, .22); }

/* focus chips — same anatomy as the site's status chips, one hue per focus */
.chip--racing {
  color: var(--warn-text);
  background: rgba(240, 179, 106, .13);
  border: 1px solid rgba(240, 179, 106, .5);
}
.chip--heists {
  color: var(--logo-pink);
  background: rgba(245, 145, 193, .13);
  border: 1px solid rgba(245, 145, 193, .5);
}
.chip--roleplay {
  color: var(--ok-text);
  background: rgba(71, 214, 174, .13);
  border: 1px solid rgba(71, 214, 174, .45);
}
.chip--photo {
  color: var(--sun-5);
  background: rgba(178, 133, 194, .16);
  border: 1px solid rgba(178, 133, 194, .55);
}
.chip--pink {
  color: var(--logo-pink);
  background: rgba(245, 145, 193, .13);
  border: 1px solid rgba(245, 145, 193, .5);
}

/* empty search result */
.finder-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed rgba(255, 255, 255, .25);
  border-radius: 16px;
  color: rgba(255, 255, 255, .72);
}

/* --------------------------------------------------------------------------
   4. Crew page — emblem hero band + stats + members strip
   -------------------------------------------------------------------------- */
.crew-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  padding: 42px 40px 38px;
}
.crew-emblem--xl {
  flex: none;
  width: 132px;
  height: 132px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(10, 9, 20, .4);
  border: 1px solid rgba(255, 255, 255, .25);
}
.crew-emblem--xl svg { width: 100%; height: 100%; }
.crew-hero-copy {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.crew-hero-copy .crew-chips { margin-top: 0; }
.crew-hero-motto {
  font-family: var(--font-heavy);
  font-weight: 700;
  font-stretch: semi-condensed;
  text-transform: uppercase;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.2;
  color: var(--cream);
  text-shadow: 0 2px 14px rgba(10, 9, 20, .5);
}
.crew-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.crew-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stat {
  padding: 20px 16px 18px;
  text-align: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
}
.stat-num {
  font-family: var(--font-heavy);
  font-weight: 700;
  font-stretch: semi-condensed;
  text-transform: uppercase;
  font-size: 28px;
  line-height: 1.1;
  color: #FFFFFF;
}
.stat-label {
  margin-top: 8px;
  font-family: var(--font-thin);
  font-weight: 300;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .3em;
  text-indent: .3em;
  color: rgba(255, 255, 255, .55);
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.member-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px 18px;
  text-align: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
}
.member-card--you { border-color: rgba(249, 201, 212, .45); }
.avatar-ring {
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--logo-pink), var(--logo-orange));
}
.avatar {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
}
.member-name {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  overflow-wrap: anywhere;
}
.member-role {
  font-family: var(--font-thin);
  font-weight: 300;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .26em;
  text-indent: .26em;
  color: rgba(255, 255, 255, .55);
}
.member-role--leader { color: var(--warn-text); }

/* --------------------------------------------------------------------------
   5. Auth — two-tab card on a sunset-panel ground
   -------------------------------------------------------------------------- */
.auth-ground { padding: 56px 24px 64px; }
.auth-lede {
  position: relative;
  z-index: 2;
  max-width: 46ch;
  margin: 0 auto 28px;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 8px rgba(10, 9, 20, .5);
}
.auth-card {
  position: relative;
  z-index: 2;
  max-width: 440px;
  margin: 0 auto;
  background: rgba(14, 13, 29, .9);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 20px;
  padding: 30px 30px 26px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(10, 9, 20, .5);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .07);
  margin-bottom: 24px;
}
.auth-tab {
  padding: 11px 8px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, .7);
  transition: background-color 160ms ease, color 160ms ease;
}
.auth-tab:hover { color: #FFFFFF; }
.auth-tab[aria-selected="true"] {
  background: var(--pink);
  color: var(--cta-ink);
}

.field { margin-bottom: 16px; }
.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .62);
}
.field input[type="text"],
.field input[type="password"],
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .06);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 15px;
}
.field select option { color: var(--cta-ink); background: #FFFFFF; }
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--pink);
  background: rgba(255, 255, 255, .08);
}

.radio-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill { position: relative; }
.radio-pill input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.radio-pill span {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .8);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.radio-pill input:checked + span {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--cta-ink);
}
.radio-pill input:focus-visible + span {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.protag-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.protag-card { position: relative; }
.protag-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.protag-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px 14px;
  border-radius: 14px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .04);
  transition: border-color 160ms ease, background-color 160ms ease;
}
.protag-card input:checked + .protag-inner {
  border-color: var(--pink);
  background: rgba(249, 201, 212, .1);
}
.protag-card input:focus-visible + .protag-inner {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}
.protag-mono {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: var(--font-heavy);
  font-weight: 700;
  font-size: 22px;
  color: var(--cta-ink);
}
.protag-mono--j { background: linear-gradient(160deg, var(--logo-orange), var(--sun-4)); }
.protag-mono--l { background: linear-gradient(160deg, var(--logo-pink), var(--sun-2)); }
.protag-name { font-weight: 600; font-size: 14.5px; color: #FFFFFF; }
.protag-line {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .6);
}

.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
}
.form-error {
  display: none;
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--warn-text);
}
.form-error.is-on { display: block; }
.footnote {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .55);
}

/* --------------------------------------------------------------------------
   6. Profile
   -------------------------------------------------------------------------- */
.profile-hero-inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: -64px;               /* avatar overlaps the banner 50% */
  padding: 0 40px 38px;
}
.avatar-ring--xl { padding: 4px; }
.avatar--xl { width: 128px; height: 128px; }
.profile-copy {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 76px;               /* clears the banner the avatar overlaps */
}
.profile-name {
  font-family: var(--font-heavy);
  font-weight: 700;
  font-stretch: semi-condensed;
  text-transform: uppercase;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.08;
  color: #FFFFFF;
  text-shadow: 0 2px 14px rgba(10, 9, 20, .5);
  overflow-wrap: anywhere;
}
.profile-since {
  font-family: var(--font-heavy);
  font-weight: 700;
  font-stretch: semi-condensed;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .8);
  text-shadow: 0 1px 8px rgba(10, 9, 20, .5);
}
/* handle line — @nickname · platform, straight under the display name,
   in the member's own banner accent */
.profile-handle {
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--profile-accent, rgba(255, 255, 255, .7));
  text-shadow: 0 1px 8px rgba(10, 9, 20, .5);
}
/* attribute chips — an 8px-gap row in the name stack, left-aligned with
   the name: attributes of the person, not chrome floating in the banner */
.profile-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
/* hero chips borrow the banner accent for their borders — the member's
   choice owns even the small print */
#profile-main .profile-meta .chip {
  border-color: color-mix(in srgb,
    var(--profile-accent, var(--logo-pink)) 55%, transparent);
}

/* member-authored status line — the cheapest ownership signal; the pencil
   reveals on hover/focus, editing swaps the line for an 80-char input */
.profile-status { width: 100%; max-width: 52ch; }
.profile-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 15px;
  font-style: italic;
  line-height: 1.4;
  color: rgba(255, 255, 255, .72);
  text-shadow: 0 1px 8px rgba(10, 9, 20, .5);
}
.status-pencil {
  flex: none;
  opacity: 0;
  color: rgba(255, 255, 255, .75);
  transition: opacity 160ms ease;
}
.profile-status-btn:hover .status-pencil,
.profile-status-btn:focus-visible .status-pencil { opacity: 1; }
.profile-status-btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
.profile-status-text.is-empty { color: rgba(255, 255, 255, .45); }
.profile-status-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(10, 9, 20, .4);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 15px;
  font-style: italic;
  line-height: 1.4;
}
.profile-status-input::placeholder { color: rgba(255, 255, 255, .45); }
.profile-status-input:focus { outline: none; border-color: var(--pink); }

/* "Merki" trophy case — a dedicated row of 56px badge tiles under the
   stat strip: 24px emblem, 12px name, 11px earned-date underneath.
   Locked badges stay visible at half strength, dashed, with the how-to
   hint as their sub-line, so they read as goals rather than clutter. */
.badge-case {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.badge-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--card, #1a1533);
  border: 1px solid rgba(255, 255, 255, .08);
}
.badge-tile.is-locked {
  opacity: .55;
  background: transparent;
  border-style: dashed;
}
.badge-tile-icon {
  width: 24px;
  height: 24px;
  flex: none;
}
.badge-tile-icon svg { width: 100%; height: 100%; display: block; }
.badge-tile-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.badge-tile-name {
  font-family: var(--font-heavy);
  font-weight: 700;
  font-stretch: semi-condensed;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .1em;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge-tile-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, .5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* crew emblems as 20px chips beside the team pill */
.crew-mini {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: none;
}
.crew-mini svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* profile hero — owned by the member: JS sets --profile-accent on
   #profile-main from the chosen banner preset; the hero ground, avatar
   ring, handle, chips, badges and stat numbers all inherit it */
.profile-hero {
  background-image: linear-gradient(135deg,
    #150a2e 0%,
    color-mix(in srgb, var(--profile-accent, var(--logo-pink)) 35%, #150a2e) 100%);
}
.profile-hero::before {
  background: linear-gradient(180deg,
    rgba(10, 9, 20, .16) 0%, rgba(10, 9, 20, .64) 100%);
}
.profile-hero .avatar-ring--xl {
  display: block;
  padding: 0;
  background: none;
  /* 3px accent border + 6px page-ground gap ring — the portrait reads as
     pinned onto the banner, not printed on it */
  border: 3px solid var(--profile-accent, var(--logo-pink));
  box-shadow: 0 0 0 6px var(--ink);
  border-radius: 50%;
}

/* member banner — a 320px strip carrying the member's chosen preset scene
   across the top of the identity card; the avatar overlaps its bottom edge,
   so banner + portrait compose as one identity unit. The starred crew's
   tile rides its right side. */
.profile-banner {
  position: relative;
  z-index: 2;
  height: 320px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--member-accent, var(--logo-pink)) 22%, transparent) 0%,
    color-mix(in srgb, var(--member-accent-2, var(--logo-orange)) 22%, transparent) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
/* bottom scrim — whichever scene the member picked, the overlapping
   identity block underneath always sits on a dark, legible ground */
.profile-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10, 8, 26, 0) 45%, rgba(10, 8, 26, .9) 100%);
  pointer-events: none;
}

/* the six selectable banner scenes (also used as picker swatches) — each a
   135deg two-stop gradient plus a .07-opacity repeated original SVG motif;
   each preset also carries an accent hex (set as --profile-accent by
   hub.js) that the rest of the page inherits */
.banner--sunset {              /* Vice Sunset — palms, accent #FF7A59 */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='120' viewBox='0 0 160 120'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-opacity='.07' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M44 112 Q48 88 46 70'/%3E%3Cpath d='M46 70 Q34 62 24 66 M46 70 Q38 54 28 52 M46 70 Q50 54 60 50 M46 70 Q58 60 68 64'/%3E%3Cpath d='M118 116 Q120 100 119 88'/%3E%3Cpath d='M119 88 Q110 82 102 85 M119 88 Q114 76 106 74 M119 88 Q122 76 130 73 M119 88 Q128 80 136 83'/%3E%3C/g%3E%3C/svg%3E") repeat,
    linear-gradient(135deg, #3B0D2E 0%, #B3421F 100%);
}
.banner--aurora {              /* Norðurljós — aurora waves, accent #4DE3A8 */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='120' viewBox='0 0 180 120'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-opacity='.07' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M-10 38 Q30 18 62 34 T130 30 T190 38'/%3E%3Cpath d='M-10 84 Q40 64 84 80 T190 76'/%3E%3C/g%3E%3C/svg%3E") repeat,
    linear-gradient(135deg, #0D1F3B 0%, #1F7A5A 100%);
}
.banner--mani {                /* Máninn — crescents, accent #AFC3FF */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='140' viewBox='0 0 180 140'%3E%3Cg fill='%23FFFFFF' fill-opacity='.07'%3E%3Cpath d='M52 22 a24 24 0 1 0 14 32 a19 19 0 1 1 -14 -32 Z'/%3E%3Cpath d='M138 88 a14 14 0 1 0 8 20 a11 11 0 1 1 -8 -20 Z'/%3E%3Ccircle cx='120' cy='30' r='2'/%3E%3Ccircle cx='160' cy='56' r='1.5'/%3E%3Ccircle cx='24' cy='104' r='1.5'/%3E%3C/g%3E%3C/svg%3E") repeat,
    linear-gradient(135deg, #0B1026 0%, #2C3A72 100%);
}
.banner--chrome {              /* Öldur — waves, accent #5EC9E8 */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='80' viewBox='0 0 120 80'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-opacity='.07' stroke-width='2.5'%3E%3Cpath d='M0 24 Q15 12 30 24 T60 24 T90 24 T120 24'/%3E%3Cpath d='M0 56 Q15 44 30 56 T60 56 T90 56 T120 56'/%3E%3C/g%3E%3C/svg%3E") repeat,
    linear-gradient(135deg, #0D2A33 0%, #1A3A55 100%);
}
.banner--neon {                /* Borgarlína — skyline, accent #C99AFF */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='120' viewBox='0 0 200 120'%3E%3Cg fill='%23FFFFFF' fill-opacity='.07'%3E%3Crect x='8' y='64' width='16' height='56'/%3E%3Crect x='30' y='44' width='22' height='76'/%3E%3Crect x='58' y='72' width='14' height='48'/%3E%3Crect x='78' y='52' width='20' height='68'/%3E%3Crect x='104' y='66' width='16' height='54'/%3E%3Crect x='126' y='38' width='24' height='82'/%3E%3Crect x='156' y='58' width='18' height='62'/%3E%3Crect x='180' y='70' width='14' height='50'/%3E%3C/g%3E%3C/svg%3E") repeat-x bottom,
    linear-gradient(135deg, #150A2E 0%, #3A1E63 100%);
}
.banner--stjornur {            /* Stjörnuhiminn — stars, accent #FFD166 */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='%23FFFFFF' fill-opacity='.07'%3E%3Ccircle cx='20' cy='26' r='2'/%3E%3Ccircle cx='72' cy='14' r='1.5'/%3E%3Ccircle cx='118' cy='40' r='2'/%3E%3Ccircle cx='44' cy='72' r='1.5'/%3E%3Ccircle cx='96' cy='92' r='2'/%3E%3Ccircle cx='16' cy='112' r='1.5'/%3E%3Ccircle cx='128' cy='120' r='1.5'/%3E%3Cpath d='M60 44 l2 5 5 2 -5 2 -2 5 -2 -5 -5 -2 5 -2 Z'/%3E%3Cpath d='M110 70 l1.6 4 4 1.6 -4 1.6 -1.6 4 -1.6 -4 -4 -1.6 4 -1.6 Z'/%3E%3C/g%3E%3C/svg%3E") repeat,
    linear-gradient(135deg, #0A0914 0%, #241A4A 100%);
}

/* starred-crew tile overlaid on the banner's right side — a 96px rounded
   tile of crew initials on the crew's own hashed hue (SVG carries the
   12px-radius rect); sits above the bottom scrim */
.banner-crew-tile {
  position: absolute;
  top: 50%;
  right: 32px;
  z-index: 1;
  width: 96px;
  height: 96px;
  transform: translateY(-50%);
  filter: drop-shadow(0 10px 26px rgba(10, 9, 20, .5));
}
.banner-crew-tile svg { width: 100%; height: 100%; display: block; }
.profile-banner-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
}
.profile-avatar-wrap {
  position: relative;
  flex: none;
}
.status-dot {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #6B7280;                           /* offline = grey */
  border: 3px solid var(--ink);
}
.status-dot.is-online { background: #4ADE80; }   /* online = green */

/* look picker — a popover under the "Breyta útliti" button: banner
   scenes first, then 12 portraits x 6 accent hues */
.avatar-picker {
  position: absolute;
  top: 60px;
  right: 16px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(392px, calc(100% - 32px));
  max-height: calc(100% - 76px);
  overflow-y: auto;
  padding: 18px;
  border-radius: 14px;
  background: rgba(14, 13, 29, .96);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 18px 44px rgba(10, 9, 20, .55);
}
.avatar-picker-label {
  font-family: var(--font-heavy);
  font-weight: 700;
  font-stretch: semi-condensed;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .75);
}
.avatar-glyphs {
  display: grid;
  grid-template-columns: repeat(4, 46px);   /* 4x3 grid of 12 emblems */
  gap: 8px;
}
.avatar-grads,
.avatar-banners {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.avatar-glyph {
  width: 46px;
  height: 46px;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(10, 9, 20, .35);
  transition: border-color 160ms ease, background-color 160ms ease;
}
.avatar-glyph:hover { border-color: #FFFFFF; }
.avatar-glyph[aria-pressed="true"] {
  border-color: #FFFFFF;
  background: rgba(10, 9, 20, .6);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}
.avatar-glyph svg { width: 100%; height: 100%; display: block; }
.avatar-grad {
  width: 46px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .45);
  transition: border-color 160ms ease;
}
.avatar-grad:hover { border-color: #FFFFFF; }
.avatar-grad[aria-pressed="true"] { box-shadow: 0 0 0 2px #FFFFFF; }
/* banner swatch tiles — 72x40, 8px radius, 2px accent border on active */
.avatar-banner {
  width: 72px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, .25);
  transition: border-color 160ms ease;
}
.avatar-banner:hover { border-color: rgba(255, 255, 255, .8); }
.avatar-banner[aria-pressed="true"] {
  border-color: var(--profile-accent, #FFFFFF);
}
.avatar-glyph:focus-visible,
.avatar-grad:focus-visible,
.avatar-banner:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* personal stat strip — four labeled, left-aligned cards at a fixed
   ~120px so the whole strip sits above or below the fold, never across
   it. Anatomy top to bottom: 11px uppercase label, 40px tabular numeral,
   13px context line (mint when positive, a pink action link at zero).
   No arcs: a count has no maximum — the one stat with a true denominator
   (badges earned of badges available) gets a small 28px trailing ring
   after its value, never as the hero of the tile. */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  height: 120px;
  padding: 18px 20px;
  text-align: left;
  border-radius: 12px;
  background: var(--card, #1a1533);
  border: 1px solid rgba(255, 255, 255, .08);
  overflow: hidden;
}
.profile-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}
.profile-stat-value {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heavy);
  font-weight: 700;
  font-stretch: semi-condensed;
  font-variant-numeric: tabular-nums;
  font-size: 40px;
  line-height: 1.1;
  color: var(--profile-accent, #FFFFFF);
}
.profile-stat-ring {
  width: 28px;
  height: 28px;
  flex: none;
  transform: rotate(-90deg);      /* arc starts at 12 o'clock */
}
.profile-stat-ctx {
  max-width: 100%;
  font-size: 13px;
  color: var(--ok-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-stat-ctx--muted { color: rgba(255, 255, 255, .5); }
.profile-stat-ctx a {
  font-weight: 600;
  color: var(--logo-pink);
  transition: color 160ms ease;
}
.profile-stat-ctx a:hover { color: var(--pink-hover); }

/* "Nýlegt" — the last five member actions as 44px rows: icon, label,
   relative timestamp right-aligned in the muted text colour */
.activity-list {
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  overflow: hidden;
}
.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 4px 18px;
}
.activity-row + .activity-row { border-top: 1px solid rgba(255, 255, 255, .08); }
.activity-icon {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--profile-accent, var(--logo-pink));
}
.activity-icon svg { width: 100%; height: 100%; display: block; }
.activity-label { font-size: 13px; color: rgba(255, 255, 255, .85); }
/* named article/guide inside a feed row — 600 weight, hover in accent */
.activity-label a {
  font-weight: 600;
  color: #FFFFFF;
  transition: color 160ms ease;
}
.activity-label a:hover {
  color: var(--profile-accent, var(--pink-hover));
  text-decoration: underline;
}
.activity-time {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255, 255, 255, .5);
  white-space: nowrap;
  text-align: right;
}

/* on the profile page the crew cards' bottom accent echoes the member's
   own colour — one variable, page-wide echo */
#profile-main .crew-card::after {
  background: var(--profile-accent, var(--logo-pink));
}

/* featured-crew showcase — star toggle + full-width starred card */
.crew-card--starrable .crew-card-top { padding-right: 36px; }
.crew-star {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, .4);
  transition: color 160ms ease, background-color 160ms ease;
}
.crew-star:hover { color: #FFFFFF; background: rgba(255, 255, 255, .08); }
.crew-star[aria-pressed="true"] { color: var(--warn); }
.crew-star:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.crew-star svg { width: 18px; height: 18px; display: block; }
.crew-card--featured { grid-column: 1 / -1; }
.crew-card--featured .crew-motto {
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
}
.crew-card--featured .crew-count { font-size: 24px; }
.crew-card--featured .crew-count svg { width: 17px; height: 17px; }

/* settings drawer — collapsed by default so forms never own a viewport */
.settings-details { width: 100%; }
.settings-summary {
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .6);
  transition: color 160ms ease;
}
.settings-summary:hover { color: #FFFFFF; }
.settings-summary:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: 4px;
}
.settings-details[open] > .settings-summary {
  margin-bottom: 26px;
  color: rgba(255, 255, 255, .85);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.settings-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 26px 26px 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
}
.settings-block--wide { grid-column: 1 / -1; }
.settings-title { font-size: 16.5px; font-weight: 600; color: #FFFFFF; }
.settings-block .field { width: 100%; margin-bottom: 2px; }
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.settings-note {
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .55);
}
.pill--ghost {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  color: #FFFFFF;
}
.pill--ghost:hover { background: rgba(255, 255, 255, .08); }
.pill--danger {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(240, 179, 106, .6);
  color: var(--warn-text);
}
.pill--danger:hover { background: rgba(240, 179, 106, .12); }
.flash {
  display: none;
  font-size: 13px;
  color: var(--ok-text);
}
.flash.is-on { display: block; }

/* locked state (signed-out profile) */
.locked-card {
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 48px 28px;
}
.locked-card .tile-icon { width: 56px; height: 56px; }
.locked-card .panel-text { max-width: 44ch; }

/* empty state (my crews) */
.empty-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 44px 24px;
  border: 1px dashed rgba(255, 255, 255, .25);
  border-radius: 16px;
  color: rgba(255, 255, 255, .72);
}

/* --------------------------------------------------------------------------
   7. Found-a-crew panel
   -------------------------------------------------------------------------- */
.found-inner {
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
  align-items: stretch;
}
.found-card {
  width: 100%;
  background: rgba(14, 13, 29, .82);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  padding: 26px 26px 22px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.found-card .field input[type="text"],
.found-card .field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .06);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 15px;
}
.found-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 14px;
}
.found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   8. Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .crew-grid { grid-template-columns: 1fr 1fr; }
  .crew-stats { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .profile-stats { grid-template-columns: 1fr 1fr; }
  .badge-case { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  .profile-copy { padding-top: 12px; }    /* copy wraps under the avatar */
}

@media (max-width: 680px) {
  .crew-grid { grid-template-columns: 1fr; }
  .filter-groups { gap: 12px 18px; }
  .crew-hero-inner { padding: 28px 22px 26px; }
  .profile-hero-inner { padding: 0 22px 26px; }
  .avatar-picker { top: 56px; right: 12px; left: 12px; width: auto; }
  .banner-crew-tile { width: 72px; height: 72px; right: 18px; }
  .auth-ground { padding: 36px 16px 44px; }
  .auth-card { padding: 24px 20px 22px; }
  .found-row { grid-template-columns: 1fr; }
  .found-card { padding: 22px 18px 20px; }
}

/* --------------------------------------------------------------------------
   Confirm-inbox state — shown after a remote sign-up that needs e-mail
   confirmation. Matches the auth-card's dark, blurred panel language.
   -------------------------------------------------------------------------- */
.auth-confirm {
  max-width: 440px;
  margin: 18px auto 0;
  padding: 22px 24px;
  background: rgba(14, 13, 29, .9);
  border: 1px solid rgba(249, 201, 212, .4);
  border-radius: 16px;
  text-align: center;
  color: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.auth-confirm-title { margin: 0 0 8px; font-size: 18px; color: #FFFFFF; }
.auth-confirm p { margin: 0; font-size: 14px; line-height: 1.55; }
