/* ===============================
   ROOSTER — Neu-Brutalism Design System
   Light base · Black borders · Hard black shadows · Electric yellow accent
   =============================== */


:root {
  /* --- Backgrounds --- */
  --color-bg-primary:    #fef5e4;   /* warm cream — page background */
  --color-bg-card:       #ffffff;   /* pure white cards */
  --color-bg-card-hover: #fafaf8;
  --color-bg-input:      #f5f5f0;   /* slightly off-white inputs */
  --color-bg-elevated:   #fff8f0;   /* warm white for elevated surfaces */

  /* --- Text --- */
  --color-text-primary:  #1a1a1a;
  --color-text-secondary:#555555;
  --color-text-heading:  #1a1a1a;
  --color-text-muted:    #999999;

  /* --- Accents --- */
  --color-accent-primary:   #ffe500;   /* electric yellow */
  --color-accent-secondary: #ff5c35;   /* coral */
  --color-accent-gold:      #ffe500;
  --color-accent-green:     #00c853;
  --color-accent-blue:      #4d9fff;

  /* --- Borders (BLACK — core of neubrutalism) --- */
  --color-border:        #1a1a1a;
  --color-border-active: #ffe500;

  /* --- Nav --- */
  --color-nav-bg:      #ffffff;
  --color-nav-active:  #1a1a1a;
  --color-nav-inactive:#aaaaaa;

  /* --- Neu-Brutalism Shadows (hard black offset, zero blur) --- */
  --shadow-sm:   2px 2px 0px 0px #1a1a1a;
  --shadow-md:   4px 4px 0px 0px #1a1a1a;
  --shadow-lg:   5px 5px 0px 0px #1a1a1a;
  --shadow-xl:   6px 6px 0px 0px #1a1a1a;
  --shadow-2xl:  8px 8px 0px 0px #1a1a1a;
  --shadow-accent: 5px 5px 0px 0px #ffe500;

  /* --- Spacing --- */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;

  /* --- Radius --- */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-full: 9999px;

  /* --- Typography --- */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-pixel:   'Press Start 2P', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;

  /* --- Transitions (snappy) --- */
  --transition:      0.12s ease;
  --transition-fast: 0.08s ease;

  /* --- Layout --- */
  --nav-height:    68px;
  --header-height: 58px;

  /* --- Backward-compat aliases --- */
  --bg-primary:    var(--color-bg-primary);
  --bg-card:       var(--color-bg-card);
  --bg-dark:       var(--color-bg-primary);
  --text-primary:  var(--color-text-primary);
  --text-secondary:var(--color-text-secondary);
  --text-light:    var(--color-text-primary);
  --text-muted:    var(--color-text-muted);
  --shadow:        var(--shadow-md);
  --radius:        var(--radius-md);
  --radius-lg:     var(--radius-lg);

  /* --- Legacy rooster-* variables --- */
  --rooster-red:    var(--color-accent-secondary);
  --rooster-dark-red: #cc2200;
  --rooster-orange: var(--color-accent-secondary);
  --rooster-gold:   var(--color-accent-gold);
  --rooster-yellow: #ffe500;
  --rooster-green:  var(--color-accent-green);
  --rooster-brown:  #3d2820;
  --rooster-cream:  #fef5e4;
  --rooster-white:  #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-text-heading);
  letter-spacing: -0.02em;
}

/* ===============================
   SCREENS & PAGES
   =============================== */

.screen {
  display: none;
  min-height: 100vh;
}
.screen.active {
  display: flex;
  flex-direction: column;
}

.page {
  display: none;
  padding: var(--space-md);
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 16px);
  animation: fadeIn 0.3s ease;
  background: transparent;
  color: var(--color-text-primary);
}
.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===============================
   LOGIN SCREEN
   =============================== */

#login-screen {
  justify-content: center;
  align-items: center;
  background: var(--color-bg-primary);
  min-height: 100vh;
  padding: 24px 20px;
}

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 32px 36px;
  max-width: 380px;
  width: 100%;
  background: var(--color-bg-card);
  border: 3px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2xl);
}

.rooster-logo {
  font-size: 4rem;
  line-height: 1;
}

.login-logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* ---- Login Logo Animations ---- */

@keyframes logoBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%       { transform: translateY(-12px) rotate(-6deg); }
  75%       { transform: translateY(-6px) rotate(6deg); }
}
.logo-anim-bounce { animation: logoBounce 2.4s ease-in-out infinite; }

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-18px); }
}
.logo-anim-float { animation: logoFloat 3s ease-in-out infinite; }

@keyframes logoSpin {
  from { transform: perspective(400px) rotateY(0deg); }
  to   { transform: perspective(400px) rotateY(360deg); }
}
.logo-anim-spin { animation: logoSpin 1.6s linear infinite; }

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.25); }
}
.logo-anim-pulse { animation: logoPulse 1.2s ease-in-out infinite; }

@keyframes logoShake {
  0%, 100%      { transform: translateX(0) rotate(0deg); }
  15%, 55%      { transform: translateX(-10px) rotate(-5deg); }
  35%, 75%      { transform: translateX(10px) rotate(5deg); }
}
.logo-anim-shake { animation: logoShake 0.7s ease-in-out infinite; }

@keyframes logoWobble {
  0%, 100% { transform: rotate(0deg); }
  20%       { transform: rotate(-18deg); }
  60%       { transform: rotate(18deg); }
  80%       { transform: rotate(-8deg); }
}
.logo-anim-wobble { animation: logoWobble 1.8s ease-in-out infinite; }

@keyframes logoFlip {
  0%, 40%, 100% { transform: scaleX(1); }
  50%, 90%      { transform: scaleX(-1); }
}
.logo-anim-flip { animation: logoFlip 2.2s ease-in-out infinite; }

@keyframes logoTada {
  0%        { transform: scale(1) rotate(0deg); }
  10%, 20%  { transform: scale(0.9) rotate(-4deg); }
  30%, 50%, 70%, 90% { transform: scale(1.15) rotate(4deg); }
  40%, 60%, 80%      { transform: scale(1.15) rotate(-4deg); }
  100%      { transform: scale(1) rotate(0deg); }
}
.logo-anim-tada { animation: logoTada 2s ease-in-out infinite; }

.app-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--color-text-heading);
  margin: var(--space-md) 0 var(--space-xs);
}

#login-wordmark-wrap {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.login-wordmark-img {
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.app-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

.login-form {
  width: 100%;
}

.login-form input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 500;
  margin-bottom: 12px;
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  min-height: 50px;
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
}

.login-form input::placeholder {
  color: var(--color-text-muted);
}

.login-form input:focus {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px 0px #1a1a1a;
  border-color: var(--color-accent-primary);
}

.login-form .btn {
  background: #1a1a1a;
  color: #ffffff;
  font-weight: 800;
  width: 100%;
  margin-top: 8px;
  border: 2px solid #1a1a1a;
  box-shadow: var(--shadow-lg);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.login-form .btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-xl);
}

