/* ============================================================
   WHERE'S THE CHIP — App Stylesheet
   Aesthetic: Industrial Brutalist · Black/Amber/White
   Fonts: Bebas Neue (display) + Space Mono (body/code)
   ============================================================ */

:root {
  --black:   #0a0a0a;
  --dark:    #141414;
  --mid:     #1e1e1e;
  --border:  #2a2a2a;
  --chip:    #f5a623;
  --chip-dk: #c27d0e;
  --found:   #3de68a;
  --found-dk:#1ba55e;
  --white:   #f0ede8;
  --muted:   #666;
  --danger:  #ff4444;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Space Mono', monospace;

  --radius: 2px;
  --gap: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--chip); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .75; }

/* ── SITE LAYOUT ── */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

.site-header {
  border-bottom: 2px solid var(--chip);
  background: var(--dark);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1100px; margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex; align-items: center; gap: .6rem;
  color: var(--white); text-decoration: none;
}
.logo-chip { font-size: 1.8rem; color: var(--chip); line-height: 1; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem; line-height: 1.1;
  letter-spacing: .05em;
}

.site-nav {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
}
.nav-link {
  font-family: var(--font-display);
  font-size: 1rem; letter-spacing: .08em;
  color: var(--white); text-decoration: none;
  transition: color .15s;
}
.nav-link:hover { color: var(--chip); }
.nav-logout { color: var(--muted); }
.nav-register {
  background: var(--chip); color: var(--black) !important;
  padding: .2rem .7rem;
  font-weight: bold;
}
.nav-register:hover { opacity: .85; }
.nav-divider { color: var(--border); }
.nav-user { color: var(--chip); font-size: .85rem; }

.site-body {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-height: 0;
}
.site-main {
  flex: 1;
  min-width: 0;          /* allow shrink when sidebar is open */
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1rem;
  font-size: .75rem; color: var(--muted);
  font-family: var(--font-display);
  letter-spacing: .1em;
}

/* ── DASHBOARD ── */
.dashboard { display: flex; flex-direction: column; gap: 2.5rem; }

/* Chip Status Card */
.chip-status-card {
  display: flex; align-items: flex-start; gap: 2rem;
  padding: 2rem;
  border: 2px solid var(--border);
  position: relative;
  overflow: hidden;
}
.chip-status-card::before {
  content: '';
  position: absolute; inset: 0;
  opacity: .04;
  pointer-events: none;
  background: repeating-linear-gradient(
    45deg, currentColor 0, currentColor 1px, transparent 0, transparent 50%
  );
  background-size: 10px 10px;
}
.status-hidden {
  border-color: var(--chip);
  background: linear-gradient(135deg, rgba(245,166,35,.08) 0%, var(--dark) 60%);
}
.status-found {
  border-color: var(--found);
  background: linear-gradient(135deg, rgba(61,230,138,.06) 0%, var(--dark) 60%);
}

.status-glyph {
  font-size: 4rem; line-height: 1;
  flex-shrink: 0;
}
.status-hidden .status-glyph { color: var(--chip); }
.status-found  .status-glyph { color: var(--found); }

.status-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: .05em;
  line-height: 1;
}
.status-hidden .status-headline { color: var(--chip); }
.status-found  .status-headline { color: var(--found); }

.status-detail { margin-top: .5rem; color: var(--white); font-size: .9rem; }
.status-location { margin-top: .3rem; color: var(--chip); font-size: .9rem; }

.location-hint {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: .75rem;
  background: rgba(245,166,35,.15);
  border: 1px solid var(--chip);
  padding: .4rem .8rem;
}
.hint-label {
  font-family: var(--font-display); font-size: .85rem;
  color: var(--chip); letter-spacing: .1em;
}
.hint-text { font-size: .9rem; }

/* Action Cards */
.action-card {
  border: 2px solid var(--border);
  padding: 2rem;
  background: var(--dark);
}
.action-hide { border-color: var(--chip); }
.action-find { border-color: var(--found); }
.action-waiting { border-color: var(--border); opacity: .8; }

