/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0c14;
  --bg-grad: radial-gradient(1200px 600px at 80% -10%, rgba(124, 92, 255, .12), transparent 60%),
             radial-gradient(900px 500px at -10% 110%, rgba(236, 72, 153, .08), transparent 60%),
             #0a0c14;
  --surface: #141826;
  --surface2: #1c2236;
  --surface-elev: #232a44;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);
  --text: #f1f3fb;
  --text-muted: #8a92ac;
  --text-dim: #5d6582;
  --primary: #7c5cff;
  --primary-hover: #6a48ff;
  --primary-soft: rgba(124, 92, 255, .14);
  --accent: #ff4d8f;
  --accent-soft: rgba(255, 77, 143, .12);
  --success: #22d39a;
  --success-soft: rgba(34, 211, 154, .12);
  --warn: #ffc043;
  --warn-soft: rgba(255, 192, 67, .12);
  --danger: #ff5d6c;
  --danger-soft: rgba(255, 93, 108, .12);
  --gold: #ffd84d;
  --silver: #c8d0dc;
  --bronze: #d99466;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .55);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { letter-spacing: -0.01em; line-height: 1.25; }
h1 { font-weight: 700; }
h2 { font-weight: 600; }

a { color: var(--primary); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--accent); text-decoration: none; }