.login-form .btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.error-text {
  color: #d93025;
  font-weight: 700;
  font-size: var(--text-sm);
  margin-top: var(--space-sm);
  min-height: 20px;
}

.success-text {
  color: #1a7a3f;
  font-weight: 700;
  font-size: var(--text-sm);
  margin-top: var(--space-sm);
  min-height: 20px;
}

/* ===============================
   BUTTONS — Neu-Brutalism
   =============================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  letter-spacing: 0.01em;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-xl);
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: #1a1a1a;
  color: #ffffff;
  border-color: #1a1a1a;
}

.btn-secondary {
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

.btn-success {
  background: var(--color-accent-green);
  color: #1a1a1a;
  border-color: var(--color-border);
}

.btn-danger {
  background: var(--color-accent-secondary);
  color: #fff;
  border-color: var(--color-border);
}

.btn-outline {
  background: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

.btn-gold {
  background: var(--color-accent-gold);
  color: #1a1a1a;
  font-weight: 800;
  border-color: var(--color-border);
  box-shadow: var(--shadow-md);
}

.btn-block { width: 100%; }

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
  min-height: 36px;
  box-shadow: var(--shadow-sm);
}
.btn-sm:hover { box-shadow: var(--shadow-md); }

.btn-xs {
  padding: 4px 10px;
  font-size: 0.75rem;
  min-height: 28px;
  box-shadow: 2px 2px 0px 0px #1a1a1a;
  border-width: 1.5px;
}
.btn-xs:hover { box-shadow: var(--shadow-sm); }

/* ===============================
   HEADER — Neu-Brutalism
   =============================== */

.app-header {
  background: var(--color-bg-primary);
  border-bottom: 2px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  box-shadow: 2px 2px 0px 0px #1a1a1a;
}

.header-page-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
  color: var(--color-text-heading);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-icon-btn {
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
  min-height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.header-icon-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-md);
}

.header-icon-btn:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

/* ===============================
   BOTTOM NAVIGATION — Neu-Brutalism
   White bar · thick black border · yellow pill for active
   =============================== */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 3px solid var(--color-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--nav-height);
  padding: 6px 6px;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 100;
}

.nav-btn {
  background: none;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 8px;
  min-height: 50px;
  flex: 1;
  max-width: 80px;
  color: var(--color-nav-inactive);
  font-family: var(--font-heading);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.nav-btn:active:not(.active) {
  transform: scale(0.94);
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.nav-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Active item — yellow card-pill with hard black shadow */
.nav-btn.active {
  background: var(--color-accent-primary);
  border-color: var(--color-border);
  color: #1a1a1a;
  box-shadow: 3px 3px 0px 0px #1a1a1a;
}

.nav-btn.active:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.nav-btn.active .nav-icon svg {
  stroke-width: 3;
}

/* ===============================
   PAGE CONTENT
   =============================== */

.page-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  color: var(--color-text-primary);
}

.page-title {
  font-size: 1.5rem;
  color: var(--color-text-heading);
  font-family: var(--font-heading);
  margin-bottom: 20px;
  text-align: center;
}

/* ===============================
   HOME PAGE
   =============================== */

/* User Info Card */
.home-container {
  max-width: 500px;
  margin: 0 auto;
}

.user-info-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-lg);
}

.user-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--color-bg-elevated);
}

.user-info-text {
  flex: 1;
}

.user-name {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text-primary);
}

.user-level {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--color-accent-gold);
  margin-top: 2px;
}

.user-points {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--color-text-primary);
  text-align: right;
}

/* Home Sections */
.home-section {
  margin-bottom: var(--space-lg);
}

.home-section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text-heading);
  margin-bottom: var(--space-md);
}

/* Schedule Timeline */
.schedule-timeline {
  position: relative;
  padding-left: 20px;
}

/* Vertical line */
.schedule-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding: var(--space-sm) 0 var(--space-md) var(--space-md);
}

/* Colored dot */
.timeline-item::before {
  content: '';
  position: absolute;
  left: -17px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent-blue);
  border: 2px solid var(--color-bg-primary);
}

/* Color variants for time markers */
.timeline-item.is-past::before { background: var(--color-text-muted); }
.timeline-item.is-now::before { background: var(--color-accent-green); box-shadow: 0 0 6px var(--color-accent-green); }
.timeline-item.is-future::before { background: var(--color-accent-blue); }
.timeline-item.is-allday::before { background: var(--color-accent-gold); }

.timeline-time {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 2px;
}

.timeline-title {
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: var(--text-base);
}

.timeline-location {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.timeline-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.timeline-empty {
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-lg);
  font-style: italic;
}

/* Season Info Card */
.season-info-card {
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

/* ===============================
   WHEEL PAGE
   =============================== */

#page-wheel {
  padding: var(--space-xs) var(--space-md);
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 8px);
}

.wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-sm) 0;
}

.wheel-status {
  text-align: center;
  padding: 10px 20px;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  margin-bottom: var(--space-sm);
  font-weight: 700;
  width: 100%;
  max-width: 360px;
}

.wheel-status.locked {
  border-left: 4px solid var(--color-text-muted);
  color: var(--color-text-muted);
}
.wheel-status.spin-person {
  border-left: 4px solid var(--color-accent-gold);
  color: var(--color-accent-secondary);
}
.wheel-status.spin-place {
  border-left: 4px solid var(--color-accent-green);
  color: var(--color-accent-green);
}
.wheel-status.poll-active {
  border-left: 4px solid var(--color-accent-primary);
  color: var(--color-accent-primary);
}
.wheel-status.scheduled {
  border-left: 4px solid var(--color-accent-green);
  color: var(--color-accent-green);
}
.wheel-status.all-done {
  border-left: 4px solid var(--color-accent-gold);
  color: var(--color-accent-gold);
  background: var(--color-bg-elevated);
}

.wheel-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  margin: var(--space-sm) 0;
  filter: drop-shadow(8px 8px 0px #1a1a1a);
}

.wheel-pointer {
  display: none; /* pointer is drawn on canvas */
}

#wheel-canvas,
#free-wheel-canvas {
  border-radius: 50%;
  overflow: visible;
}

.wheel-info {
  text-align: center;
  margin: 12px 0;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  max-width: 360px;
}

.wheel-info .chosen-highlight {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-accent-primary);
  margin-top: var(--space-xs);
}

.wheel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-sm);
}

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

.admin-container {
  max-width: 600px;
  margin: 0 auto;
}