.action-title {
  font-family: var(--font-display);
  font-size: 1.8rem; letter-spacing: .05em;
  margin-bottom: .5rem;
}
.action-hide .action-title { color: var(--chip); }
.action-find .action-title { color: var(--found); }

.action-subtitle { color: var(--muted); margin-bottom: 1.5rem; font-size: .9rem; }

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.form-full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group label { font-size: .8rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.label-optional { color: var(--muted); font-size: .75rem; text-transform: none; letter-spacing: 0; }

.form-input, .form-textarea {
  background: var(--mid);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font-body);
  font-size: .9rem;
  padding: .6rem .8rem;
  outline: none;
  border-radius: var(--radius);
  transition: border-color .15s;
  width: 100%;
}
.form-input:focus, .form-textarea:focus { border-color: var(--chip); }
.form-textarea { min-height: 80px; resize: vertical; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display);
  font-size: 1.2rem; letter-spacing: .1em;
  padding: .75rem 2rem;
  border: none; cursor: pointer;
  transition: transform .1s, opacity .15s;
  border-radius: var(--radius);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-hide  { background: var(--chip);  color: var(--black); }
.btn-find  { background: var(--found); color: var(--black); }
.btn-primary { background: var(--chip); color: var(--black); }
.btn-full { width: 100%; }

