/* ================================================
   SURVIVOR OUTPLAY — Fantasy Picks League
   Light Retro Edition
   ================================================ */

:root {
  /* Light warm backgrounds */
  --cream-50: #fefcf8;
  --cream-100: #faf7f1;
  --cream-200: #f3efe6;
  --cream-300: #e8e2d6;
  --cream-400: #d4cdc0;

  /* Flame — primary (torch / fire) */
  --flame-500: #e06838;
  --flame-600: #c85428;
  --flame-700: #a8421c;

  /* Palm — secondary (island green) */
  --palm-500: #3d9b6b;
  --palm-600: #2d7a52;
  --palm-700: #1f5c3d;

  /* Sun — accent (idol gold) */
  --sun-500: #dbb24a;
  --sun-600: #c49a35;
  --sun-700: #a07e28;

  /* Ink — text */
  --ink-900: #2d2b26;
  --ink-700: #514d45;
  --ink-500: #8a8479;
  --ink-400: #aaa49a;
  --ink-300: #c7c1b6;

  /* Effects */
  --border-soft: rgba(90, 80, 65, 0.12);
  --border-med: rgba(90, 80, 65, 0.2);
  --shadow-sm: 0 2px 8px rgba(45, 40, 30, 0.06);
  --shadow-md: 0 4px 16px rgba(45, 40, 30, 0.08);
  --shadow-lg: 0 8px 28px rgba(45, 40, 30, 0.1);
  --shadow-retro: 3px 3px 0 rgba(45, 40, 30, 0.07);

  /* Rounded corners */
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

/* ---- Reset ---- */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

[hidden] {
  display: none !important;
}

/* ---- Body ---- */

body {
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  background-color: #f5f1ea;
  background-image:
    radial-gradient(ellipse at 18% 12%, rgba(224, 178, 74, 0.08), transparent 50%),
    radial-gradient(ellipse at 82% 85%, rgba(61, 155, 107, 0.06), transparent 50%);
  color: var(--ink-900);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Light paper grain */
.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: radial-gradient(rgba(80, 70, 50, 0.18) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
  z-index: 0;
}

/* ---- Z-Index ---- */

.site-header,
.top-nav,
.layout,
.site-footer,
.retro-divider {
  position: relative;
  z-index: 1;
}

.modal-overlay {
  z-index: 100;
}

/* ================================================
   HEADER
   ================================================ */

.site-header {
  width: min(1060px, calc(100% - 2rem));
  margin: 1.1rem auto 0;
  padding: 0.85rem 1.2rem;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 4rem;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-title {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-900);
  line-height: 1;
}

.brand-subtitle {
  margin: 0.1rem 0 0;
  color: var(--ink-500);
  font-size: 0.73rem;
  letter-spacing: 0.02em;
}

.brand-motto {
  margin: 0.05rem 0 0;
  color: var(--flame-600);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-status {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-500);
  font-weight: 500;
}

.stamp-badge {
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--palm-600);
  border: 2px solid var(--palm-500);
  border-radius: 50%;
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  transform: rotate(-12deg);
  opacity: 0.6;
  line-height: 1;
  text-align: center;
}

/* ================================================
   DECORATIVE DIVIDER
   ================================================ */

.retro-divider {
  width: min(1060px, calc(100% - 2rem));
  margin: 0.5rem auto 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-300);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
}

.retro-divider::before,
.retro-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border-soft);
}

/* ================================================
   NAVIGATION
   ================================================ */