.admin-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-xs);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
  flex: none;
  min-width: max-content;
  padding: 10px 14px;
  border: 2px solid transparent;
  background: transparent;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.admin-tab.active {
  background: var(--color-accent-gold);
  color: #1a1a1a;
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.admin-panel {
  display: none;
}
.admin-panel.active {
  display: block;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.panel-header h2 {
  font-size: 1.2rem;
  color: var(--color-text-heading);
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.item-card:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.item-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.item-details {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text-primary);
}

.item-sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.item-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
}
.item-badge.available { background: rgba(39,174,96,0.15); color: var(--color-accent-green); }
.item-badge.chosen { background: rgba(230,126,34,0.15); color: var(--color-accent-secondary); }
.item-badge.completed { background: rgba(85,102,119,0.15); color: var(--color-text-muted); }
.item-badge.admin { background: rgba(244,196,48,0.15); color: var(--color-accent-gold); }

/* Game Control */
.game-control {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.game-control .game-phase {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-accent-primary);
  margin-bottom: 12px;
}

.game-control .game-info {
  margin-bottom: var(--space-md);
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.game-control .game-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===============================
   CALENDAR PAGE
   =============================== */

.calendar-container {
  max-width: 600px;
  margin: 0 auto;
}

.calendar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 2px solid var(--color-border);
  border-left: 5px solid var(--color-accent-green);
  box-shadow: var(--shadow-md);
  position: relative;
}

.calendar-card.completed {
  border-left-color: var(--color-text-muted);
  opacity: 0.7;
}

.calendar-card.next-up {
  border-left-color: var(--color-accent-gold);
  background: var(--color-bg-elevated);
}

.calendar-card .event-round {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.calendar-card .event-place {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-text-heading);
  margin: var(--space-xs) 0;
}

.calendar-card .event-date {
  color: var(--color-text-secondary);
  font-weight: 600;
}

.calendar-card .event-person {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.calendar-card .event-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
}

.event-badge.upcoming { background: rgba(39,174,96,0.15); color: var(--color-accent-green); }
.event-badge.completed { background: rgba(85,102,119,0.15); color: var(--color-text-muted); }
.event-badge.next { background: var(--color-accent-gold); color: var(--color-bg-primary); }

.calendar-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
}
.calendar-empty .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* ===============================
   SETTINGS PAGE
   =============================== */

.settings-container {
  max-width: 500px;
  margin: 0 auto;
}

.settings-section { /* nb-card */
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--space-md);
}

.settings-section h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text-heading);
  margin-bottom: 14px;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.settings-form label {
  display: block;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  margin-top: 14px;
}

.settings-form label:first-of-type {
  margin-top: 0;
}

.settings-form input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 500;
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  min-height: 48px;
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
}

.settings-form input::placeholder {
  color: var(--color-text-muted);
}

.settings-form input:focus {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px 0px #1a1a1a;
  border-color: var(--color-accent-primary);
}

.settings-admin-link h3 {
  color: var(--color-accent-gold);
  margin-bottom: 8px;
}
.admin-link-desc {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.settings-form input:disabled {
  background: var(--color-bg-elevated);
  color: var(--color-text-muted);
  box-shadow: none;
  opacity: 0.6;
}

.settings-form .btn {
  margin-top: var(--space-md);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.avatar-option {
  width: 72px;
  height: 72px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  overflow: hidden;
}

.avatar-option:hover {
  border-color: var(--color-accent-gold);
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0px 0px #ffe500;
}

.avatar-option.selected {
  border-color: var(--color-accent-gold);
  box-shadow: 3px 3px 0px 0px #ffe500;
  transform: translate(-1px, -1px);
}

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

/* ===============================
   POLL OVERLAY
   =============================== */

.poll-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: var(--nav-height);
  background: rgba(26,26,26,0.7);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  animation: fadeIn 0.3s ease;
}

.poll-overlay.hidden {
  display: none;
}

.poll-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 420px;
  width: 100%;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-2xl);
  max-height: 80vh;
  overflow-y: auto;
}

.poll-title {
  text-align: center;
  color: var(--color-text-heading);
  font-size: 1.3rem;
  margin-bottom: var(--space-xs);
}

.poll-subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.poll-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--color-bg-input);
}

.poll-option:hover {
  border-color: var(--color-accent-secondary);
}

.poll-option.voted {
  border-color: var(--color-accent-green);
  background: rgba(0,200,83,0.08);
}

.poll-option .option-label {
  flex: 1;
  font-weight: 600;
  color: var(--color-text-primary);
}

.poll-option .option-votes {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  background: var(--color-bg-elevated);
  padding: 2px 8px;
  border-radius: 10px;
}

.poll-option .option-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--color-accent-green);
  transition: width 0.3s;
}

.poll-status {
  text-align: center;
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.poll-dismiss-btn {
  width: 100%;
  background: transparent;
  color: var(--color-text-muted);
  border: none;
  padding: 10px;
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: color 0.2s;
  min-height: 44px;
}
.poll-dismiss-btn:hover {
  color: var(--color-text-secondary);
}
.poll-dismiss-btn.hidden {
  display: none;
}

/* ===============================
   MODAL
   =============================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26,26,26,0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--color-bg-elevated);
  border-bottom: 2px solid var(--color-border);
  color: var(--color-text-primary);
}

.modal-header h3 {
  font-size: 1.1rem;
  color: var(--color-text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 20px;
}

.modal-body label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
  margin-top: 12px;
}

.modal-body label:first-child {
  margin-top: 0;
}

.modal-body input,
.modal-body textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-body);
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  min-height: 44px;
}

.modal-body input::placeholder,
.modal-body textarea::placeholder {
  color: var(--color-text-muted);
}

.modal-body input:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px 0px #1a1a1a;
}

.modal-footer {
  padding: 12px 20px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ===============================
   CONFETTI
   =============================== */

.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 300;
}

/* ===============================
   UTILITY
   =============================== */

.hidden { display: none !important; }

.text-center { text-align: center; }
.mt-8 { margin-top: var(--space-sm); }
.mt-16 { margin-top: var(--space-md); }
.mb-8 { margin-bottom: var(--space-sm); }

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

@media (min-width: 768px) {
  .wheel-wrapper canvas {
    width: 400px;
    height: 400px;
  }

  .app-title {
    font-size: 2.8rem;
  }

  .header-page-title {
    font-size: 1.2rem;
  }

  .page {
    padding: var(--space-lg);
    padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 32px);
  }

  .nav-btn {
    font-size: 0.8rem;
  }

  .nav-btn .nav-icon {
    font-size: 1.6rem;
  }
}

@media (min-width: 1024px) {
  .page-content {
    max-width: 900px;
    margin: 0 auto;
  }

  .bottom-nav {
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

/* Small phones */
@media (max-width: 360px) {
  .app-title {
    font-size: 1.8rem;
  }

  .rooster-logo {
    font-size: 3rem;
  }

  #wheel-canvas {
    width: 280px;
    height: 280px;
  }

  .admin-tab {
    font-size: 0.75rem;
    padding: var(--space-sm);
  }
}

/* ============ SCOREBOARD ============ */

.scoreboard-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 1rem;
}

.scoreboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* --- Leader Hero Card --- */
.scoreboard-hero {
  background: var(--color-bg-card);
  border: 2px solid var(--color-accent-gold);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-accent);
}

.scoreboard-hero-crown {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.scoreboard-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--color-accent-gold);
  object-fit: cover;
  image-rendering: pixelated;
  margin-bottom: var(--space-sm);
  box-shadow: 3px 3px 0px 0px #ffe500;
}

.scoreboard-hero-fallback {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--space-sm);
}

.scoreboard-hero-name {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.scoreboard-hero-level {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--color-accent-gold);
  margin-top: var(--space-xs);
}

.scoreboard-hero-points {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--color-accent-gold);
  margin-top: var(--space-sm);
}

/* --- Compact Player Rows --- */
.scoreboard-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.scoreboard-row:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-md);
}

.scoreboard-row-rank {
  font-weight: 700;
  color: var(--color-text-muted);
  min-width: 2rem;
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 10px;
}

.scoreboard-row-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  object-fit: cover;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.scoreboard-avatar-fallback {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.scoreboard-row-info {
  flex: 1;
  min-width: 0;
}

.scoreboard-row-name {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.scoreboard-row-level {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.scoreboard-row-points {
  font-family: var(--font-pixel);
  font-size: 12px;
  font-weight: 800;
  min-width: 3rem;
  text-align: right;
  color: var(--color-text-primary);
}

.you-badge {
  font-size: 0.65rem;
  background: var(--color-accent-primary);
  color: #fff;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* --- Current User Highlight --- */
.scoreboard-you.scoreboard-hero {
  border-color: var(--color-accent-gold);
  box-shadow: var(--shadow-accent);
}

.scoreboard-you.scoreboard-row {
  border-color: var(--color-accent-gold);
  border-width: 3px;
  background: rgba(255, 229, 0, 0.12);
}

/* Admin Points Panel */
.points-form-area {
  padding: 0.5rem 0;
}

.points-form-area .form-group {
  margin-bottom: 0.75rem;
}

.points-form-area label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: var(--color-text-secondary);
  font-weight: 700;
}

.points-form-area .form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  font-size: 0.9rem;
  font-family: var(--font-body);
  min-height: 44px;
}

.points-form-area .form-control::placeholder {
  color: var(--color-text-muted);
}

.points-form-area .form-control:focus {
  outline: none;
  border-color: var(--color-border-active);
}

.points-form-area select.form-control {
  appearance: auto;
}

/* Admin inline form controls — dark theme */
.admin-container .form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 500;
  min-height: 44px;
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.admin-container .form-control::placeholder {
  color: var(--color-text-muted);
}
.admin-container .form-control:focus {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px 0px #1a1a1a;
  border-color: var(--color-accent-primary);
}
.admin-container select.form-control {
  appearance: auto;
  background: var(--color-bg-input);
  color: var(--color-text-primary);
}
.admin-container textarea.form-control {
  resize: vertical;
  min-height: 80px;
}
.admin-container .form-group {
  margin-bottom: var(--space-sm);
}
.admin-container .form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}

/* Admin section headings */
.popup-trigger-section h3,
.custom-challenge-section h3 {
  color: var(--color-accent-primary);
  font-size: 1rem;
  font-weight: 700;
}

.points-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent-primary);
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 2px solid var(--color-border);
}

.item-row:last-child {
  border-bottom: none;
}

/* ============ CHALLENGES PAGE ============ */

.challenges-container {
  max-width: 600px;
  margin: 0 auto;
}

/* Challenge Category Tabs */
.challenge-tabs {
  display: flex;
  gap: var(--space-sm);
  padding: 0 0 var(--space-md) 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.challenge-tabs::-webkit-scrollbar {
  display: none;
}

.challenge-tab {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  transition: all 0.2s;
  flex-shrink: 0;
}

.challenge-tab:hover {
  background: var(--color-bg-card-hover);
}

.challenge-tab.active {
  background: var(--color-accent-primary);
  color: #1a1a1a;
  font-weight: 800;
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* Challenge Grid */
.challenge-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

/* Challenge Cards */
.challenge-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.challenge-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}

.challenge-card:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.challenge-card.completed {
  border-color: var(--color-accent-green);
  background: rgba(39,174,96,0.05);
}

.challenge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.challenge-difficulty {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.difficulty-easy {
  background: var(--color-accent-green);
}

.difficulty-medium {
  background: var(--color-accent-secondary);
}

.difficulty-hard {
  background: var(--color-accent-primary);
}

.challenge-category-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  background: var(--color-bg-elevated);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.challenge-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
  line-height: 1.2;
}

.challenge-desc {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  flex: 1;
}

.challenge-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.challenge-points {
  display: inline-block;
  background: var(--color-accent-primary);
  color: #1a1a1a;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 2px 2px 0px 0px #1a1a1a;
}

.challenge-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.status-pending {
  background: rgba(230,126,34,0.15);
  color: var(--color-accent-secondary);
}

.status-approved {
  background: rgba(39,174,96,0.15);
  color: var(--color-accent-green);
}

.status-rejected {
  background: rgba(192,57,43,0.15);
  color: var(--color-accent-primary);
}

.challenge-action-btn {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  background: var(--color-accent-secondary);
  color: white;
  cursor: pointer;
  box-shadow: 2px 2px 0px 0px #1a1a1a;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}

.challenge-action-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-sm);
}
.challenge-action-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.btn-retry {
  background: var(--color-accent-primary);
}

.btn-retry:hover {
  background: #cc3a1a;
}

/* Photo Upload Area */
.photo-upload-area {
  text-align: center;
  padding: 20px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-input);
  margin-top: 12px;
  color: var(--color-text-secondary);
}

.photo-preview-container {
  margin-top: 12px;
}

.photo-preview-container.hidden {
  display: none;
}

.photo-preview {
  max-width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

/* Challenge Modal Content */
.challenge-modal-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-challenge-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-text-heading);
}

.modal-challenge-desc {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

.modal-challenge-points {
  font-weight: 700;
  color: var(--color-accent-primary);
  font-size: 0.95rem;
}

/* ============ POP-UP CHALLENGE OVERLAY ============ */

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(26, 26, 26, 0.88);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-overlay.hidden {
  display: none;
}

.popup-content {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 40px 28px 32px;
  max-width: 420px;
  width: 92%;
  text-align: center;
  border: 3px solid var(--color-accent-primary);
  box-shadow: 8px 8px 0px 0px var(--color-accent-secondary);
  animation: popupSlam 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popupSlam {
  from { transform: scale(0.7) translateY(40px); opacity: 0; }
  to   { transform: scale(1) translateY(0);     opacity: 1; }
}

.popup-header {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-accent-primary);
  margin-bottom: var(--space-md);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-family: var(--font-heading);
}

.popup-challenge-name {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

.popup-challenge-desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.4;
}

.popup-challenge-meta {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.popup-points {
  background: var(--color-accent-primary);
  color: #1a1a1a;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 2px 2px 0px 0px #1a1a1a;
}

.popup-difficulty {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  background: var(--color-bg-elevated);
  padding: 6px 12px;
  border-radius: 12px;
}

.popup-countdown {
  font-size: 1.1rem;
  color: var(--color-accent-secondary);
  font-weight: bold;
  margin: 12px 0;
}

.popup-countdown.hidden {
  display: none;
}

.popup-accept-btn {
  width: 100%;
  background: var(--color-accent-primary);
  color: white;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font-heading);
  min-height: 44px;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.popup-accept-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-xl);
}