/* ── ALERTS ── */
.alert {
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  font-size: .9rem;
  border-left: 3px solid;
}
.alert-error   { background: rgba(255,68,68,.1);  border-color: var(--danger); color: #ff9999; }
.alert-success { background: rgba(61,230,138,.1); border-color: var(--found);  color: var(--found); }

/* ── EVENTS LIST ── */
.recent-section .section-title {
  font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 1rem;
}
.event-list { display: flex; flex-direction: column; gap: .5rem; }
.event-item {
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1rem;
  border: 1px solid var(--border);
  background: var(--dark);
  transition: border-color .15s;
}
.event-item:hover { border-color: var(--muted); }
.event-hidden { border-left: 3px solid var(--chip); }
.event-found  { border-left: 3px solid var(--found); }
.event-icon { font-size: 1.2rem; flex-shrink: 0; }
.event-hidden .event-icon { color: var(--chip); }
.event-found  .event-icon { color: var(--found); }
.event-body { flex: 1; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .9rem; }
.event-name { color: var(--chip); font-weight: bold; }
.event-action { color: var(--white); }
.event-location { color: var(--muted); font-size: .8rem; }
.event-time { color: var(--muted); font-size: .8rem; white-space: nowrap; }

/* ── AUTH PAGES ── */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 2rem;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--dark);
  border: 2px solid var(--chip);
  padding: 2.5rem;
}
.auth-logo {
  font-size: 3rem; color: var(--chip);
  text-align: center; margin-bottom: 1rem;
}
.auth-title {
  font-family: var(--font-display); font-size: 2.5rem; letter-spacing: .08em;
  text-align: center; margin-bottom: .25rem;
}
.auth-subtitle { text-align: center; color: var(--muted); margin-bottom: 2rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-switch { text-align: center; margin-top: 1.5rem; color: var(--muted); font-size: .85rem; }

/* ── HISTORY PAGE ── */
.page-container { max-width: 100%; }
.page-title { font-family: var(--font-display); font-size: 3rem; letter-spacing: .05em; }
.page-subtitle { color: var(--muted); margin-bottom: 2rem; }

.history-table-wrap { overflow-x: auto; }
.history-table {
  width: 100%; border-collapse: collapse; font-size: .85rem;
}
.history-table th {
  text-align: left; padding: .6rem .8rem;
  font-family: var(--font-display); letter-spacing: .08em;
  color: var(--muted); font-size: .9rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.history-table td { padding: .6rem .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.history-table tr:hover td { background: var(--dark); }

.row-hidden td { border-left: 2px solid var(--chip); }
.row-found  td { border-left: 2px solid var(--found); }

.td-num { color: var(--muted); width: 2rem; }
.hint-pill { background: rgba(245,166,35,.15); color: var(--chip); padding: .15rem .5rem; font-size: .8rem; }
.muted { color: var(--muted); }

.event-badge {
  font-family: var(--font-display); font-size: .9rem; letter-spacing: .08em;
  padding: .15rem .5rem;
}
.badge-hidden { background: rgba(245,166,35,.15); color: var(--chip); border: 1px solid var(--chip); }
.badge-found  { background: rgba(61,230,138,.15);  color: var(--found); border: 1px solid var(--found); }

/* ── LEADERBOARD ── */
.leaderboard-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.lb-card { background: var(--dark); border: 2px solid var(--border); padding: 1.5rem; }
.lb-hiders { border-color: var(--chip); }
.lb-finders { border-color: var(--found); }
.lb-title {
  font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .05em;
  margin-bottom: 1.25rem;
}
.lb-hiders .lb-title  { color: var(--chip); }
.lb-finders .lb-title { color: var(--found); }
.lb-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.lb-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  font-size: .9rem;
}
.lb-gold   { border-color: gold;   background: rgba(255,215,0,.06); }
.lb-silver { border-color: silver; background: rgba(192,192,192,.06); }
.lb-bronze { border-color: #cd7f32; background: rgba(205,127,50,.06); }
.lb-rank { color: var(--muted); width: 1.5rem; flex-shrink: 0; font-family: var(--font-display); }
.lb-name { flex: 1; }
.lb-count { color: var(--chip); font-family: var(--font-display); font-size: 1rem; }
.lb-count small { color: var(--muted); font-size: .7rem; font-family: var(--font-body); }

/* ── SECTION TITLE ── */
.section-title {
  font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 1rem;
}

/* ── EMPTY / LOADING STATES ── */
.empty-state { text-align: center; padding: 3rem; color: var(--muted); }
.empty-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.loading-text { color: var(--muted); }

/* ── SPINNER ── */
.spinner {
  width: 1rem; height: 1rem;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .chip-status-card { flex-direction: column; gap: 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .leaderboard-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav { gap: .6rem; }
  .page-title { font-size: 2rem; }
}

/* ── LIVE TIMER SECTION ── */
.live-timer-section { }

.live-timer-card {
  background: var(--dark);
  border: 2px solid var(--chip);
  padding: 1.75rem 2rem;
  position: relative;
  overflow: hidden;
}
.live-timer-card::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(245,166,35,.08) 0%, transparent 70%);
}

.live-timer-label {
  font-family: var(--font-display);
  font-size: .85rem; letter-spacing: .15em;
  color: var(--muted);
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: 1.25rem;
}

/* Pulsing live dot */
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--chip);
  flex-shrink: 0;
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(245,166,35,.6); }
  50%       { opacity: .7; box-shadow: 0 0 0 6px rgba(245,166,35,0); }
}

/* Digit row */
.live-timer-display {
  display: flex; align-items: flex-end; gap: .5rem;
  flex-wrap: wrap;
}
.timer-unit {
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
}
.timer-digits {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1;
  color: var(--chip);
  letter-spacing: .04em;
  /* subtle digit flip feel via tabular nums */
  font-variant-numeric: tabular-nums;
  min-width: 2ch; text-align: center;
}
.timer-unit-seconds .timer-digits {
  color: var(--white);
}
.timer-unit-label {
  font-family: var(--font-display);
  font-size: .65rem; letter-spacing: .15em;
  color: var(--muted);
}
.timer-sep {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--border);
  line-height: 1;
  padding-bottom: .35rem;
  user-select: none;
}

/* Progress bar toward record */
.timer-progress-wrap {
  margin-top: 1.25rem;
  height: 4px;
  background: var(--border);
  position: relative;
}
.timer-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--chip-dk), var(--chip));
  transition: width .9s linear;
  max-width: 100%;
}
.timer-progress-label {
  margin-top: .4rem;
  font-size: .75rem; color: var(--muted);
}