.top-nav {
  width: min(1060px, calc(100% - 2rem));
  margin: 0.5rem auto 0;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.nav-btn {
  border: 1.5px solid var(--border-soft);
  background: var(--cream-100);
  color: var(--ink-700);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-family: "Nunito", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.nav-btn:hover,
.nav-btn:focus-visible {
  background: var(--cream-50);
  border-color: var(--palm-500);
  color: var(--palm-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.nav-btn.active {
  background: linear-gradient(135deg, var(--palm-500), var(--palm-600));
  color: #fff;
  border-color: var(--palm-700);
  box-shadow: 0 4px 14px rgba(61, 155, 107, 0.25);
}

/* ================================================
   LAYOUT
   ================================================ */

.layout {
  width: min(1060px, calc(100% - 2rem));
  margin: 0.8rem auto 2.5rem;
  display: grid;
  gap: 1rem;
}

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

.view[hidden] {
  display: none !important;
}

/* ================================================
   PANELS
   ================================================ */

.panel {
  background: var(--cream-100);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}

/* Subtle inner frame */
.panel::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(90, 80, 65, 0.06);
  border-radius: var(--radius-md);
  pointer-events: none;
}

.hero-panel {
  background:
    radial-gradient(circle at 85% 15%, rgba(224, 104, 56, 0.04), transparent 35%),
    radial-gradient(circle at 10% 85%, rgba(61, 155, 107, 0.04), transparent 40%),
    var(--cream-100);
  border-width: 2px;
  border-color: var(--border-med);
}

#view-auth {
  width: 100%;
  justify-items: stretch;
}

.auth-panel {
  width: 100%;
  max-width: 100%;
  margin: 0;
  text-align: center;
}

.auth-panel h2 {
  text-align: center;
}

.auth-panel h2::after {
  margin-left: auto;
  margin-right: auto;
}

.auth-panel .hint {
  text-align: center;
}

.auth-panel .actions {
  justify-content: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0.3rem 0;
  color: var(--ink-400);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.auth-panel .inline-form {
  flex-direction: column;
  align-items: stretch;
}

.auth-panel .inline-form input {
  text-align: center;
}

.auth-panel .inline-form .btn {
  align-self: center;
}

/* ================================================
   PROFILE DISPLAY / EDIT
   ================================================ */

.profile-display {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.7rem;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--cream-50);
}

.pick-nudge {
  margin: 0.4rem 0 0;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

#tribe-name-summary {
  margin-top: 0.25rem;
}

.pick-nudge-warn {
  background: #fef3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

.pick-nudge-ok {
  background: #d4edda;
  color: #155724;
  border: 1px solid #28a745;
}

.pick-nudge-done {
  background: #e8e2d6;
  color: var(--ink-700);
  border: 1px solid var(--border-med);
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-med);
  background: var(--cream-200);
  flex-shrink: 0;
}

.profile-avatar-placeholder {
  display: grid;
  place-items: center;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink-500);
}

.profile-avatar-emoji {
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: var(--cream-300);
}

.profile-display-info {
  flex: 1;
  min-width: 0;
}

.profile-display-name {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-900);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.profile-display-league {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.75rem;
}

.profile-edit-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border-soft);
  background: var(--cream-100);
  color: var(--ink-500);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.profile-edit-btn:hover {
  background: var(--palm-500);
  color: #fff;
  border-color: var(--palm-600);
}

.profile-edit-form {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.profile-name-field {
  display: grid;
  gap: 0.3rem;
}

.avatar-picker-label {
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.avatar-option {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--border-soft);
  background: var(--cream-100);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: all 0.15s ease;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.avatar-option:hover {
  border-color: var(--flame-500);
  transform: scale(1.1);
}

.avatar-option.selected {
  border-color: var(--flame-500);
  box-shadow: 0 0 0 2px var(--flame-500);
}

.avatar-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-option-initial {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink-500);
}

.profile-edit-actions {
  display: flex;
  gap: 0.5rem;
}

/* ================================================
   TYPOGRAPHY
   ================================================ */

h1, h2, h3, h4, h5 {
  margin: 0;
  color: var(--ink-900);
  line-height: 1.2;
}

h2, h3, h4, h5 {
  font-family: "Nunito", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

h2 {
  font-size: clamp(1.3rem, 2.8vw, 1.9rem);
  font-weight: 800;
  position: relative;
  padding-bottom: 0.35rem;
}

/* Accent underline */
h2::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--flame-500);
  border-radius: 2px;
  margin-top: 0.25rem;
}

h3 {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 700;
}

.summary,
.hint,
label,
li,
input,
select,
textarea,
button {
  font-family: "DM Sans", system-ui, sans-serif;
}

.summary {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.93rem;
  line-height: 1.55;
}

.hint {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.8rem;
  line-height: 1.45;
}

/* ================================================
   LAYOUT HELPERS
   ================================================ */

.stack {
  display: grid;
  gap: 0.62rem;
}

.compact-form {
  margin-top: 0.8rem;
}

.inline-form {
  display: flex;
  gap: 0.56rem;
  align-items: center;
  flex-wrap: wrap;
}

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