.popup-accept-btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.popup-dismiss-btn {
  width: 100%;
  background: transparent;
  color: var(--color-text-secondary);
  border: none;
  padding: 10px;
  margin-top: var(--space-sm);
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: color 0.2s;
  min-height: 44px;
}

.popup-dismiss-btn:hover {
  color: var(--color-text-primary);
}

.popup-trigger-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.custom-challenge-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.custom-challenge-section textarea.form-control {
  resize: vertical;
}

/* ============ CHALLENGE WHEEL OVERLAY ============ */

.wheel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 26, 0.88);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.wheel-overlay.hidden {
  display: none;
}

.wheel-overlay .wheel-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.wheel-overlay .wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 25px solid white;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.challenge-wheel {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  position: relative;
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 0 6px var(--color-border);
  overflow: hidden;
}

.wheel-segment-label {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  width: 100%;
  text-align: center;
}

.wheel-spin-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-accent-primary);
  color: white;
  font-weight: bold;
  font-size: 0.8rem;
  z-index: 10;
  border: 3px solid white;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  min-height: 44px;
}

.wheel-spin-btn:hover {
  background: #cc3a1a;
  transform: translate(-50%, -50%) scale(1.05);
}

.wheel-spin-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.wheel-result {
  text-align: center;
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  margin-top: var(--space-lg);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-2xl);
  max-width: 360px;
  width: 90%;
}

.wheel-result.hidden {
  display: none;
}

.wheel-result-type {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.wheel-result-label {
  font-size: 1.4rem;
  font-weight: bold;
  margin: 12px 0;
  color: var(--color-text-primary);
}

.wheel-result-points {
  font-size: 2rem;
  font-weight: bold;
  margin: 12px 0;
}

.wheel-result-points.positive {
  color: var(--color-accent-green);
}

.wheel-result-points.negative {
  color: var(--color-accent-primary);
}

.wheel-result-close {
  background: var(--color-accent-primary);
  color: white;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 800;
  font-family: var(--font-heading);
  cursor: pointer;
  margin-top: 12px;
  min-height: 44px;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.wheel-result-close:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-xl);
}

.wheel-result-close:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.wheel-cancel-btn {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  background: none;
  border: 2px solid var(--color-border);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 44px;
  z-index: 10;
  transition: background 0.2s, color 0.2s;
}

.wheel-cancel-btn:hover {
  background: var(--color-bg-card-hover);
  color: var(--color-text-primary);
}

.wheel-cancel-btn.hidden {
  display: none;
}

/* ============ BOTTOM SHEET ============ */

.bottom-sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bottom-sheet-overlay.hidden {
  display: none;
}

.bottom-sheet-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26,26,26,0.5);
}

.bottom-sheet-panel {
  position: relative;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 60vh;
  overflow-y: auto;
  border: 2px solid var(--color-border);
  border-bottom: none;
  box-shadow: 0 -4px 0px 0px #1a1a1a;
  animation: slideUpSheet 0.3s ease-out;
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--color-text-muted);
  border-radius: 2px;
  margin: var(--space-sm) auto;
}

.bottom-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 var(--space-lg) var(--space-sm);
}

.bottom-sheet-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text-heading);
  flex: 1;
  margin: 0;
}

.bottom-sheet-close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bottom-sheet-body {
  padding: 0 var(--space-lg) var(--space-lg);
}

.bottom-sheet-desc {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.bottom-sheet-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.challenge-difficulty-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  background: var(--color-bg-elevated);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.bottom-sheet-photo-area {
  margin-top: var(--space-sm);
}

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

.approvals-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.approval-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: grab;
  touch-action: pan-y;
}

.approval-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}

.approval-photo {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.approval-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.approval-user {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
}

.approval-avatar {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 6px;
  flex-shrink: 0;
}

.approval-challenge {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.approval-points {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent-primary);
}

.approval-time {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.approval-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .approval-actions {
    flex-direction: row;
  }
}

.btn-approve {
  background: var(--color-accent-green);
  color: #1a1a1a;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  border: 2px solid var(--color-border);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-approve:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-md);
}

.btn-approve:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.btn-reject {
  background: var(--color-accent-secondary);
  color: white;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  border: 2px solid var(--color-border);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-reject:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-md);
}

.btn-reject:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

/* Swipe gesture visual feedback */
.approval-card.swiping-approve {
  box-shadow: 0 0 0 2px var(--color-accent-green) inset;
}

.approval-card.swiping-reject {
  box-shadow: 0 0 0 2px var(--color-accent-primary) inset;
}

.approval-card.swipe-done {
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.swipe-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}
.swipe-hint-approve {
  left: 12px;
  color: var(--color-accent-green);
}
.swipe-hint-reject {
  right: 12px;
  color: var(--color-accent-primary);
}
.approval-card.swiping-approve .swipe-hint-approve,
.approval-card.swiping-reject .swipe-hint-reject {
  opacity: 1;
}

.pending-count-badge {
  display: inline-block;
  background: var(--color-accent-primary);
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 4px;
  min-width: 18px;
  text-align: center;
}

/* ===============================
   TROPHY MODAL
   =============================== */

.trophy-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(26, 26, 26, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.5s ease;
}