/* Status record line */
.status-record {
  margin-top: .5rem; font-size: .85rem; color: var(--muted);
}

/* ── STATS STRIP ── */
.stats-strip {
  display: flex; flex-wrap: wrap; gap: .75rem;
}
.stat-pill {
  display: flex; flex-direction: column;
  background: var(--dark);
  border: 1px solid var(--border);
  padding: .6rem 1.1rem;
  min-width: 120px;
}
.stat-pill-accent { border-color: var(--chip); background: rgba(245,166,35,.07); }
.stat-pill-live   { border-color: var(--found); background: rgba(61,230,138,.07); }

@keyframes pulse-border {
  0%, 100% { border-color: var(--found); }
  50%       { border-color: rgba(61,230,138,.3); }
}

.stat-label {
  font-family: var(--font-display); font-size: .7rem;
  letter-spacing: .1em; color: var(--muted);
}
.stat-value {
  font-family: var(--font-display); font-size: 1.4rem;
  letter-spacing: .03em; color: var(--white);
  line-height: 1.2;
}
.stat-pill-accent .stat-value { color: var(--chip); }
.stat-pill-live   .stat-value { color: var(--found); }

/* ── DURATION ON EVENT ITEMS ── */
.event-duration {
  color: var(--found); font-size: .78rem;
  background: rgba(61,230,138,.1);
  padding: .1rem .4rem;
  border: 1px solid rgba(61,230,138,.3);
}

/* ── DURATION PILL IN HISTORY TABLE ── */
.duration-pill {
  color: var(--found); font-size: .82rem;
  background: rgba(61,230,138,.1);
  padding: .15rem .5rem;
  border: 1px solid rgba(61,230,138,.25);
  white-space: nowrap;
}
.td-duration { white-space: nowrap; }

/* ── DURATION LEADERBOARD CARDS ── */
.lb-duration-long { border-color: var(--chip); }
.lb-duration-avg  { border-color: var(--found); }
.lb-duration-long .lb-title { color: var(--chip); }
.lb-duration-avg  .lb-title { color: var(--found); }

.lb-duration { color: var(--found) !important; font-size: .95rem !important; }
.lb-duration-long .lb-duration { color: var(--chip) !important; }

.lb-name-stack { display: flex; flex-direction: column; flex: 1; }
.lb-sub { color: var(--muted); font-size: .7rem; font-family: var(--font-body); }

/* ════════════════════════════════════════════════════════════
   CHAT SIDEBAR
   ════════════════════════════════════════════════════════════ */

/* Sidebar shell — always in the DOM, slides in/out */
.chat-sidebar {
  width: 0;
  flex-shrink: 0;
  position: relative;
  transition: width .25s cubic-bezier(.4,0,.2,1);
  /* Keep the toggle button visible even when closed */
  overflow: visible;
}
.chat-sidebar.chat-open {
  width: 300px;
}

/* ── Toggle bubble ── */
.chat-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--black);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 20px rgba(245,166,35,.35);
  transition: transform .15s, box-shadow .15s;
}
.chat-toggle:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(245,166,35,.5); }
.chat-sidebar.chat-open .chat-toggle {
  /* hide the floating bubble when panel is open on desktop */
  display: none;
}

/* Unread badge on toggle */
.chat-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--danger);
  color: #fff;
  font-family: var(--font-display);
  font-size: .7rem;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--black);
}

/* ── Slide-in panel ── */
.chat-panel {
  display: none;             /* hidden when sidebar is closed */
  flex-direction: column;
  height: calc(100vh - 60px); /* stretch below header */
  position: sticky;
  top: 60px;                 /* header height */
  width: 300px;
  background: var(--dark);
  border-left: 2px solid var(--chip);
  overflow: hidden;
}
.chat-sidebar.chat-open .chat-panel {
  display: flex;
}