#league-actions {
  grid-template-columns: 1fr;
}

.how-to-play-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.how-to-play-card {
  padding: 0.9rem;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--cream-50);
  box-shadow: var(--shadow-sm);
}

.how-to-play-card h3 {
  font-size: 0.92rem;
}

.how-to-play-list {
  margin: 0.45rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.42rem;
}

.how-to-play-list li {
  color: var(--ink-700);
  font-size: 0.86rem;
  line-height: 1.45;
}

.qa-list li strong {
  color: var(--ink-900);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.84rem;
}

.actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ================================================
   BUTTONS
   ================================================ */

.btn {
  appearance: none;
  cursor: pointer;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(135deg, var(--flame-500), var(--flame-600));
  color: #fff;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1.5px solid var(--flame-700);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-retro), 0 4px 12px rgba(224, 104, 56, 0.2);
  transition: all 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-retro), 0 6px 18px rgba(224, 104, 56, 0.28);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(224, 104, 56, 0.15);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: grayscale(0.3);
}

.btn-ghost {
  background: var(--cream-50);
  color: var(--ink-700);
  border: 1.5px solid var(--border-med);
  box-shadow: var(--shadow-retro);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--cream-200);
  border-color: var(--ink-500);
  box-shadow: var(--shadow-retro);
  filter: none;
}

.btn-muted {
  background: var(--cream-200);
  color: var(--ink-700);
  border: 1px dashed var(--border-med);
  box-shadow: none;
}

.btn-muted:hover,
.btn-muted:focus-visible {
  background: var(--cream-300);
  filter: none;
}

.google-btn {
  background: linear-gradient(135deg, #4285f4, #3367c4);
  border-color: #2a56a8;
  box-shadow: var(--shadow-retro), 0 4px 12px rgba(66, 133, 244, 0.2);
}

.google-btn:hover,
.google-btn:focus-visible {
  box-shadow: var(--shadow-retro), 0 6px 18px rgba(66, 133, 244, 0.3);
}

/* ================================================
   FORM INPUTS
   ================================================ */

label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-700);
}

input,
select,
textarea {
  width: 100%;
  border: 1.5px solid var(--border-med);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
  background: var(--cream-50);
  color: var(--ink-900);
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--palm-500);
  box-shadow: 0 0 0 3px rgba(61, 155, 107, 0.12);
}

select {
  cursor: pointer;
}

code {
  background: rgba(90, 80, 65, 0.07);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
  font-size: 0.8rem;
}

/* ================================================
   LISTS & LEADERBOARD
   ================================================ */

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.leaderboard-list li,
#discoverable-leagues-list li,
#my-picks-history li {
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  background: var(--cream-50);
  box-shadow: var(--shadow-sm);
  position: relative;
}

/* Gold corner ornaments on leaderboard */
.leaderboard-list li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--sun-500);
  border-left: 2px solid var(--sun-500);
  border-top-left-radius: 2px;
}

.leaderboard-list li::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-bottom: 2px solid var(--sun-500);
  border-right: 2px solid var(--sun-500);
  border-bottom-right-radius: 2px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

.leaderboard-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-med);
  background: var(--cream-200);
}

.leaderboard-avatar-placeholder {
  display: grid;
  place-items: center;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-500);
}

.leaderboard-avatar-emoji {
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  background: var(--cream-300);
}

.rank-pill {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--palm-500), var(--palm-600));
  color: #fff;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: 1px 1px 0 rgba(45, 40, 30, 0.1);
}

.member-name {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 700;
  color: var(--ink-900);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.member-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.member-badges {
  display: inline-flex;
  gap: 0.3rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.member-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  background: var(--sun-500);
  color: #fff;
}

.member-subline {
  color: var(--ink-500);
  font-size: 0.78rem;
}

.points-pill {
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--flame-500), var(--flame-600));
  color: #fff;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 1px 1px 0 rgba(45, 40, 30, 0.1);
}

/* ================================================
   PILLS & TAGS
   ================================================ */

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(61, 155, 107, 0.1);
  color: var(--palm-600);
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid rgba(61, 155, 107, 0.2);
}

.invite-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  background: #e8f4fd;
  border: 1px solid #b8daff;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

#admin-config-access-code {
  text-transform: uppercase;
}

.invite-bar-text {
  margin: 0;
  color: var(--ink-700);
}