.trophy-content {
  text-align: center;
  padding: 2.5rem 2rem;
  max-width: 500px;
  width: 90%;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  border: 3px solid var(--color-accent-gold);
  box-shadow: 8px 8px 0px 0px #ffe500;
  animation: trophyCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes trophyCardIn {
  from { transform: scale(0.8) translateY(30px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.trophy-icon-large {
  font-size: 8rem;
  animation: trophyBounce 0.8s ease-out;
  filter: drop-shadow(0 0 20px rgba(244, 196, 48, 0.8));
  display: block;
  margin-bottom: 0.5rem;
}

@keyframes trophyBounce {
  0% { transform: scale(0) rotate(-180deg); }
  60% { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}

.trophy-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--color-accent-gold);
  margin: 1rem 0;
  animation: pulse 2s infinite;
  font-family: var(--font-heading);
}

.trophy-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 5px solid var(--color-accent-gold);
  margin: 1rem auto;
  display: block;
  box-shadow: 0 0 30px rgba(244, 196, 48, 0.5);
  image-rendering: pixelated;
}

.trophy-name {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: white;
  font-family: var(--font-heading);
}

.trophy-points {
  font-size: 1.5rem;
  color: var(--color-accent-gold);
  font-weight: bold;
}

/* ===============================
   SEASON MANAGEMENT STYLES
   =============================== */

.season-active-banner {
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.season-active-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.season-active-name {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--color-text-heading);
}

.season-active-meta {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
}

.season-halftime-badge {
  display: inline-block;
  background: var(--color-accent-gold);
  color: var(--color-bg-primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 0.5rem;
  letter-spacing: 1px;
}

.season-status-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
  letter-spacing: 0.5px;
}

.season-status-created { background: rgba(52,152,219,0.15); color: var(--color-accent-blue); }
.season-status-active { background: rgba(39,174,96,0.15); color: var(--color-accent-green); }
.season-status-ended { background: rgba(155,89,182,0.15); color: #b07cc6; }
.season-status-cancelled { background: rgba(192,57,43,0.15); color: var(--color-accent-primary); }

.season-winner {
  font-size: 0.85rem;
  color: var(--color-accent-secondary);
  font-weight: 700;
  margin-top: 0.25rem;
}

.season-card .item-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.admin-notification {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent-primary);
  color: #1a1a1a;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  z-index: 5000;
  box-shadow: 4px 4px 0px 0px #1a1a1a;
  transition: opacity 0.5s ease;
}

.admin-notification.fade-out {
  opacity: 0;
}

/* ===============================
   SCHEDULE TIMELINE STYLES
   =============================== */

.schedule-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--color-bg-card);
  border-left: 4px solid var(--color-accent-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.schedule-item.all-day {
  border-left-color: var(--color-accent-gold);
  background: var(--color-bg-elevated);
}

.schedule-time {
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--color-accent-primary);
  min-width: 70px;
  flex-shrink: 0;
  padding-top: 2px;
}

.schedule-item.all-day .schedule-time {
  color: var(--color-accent-secondary);
}

.schedule-details {
  flex: 1;
}

.schedule-title {
  font-weight: bold;
  margin-bottom: 0.2rem;
  color: var(--color-text-primary);
}

.schedule-location {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 0.1rem;
}

.schedule-desc {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}

#schedule-today-widget {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
}

.schedule-date-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-text-heading);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.schedule-date-sub {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-weight: 600;
}

/* ===============================
   ROLE BADGES
   =============================== */

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  margin-left: 6px;
  font-weight: bold;
  vertical-align: middle;
}

.role-badge.admin {
  background: var(--color-accent-gold);
  color: var(--color-bg-primary);
}

.role-badge.co-organizer {
  background: var(--color-accent-primary);
  color: #fff;
}

/* ===============================
   ADMIN CO-ORGANIZER TOGGLE
   =============================== */

.item-role-toggle {
  margin-top: var(--space-xs);
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  user-select: none;
}

.toggle-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-accent-primary);
}

.item-badge.co-org {
  background: var(--color-accent-primary);
  color: white;
}

/* =============================================
   SEASON THEMING
   ============================================= */

/* Football Theme */
[data-theme="football"] .season-badge {
  background: #22c55e;
  color: #fff;
  font-family: monospace;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  vertical-align: middle;
  margin-left: 8px;
}

[data-theme="football"] .scoreboard-container .page-title::before {
  content: "\1F3C8 ";
}

[data-theme="football"] .scoreboard-container {
  --theme-accent: #22c55e;
  border-top: 3px solid #22c55e;
}

[data-theme="football"] .scoreboard-leader .scoreboard-name::after {
  content: " MVP";
  font-size: 0.75rem;
  color: var(--color-accent-gold);
}

/* Adventure Theme */
[data-theme="adventure"] .season-badge {
  background: #7c3aed;
  color: #fff;
  font-family: monospace;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  vertical-align: middle;
  margin-left: 8px;
}

[data-theme="adventure"] .scoreboard-container .page-title::before {
  content: "\2694 ";
}

[data-theme="adventure"] .scoreboard-container {
  --theme-accent: #7c3aed;
  border-top: 3px solid #7c3aed;
}

[data-theme="adventure"] .scoreboard-leader .scoreboard-name::after {
  content: " Legend";
  font-size: 0.75rem;
  color: var(--color-accent-gold);
}

/* ===============================
   CALENDAR SCHEDULE INTEGRATION
   =============================== */

.cal-schedule-section {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.cal-schedule-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cal-schedule-date-group {
  margin-bottom: 12px;
}

.cal-schedule-date-group.past {
  opacity: 0.5;
}

.cal-schedule-date-header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.cal-schedule-item {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  background: var(--color-bg-elevated);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  border-left: 3px solid var(--color-accent-gold);
}

.cal-schedule-item.past {
  border-left-color: var(--color-text-muted);
}

.cal-schedule-time {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-muted);
  min-width: 50px;
  padding-top: 2px;
}

.cal-schedule-details {
  flex: 1;
}

.cal-schedule-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.cal-schedule-location {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  display: block;
  margin-top: 2px;
}

/* =============================================
   Free Wheel - Mode Toggle
============================================= */

.wheel-mode-toggle {
  display: flex;
  gap: var(--space-xs);
  margin: 8px auto 8px;
  width: fit-content;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.wheel-mode-btn {
  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: var(--font-heading);
  background: transparent;
  color: var(--color-text-muted);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.wheel-mode-btn.active {
  background: var(--color-accent-gold);
  color: #1a1a1a;
  border-color: var(--color-border);
  box-shadow: 3px 3px 0px 0px #1a1a1a;
}

.wheel-mode-btn:hover:not(.active) {
  color: var(--color-text-primary);
}

/* =============================================
   Free Wheel - Section Layout
============================================= */

.wheel-section {
  width: 100%;
}

.wheel-section.hidden {
  display: none;
}

/* =============================================
   Free Wheel - Item List
============================================= */

.free-wheel-captain {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-gold, #f5c842);
  padding: 10px 16px 0;
  min-height: 1.4em;
  letter-spacing: 0.02em;
}

.free-wheel-remove-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-left: 8px;
  transition: color 0.15s, background 0.15s;
}

.free-wheel-remove-btn:hover {
  color: var(--color-accent-primary);
  background: rgba(192, 57, 43, 0.1);
}

.free-wheel-empty-list {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 12px 0;
  margin: 0;
}

/* =============================================
   Free Wheel - Add Form
============================================= */

.free-wheel-add-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 16px 0;
}

.free-wheel-add-form > .free-wheel-input {
  width: 100%;
}

.free-wheel-add-extras {
  display: flex;
  gap: 8px;
  align-items: center;
}