/* ── Header ── */
.chat-header {
  display: flex; align-items: center; gap: .5rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--black);
  flex-shrink: 0;
}
.chat-title {
  font-family: var(--font-display);
  font-size: 1rem; letter-spacing: .1em;
  color: var(--chip);
  flex: 1;
}
.chat-online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--found);
  animation: live-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
.chat-close {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  font-size: 1rem; line-height: 1;
  padding: .1rem .3rem;
  transition: color .15s;
}
.chat-close:hover { color: var(--white); }

/* ── Message list ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: .75rem;
  display: flex; flex-direction: column; gap: .5rem;
  scroll-behavior: smooth;
}

/* Custom scrollbar */
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.chat-loading, .chat-empty {
  text-align: center; color: var(--muted);
  font-size: .8rem; margin: auto;
}

/* ── Individual message ── */
.chat-msg {
  display: flex; flex-direction: column;
  max-width: 88%;
  gap: .15rem;
  animation: msg-in .18s ease-out;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.chat-msg-mine  { align-self: flex-end;  align-items: flex-end; }
.chat-msg-theirs { align-self: flex-start; align-items: flex-start; }

.chat-msg-author {
  font-size: .7rem; color: var(--chip);
  font-family: var(--font-display); letter-spacing: .05em;
  padding: 0 .4rem;
}

.chat-msg-bubble {
  display: flex; align-items: flex-start; gap: .3rem;
  padding: .45rem .7rem;
  font-size: .85rem; line-height: 1.4;
  word-break: break-word;
}
.chat-msg-mine .chat-msg-bubble {
  background: rgba(245,166,35,.15);
  border: 1px solid rgba(245,166,35,.3);
  border-radius: 8px 8px 2px 8px;
  flex-direction: row-reverse;
}
.chat-msg-theirs .chat-msg-bubble {
  background: var(--mid);
  border: 1px solid var(--border);
  border-radius: 8px 8px 8px 2px;
}

.chat-msg-text { flex: 1; }

.chat-delete {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  font-size: .9rem; line-height: 1;
  padding: 0 2px; flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s, color .15s;
}
.chat-msg-bubble:hover .chat-delete { opacity: 1; }
.chat-delete:hover { color: var(--danger); }

.chat-msg-time {
  font-size: .65rem; color: var(--muted);
  padding: 0 .4rem;
}

/* ── Input row ── */
.chat-input-row {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem .75rem;
  border-top: 1px solid var(--border);
  background: var(--black);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: var(--mid);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font-body);
  font-size: .85rem;
  padding: .5rem .7rem;
  border-radius: 4px;
  outline: none;
  transition: border-color .15s;
}
.chat-input:focus { border-color: var(--chip); }
.chat-input::placeholder { color: var(--muted); }
.chat-input:disabled { opacity: .5; }

.chat-send {
  width: 36px; height: 36px;
  background: var(--chip);
  color: var(--black);
  border: none; cursor: pointer;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
  transition: opacity .15s, transform .1s;
}
.chat-send:hover:not(:disabled) { opacity: .85; transform: scale(1.05); }
.chat-send:disabled { opacity: .4; cursor: not-allowed; }

.chat-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(0,0,0,.3);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin .5s linear infinite;
  display: inline-block;
}

.chat-login-prompt {
  padding: .7rem;
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  /* On mobile, sidebar overlays as a drawer rather than pushing content */
  .chat-sidebar { width: 0 !important; }
  .chat-sidebar.chat-open .chat-toggle { display: flex; }

  .chat-panel {
    position: fixed;
    right: 0; top: 0; bottom: 0;
    width: 280px !important;
    height: 100vh;
    top: 0;
    z-index: 300;
    box-shadow: -8px 0 40px rgba(0,0,0,.6);
    border-left: 2px solid var(--chip);
  }
  .chat-sidebar.chat-open .chat-panel { display: flex; }
}