.invite-bar-text strong {
  font-family: "Nunito", system-ui, sans-serif;
  letter-spacing: 0.08em;
  color: var(--ink-900);
}

.btn-sm {
  padding: 0.28rem 0.6rem;
  font-size: 0.7rem;
}

.dashboard-head {
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* ================================================
   CASTAWAY CARDS
   ================================================ */

.castaways-grouped {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.tribe-section-header {
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--flame-600);
  border-bottom: 2px solid var(--border-soft);
  padding-bottom: 0.4rem;
  margin: 0 0 0.6rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.tribe-section-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-500);
  text-transform: none;
  letter-spacing: 0;
}

.castaways-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem;
}

.castaway-card.is-eliminated {
  opacity: 0.55;
}

.castaway-card {
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--cream-50);
  padding: 0.75rem;
  display: grid;
  gap: 0.5rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

/* Vintage tape strip */
.castaway-card::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 6px;
  background: rgba(219, 178, 74, 0.3);
  border: 1px solid rgba(219, 178, 74, 0.15);
  border-radius: 2px;
}

.castaway-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.castaway-top {
  display: flex;
  gap: 0.58rem;
  align-items: center;
}

.castaway-photo {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1.5px solid var(--border-med);
  background: var(--cream-200);
  box-shadow: 2px 2px 0 rgba(45, 40, 30, 0.06);
}

.castaway-name {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-900);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.castaway-meta {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.75rem;
}

.castaway-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid var(--border-soft);
  background: var(--cream-100);
  color: var(--ink-700);
}

.tag.eliminated {
  background: rgba(224, 104, 56, 0.1);
  border-color: rgba(224, 104, 56, 0.2);
  color: var(--flame-600);
  text-decoration: line-through;
  text-decoration-color: rgba(200, 84, 40, 0.35);
}

/* ================================================
   PICK CARDS
   ================================================ */

.pick-section-label {
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-700);
  margin: 0;
}

.pick-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
}

.pick-card {
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--cream-50);
  padding: 0.6rem;
  padding-bottom: 0.7rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}

.pick-card:hover {
  border-color: var(--palm-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pick-card.selected {
  border-color: var(--flame-500);
  background: rgba(224, 104, 56, 0.06);
  box-shadow: 0 0 0 3px rgba(224, 104, 56, 0.15), var(--shadow-md);
}

.pick-card.selected::after {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.22rem 0.4rem;
  border-radius: 0 0 calc(var(--radius-md) - 2px) calc(var(--radius-md) - 2px);
  background: var(--flame-500);
  color: #fff;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.3;
}

#pick-elimination-cards .pick-card.selected::after {
  content: "Going Home";
}

#pick-immunity-individual-cards .pick-card.selected::after {
  content: "Wins Immunity";
}

/* Eliminated pick cards */
.pick-card.is-eliminated {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}
.pick-card.is-eliminated .pick-card-info-btn {
  pointer-events: auto;
}
.pick-card.is-eliminated .pick-card-photo {
  filter: grayscale(0.7);
}
.pick-card.is-eliminated:hover {
  transform: none;
  border-color: var(--border-soft);
  box-shadow: none;
}
.pick-card-elim-tag {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(224, 104, 56, 0.12);
  color: var(--flame-600);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-decoration: line-through;
  text-decoration-color: rgba(200, 84, 40, 0.4);
}

.pick-card-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-med);
  background: var(--cream-200);
  margin: 0 auto 0.4rem;
  display: block;
}

.pick-card-info {
  display: grid;
  gap: 0.15rem;
}

.pick-card-name {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-900);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.pick-card-bio {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.68rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pick-tribe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem;
}

/* Tribe pick card — clickable to select tribe */
.tribe-pick-card {
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--cream-50);
  padding: 0.9rem;
  padding-bottom: 1rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}

