.fan-club {
  --fan-ink: #23362b;
  --fan-muted: #556456;
  --fan-line: #dce2d3;
  --fan-accent: #31533e;
  --fan-warm: #fbe9cb;
  display: grid;
  gap: 16px;
  color: var(--fan-ink);
}

.fan-club :is(h2, h3, p) { margin: 0; }

.fan-club-head,
.fan-club-card-head,
.fan-club-meter-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.fan-club-wallet {
  flex: 0 0 auto;
  border: 1px solid #eadabf;
  border-radius: 999px;
  background: var(--fan-warm);
  color: #684b25;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.fan-club-roster {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.fan-club-athlete {
  position: relative;
  display: grid;
  grid-template-rows: 42px auto;
  align-content: center;
  justify-items: center;
  min-width: 0;
  min-height: 76px;
  padding: 4px 1px 7px;
  border: 1px solid var(--fan-line);
  border-radius: 12px;
  background: #f2f4e9;
  font-size: 13px;
}

.fan-club-athlete[aria-pressed="true"] {
  border-color: #5e8467;
  background: #e6efdf;
  box-shadow: inset 0 0 0 1px #5e8467;
}

.fan-club-athlete canvas {
  display: block;
  width: 52px;
  height: 44px;
  max-width: 100%;
  object-fit: contain;
}

.fan-club-athlete [data-fan-roster-status] {
  position: absolute;
  z-index: 1;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 99px;
  background: #fbe9ca;
  box-shadow: 0 0 0 1px #ebd5ac;
  color: #6d411e;
  padding: 2px 3px;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.fan-club-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--fan-line);
  border-radius: 11px;
  background: #eef1e6;
}

.fan-club-switch button {
  min-height: 44px;
  padding: 5px 12px;
  border-radius: 8px;
  color: var(--fan-muted);
  font-size: 13px;
  font-weight: 800;
}

.fan-club-switch [aria-pressed="true"] {
  background: #fffef9;
  color: var(--fan-ink);
  box-shadow: 0 1px 3px #334c2f22;
}

.fan-club [hidden] { display: none; }

.fan-club-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--fan-line);
  border-radius: 14px;
  background: #fffef9;
}

.fan-club-card h3 { font-size: 16px; font-weight: 850; }
.fan-club-card h3 small { color: var(--fan-muted); font-size: 11px; font-weight: 650; }
.fan-club-card-head:has(.fan-club-equipped) { min-height: 32px; }

.fan-club-favorite {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid #e6d7c5;
  border-radius: 9px;
  color: #743b32;
  background: #fff3e8;
  font-size: 12px;
  font-weight: 750;
}

.fan-club-favorite[aria-pressed="true"] {
  background: #f5d6c9;
  border-color: #e7baa8;
}

.fan-club-favorite [data-fan-heart] { font-size: 15px; vertical-align: middle; }

