/* ===========================
   SNEEZE.LOG - BRUTAL CSS
   Theme: Strict Brutalism
   =========================== */

/* --- RESET & CUSTOM PROPERTIES --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

:root {
  --bg:         #F0F0F0;
  --black:      #000000;
  --white:      #FFFFFF;
  --yellow:     #FFFF00;
  --border:     4px solid var(--black);
  --shadow:     8px 8px 0px var(--black);
  --font:       'JetBrains Mono', 'Courier New', Courier, monospace;
  --transition: 80ms ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--black);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

/* --- HEADER --- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: var(--border);
  background-color: var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

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

.site-title {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.live-counter {
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  font-weight: 700;
  color: var(--white);
  background-color: var(--black);
  border: 2px solid var(--yellow);
  padding: 6px 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: var(--yellow); }
  50%       { border-color: var(--white); }
}

#totalCount {
  color: var(--yellow);
  font-weight: 800;
}

/* --- AUTH SECTION --- */
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--yellow);
  background-color: var(--white);
}

.btn-logout {
  background-color: transparent;
  color: var(--white);
  border: 1px solid var(--white);
  padding: 4px 10px;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all var(--transition);
}

.btn-logout:hover {
  background-color: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
}

@media (max-width: 650px) {
  .site-header {
    flex-direction: column;
    gap: 12px;
  }
}

/* --- MAIN --- */
.main-content {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.app-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.main-area {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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


/* --- STATUS BAR --- */
.status-bar {
  border: var(--border);
  background-color: var(--white);
  padding: 12px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: var(--shadow);
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: background-color var(--transition), color var(--transition);
  word-break: break-word;
}

.status-bar.status--loading {
  background-color: var(--black);
  color: var(--yellow);
}

.status-bar.status--success {
  background-color: var(--yellow);
  color: var(--black);
}

.status-bar.status--error {
  background-color: #FF0000;
  color: var(--white);
}

/* --- ACTION ZONE --- */
.action-zone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  border: var(--border);
  font-family: var(--font);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    box-shadow var(--transition),
    transform var(--transition);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

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

.btn:focus-visible {
  outline: 3px solid #0066FF;
  outline-offset: 3px;
}

.btn-icon {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1;
  display: block;
}

/* Self sneeze — Neon Yellow */
.btn--self {
  background-color: var(--yellow);
  color: var(--black);
}

.btn--self:hover {
  background-color: #e6e600;
}

/* Heard sneeze — White */
.btn--heard {
  background-color: var(--white);
  color: var(--black);
}

.btn--heard:hover {
  background-color: #e0e0e0;
}

/* Disabled state while fetching location */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: 4px 4px 0px var(--black);
}

/* --- COUNT MODAL (1-2-3-WOW) --- */
.count-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.count-modal[hidden] {
  display: none;
}

.count-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
}

.count-modal__panel {
  position: relative;
  border: var(--border);
  box-shadow: var(--shadow);
  background-color: var(--white);
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
}

.count-modal__title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  text-align: center;
}

.count-modal__buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.count-btn {
  padding: 20px 12px;
  border: var(--border);
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 4px 4px 0px var(--black);
  transition: box-shadow var(--transition), transform var(--transition);
  background-color: var(--yellow);
  color: var(--black);
}

.count-btn:hover {
  background-color: #e6e600;
}

.count-btn--wow {
  font-size: 1rem;
  background-color: var(--black);
  color: var(--yellow);
}

.count-btn--wow:hover {
  color: var(--white);
}

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

/* --- MAP SECTION --- */
.map-section {
  border: var(--border);
  box-shadow: var(--shadow);
  background-color: var(--white);
  display: flex;
  flex-direction: column;
}

.sneeze-map {
  height: 300px;
  width: 100%;
  background-color: #ddd;
  z-index: 10;
}

/* --- LEADERBOARD SECTION --- */
.leaderboard-section {
  border: var(--border);
  box-shadow: var(--shadow);
  background-color: var(--white);
  display: flex;
  flex-direction: column;
}

.leaderboard-container {
  padding: 0;
}

.leaderboard-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--black);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