.tribe-pick-card:hover {
  border-color: var(--palm-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tribe-pick-card.selected {
  border-color: var(--flame-500);
  background: rgba(224, 104, 56, 0.05);
  box-shadow: 0 0 0 3px rgba(224, 104, 56, 0.15), var(--shadow-md);
}

.tribe-pick-card.selected::after {
  content: "Winning Tribe";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.25rem 0.4rem;
  border-radius: 0 0 calc(var(--radius-lg) - 2px) calc(var(--radius-lg) - 2px);
  background: var(--flame-500);
  color: #fff;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.3;
}

.tribe-pick-name {
  margin: 0 0 0.5rem;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-900);
}

.tribe-pick-card.selected .tribe-pick-name {
  color: var(--flame-600);
}

/* Avatar roster row */
.tribe-roster {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.tribe-roster-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-med);
  background: var(--cream-200);
  transition: all 0.15s ease;
  cursor: pointer;
}

.tribe-roster-avatar:hover {
  border-color: var(--palm-500);
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(61, 155, 107, 0.25);
  z-index: 1;
}

.tribe-pick-count {
  color: var(--ink-500);
  font-size: 0.72rem;
  font-weight: 500;
}

/* ================================================
   ADMIN
   ================================================ */

.admin-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-tab-btn {
  appearance: none;
  cursor: pointer;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid var(--border-soft);
  background: var(--cream-100);
  color: var(--ink-700);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.18s ease;
}

.admin-tab-btn:hover,
.admin-tab-btn:focus-visible {
  background: var(--cream-50);
  border-color: var(--palm-500);
  color: var(--palm-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.admin-tab-btn.active {
  background: linear-gradient(135deg, var(--palm-500), var(--palm-600));
  color: #fff;
  border-color: var(--palm-700);
  box-shadow: 0 4px 14px rgba(61, 155, 107, 0.22);
}

.admin-fieldset {
  border: 1.5px solid var(--border-med);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.admin-fieldset legend {
  padding: 0 0.35rem;
  font-family: "Nunito", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-700);
}

.admin-fieldset label {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  width: fit-content;
}

.admin-fieldset input[type="radio"] {
  width: auto;
}

.admin-tribe-manager-list {
  display: grid;
  gap: 0.5rem;
}

.admin-player-manager-list {
  display: grid;
  gap: 0.5rem;
}

.admin-tribe-row {
  display: grid;
  gap: 0.56rem;
  grid-template-columns: 1fr minmax(150px, 220px);
  align-items: center;
  padding: 0.6rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--cream-50);
}

.admin-tribe-row strong {
  display: block;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.admin-tribe-row span {
  color: var(--ink-500);
  font-size: 0.75rem;
}

.admin-player-row {
  display: grid;
  gap: 0.56rem;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0.6rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--cream-50);
}

.admin-player-row strong {
  display: block;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.admin-player-row span {
  color: var(--ink-500);
  font-size: 0.75rem;
}

.admin-remove-player-btn {
  white-space: nowrap;
}

/* ================================================
   MESSAGES
   ================================================ */

.message {
  min-height: 52px;
  display: flex;
  align-items: center;
  border-left: 4px solid var(--palm-500);
  border-radius: var(--radius-sm);
  background: var(--cream-50);
  box-shadow: var(--shadow-sm);
}

.message.error {
  border-left-color: var(--flame-600);
  background: rgba(224, 104, 56, 0.04);
}

/* ================================================
   LOADING
   ================================================ */

.loading-panel {
  display: grid;
  place-items: center;
  min-height: 260px;
  text-align: center;
}

.loading-rings {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.loading-rings span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  animation: torch-flicker 1.2s ease-in-out infinite;
}

.loading-rings span:nth-child(1) {
  background: var(--flame-500);
}

.loading-rings span:nth-child(2) {
  background: var(--sun-500);
  animation-delay: 0.15s;
}

.loading-rings span:nth-child(3) {
  background: var(--palm-500);
  animation-delay: 0.3s;
}

@keyframes torch-flicker {
  0%, 100% {
    transform: scale(0.7);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

/* ================================================
   FOOTER
   ================================================ */

.site-footer {
  width: min(1060px, calc(100% - 2rem));
  margin: 0 auto 1.6rem;
  padding-top: 0.8rem;
  border-top: 1.5px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.74rem;
}

/* ================================================
   PICKS PAGE — WEEK SWITCHER & SECTION HEADINGS
   ================================================ */

.pick-week-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem 0.3rem 0.75rem;
  background: var(--cream-200);
  border: 1.5px solid var(--border-soft);
  border-radius: 999px;
  width: 100%;
}

.pick-week-switcher label {
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-700);
  margin: 0;
  flex-shrink: 0;
}

.week-pill-select {
  width: 100%;
  flex: 1;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--cream-50);
  font-size: 0.82rem;
  font-weight: 600;
}

.pick-history-missed {
  opacity: 0.6;
}

.pick-missed-label {
  color: var(--flame-600);
  font-weight: 600;
}

.pick-history-pending {
  opacity: 0.5;
  font-style: italic;
}

.pick-section-heading {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--flame-600);
  margin: 0.4rem 0 0;
  padding-bottom: 0.3rem;
  border-bottom: 2px dashed rgba(224, 104, 56, 0.18);
}