.fan-club-meter-label {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.fan-club-meter { height: 8px; border-radius: 99px; background: #edf0e7; overflow: hidden; }
.fan-club-meter > span { display: block; height: 100%; border-radius: 99px; background: #5f865e; }
.fan-club-meter.is-complete > span { background: #b67531; }

.fan-club .fan-club-note,
#modal-content .fan-club .fan-club-note {
  color: var(--fan-muted);
  font-size: 11px;
  line-height: 1.5;
}

.fan-club [data-fan-progress] { font-weight: 650; }

.fan-club-primary {
  min-height: 44px;
  padding: 7px 8px;
  border-radius: 9px;
  background: var(--fan-accent);
  color: #fffef8;
  font-size: 13px;
  font-weight: 800;
}

.fan-club-primary[aria-disabled="true"] {
  background: #e9eee4;
  color: #4c5b4d;
  cursor: default;
}

.fan-club-equipped { color: var(--fan-muted); font-size: 11px; font-weight: 650; text-align: end; }

.fan-club-stage {
  --fan-stage-color: #e6edda;
  position: relative;
  min-height: 112px;
  display: grid;
  justify-items: center;
  align-items: end;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(ellipse at 50% 69%, #fffdf6a8 0 34%, transparent 73%),
    linear-gradient(to top, #2535200d 0 23%, transparent 23%),
    var(--fan-stage-color);
}

.fan-club-stage[data-fan-stage="duck"] { --fan-stage-color: #f3e7bf; }
.fan-club-stage[data-fan-stage="shiba"] { --fan-stage-color: #f0dfc8; }
.fan-club-stage[data-fan-stage="rabbit"] { --fan-stage-color: #e9e2ef; }
.fan-club-stage[data-fan-stage="pig"] { --fan-stage-color: #f3e4e5; }
.fan-club-stage[data-fan-stage="pigeon"] { --fan-stage-color: #e2ebef; }

.fan-club-stage canvas { display: block; width: 190px; height: auto; max-width: 100%; }
.fan-club-look {
  position: absolute;
  right: 6px;
  bottom: 6px;
  border-radius: 99px;
  background: #fffef6;
  color: #3f5344;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 750;
}

.fan-club-items { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.fan-club-items > button {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-height: 46px;
  min-width: 0;
  padding: 3px 1px;
  border: 1px solid var(--fan-line);
  border-radius: 7px;
  background: #f5f6ed;
  font-size: 10px;
  font-weight: 650;
}

.fan-club-items > .fan-club-reward {
  background: #fbefdb;
  border-color: #ead7b4;
}

.fan-club-items svg { width: 18px; height: 18px; }
.fan-club-items button.is-equipped::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  right: 4px;
  top: 4px;
  border-radius: 50%;
  background: #376446;
}

.fan-club-items [aria-pressed="true"] {
  border-color: #5e8467;
  background: #e6efdf;
  box-shadow: inset 0 0 0 1px #5e8467;
}

.fan-club-career {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #dce6d3;
  border-radius: 8px;
  background: #eef3e6;
  font-size: 12px;
}

.fan-club-career div { display: grid; gap: 2px; }
.fan-club-career small { color: var(--fan-muted); font-size: 11px; }
.fan-club-career [data-fan-career-points] { color: var(--fan-accent); font-variant-numeric: tabular-nums; }

:is(#modal-content .fan-club-leaderboard, .fan-club-leaderboard) :is(ol, ul) { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.fan-club-leaderboard ol + ul { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--fan-line); }
:is(#modal-content .fan-club-leaderboard, .fan-club-leaderboard) .fan-club-board-row {
  display: grid;
  grid-template-columns: 2.5em minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 7px;
  background: #f3f5ec;
  color: var(--fan-ink);
  font-size: 12px;
  line-height: 1.3;
}

:is(#modal-content .fan-club-leaderboard, .fan-club-leaderboard) .fan-club-board-row.is-me { background: #e4efdd; }
.fan-club-rank, .fan-club-board-points { font-variant-numeric: tabular-nums; }
.fan-club-rank { font-weight: 800; color: var(--fan-accent); }
.fan-club-board-name { display: grid; gap: 1px; overflow-wrap: anywhere; }
.fan-club-board-name small { color: var(--fan-muted); font-size: 10px; }
.fan-club [data-fan-board-status]:empty { position: absolute; }
.fan-club [data-fan-board-rows]:empty { display: none; }

.fan-club-feedback { color: var(--fan-accent); font-size: 12px; font-weight: 700; }
.fan-club-feedback:empty { position: absolute; }
.fan-club button:focus-visible { outline-offset: 1px; z-index: 2; }

@media (hover: hover) {
  .fan-club :is(.fan-club-athlete, .fan-club-items button):hover { border-color: #5e8467; }
  .fan-club-primary[aria-disabled="false"]:hover { background: #3e654e; }
}

@media (max-width: 560px) {
  .fan-club { gap: 12px; }
  .fan-club-roster { gap: 3px; }
  .fan-club-athlete { min-height: 62px; grid-template-rows: 32px auto; font-size: 11px; border-radius: 8px; }
  .fan-club-athlete canvas { width: 38px; height: 33px; }
  .fan-club-card { gap: 7px; padding: 10px; }
  .fan-club-support { grid-template-columns: 1fr auto; align-items: center; }
  .fan-club-support > :is(header, .fan-club-meter-label, .fan-club-meter) { grid-column: 1 / -1; }
  .fan-club-support > .fan-club-primary { grid-column: 2; grid-row: 4; min-width: 102px; }
  .fan-club-support > :is(.fan-club-career, .fan-club-note:last-child) { grid-column: 1 / -1; }
}

@media (max-width: 330px) {
  .fan-club-wallet { font-size: 10px; }
  .fan-club-athlete [data-fan-roster-status] { font-size: 7px; }
}