.leaderboard-country {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-stats {
  display: flex;
  gap: 6px;
  font-size: 0.7rem;
}

.stat-tag {
  padding: 1px 4px;
  border: 1px solid var(--black);
}

.stat-tag--sneezes {
  background: var(--yellow);
}

.stat-tag--heard {
  background: var(--black);
  color: var(--white);
}

/* --- FEED SECTION --- */
.feed-section {
  border: var(--border);
  box-shadow: var(--shadow);
  background-color: var(--white);
  display: flex;
  flex-direction: column;
}

.stats-section {
  border: var(--border);
  box-shadow: var(--shadow);
  background-color: var(--white);
  display: flex;
  flex-direction: column;
  margin-top: 24px;
}

.stats-container {
  padding: 20px;
  background: var(--white);
  height: 300px;
  position: relative;
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: var(--border);
  background-color: var(--black);
}

.feed-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feed-title::before {
  font-size: 1rem;
  line-height: 1;
}

.feed-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.feed-container {
  max-height: 420px;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--black) var(--bg);
}

.feed-container::-webkit-scrollbar {
  width: 8px;
}

.feed-container::-webkit-scrollbar-track {
  background: var(--bg);
}

.feed-container::-webkit-scrollbar-thumb {
  background-color: var(--black);
}

.feed-empty {
  padding: 40px 20px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #666;
  text-transform: uppercase;
}

/* --- FEED ITEM --- */
.feed-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 2px solid var(--black);
  font-size: clamp(0.72rem, 2vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: slideIn 0.2s ease;
  word-break: break-word;
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feed-item__time {
  color: #555;
  min-width: 80px;
  font-size: 0.78rem;
}

.feed-item__location {
  color: var(--black);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-item__type {
  padding: 3px 8px;
  border: 2px solid var(--black);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.feed-item__type--self {
  background-color: var(--yellow);
  color: var(--black);
}

.feed-item__type--heard {
  background-color: var(--black);
  color: var(--white);
}

.feed-item__count {
  font-size: 0.7rem;
  font-weight: 800;
  margin-left: 4px;
  opacity: 0.9;
}

/* --- FOOTER --- */
.site-footer {
  border-top: var(--border);
  background-color: var(--black);
  color: var(--white);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-note {
  color: #888;
  font-size: 0.7rem;
}

/* --- Communities CTA button (main page) --- */
.btn--communities {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px 24px;
  border: var(--border);
  font-family: var(--font);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: var(--shadow);
  background-color: var(--black);
  color: var(--yellow);
  transition: box-shadow var(--transition), transform var(--transition), background-color var(--transition);
}

.btn--communities .btn-icon {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.btn--communities:hover {
  background-color: #1a1a1a;
}

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

/* --- Communities feature intro (sign-in prompt) --- */
.comm-feature-intro {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.7;
  color: #333;
}

.comm-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: var(--border);
  padding: 18px 20px;
  background-color: var(--bg);
}

.comm-feature-list li {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-left: 20px;
  position: relative;
}

.comm-feature-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--black);
  font-weight: 800;
}

.comm-feature-cta {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-color: var(--yellow);
  border: var(--border);
  padding: 14px 18px;
  text-align: center;
}

/* ============================================================
   COMMUNITY SYSTEM
   ============================================================ */

/* --- Overlay (behind panel and modals) --- */
.comm-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  z-index: 300;
}

/* --- Slide-in panel (drawer) --- */
.comm-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 440px;
  max-width: 100vw;
  height: 100%;
  background-color: var(--bg);
  border-left: var(--border);
  box-shadow: -8px 0 0 var(--black);
  z-index: 301;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.comm-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: var(--border);
  background-color: var(--black);
  flex-shrink: 0;
  gap: 8px;
}

.comm-panel__header .feed-title {
  font-size: 1.05rem;
  letter-spacing: 0.12em;
}

.comm-close {
  background: none;
  border: 2px solid transparent;
  color: var(--white);
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: all var(--transition);
}

.comm-close:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}

.comm-panel__body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
}

.comm-panel__section {
  padding: 20px 22px;
  border-bottom: 2px solid var(--black);
  color: var(--black);
}

.comm-panel__section--actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: none;
  padding: 24px 22px;
}

.comm-panel__action-btn {
  width: 100%;
  padding: 16px 20px;
  border: var(--border);
  background-color: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--black);
  transition: box-shadow var(--transition), transform var(--transition), background-color var(--transition);
  text-align: left;
}

.comm-panel__action-btn:hover {
  background-color: var(--yellow);
}

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

.comm-panel__action-btn.comm-btn--yellow {
  background-color: var(--yellow);
}

/* --- Community list in panel --- */
.comm-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comm-list-item {
  padding: 16px 18px;
  border: 3px solid var(--black);
  background-color: var(--white);
  cursor: pointer;
  transition: background-color var(--transition), box-shadow var(--transition), transform var(--transition);
  color: var(--black);
  box-shadow: 4px 4px 0 var(--black);
}

.comm-list-item:hover {
  background-color: var(--yellow);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--black);
}