/* ================================================
   PICK CARD — INFO BUTTON
   ================================================ */

.pick-card-info-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-med);
  background: var(--cream-100);
  color: var(--ink-500);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
  z-index: 2;
  padding: 0;
  line-height: 1;
}

.pick-card-info-btn:hover {
  background: var(--palm-500);
  color: #fff;
  border-color: var(--palm-600);
  transform: scale(1.1);
}

/* ================================================
   CASTAWAY BIO MODAL
   ================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 43, 38, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-overlay.is-visible {
  opacity: 1;
}

.modal-card {
  position: relative;
  background: var(--cream-50);
  border: 2px solid var(--border-med);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(90, 80, 65, 0.06);
  width: min(560px, 100%);
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.22s ease;
}

.modal-overlay.is-visible .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border-med);
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(4px);
  color: var(--ink-700);
  font-size: 1.3rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  background: var(--flame-500);
  color: #fff;
  border-color: var(--flame-600);
}

.modal-body {
  overflow-y: auto;
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
}

.modal-hero {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.modal-photo {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 2px solid var(--border-med);
  background: var(--cream-200);
  box-shadow: 3px 3px 0 rgba(45, 40, 30, 0.08);
  flex-shrink: 0;
}

.modal-hero-info {
  display: grid;
  gap: 0.2rem;
}

.modal-name {
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-900);
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

.modal-name::after {
  display: none;
}

.modal-tribe {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--palm-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-location {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.82rem;
}

.modal-seasons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.modal-season-tag {
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border-soft);
  background: var(--cream-100);
  color: var(--ink-700);
}

.modal-season-tag.winner {
  background: rgba(219, 178, 74, 0.15);
  border-color: rgba(219, 178, 74, 0.3);
  color: var(--sun-700);
}

.modal-season-tag.runner-up {
  background: rgba(61, 155, 107, 0.1);
  border-color: rgba(61, 155, 107, 0.2);
  color: var(--palm-600);
}

.modal-bio {
  color: var(--ink-700);
  font-size: 0.88rem;
  line-height: 1.65;
}

.modal-bio p {
  margin: 0 0 0.7rem;
}

.modal-bio p:last-child {
  margin-bottom: 0;
}

/* ================================================
   RESPONSIVE
   ================================================ */

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

  .how-to-play-grid {
    grid-template-columns: 1fr;
  }

  .admin-tribe-row {
    grid-template-columns: 1fr;
  }

  .admin-player-row {
    grid-template-columns: 1fr;
  }

  .leaderboard-row {
    grid-template-columns: auto auto 1fr;
  }

  .stamp-badge {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    width: calc(100% - 1.2rem);
    margin-top: 0.7rem;
    padding: 0.7rem 0.75rem;
  }

  .top-nav,
  .layout,
  .site-footer {
    width: calc(100% - 1.2rem);
  }

  .panel {
    padding: 0.9rem;
    border-radius: 12px;
  }

  .panel::before {
    inset: 4px;
    border-radius: 8px;
  }

  .brand-logo {
    width: 3rem;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-subtitle {
    font-size: 0.6rem;
  }

  .brand-motto {
    display: none;
  }

  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .actions .btn {
    width: auto;
  }

  .nav-btn {
    font-size: 0.76rem;
    padding: 0.42rem 0.7rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .castaway-card::before {
    width: 28px;
    height: 5px;
  }

  .pick-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .pick-card-photo {
    width: 50px;
    height: 50px;
  }

  .pick-tribe-members {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .modal-overlay {
    padding: 0.5rem;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100dvh - 1rem);
    border-radius: var(--radius-lg);
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-photo {
    width: 80px;
    height: 80px;
  }

  .modal-name {
    font-size: 1.15rem;
  }
}
