.club-account-link { margin-top: 1.4rem; color: #201a13; text-decoration: none; }
.club-hero {
  min-height: clamp(26rem, 33vw, 39rem);
  display: grid;
  align-items: center;
  background: linear-gradient(90deg, #171a16 1%, #171a16c9 29%, #171a165e 57%, #171a160a 84%),
    #171a16 url("club-campfire-v2.webp") center 52% / cover no-repeat;
}
@media (max-width: 720px) {
  .club-hero {
    --club-camp-height: clamp(15rem, 68vw, 19rem);
    background-image: linear-gradient(180deg, #171a16 0, #171a16 var(--header-height), transparent calc(var(--header-height) + .4rem), transparent calc(var(--header-height) + var(--club-camp-height) - 3rem), #171a16 calc(var(--header-height) + var(--club-camp-height))), url("club-campfire-v2.webp");
    background-position: center, 80% var(--header-height);
    background-size: cover, auto var(--club-camp-height);
  }
  .club-hero .wrap { padding-block: var(--club-camp-height) 2.5rem; }
}
.club-account-actions, .profile-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem 1rem;
  margin-top: 1rem;
}
.club-account-actions .button, .club-fields .button { color: #201a13; text-decoration: none; }
.club-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem .8rem;
  border: 1px solid #c7a77d66;
  background: transparent;
  color: #f3dfbd;
  font: inherit;
}
.club-secondary[aria-disabled="true"] { color: #c7c1b2; }
.profile-avatar { object-fit: cover; border: 1px solid #a17c4a; background: #282e24; }

.club-member-overview {
  display: grid;
  grid-template-columns: minmax(0, 35rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.ranger-card {
  margin: 0;
  padding: 0;
  max-width: 35rem;
  border: 1px solid #bb9360;
  border-radius: .65rem;
  overflow: hidden;
  color: #251f16;
  background:
    repeating-linear-gradient(135deg, #a37d3e08 0 1px, transparent 1px 8px),
    #e9d8b4;
  box-shadow: 0 10px 28px #0005;
}
.ranger-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: .7rem;
  padding: .85rem 1rem;
  background: #30392b;
  border-bottom: 3px double #bb9360;
  color: #fff2db;
}
.ranger-card h3 { margin: .18rem 0 0; line-height: 1.15; }
.ranger-card .ranger-brand, .ranger-number {
  color: #f0be80;
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ranger-number { white-space: nowrap; }
.ranger-card-body {
  display: grid;
  grid-template-columns: clamp(4.35rem, 15vw, 7.5rem) minmax(0, 1fr);
  gap: clamp(.75rem, 3vw, 1.25rem);
  align-items: center;
  padding: .9rem 1rem;
}
.ranger-photo { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 3px solid #faf1da; box-shadow: 0 1px 4px #47322266; }
.ranger-identity .ranger-caption { color: #654d2c; font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.ranger-identity .ranger-name {
  color: #251f16;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 700 clamp(1rem, 4vw, 1.6rem)/1.2 Oswald, system-ui, sans-serif;
}
.club-metrics { display: flex; flex-wrap: wrap; gap: .35rem 1.15rem; margin: .6rem 0 0; }
.club-metrics dt { font-size: .78rem; font-weight: 650; }
.club-metrics dd { display: flex; align-items: center; gap: .25rem; margin: .1rem 0 0; font-weight: 750; line-height: 1.25; }
.club-metrics dd > span:not(.respect-score) { font-size: .8rem; }
.respect-score { display: inline-flex; justify-content: center; min-width: 2rem; padding: .1rem .44rem; border: 1px solid transparent; border-radius: .2rem; font-weight: 750; line-height: 1.25; font-variant-numeric: tabular-nums; }
.respect-score[data-tone="positive"] { background: #284733; color: #e0f4d9; }
.respect-score[data-tone="negative"] { background: #6a302d; color: #ffe3dc; }
.respect-score[data-tone="neutral"] { background: #42483a; color: #f1ead9; }
.ranger-card-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding: .55rem 1rem .7rem; border-top: 1px solid #ab8f61; }
.ranger-card-links a { color: #543715; font-weight: 700; text-underline-offset: .15em; }
.club-recent { padding: 1rem; background: #22261f; border: 1px solid #ffffff2b; }
.club-recent-body { min-height: 6.25rem; }
.club-recent ul { margin: 0; padding: 0; list-style: none; }
.club-recent li { display: grid; align-content: center; height: 3rem; border-top: 1px solid #ffffff2b; }
.club-recent li span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.club-recent li small { color: #e7aa62; line-height: 1.15; }
.club-recent > a { color: #e7aa62; }

.club-dialog {
  width: min(30rem, 92vw);
  max-height: 90vh;
  padding: clamp(1.2rem, 4vw, 2rem);
  color: #f2eddf;
  background: #21261e;
  border: 1px solid #a38560;
  box-shadow: 0 20px 70px #000a;
}
.club-dialog::backdrop { background: #11140fbe; backdrop-filter: blur(3px); }
.club-dialog-close { float: right; }
.club-dialog h2 { margin: 0 2.5rem .9rem 0; }
.club-auth-modes { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-block: 0 1rem; }
.club-auth-modes a { color: #e7aa62; text-underline-offset: .2em; }
.club-auth-modes a[aria-current] { color: #fff2da; font-weight: 750; }
.club-fields { display: grid; gap: .65rem; }
.club-fields[hidden] { display: none; }
.club-fields label { display: grid; gap: .25rem; font-weight: 650; }
.club-fields input:not([type="hidden"]) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .55rem .65rem;
  color: #f2eddf;
  background: #181c16;
  border: 1px solid #a38560;
  font: inherit;
}
.club-fields .button { justify-self: start; border: 0; }
.club-hint { color: #c7c1b2; font-size: .9rem; }
p.club-alert { margin: .6rem 0; color: #f3c68c; }
.club-news-item + .club-news-item { margin-top: 1rem; }
.club-news-content > * + * { margin-top: .75rem; }
.club-news-content img { max-width: 100%; height: auto; }
.club-feed-nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.club-rank-rules { margin-bottom: .85rem; }
.club-ranks { margin: 0; padding: 0; list-style: none; background: #22261f; border: 1px solid #ffffff2b; }
.club-ranks li { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content max-content; gap: .35rem .6rem; align-items: center; padding: .55rem .7rem; }
.club-ranks li + li { border-top: 1px solid #ffffff2b; }
.club-place, .club-rank-xp { font-size: .85rem; font-weight: 700; white-space: nowrap; }
.club-place { min-width: 1.15rem; color: #e7aa62; text-align: center; }
.club-rank-member { display: flex; min-width: 0; align-items: center; gap: .7rem; }
.club-rank-member img {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 2px;
  border: 1px solid #ad8957;
  border-radius: 2px;
  background: #181c16;
  object-fit: cover;
}
.club-rank-member span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.club-profile {
  margin: 0;
  color-scheme: dark;
  color: #f2eddf;
  background: #171a16;
  line-height: 1.55;
}
.club-profile * { box-sizing: border-box; }
.club-profile .wrap { width: min(1160px, 90%); margin-inline: auto; }
.club-profile a { color: inherit; }
.club-profile .button { color: #201a13; }
.club-profile-main { padding-block: calc(var(--header-height) + 1.75rem) 3.5rem; }
.club-profile a.profile-back { display: inline-block; margin-bottom: 1rem; color: #e7aa62; }
.profile-cover {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 2.5rem);
  padding: clamp(1.2rem, 4vw, 2.75rem);
  border: 1px solid #a17c4a;
  background: linear-gradient(90deg, #191e17 20%, #191e17c7 65%, #191e1765), url("club.png") center 42% / cover;
}
.profile-avatar { width: clamp(5rem, 17vw, 10rem); height: auto; aspect-ratio: 1; flex: none; }
.profile-cover h1 { font-size: clamp(1.65rem, 5.8vw, 4rem); line-height: 1.06; margin: .25rem 0; overflow-wrap: anywhere; }
.profile-cover p { margin: .35rem 0; }
.profile-vote { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; scroll-margin-top: calc(var(--header-height) + 1rem); }
.profile-vote button[aria-pressed="true"] { border-color: #e7aa62; background: #3a402d; }
.profile-vote p { font-size: .85rem; color: #c7c1b2; }
.profile-panel[id], #profile-submissions { scroll-margin-top: calc(var(--header-height) + 1rem); }
.profile-kicker { color: #e7aa62; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 750; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.profile-panel { min-width: 0; padding: clamp(1rem, 3vw, 1.75rem); background: #21261e; border: 1px solid #ffffff2b; }
.profile-panel:only-child, .profile-settings { grid-column: 1 / -1; }
.profile-panel h2 { margin: 0 0 .7rem; }
.profile-panel p { margin-block: 0 .65rem; }
.profile-panel a, .profile-links a { color: #e7aa62; text-underline-offset: .2em; }
.profile-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.profile-avatar-reset { margin-top: .75rem; }
.profile-email { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #ffffff2b; overflow-wrap: anywhere; }
.profile-email h3 { margin: 0 0 .65rem; }
.profile-email form { max-width: 31rem; }
.profile-badges, .profile-submissions { list-style: none; padding: 0; }
.profile-badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: .7rem; }
.profile-badges li { display: grid; justify-items: center; text-align: center; gap: .15rem; padding: .65rem; background: #181c16; }
.profile-badges img { object-fit: contain; }
.profile-badges [data-status="approved"] small { color: #a9d0a5; }
.profile-badges [data-status="excellent"] small { color: #efbf78; }
.profile-submissions li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; padding: .5rem 0; border-bottom: 1px solid #ffffff2b; }
.club-profile footer { border-top: 1px solid #ffffff2b; padding-block: 1.5rem; }
@media (max-width: 680px) {
  .club-member-overview, .profile-grid, .profile-settings-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-cover { align-items: flex-start; }
}

/* Profile collection: all library patches, earned colors only. */
.profile-badges{grid-template-columns:repeat(auto-fill,minmax(min(100%,5rem),1fr));gap:1rem .65rem;align-items:center;justify-items:center;margin:1.2rem 0 1.5rem}
.profile-badges li{min-width:0;padding:0;background:transparent;gap:0;align-content:center}
.profile-patch-frame{display:block;width:76px;max-width:100%;line-height:0}
.profile-badges img{display:block;width:100%;height:auto;aspect-ratio:6/7;object-fit:cover;clip-path:polygon(50% 2%,98% 25%,98% 75%,50% 98%,2% 75%,2% 25%)}
.profile-badges [data-status="locked"] .profile-patch-frame{opacity:.32;filter:grayscale(1)}
.profile-badges [data-status="approved"] .profile-patch-frame{filter:drop-shadow(0 0 3px #79c980) drop-shadow(0 0 8px #59b96d99)}
.profile-badges [data-status="excellent"] .profile-patch-frame{filter:drop-shadow(0 0 3px #efbe6b) drop-shadow(0 0 9px #e8a849aa)}
@media(hover:hover) and (pointer:fine){.profile-badges li:hover .profile-patch-frame{transform:scale(1.07)}.profile-badges [data-status="locked"]:hover .profile-patch-frame{opacity:.55}}
@media(prefers-reduced-motion:no-preference){.profile-patch-frame{transition:transform .2s ease,opacity .2s ease}}
@media(max-width:380px){.profile-badges{grid-template-columns:repeat(auto-fill,minmax(min(100%,4rem),1fr));gap:.9rem .5rem}.profile-patch-frame{width:64px}}

/* The same square artwork and actual status palette as the club library. */
.profile-badges{grid-template-columns:repeat(auto-fill,minmax(min(100%,5rem),1fr));gap:9px}
.profile-badges img{aspect-ratio:1;object-fit:contain;clip-path:none}
.profile-badges [data-status] .profile-patch-frame{filter:none;opacity:1}
.profile-patch-frame{width:100%;max-width:100px}
.profile-badges [data-status="locked"]:hover .profile-patch-frame{opacity:1}