.comm-list-item:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

.comm-list-item__name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.comm-list-item__meta {
  font-size: 0.75rem;
  font-weight: 700;
  color: #555;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 6px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* --- Community modals --- */
.comm-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.comm-modal[hidden] { display: none; }

.comm-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
}

#commSignInPrompt .comm-modal__backdrop {
  background-color: transparent;
}

.comm-modal__panel {
  position: relative;
  border: var(--border);
  box-shadow: 12px 12px 0 var(--black);
  background-color: var(--white);
  padding: 32px 28px;
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comm-modal__panel--wide { max-width: 580px; }

.comm-modal__title {
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: var(--border);
  padding-bottom: 14px;
  margin-bottom: 4px;
}

.comm-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.comm-modal__status {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 18px;
  color: #c00;
}

/* --- Shared form elements --- */
.comm-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.comm-input {
  width: 100%;
  padding: 12px 14px;
  border: var(--border);
  background-color: var(--white);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  outline: none;
  transition: background-color var(--transition);
}

.comm-input:focus { background-color: var(--yellow); }

.comm-input--small { width: auto; flex: 1; font-size: 0.8rem; padding: 8px 12px; }

.comm-textarea {
  resize: vertical;
  min-height: 90px;
}

/* --- Buttons --- */
.comm-btn {
  padding: 12px 20px;
  border: var(--border);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--black);
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.comm-btn--primary {
  background-color: var(--yellow);
  color: var(--black);
}

.comm-btn--primary:hover { background-color: #e6e600; }

.comm-btn--ghost {
  background-color: var(--white);
  color: var(--black);
}

.comm-btn--ghost:hover { background-color: #e0e0e0; }

.comm-btn--danger {
  background-color: var(--black);
  color: var(--white);
}

.comm-btn--danger:hover { background-color: #c00; border-color: #c00; }

.comm-btn--small {
  padding: 5px 10px;
  font-size: 0.72rem;
  box-shadow: 2px 2px 0 var(--black);
}

/* --- Community profile tabs --- */
.comm-tabs {
  display: flex;
  border: var(--border);
  background-color: var(--black);
  overflow: hidden;
}

.comm-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
  text-align: center;
  border-right: 2px solid var(--white);
}

.comm-tab:last-child {
  border-right: none;
}

.comm-tab:hover {
  background-color: #222;
}

.comm-tab.active {
  background-color: var(--yellow);
  color: var(--black);
}

.comm-tab-content {
  display: none;
}

.comm-tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --- Community leaderboard in profile --- */
.comm-leaderboard-list {
  display: flex;
  flex-direction: column;
  border: var(--border);
}

.comm-leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 2px solid var(--black);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.comm-leaderboard-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--black);
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  background-color: var(--bg);
}

.comm-leaderboard-rank--gold {
  background-color: var(--yellow);
}

.comm-leaderboard-rank--silver {
  background-color: #ccc;
}

.comm-leaderboard-rank--bronze {
  background-color: #cd7f32;
  color: var(--white);
}

.comm-leaderboard-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comm-leaderboard-score {
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 10px;
  border: 2px solid var(--black);
  background-color: var(--yellow);
}

.comm-leaderboard-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
}

/* --- Community info field --- */
.comm-info-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* --- Community description --- */
.comm-description {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #333;
  border: 3px solid var(--black);
  padding: 14px 16px;
  background-color: var(--bg);
  line-height: 1.5;
}

/* --- Created by --- */
.comm-created-by {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #333;
  border: 3px solid var(--black);
  padding: 14px 16px;
  background-color: var(--bg);
}

/* --- Invite link block --- */
.comm-invite-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: var(--bg);
  border: 3px solid var(--black);
  padding: 14px 16px;
}

.comm-invite-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

/* --- Member list in profile --- */
.comm-members-header { margin-top: 8px; }

.comm-member-list {
  display: flex;
  flex-direction: column;
  border: var(--border);
  max-height: 280px;
  overflow-y: auto;
}

.comm-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 2px solid var(--black);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background-color var(--transition);
}

.comm-member-row:hover {
  background-color: var(--bg);
}

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

.comm-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--black);
  flex-shrink: 0;
  background-color: var(--bg);
}

.comm-member-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.comm-member-role {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  border: 2px solid var(--black);
}

.comm-member-role--admin {
  background-color: var(--yellow);
  color: var(--black);
}

.comm-member-role--member {
  background-color: var(--black);
  color: var(--white);
}

/* --- Transfer admin member select --- */
.comm-member-select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comm-member-select-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border: var(--border);
  background-color: var(--white);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--black);
  transition: box-shadow var(--transition), transform var(--transition);
}