.free-wheel-add-extras .form-control {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.free-wheel-add-extras input[type="number"] {
  max-width: 90px;
  flex: 0 0 90px;
}

.free-wheel-add-description {
  resize: vertical;
  min-height: 52px;
  font-size: 0.85rem;
  padding: 8px 10px;
}

.free-wheel-add-form.hidden {
  display: none;
}

.free-wheel-input {
  flex: 1;
  padding: 9px 12px;
  background: var(--color-bg-input);
  border: 2px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.free-wheel-input:focus {
  transform: translateY(2px);
  box-shadow: 1px 1px 0px 0px #1a1a1a;
}

.free-wheel-input::placeholder {
  color: var(--color-text-muted);
}

/* =============================================
   Free Wheel - Result Overlay
============================================= */

.free-wheel-result {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.80);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(2px);
}

.free-wheel-result.hidden {
  display: none;
}

.free-wheel-result-inner {
  background: var(--color-bg-card);
  border: 3px solid #1a1a1a;
  border-radius: 0;
  padding: 40px 32px;
  text-align: center;
  max-width: 320px;
  width: 90%;
  box-shadow: 8px 8px 0px 0px #1a1a1a;
}

.free-wheel-result-label {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
  word-break: break-word;
}

.free-wheel-winner-description {
  font-size: 1rem;
  color: var(--color-text-primary);
  margin-bottom: 20px;
  line-height: 1.5;
  word-break: break-word;
}

.free-wheel-winner-description.hidden {
  display: none;
}

/* =============================================
   WHEEL TEMPLATES - Gallery (Free Wheel)
   ============================================= */
.template-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.template-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-md);
}
.template-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.template-card-name {
  font-weight: 700;
  color: var(--color-text-primary);
  font-size: 0.95rem;
}
.template-card-count {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.template-card-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.template-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* =============================================
   WHEEL TEMPLATES - Admin Panel
   ============================================= */
.template-admin-card {
  border: 2px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-fast);
}
.template-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-bg-elevated);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}
.template-admin-header:hover {
  background: var(--color-bg-card-hover);
}
.template-admin-name {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text-primary);
}
.template-admin-count {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-left: 8px;
}
.template-admin-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}
#template-items-list-* > .hidden {
  display: none;
}
.template-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--color-border);
}
.template-item-row:last-child {
  border-bottom: none;
}
.template-item-edit-form {
  padding: 8px 14px 10px;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
}
.template-item-edit-form.hidden {
  display: none;
}
.template-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.template-item-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.template-item-desc {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.template-item-sound-badge {
  font-size: 14px;
  cursor: default;
  flex-shrink: 0;
}
.template-add-item-form {
  border-top: 1px solid var(--color-border);
}

/* =============================================
   SCOREBOARD - History Dropdown
   ============================================= */
.scoreboard-history-btn {
  background: transparent;
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.15s;
}
.scoreboard-history-btn:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
}
.scoreboard-history {
  border-top: 1px solid var(--color-border);
  padding: 6px 0 4px;
  margin-top: 4px;
}
.scoreboard-history-loading,
.scoreboard-history-empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 12px;
  padding: 8px 0;
}
.scoreboard-history-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.scoreboard-history-row:last-child { border-bottom: none; }
.scoreboard-history-icon { flex-shrink: 0; font-size: 13px; }
.scoreboard-history-reason {
  flex: 1;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scoreboard-history-pts {
  font-weight: 700;
  flex-shrink: 0;
}
.scoreboard-history-pts.positive { color: #4caf50; }
.scoreboard-history-pts.negative { color: #f44336; }
.scoreboard-history-age {
  color: var(--color-text-muted);
  font-size: 10px;
  flex-shrink: 0;
}

/* =============================================
   FREE WHEEL - Points Badge in Result
   ============================================= */
.free-wheel-winner-points {
  font-size: 1.3rem;
  font-weight: 700;
  color: #4caf50;
  margin-bottom: 12px;
  text-shadow: 0 0 12px rgba(76,175,80,0.6);
}

/* =============================================
   TEMPLATE ITEMS - Points Badge & Award Mode Badge
   ============================================= */
.template-item-award-badge {
  font-size: 11px;
  font-weight: 700;
  color: #e67e22;
  background: rgba(230,126,34,0.15);
  border: 1px solid rgba(230,126,34,0.35);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

.template-item-points-badge {
  font-size: 11px;
  font-weight: 700;
  color: #4caf50;
  background: rgba(76,175,80,0.15);
  border: 1px solid rgba(76,175,80,0.3);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

/* =============================================
   TWIST OF FATE
   ============================================= */
.free-wheel-twist-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  animation: twist-slide-in 0.4s ease-out;
}
.free-wheel-twist-wrap.hidden {
  display: none;
}
@keyframes twist-slide-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.twist-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFD600;
  text-shadow: 0 0 10px rgba(255,214,0,0.7);
  letter-spacing: 1px;
  text-transform: uppercase;
}
#twist-dice-canvas {
  image-rendering: pixelated;
  border: 2px solid rgba(255,214,0,0.3);
  border-radius: 6px;
  background: transparent;
}
.twist-given-to {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  min-height: 1.4em;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.twist-given-to.pop-in {
  animation: twist-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes twist-pop {
  0%   { opacity: 0; transform: scale(0.5); }
  70%  { transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}

/* =============================================
   NEW GAME BOTTOM SHEET
   ============================================= */
.new-game-sheet {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
  z-index: 900;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.new-game-sheet.visible {
  opacity: 1;
}
.new-game-sheet-card {
  background: var(--color-bg-card);
  border-radius: 20px 20px 0 0;
  padding: 28px 24px;
  padding-bottom: max(28px, env(safe-area-inset-bottom, 28px));
  width: 100%;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 2px solid var(--color-border);
  border-bottom: none;
  box-shadow: 0 -4px 0px 0px #1a1a1a;
}
.new-game-sheet.visible .new-game-sheet-card {
  transform: translateY(0);
}
.new-game-sheet-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}
.new-game-sheet-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}
.new-game-sheet-select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  font-size: 1rem;
  font-family: var(--font-body);
  min-height: 54px;
  appearance: auto;
  margin-bottom: 8px;
}
.new-game-sheet-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}
.new-game-sheet-btn {
  width: 100%;
  min-height: 52px;
  font-size: 1rem;
  margin-bottom: 10px;
}
.new-game-sheet-btn:last-child {
  margin-bottom: 0;
}

.new-game-secret-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
  padding: 10px 0 6px;
}

.new-game-secret-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-accent-gold);
}

#new-game-secret-wrap {
  margin-bottom: 10px;
}

/* =============================================
   SECRET TAKEOVER OVERLAY
   ============================================= */

.takeover-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.takeover-overlay.hidden {
  display: none;
}