::selection { background: var(--primary-soft); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 720px; margin: 0 auto; padding: 1.25rem 1rem 3rem; flex: 1; width: 100%; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.25rem;
  background: rgba(20, 24, 38, .85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.nav-brand:hover { color: var(--text); }
.nav-brand-emoji { filter: drop-shadow(0 0 8px rgba(255, 192, 67, .35)); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
  width: 36px;
  height: 36px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .15s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.nav-links a { font-size: .9rem; color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-admin { color: var(--warn) !important; }
.nav-admin:hover { color: var(--gold) !important; }
.nav-party {
  color: var(--accent) !important;
  font-weight: 600;
  background: var(--accent-soft);
  padding: .25rem .65rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 77, 143, .25);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1.1rem;
}
.nav-party:hover { color: #fff !important; background: var(--accent); border-color: var(--accent); }
.nav-user {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding-left: 1rem;
  margin-left: .25rem;
  border-left: 1px solid var(--border);
}
.nav-username { color: var(--text); font-weight: 600; }

@media (max-width: 720px) {
  .navbar { flex-wrap: wrap; gap: 0; padding: .65rem 1rem; }
  .nav-toggle { display: flex; margin-left: auto; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--border);
    margin-top: .65rem;
    padding-top: .25rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: .75rem .25rem;
    width: 100%;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-user {
    flex-direction: row;
    align-items: center;
    padding: .75rem .25rem;
    margin-left: 0;
    border-left: none;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
  .nav-user .nav-username { flex: 1; }
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .6rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: .92rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -0.005em;
  transition: background-color .15s var(--ease), border-color .15s var(--ease),
              color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease);
  line-height: 1;
  user-select: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 6px 18px rgba(124, 92, 255, .35);
}
.btn-primary:hover { color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 8px 24px rgba(124, 92, 255, .5); }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-elev); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #ff4255; color: #fff; }

.btn-success { background: var(--success); color: #062b1d; }
.btn-success:hover { background: #1ee29b; color: #062b1d; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface2); }

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .9rem;
  font-family: inherit;
  padding: 0;
  font-weight: 500;
}
.btn-link:hover { color: var(--text); }

.btn-full { width: 100%; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1rem; border-radius: var(--radius-sm); }
.btn-sm { padding: .35rem .7rem; font-size: .8rem; }
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: .35rem .5rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  line-height: 1;
  transition: background .15s, color .15s;
}
.btn-icon:hover { color: var(--danger); background: var(--danger-soft); }

/* ── Forms ────────────────────────────────────────────────── */
.form-page { padding: 1rem 0; }
.form-page > h1 { margin-bottom: 1.5rem; font-size: 1.65rem; }
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: var(--shadow);
}
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.hint { font-size: .72rem; color: var(--text-dim); font-weight: 500; }

input, select, textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .65rem .85rem;
  font-size: .95rem;
  font-family: inherit;
  width: 100%;
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s;
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
input[type=search]::-webkit-search-cancel-button { display: none; }

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%238a92ac' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  padding-right: 2.2rem;
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: .9rem;
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: .55rem;
}
.alert-error { background: var(--danger-soft); border-color: var(--danger); color: #ffb1b8; }
.alert-success { background: var(--success-soft); border-color: var(--success); color: #8bf2c8; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .15rem .55rem;
  border-radius: var(--radius-pill);
  font-size: .7rem;
  font-weight: 600;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: .01em;
}
.badge-verified { background: var(--success-soft); color: #56e3b3; border-color: rgba(34, 211, 154, .35); }
.badge-banned { background: var(--danger-soft); color: #ffa0a8; border-color: rgba(255, 93, 108, .35); }
.badge-admin { background: var(--warn-soft); color: var(--warn); border-color: rgba(255, 192, 67, .35); }
.badge-cat { text-transform: capitalize; }

/* ── Avatars ──────────────────────────────────────────────── */
.avatar-xs { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.avatar-lg { width: 88px; height: 88px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--border-strong); }

/* ── Hero (landing) ───────────────────────────────────────── */
.hero { display: flex; align-items: center; justify-content: center; min-height: 78vh; text-align: center; }
.hero-content { max-width: 520px; }
.hero-emoji {
  display: inline-block;
  font-size: 4rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 24px rgba(255, 192, 67, .4));
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin-bottom: .65rem;
  background: linear-gradient(135deg, #ffffff 0%, #c5cdee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1.75rem; }
.hero-features { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; margin-bottom: 1.75rem; }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: .45rem .9rem;
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.hero .btn-lg { box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 12px 32px rgba(124, 92, 255, .45); }
.hero-disclaimer { font-size: .75rem; color: var(--text-dim); margin-top: 1.25rem; max-width: 380px; margin-left: auto; margin-right: auto; }

/* ── Dashboard ────────────────────────────────────────────── */
.dashboard { padding: .5rem 0; }
.dashboard-header { margin-bottom: 1.25rem; }
.dashboard-header h1 { font-size: 1.6rem; }
.dashboard-header .subtitle { color: var(--text-muted); font-size: .9rem; margin-top: .15rem; }
.dashboard-actions { margin: 1.25rem 0; }

.section { margin-top: 2rem; }
.section-title {
  font-size: .75rem;
  margin-bottom: .85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}

/* ── Party banner (dashboard) ─────────────────────────────── */
.party-banner {
  background: linear-gradient(135deg, var(--accent-soft), var(--primary-soft));
  border: 1px solid rgba(255, 77, 143, .3);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.party-banner-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  font-weight: 700;
}
.party-banner-name { font-size: 1.1rem; font-weight: 700; margin: .15rem 0; }
.party-banner-meta { font-size: .8rem; color: var(--text-muted); }
.party-banner-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── BAC Gauge ────────────────────────────────────────────── */
.bac-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.bac-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 200px at 50% -10%, var(--primary-soft), transparent 60%);
  pointer-events: none;
}
.bac-label {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: .5rem;
  font-weight: 700;
}
.bac-value {
  font-size: clamp(2.5rem, 9vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  position: relative;
}
.bac-value .bac-unit { font-size: .55em; opacity: .7; margin-left: .15em; font-weight: 600; }
.bac-safe { color: var(--success); text-shadow: 0 0 24px rgba(34, 211, 154, .35); }
.bac-warn { color: var(--warn); text-shadow: 0 0 24px rgba(255, 192, 67, .35); }
.bac-danger { color: var(--danger); text-shadow: 0 0 24px rgba(255, 93, 108, .4); }

.bac-bar-wrap {
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  height: 10px;
  margin: 0 .25rem 1.4rem;
  overflow: visible;
}
.bac-bar {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--success), var(--warn) 50%, var(--danger));
  transition: width .6s var(--ease);
  max-width: 100%;
  box-shadow: 0 0 12px rgba(124, 92, 255, .4);
}
.bac-limit-marker {
  position: absolute;
  left: 25%;
  top: -3px;
  width: 2px;
  height: 16px;
  background: var(--warn);
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(255, 192, 67, .6);
}
.bac-limit-marker::after {
  content: '0.5‰';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .65rem;
  color: var(--warn);
  white-space: nowrap;
  font-weight: 600;
}
.caffeine-card .bac-bar.caffeine-bar {
  background: linear-gradient(90deg, #c98a59, #a05a25 50%, #ff5d6c);
  box-shadow: 0 0 12px rgba(201, 138, 89, .35);
}
.caffeine-card::before {
  background: radial-gradient(600px 200px at 50% -10%, rgba(201, 138, 89, .14), transparent 60%);
}
.caff-low { color: var(--success); text-shadow: 0 0 24px rgba(34, 211, 154, .35); }
.caff-mid { color: var(--warn); text-shadow: 0 0 24px rgba(255, 192, 67, .35); }
.caff-high { color: var(--danger); text-shadow: 0 0 24px rgba(255, 93, 108, .4); }
/* 400mg / 600mg = 66.7% on the bar */
.caff-limit-marker {
  position: absolute;
  left: 66.67%;
  top: -3px;
  width: 2px;
  height: 16px;
  background: var(--warn);
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(255, 192, 67, .6);
}
.caff-limit-marker::after {
  content: '400 mg';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .65rem;
  color: var(--warn);
  white-space: nowrap;
  font-weight: 600;
}

.bac-meta {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .35rem;
  position: relative;
}
.bac-meta strong { color: var(--text); font-weight: 700; }
.bac-disclaimer { font-size: .7rem; color: var(--text-dim); position: relative; }

/* ── Log list ─────────────────────────────────────────────── */
.log-list { display: flex; flex-direction: column; gap: .55rem; }
.log-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  transition: border-color .15s, transform .15s var(--ease);
}
.log-item:hover { border-color: var(--border-strong); }
.log-drink { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.log-drink-row { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.log-name { font-weight: 600; }
.log-brand { color: var(--text-muted); font-size: .85rem; }
.log-meta { font-size: .75rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.log-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.log-time {
  font-size: .8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ── Drink search ─────────────────────────────────────────── */
.search-area { margin-bottom: 1rem; }
.search-bar { display: flex; gap: .5rem; }
.search-bar input { flex: 1; padding-left: 1rem; }
.drink-results { margin-bottom: 1rem; }
.drink-results-inner { display: flex; flex-direction: column; gap: .55rem; }
.drink-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-wrap: wrap;
  transition: border-color .15s, transform .15s var(--ease);
}
.drink-card:hover { border-color: var(--border-strong); }
.drink-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.drink-info-row { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.drink-name { font-weight: 600; }
.drink-brand { color: var(--text-muted); font-size: .85rem; }
.drink-stats { font-size: .75rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.suggestions-label { font-size: .72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: .6rem; }
.drink-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.modal-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: min(380px, 92vw);
  box-shadow: var(--shadow-lg);
}
.wine-modal-body { font-size: .9rem; color: var(--text-muted); margin-bottom: .1rem; }
.wine-modal-vol-input { width: 100%; padding: .5rem .75rem; font-size: 1rem; background: var(--surface2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); }
.wine-modal-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.wine-modal-actions .btn { flex: 1; justify-content: center; }
.drink-logged {
  justify-content: center;
  color: var(--success);
  font-weight: 700;
  background: var(--success-soft);
  border-color: rgba(34, 211, 154, .4);
  animation: pulse-in .4s var(--ease);
}
@keyframes pulse-in {
  0% { transform: scale(.96); opacity: .6; }
  100% { transform: scale(1); opacity: 1; }
}
.log-success-icon { font-size: 1.3rem; }
.log-success-text { font-size: 1rem; }

.drink-not-found {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: .85rem;
  align-items: center;
}
.drink-not-found code { background: var(--surface2); padding: .15rem .4rem; border-radius: 4px; color: var(--text); font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; font-size: .85rem; }

.add-drink-section { margin-top: 1.5rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.add-drink-section summary {
  cursor: pointer;
  color: var(--primary);
  font-size: .9rem;
  padding: .5rem 0;
  font-weight: 600;
  list-style: none;
  user-select: none;
}
.add-drink-section summary::-webkit-details-marker { display: none; }
.add-drink-section summary::before { content: '▸ '; transition: transform .15s; display: inline-block; }
.add-drink-section[open] summary::before { transform: rotate(90deg); }
.add-drink-section[open] summary { margin-bottom: .5rem; }

.report-toggle summary { list-style: none; cursor: pointer; }
.report-toggle summary::-webkit-details-marker { display: none; }
.report-toggle summary::marker { content: ''; }
.report-form { display: inline-flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.report-form select { width: auto; padding: .35rem .55rem; padding-right: 1.7rem; font-size: .8rem; }

/* ── Scan overlay ─────────────────────────────────────────── */
.scan-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .9);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.scan-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  width: min(440px, 100%);
  box-shadow: var(--shadow-lg);
}
.scan-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .85rem; font-weight: 600; }
#scan-video { width: 100%; border-radius: var(--radius-sm); background: #000; aspect-ratio: 4/3; object-fit: cover; }
.scan-status { font-size: .85rem; color: var(--text-muted); margin-top: .65rem; text-align: center; }
.qr-modal-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  width: min(320px, 90vw);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.qr-modal-inner .scan-header { width: 100%; }
.qr-modal-inner canvas { border-radius: var(--radius-sm); display: block; width: 100% !important; height: auto !important; }

/* ── Leaderboard ──────────────────────────────────────────── */
.leaderboard-page { padding: .5rem 0; }
.leaderboard-page > h1 { margin-bottom: 1.25rem; font-size: 1.65rem; }
.period-tabs {
  display: flex;
  gap: .35rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: .25rem;
}
.tab {
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  padding: .5rem 1rem;
  flex: 1;
  transition: background .15s var(--ease), color .15s;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 92, 255, .4);
}

.leaderboard-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.leaderboard-tbl { width: 100%; border-collapse: collapse; }
.leaderboard-tbl th {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  background: var(--surface2);
}
.leaderboard-tbl td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
  vertical-align: middle;
}
.leaderboard-tbl tr:last-child td { border-bottom: none; }
.leaderboard-tbl tr { transition: background .15s; }
.leaderboard-tbl tbody tr:hover { background: var(--surface2); }
.lb-user { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.lb-user-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lb-institution { color: var(--text-muted); font-size: .85rem; }
.rank { font-weight: 800; font-size: 1rem; text-align: center; width: 50px; font-variant-numeric: tabular-nums; }
.rank-emoji { font-size: 1.3rem; line-height: 1; }
.rank-gold td { background: linear-gradient(90deg, rgba(255, 216, 77, .12), transparent 60%); }
.rank-silver td { background: linear-gradient(90deg, rgba(200, 208, 220, .08), transparent 60%); }
.rank-silver td > tr { background: none; }
.rank-bronze td { background: linear-gradient(90deg, rgba(217, 148, 102, .1), transparent 60%); }
.lb-drinks { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 500px) {
  .lb-col-institution { display: none; }
  .leaderboard-tbl th, .leaderboard-tbl td { padding: .65rem .6rem; }
  .leaderboard-wrap { overflow-x: hidden; }
}

.lb-type-toggle {
  display: flex;
  gap: .35rem;
  margin-bottom: .85rem;
}
.lb-type-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  padding: .4rem 1rem;
  transition: background .15s, color .15s, border-color .15s;
}
.lb-type-btn:hover { color: var(--text); }
.lb-type-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 92, 255, .35);
}

/* ── Party ────────────────────────────────────────────────── */
.party-page { padding: .5rem 0; }

.join-prompt { display: flex; justify-content: center; padding: 1.5rem 0; }
.join-prompt-inner {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.75rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.join-prompt-inner::before {
  content: '';
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--warn));
}
.join-emoji { font-size: 3.5rem; margin-bottom: .75rem; display: inline-block; animation: float 4s ease-in-out infinite; }
.join-prompt-inner h1 { font-size: 1.7rem; margin-bottom: .35rem; }
.join-meta { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.25rem; }
.join-question { font-size: 1.05rem; margin-bottom: 1.5rem; font-weight: 500; color: var(--text); }
.join-decline {
  display: block;
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.join-decline:hover { color: var(--text); }

.party-header { margin-bottom: 1.25rem; }
.party-title-row { display: flex; align-items: baseline; gap: .85rem; flex-wrap: wrap; margin-bottom: .65rem; }
.party-title-row h1 { font-size: 1.6rem; }
.party-member-count {
  font-size: .8rem;
  color: var(--text-muted);
  background: var(--surface2);
  padding: .25rem .65rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-weight: 600;
}
.party-share-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.party-code-label {
  font-size: .85rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.party-code-label code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  color: var(--text);
  background: var(--surface2);
  padding: .2rem .5rem;
  border-radius: 4px;
  font-size: .85rem;
  letter-spacing: .04em;
  border: 1px solid var(--border);
}

.party-action-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1.1rem;
  margin-bottom: 1rem;
}
.party-action-msg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.party-action-msg { color: var(--text-muted); font-size: .9rem; }
.party-action-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }

.party-content { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.25rem; }
@media (max-width: 640px) { .party-content { grid-template-columns: 1fr; } }
.party-leaderboard h2, .party-feed-col h2 {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: .75rem;
  font-weight: 700;
}
.party-lb-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.party-lb-header h2 { margin-bottom: 0; }
.party-lb-toggle { display: flex; gap: .25rem; }
.party-lb-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  cursor: pointer;
  font-size: .85rem;
  padding: .25rem .6rem;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.party-lb-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.party-feed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.party-chat-form {
  margin-top: .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem .85rem;
  box-shadow: var(--shadow);
}
.chat-input-row {
  display: flex;
  gap: .4rem;
  align-items: center;
}
.chat-text-input {
  flex: 1;
  min-width: 0;
  font-size: .9rem;
  padding: .4rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
}
.chat-text-input:focus { outline: none; border-color: var(--primary); }
.chat-img-btn {
  cursor: pointer;
  font-size: 1.15rem;
  padding: .2rem .3rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color .15s;
  line-height: 1;
}
.chat-img-btn:hover { color: var(--text); }
.chat-img-file { display: none; }
.chat-img-preview {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin-top: .5rem;
  position: relative;
}
.chat-preview-img {
  max-height: 80px;
  max-width: 140px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: contain;
}
.chat-preview-remove {
  background: var(--danger, #e74c3c);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 1.3rem;
  height: 1.3rem;
  font-size: .7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feed-chat { align-items: flex-start; }
.feed-chat-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.feed-chat-text { font-size: .88rem; color: var(--text); word-break: break-word; }
.chat-img { max-width: 180px; max-height: 160px; border-radius: var(--radius-sm); border: 1px solid var(--border); display: block; margin-top: .25rem; object-fit: contain; }
.party-feed-list { display: flex; flex-direction: column; }
.feed-event {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .88rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
  animation: feed-in .35s var(--ease);
}
.feed-event:last-child { border-bottom: none; }
@keyframes feed-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.feed-event strong { color: var(--text); font-weight: 700; }
.feed-event-time { color: var(--text-dim); font-size: .75rem; margin-left: auto; font-variant-numeric: tabular-nums; }
.feed-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; }
.feed-empty { color: var(--text-muted); font-size: .9rem; text-align: center; padding: 1.5rem 0; }
.party-feed-list .feed-event ~ .feed-empty { display: none; }

.join-by-code {
  margin-top: 2.5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.join-by-code-label {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .65rem;
  font-weight: 500;
}
.join-by-code-row { display: flex; gap: .5rem; max-width: 320px; }
.join-by-code-row input {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
  text-align: center;
}

.party-signin {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── My Drinking (stats) ──────────────────────────────────── */
.me-page { padding: .5rem 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  box-shadow: var(--shadow-sm);
}
.stat-tile-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: .35rem;
}
.stat-tile-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-tile-unit { font-size: .7em; color: var(--text-muted); font-weight: 600; margin-left: .15em; }

.chart-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.chart-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: .2rem;
}
.chart-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: .35rem .85rem;
  border-radius: var(--radius-pill);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.chart-tab:hover { color: var(--text); }
.chart-tab.active { background: var(--primary); color: #fff; }

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1rem .75rem;
  box-shadow: var(--shadow);
}
.chart-body {
  display: flex;
  height: 160px;
}
.chart-yaxis {
  width: 2.6rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: .7rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  padding-bottom: 1px;
}
.chart-yaxis[hidden] { display: none; }
.chart-plot {
  flex: 1;
  position: relative;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.chart-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.chart-grid {
  stroke: var(--border);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.chart-area-std  { fill: var(--primary); opacity: .15; }
.chart-area-caff { fill: #d2956a; opacity: .15; }
.chart-line-std {
  stroke: var(--primary);
  stroke-width: 2;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.chart-line-caff {
  stroke: #c07a4a;
  stroke-width: 2;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.chart-xaxis {
  position: relative;
  margin-left: 2.6rem;
  height: 1.2rem;
  margin-top: .4rem;
}
.chart-x-tick {
  position: absolute;
  font-size: .7rem;
  color: var(--text-dim);
  transform: translateX(-50%);
  white-space: nowrap;
}

.fav-list { display: flex; flex-direction: column; gap: .55rem; }
.fav-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.fav-info { flex: 1; min-width: 0; }
.fav-name-row { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-bottom: .15rem; }
.fav-name { font-weight: 600; }
.fav-brand { color: var(--text-muted); font-size: .85rem; }
.fav-stats { font-size: .75rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.fav-count { color: var(--text-muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.fav-count strong { color: var(--text); font-size: 1.05rem; font-weight: 800; margin-right: .25rem; }

/* ── Profile ──────────────────────────────────────────────── */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.profile-header h1 { font-size: 1.4rem; margin: 0; }
.profile-header .profile-email { color: var(--text-muted); font-size: .85rem; margin-top: .15rem; }
.profile-avatar-actions { display: flex; gap: .4rem; margin-top: .65rem; flex-wrap: wrap; }
.profile-header .avatar-lg { object-fit: cover; }

/* ── Admin ────────────────────────────────────────────────── */
.admin-page { padding: .5rem 0; }
.admin-page > h1 { margin-bottom: 1.25rem; font-size: 1.65rem; }
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: .75rem;
  flex-wrap: wrap;
}
.admin-header h1 { font-size: 1.5rem; margin: 0; }
.admin-nav {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, transform .15s var(--ease);
  box-shadow: var(--shadow-sm);
}
.admin-card:hover {
  border-color: var(--primary);
  color: var(--text);
  transform: translateY(-2px);
  text-decoration: none;
}
.admin-card-emoji { font-size: 1.75rem; margin-bottom: .5rem; }
.admin-card-title { font-weight: 700; font-size: 1rem; margin-bottom: .15rem; }
.admin-card-desc { color: var(--text-muted); font-size: .85rem; }

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.admin-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.admin-table th {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  background: var(--surface2);
  font-weight: 700;
}
.admin-table td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.row-banned td { opacity: .55; }
.action-cell { display: flex; gap: .35rem; flex-wrap: wrap; }
.search-form { display: flex; gap: .5rem; margin-bottom: 1rem; }
.search-form input { max-width: 320px; }
.pagination {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-top: 1.25rem;
  font-size: .9rem;
  color: var(--text-muted);
  justify-content: center;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-dim);
  font-size: .8rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer a { color: var(--text-muted); }

/* ── Misc ─────────────────────────────────────────────────── */
.loading {
  color: var(--text-muted);
  font-size: .9rem;
  padding: 1.25rem 0;
  text-align: center;
}
.loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: .5rem;
  border: 2px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.empty {
  color: var(--text-muted);
  font-size: .9rem;
  padding: 1.25rem;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.empty a { font-weight: 600; }
.error-page { text-align: center; padding: 5rem 0; }
.error-page h1 {
  font-size: 5rem;
  color: var(--text-muted);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: .5rem;
}
.error-page p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── HTMX loading indicator ───────────────────────────────── */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.htmx-request.htmx-indicator { display: inline; }

/* htmx swap fade-in */
.htmx-swapping { opacity: 0; transition: opacity .15s; }
.htmx-settling { opacity: 1; transition: opacity .2s var(--ease); }

/* ── User profile page ────────────────────────────────────── */
.user-profile-page { padding: .5rem 0; }

.user-profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.user-profile-info { min-width: 0; }
.user-profile-name { font-size: 1.6rem; margin-bottom: .35rem; }
.user-profile-meta { display: flex; flex-wrap: wrap; gap: .35rem; }

.profile-notice {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 1.25rem;
}
.profile-notice-private { border-color: rgba(255, 93, 108, .2); }
.profile-notice-icon { font-size: 1.2rem; flex-shrink: 0; }

.friend-action { margin-bottom: 1.5rem; }

.friend-status-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}
.friend-status-label {
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.badge-friends {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--success-soft);
  color: var(--success);
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .65rem;
  letter-spacing: .03em;
}
.badge-friends::before { content: '✓ '; }

/* ── Friends list page ────────────────────────────────────── */
.friends-page { padding: .5rem 0; }

.friend-list { display: flex; flex-direction: column; gap: .5rem; }

.friend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background .15s;
}
.friend-item:hover { background: var(--surface2); }

.friend-item-user {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  flex: 1;
  color: var(--text);
  text-decoration: none;
}
.friend-item-user:hover { color: var(--text); }
.friend-item-name {
  font-weight: 600;
  font-size: .95rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.friend-item-actions { display: flex; gap: .4rem; flex-shrink: 0; }

/* ── Recent logs on profile ───────────────────────────────── */
.recent-logs { display: flex; flex-direction: column; gap: .4rem; }
.recent-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
}
.recent-log-info { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-log-name { font-weight: 600; }
.recent-log-brand { color: var(--text-muted); margin-left: .3em; }
.recent-log-time { color: var(--text-dim); font-size: .8rem; white-space: nowrap; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ── Party member list (collapsible) ─────────────────────── */
.party-members-section { border: none; }
.party-members-summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.party-members-summary::-webkit-details-marker { display: none; }
.party-members-summary::after {
  content: '▸';
  font-size: .7rem;
  color: var(--text-dim);
  transition: transform .15s;
}
.party-members-section[open] .party-members-summary::after { transform: rotate(90deg); }
.party-members { margin-top: .85rem; }