.comm-member-select-btn:hover { background-color: var(--yellow); }

.comm-member-select-btn:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

/* --- Pending invite items --- */
.comm-invite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 3px solid var(--black);
  background-color: var(--bg);
  margin-bottom: 8px;
}

.comm-invite-item:last-child { margin-bottom: 0; }

.comm-invite-item__name {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comm-invite-item__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* --- Hint text --- */
.comm-hint {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #555;
  line-height: 1.5;
}

/* --- AVATAR PICKER --- */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.avatar-option {
  cursor: pointer;
  border: 3px solid transparent;
  border-radius: 4px;
  padding: 4px;
  transition: border-color var(--transition), background var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
}

.avatar-option:hover {
  border-color: var(--black);
  background: #e0e0e0;
}

.avatar-option.selected {
  border-color: var(--black);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--black);
}

.avatar-option__img {
  width: 64px;
  height: 64px;
  display: block;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-option__img svg {
  width: 64px;
  height: 64px;
  display: block;
}

.avatar-option__label {
  font-family: var(--font);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
}

/* Avatar display in member rows (replaces google picture) */
.comm-member-avatar--svg {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 2px solid var(--black);
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  overflow: hidden;
}

.comm-member-avatar--svg svg {
  width: 100%;
  height: 100%;
}

/* --- RESPONSIVE --- */
@media (max-width: 560px) {
  .action-zone {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 28px 16px;
    flex-direction: row;
    gap: 16px;
    font-size: 1rem;
  }

  .btn-icon {
    font-size: 2rem;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
  }

  .feed-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .feed-item__time {
    min-width: unset;
  }

  /* --- Community panel mobile --- */
  .comm-panel {
    width: 100vw;
    border-left: none;
    box-shadow: none;
  }

  .comm-panel__section {
    padding: 16px;
  }

  .comm-panel__section--actions {
    padding: 16px;
    gap: 10px;
  }

  .comm-panel__action-btn {
    padding: 14px 16px;
    font-size: 0.82rem;
  }

  .comm-list-item {
    padding: 14px;
  }

  /* --- Community modals mobile --- */
  .comm-modal {
    padding: 10px;
  }

  .comm-modal__panel {
    padding: 22px 16px;
    max-width: 100%;
    box-shadow: 6px 6px 0 var(--black);
  }

  .comm-modal__panel--wide {
    max-width: 100%;
  }

  .comm-modal__actions {
    gap: 8px;
    flex-direction: column;
  }

  .comm-modal__actions .comm-btn {
    width: 100%;
    text-align: center;
  }

  /* --- Community tabs mobile --- */
  .comm-tab {
    padding: 10px 8px;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  /* --- Community invite row mobile --- */
  .comm-invite-row {
    flex-direction: column;
    gap: 8px;
  }

  .comm-invite-row .comm-input--small {
    width: 100%;
  }

  .comm-invite-row .comm-btn--small {
    width: 100%;
    text-align: center;
  }

  /* --- Pending invites mobile --- */
  .comm-invite-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .comm-invite-item__actions {
    width: 100%;
  }

  .comm-invite-item__actions .comm-btn {
    flex: 1;
    text-align: center;
  }

  /* --- Avatar picker mobile --- */
  .avatar-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .avatar-option__img,
  .avatar-option__img svg {
    width: 48px;
    height: 48px;
  }

  .avatar-option__label {
    font-size: 0.55rem;
  }

  /* --- Communities CTA button mobile --- */
  .btn--communities {
    padding: 22px 18px;
    font-size: 1rem;
    gap: 12px;
  }

  .btn--communities .btn-icon {
    font-size: 1.5rem;
  }

  /* --- Community leaderboard mobile --- */
  .comm-leaderboard-item {
    padding: 12px 14px;
    gap: 10px;
    font-size: 0.78rem;
  }

  .comm-leaderboard-score {
    font-size: 0.75rem;
    padding: 3px 8px;
  }
}
.privacy-link {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
  transition: color var(--transition);
}

.privacy-link:hover {
  color: #555;
}

.footer-bottom {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 8px;
  border-top: 2px solid #333;
  padding-top: 12px;
}

.footer-bottom .privacy-link {
    font-size: 0.7rem;
    color: #888;
}

.footer-bottom .privacy-link:hover {
    color: var(--white);
}

.ip-modal__content {
    text-align: center;
    color: var(--black);
}

.ip-modal__buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.ip-modal__buttons .btn {
    box-shadow: 4px 4px 0px var(--black);
}

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