.takeover-content {
  text-align: center;
  animation: takeover-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes takeover-in {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.takeover-title {
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 900;
  color: var(--color-accent-gold);
  letter-spacing: 0.05em;
  text-shadow: 0 0 60px rgba(244, 196, 48, 0.8), 0 0 120px rgba(244, 196, 48, 0.4);
  animation: takeover-pulse 0.6s ease-in-out infinite alternate;
  line-height: 1;
}

@keyframes takeover-pulse {
  from { transform: scale(1);    text-shadow: 0 0 40px rgba(244,196,48,0.8); }
  to   { transform: scale(1.06); text-shadow: 0 0 80px rgba(244,196,48,1), 0 0 160px rgba(244,196,48,0.5); }
}

.takeover-sub {
  margin-top: 16px;
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =============================================
   WAIT FOR GAME STATE
   ============================================= */
.wait-for-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
}
.wait-for-game-text {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--color-text-primary);
  text-align: center;
  font-family: var(--font-heading, sans-serif);
}
.wait-for-game-gif {
  width: min(280px, 80vw);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.1s ease;
}
.wait-for-game-gif:active {
  transform: scale(0.96);
  opacity: 0.85;
}

/* =============================================
   ASSETS PANEL
   ============================================= */
/* --- Asset Drop Zone --- */
.asset-drop-zone {
  border: 3px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 16px;
  transition: border-color 0.15s, background 0.15s;
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-sm);
}
.asset-drop-zone:hover,
.asset-drop-zone.drag-over {
  border-color: var(--color-accent-gold);
  background: color-mix(in srgb, var(--color-accent-gold) 8%, var(--color-bg-elevated));
}
.asset-drop-zone input[type="file"] { display: none; }
.asset-drop-icon { font-size: 2rem; margin-bottom: 6px; }
.asset-drop-label { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.asset-drop-hint { font-size: 0.8rem; color: var(--color-text-muted); }

/* --- Bulk upload queue --- */
.asset-queue { margin-bottom: 12px; }
.asset-queue-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; padding: 4px 0;
  color: var(--color-text-secondary);
}
.asset-queue-item .status { font-size: 0.75rem; margin-left: auto; }
.asset-queue-item .status.done { color: var(--color-success, #1e7e34); }
.asset-queue-item .status.err  { color: var(--color-error, #dc3545); }

/* --- GIF card grid --- */
.asset-gif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.asset-gif-card {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.asset-gif-card img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
}
.asset-gif-card-footer {
  padding: 6px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
}
.asset-gif-card-name {
  font-size: 0.75rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.asset-gif-card .btn-del {
  flex-shrink: 0; font-size: 0.7rem; padding: 2px 6px;
  background: transparent; border: 1px solid var(--color-border);
  border-radius: 4px; cursor: pointer; color: var(--color-text-muted);
  min-height: 28px;
}
.asset-gif-card .btn-del:hover { background: var(--color-error, #dc3545); color: #fff; border-color: var(--color-error, #dc3545); }

/* --- MP3 rows --- */
.asset-mp3-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.asset-mp3-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  box-shadow: var(--shadow-sm);
}
.asset-mp3-icon { font-size: 1.2rem; flex-shrink: 0; }
.asset-mp3-name { font-size: 0.85rem; font-weight: 600; min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-mp3-row audio { flex: 1; min-width: 0; height: 32px; }
.asset-mp3-row .btn-del {
  flex-shrink: 0; font-size: 0.7rem; padding: 2px 6px;
  background: transparent; border: 1px solid var(--color-border);
  border-radius: 4px; cursor: pointer; color: var(--color-text-muted);
  min-height: 28px;
}
.asset-mp3-row .btn-del:hover { background: var(--color-error, #dc3545); color: #fff; border-color: var(--color-error, #dc3545); }

/* --- Login Logo Picker --- */

.logo-anim-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.logo-anim-option {
  flex: 0 0 calc(33.33% - 6px);
  min-width: 90px;
  padding: 10px 8px 8px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.logo-anim-option:hover { border-color: var(--color-accent-gold); }
.logo-anim-option.selected {
  border-color: var(--color-accent-gold);
  box-shadow: 3px 3px 0 #1a1a1a;
  background: color-mix(in srgb, var(--color-accent-gold) 12%, var(--color-bg-card));
}
.logo-anim-name { font-size: 0.8rem; font-weight: 700; margin-bottom: 2px; }
.logo-anim-desc { font-size: 0.7rem; color: var(--color-text-muted); }

.logo-emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.logo-emoji-btn {
  font-size: 1.6rem;
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  line-height: 1;
  min-height: 44px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.logo-emoji-btn:hover { border-color: var(--color-accent-gold); }
.logo-emoji-btn.selected {
  border-color: var(--color-accent-gold);
  box-shadow: 3px 3px 0 #1a1a1a;
}

.logo-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.logo-asset-thumb {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.logo-asset-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-asset-thumb:hover { border-color: var(--color-accent-gold); }
.logo-asset-thumb.selected {
  border-color: var(--color-accent-gold);
  box-shadow: 3px 3px 0 #1a1a1a;
}

/* --- Asset section heading --- */
.asset-section-heading {
  margin: 1.25rem 0 0.65rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

/* --- Checkbox overlay on GIF/image cards --- */
.asset-check-wrap {
  position: absolute; top: 6px; left: 6px; z-index: 2; cursor: pointer;
}
.asset-check-wrap input[type="checkbox"] {
  width: 18px; height: 18px; cursor: pointer; accent-color: var(--color-accent-gold);
}

/* --- Rename inline input --- */
.asset-rename-input {
  width: 100%; font-size: 0.75rem; font-weight: 600;
  border: 2px solid var(--color-accent-gold); border-radius: 4px; padding: 2px 4px;
  background: var(--color-bg-card); color: var(--color-text-primary); min-width: 0;
}

/* --- Small icon button (rename pencil) --- */
.btn-icon {
  background: none; border: none; cursor: pointer;
  font-size: 0.8rem; padding: 2px 4px; min-height: 28px; flex-shrink: 0; opacity: 0.6;
}
.btn-icon:hover { opacity: 1; }

/* --- Bulk action bar --- */
.asset-bulk-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--color-accent-gold);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-weight: 700; font-size: 0.9rem;
  box-shadow: 3px 3px 0 #1a1a1a;
}
.asset-bulk-bar.hidden { display: none; }

/* MP3 row checkbox */
.asset-mp3-row input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--color-accent-gold);
}

/* legacy compat — keep for safety */
.asset-item { display: none; }
.asset-audio-player { width: 100%; height: 36px; border-radius: 6px; }
.asset-gif-preview { width: 100%; max-width: 200px; border-radius: 8px; display: block; }

/* =============================================
   FREE WHEEL RESULT GIF
   ============================================= */
.free-wheel-winner-gif {
  width: min(220px, 60vw);
  border-radius: 10px;
  margin: 8px auto;
  display: block;
}

.free-wheel-winner-gif.hidden {
  display: none;
}
