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

:root {
  --ink: #1a1a18;
  --ink2: #1a1918;
  --paper: #f5f3ef;
  --warm: #cfcabe;
  --accent: #c9a96e;
  --muted: #9a9690;
  --soft: #d4cfc6;
}

[data-theme="dark"] {
  --ink: #857f78;
  --ink2: #d4cfc6;
  --paper: #1a1a18;
  --warm: #2a2a26;
  --accent: #c9a96e;
  --muted: #9a9690;
  --soft: #3a3a36;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 48px;
  background: var(--paper);
  border-bottom: 1px solid var(--soft);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--ink2);
  text-decoration: none;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex; gap: 36px; list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--ink); }

.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 9px 20px;
  border-radius: 2px;
  font-size: 13px !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-self: center;
}

/* ── HERO ── */
.hero {
  padding: 160px 48px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-left h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(52px, 6vw, 88px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

.hero-left h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-left p {
  color: var(--muted);
  font-size: 16px;
  max-width: 380px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex; gap: 16px; align-items: center;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  padding: 13px 28px;
  border-radius: 2px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.8; }

.btn-ghost {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid var(--soft);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

/* Hero right — challenge card */
.challenge-card {
  background: white;
  border: 1px solid var(--soft);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 24px rgba(0,0,0,0.06);
}

.challenge-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  background: var(--warm);
  position: relative;
  overflow: hidden;
}

.challenge-image-placeholder {
  width: 100%; height: 280px;
  background: linear-gradient(135deg, #ddd8ce 0%, #c9c3b8 50%, #b8b0a3 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

.challenge-image-placeholder::after {
  content: '';
  position: absolute; inset: 0;
  background: 
    radial-gradient(ellipse at 30% 40%, rgba(255,255,255,0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(0,0,0,0.15) 0%, transparent 50%);
}

.photo-icon {
  width: 48px; height: 48px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}

.photo-icon svg { opacity: 0.6; }

.challenge-body { padding: 24px; }

.challenge-week {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.challenge-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 10px;
  line-height: 1.2;
}

.challenge-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.challenge-meta {
  display: flex; gap: 24px; align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--warm);
}

.meta-item {
  display: flex; flex-direction: column; gap: 2px;
}

.meta-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.countdown { color: var(--accent); }

/* ── DIVIDER ── */
.section-divider {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
  border-top: 1px solid var(--soft);
}

/* ── GALLERY ── */
.gallery-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 48px;
}

.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 48px;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 300;
}

.section-subtitle {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* Masonry-ish grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--warm);
}

.photo-card:nth-child(1) { grid-row: span 2; }

.photo-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: transform 0.4s ease;
}

.photo-card:nth-child(1) .photo-placeholder { aspect-ratio: 4/5; }
.photo-card:nth-child(4) .photo-placeholder { aspect-ratio: 16/9; }

.photo-card:hover .photo-placeholder { transform: scale(1.03); }

.ph-1 { background: linear-gradient(160deg, #c8d4d8 0%, #a4b5bc 100%); }
.ph-2 { background: linear-gradient(160deg, #d4cabb 0%, #b8ac9c 100%); }
.ph-3 { background: linear-gradient(160deg, #cccec8 0%, #a8aa9e 100%); }
.ph-4 { background: linear-gradient(160deg, #d0c8c0 0%, #b0a898 100%); }
.ph-5 { background: linear-gradient(160deg, #c4cccc 0%, #a0acac 100%); }

.photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px;
}

.photo-card:hover .photo-overlay { opacity: 1; }

.overlay-author {
  color: white;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.overlay-votes {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  margin-top: 4px;
  display: flex; align-items: center; gap: 6px;
}

.vote-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* AI badge */
.ai-badge {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,0.92);
  border-radius: 2px;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-card:hover .ai-badge { opacity: 1; }

/* ── AI ANALYSIS PANEL ── */
.ai-section {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 48px;
}

.ai-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.ai-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.ai-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 44px;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 24px;
}

.ai-heading em { font-style: italic; }

.ai-body {
  color: rgba(245,243,239,0.6);
  font-size: 15px;
  line-height: 1.7;
  max-width: 400px;
}

/* AI analysis card */
.ai-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.ai-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 12px;
}

.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.ai-card-title {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(245,243,239,0.8);
}

.ai-card-body { padding: 24px; }

.ai-photo-thumb {
  width: 100%; height: 160px;
  background: linear-gradient(135deg, #3a3830 0%, #2a2820 100%);
  border-radius: 2px;
  margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}

.ai-photo-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 35% 40%, rgba(201,169,110,0.2) 0%, transparent 60%);
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.metric {
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
  padding: 12px;
}

.metric-name {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 6px;
}

.metric-bar {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.metric-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.metric-score {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.ai-feedback {
  background: rgba(201,169,110,0.1);
  border-left: 2px solid var(--accent);
  padding: 14px 16px;
  border-radius: 0 2px 2px 0;
}

.ai-feedback p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  font-style: italic;
}

/* ── MEMBERS ── */
.members-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 48px;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.member-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  gap: 12px;
  padding: 32px 20px;
  border: 1px solid var(--soft);
  border-radius: 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.member-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.member-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--warm);
  display: flex; align-items: center; justify-content: center;
}

.avatar-initials {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 300;
  color: var(--muted);
}

.member-name {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.member-stats {
  display: flex; gap: 16px;
}

.member-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}

.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  color: var(--ink);
}

.stat-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.member-streak {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--soft);
  padding: 32px 48px;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-logo span { color: var(--accent); }

.footer-note {
  font-size: 12px;
  color: var(--soft);
  letter-spacing: 0.04em;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-left { animation: fadeUp 0.7s ease both; }
.challenge-card { animation: fadeUp 0.7s 0.15s ease both; }

/* ── UPLOAD CTA ── */
.upload-section {
  background: var(--warm);
  border-top: 1px solid var(--soft);
  border-bottom: 1px solid var(--soft);
}

.upload-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 48px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px;
}

.upload-text h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  font-weight: 300;
  margin-bottom: 8px;
}

.upload-text p {
  color: var(--muted);
  font-size: 14px;
  max-width: 420px;
  line-height: 1.6;
}

.upload-btn {
  flex-shrink: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 15px 36px;
  border-radius: 2px;
  font-size: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
  display: flex; align-items: center; gap: 12px;
}

.upload-btn:hover { opacity: 0.8; }

.upload-arrow {
  width: 16px; height: 16px;
  border: 1.5px solid rgba(245,243,239,0.5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26,26,24,0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end;
  justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 0;
}

.modal-overlay.open {
  opacity: 1; pointer-events: all;
}

.modal {
  background: var(--paper);
  border-radius: 4px 4px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--soft);
}

.modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
}

.modal-close {
  background: none; border: none;
  color: var(--muted); font-size: 16px;
  cursor: pointer; padding: 4px;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--ink); }

.modal-body { padding: 28px; }

.drop-zone {
  border: 1.5px dashed var(--soft);
  border-radius: 4px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(201,169,110,0.04);
}

.drop-icon {
  color: var(--muted);
  margin-bottom: 12px;
}

.drop-text {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.drop-link {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  cursor: pointer;
}

.drop-hint {
  font-size: 12px;
  color: var(--soft);
  letter-spacing: 0.04em;
}

.photo-preview {
  width: 100%; height: 240px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.btn-upload {
  width: 100%;
  padding: 14px;
  background: var(--ink);
  color: var(--paper);
  border: none; border-radius: 2px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-upload:hover { opacity: 0.8; }
.btn-upload:disabled { opacity: 0.4; cursor: not-allowed; }

.error-msg {
  background: #fdf0f0;
  border: 1px solid #f0c0c0;
  color: #c0392b;
  padding: 12px 16px;
  border-radius: 2px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.error-msg.visible { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 120px 24px 60px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-card:nth-child(1) { grid-row: span 1; }
  .members-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-inner { grid-template-columns: 1fr; }
  nav { padding: 20px 24px; }
  .nav-links { gap: 20px; }
  footer, .upload-inner { padding: 32px 24px; flex-direction: column; text-align: center; }
}

/* ── ANALYSIS MODAL ── */
.modal-wide {
  max-width: 760px;
}

.analysis-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.analysis-photo {
  border-radius: 2px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--warm);
}

.analysis-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.analysis-author {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 300;
  margin-bottom: 20px;
  color: var(--ink);
}

@media (max-width: 700px) {
  .analysis-layout { grid-template-columns: 1fr; }
  
}

/* ── COMMENTS ── */
.comments-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--soft);
}

.comments-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 300;
  margin-bottom: 16px;
  color: var(--ink);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  max-height: 200px;
  overflow-y: auto;
}

.comment {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comment-author {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.comment-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.comment-date {
  font-size: 11px;
  color: var(--soft);
  letter-spacing: 0.03em;
}

.comment-form {
  display: flex;
  gap: 10px;
}

.comment-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--soft);
  border-radius: 2px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.comment-form input:focus { border-color: var(--accent); }
.comment-form input::placeholder { color: var(--soft); }

.comment-form button {
  padding: 10px 20px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 2px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}

.comment-form button:hover { opacity: 0.8; }

/* ── DARK MODE TRANSITIONS ── */
body, nav, .challenge-card, .member-card, .modal, .ai-card,
.field input, .comment-form input {
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ── THEME TOGGLE ── */
.theme-toggle {
  background: none;
  border: 0px solid var(--soft);
  border-radius: 2px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.2s;
}

.theme-toggle:hover { border-color: var(--accent); }

/* ── HAMBURGER ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 201;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── NAV OVERLAY ── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
}

.nav-overlay.open { display: block; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 260px;
    height: 100vh;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 32px 32px;
    gap: 24px;
    z-index: 200;
    border-left: 1px solid var(--soft);
    transition: right 0.3s ease;
  }

  .nav-links.open { right: 0; }

  .nav-links a, .nav-links .nav-cta {
    font-size: 15px;
  }
}

/* ── USER MENU ── */
.user-menu {
  position: relative;
}

.user-avatar-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.2s;
}

[data-theme="dark"] .user-avatar-btn {
  background: var(--soft);
}

.user-avatar-btn:hover { opacity: 0.8; }

.user-initials {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--paper);
  letter-spacing: 0.04em;
}

[data-theme="dark"] .user-initials {
  color: var(--ink);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--paper);
  border: 1px solid var(--soft);
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  min-width: 160px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 101;
}

.user-dropdown.open { display: flex; }

.user-dropdown a {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.15s, color 0.15s;
}

.user-dropdown a:hover {
  background: var(--warm);
  color: var(--ink);
}

.user-dropdown a:last-child {
  border-top: 1px solid var(--soft);
  color: #c0392b;
}

.user-dropdown a:last-child:hover {
  background: #fdf0f0;
}

@media (min-width: 600px) {
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }

  .modal {
    border-radius: 4px;
    transform: translateY(16px);
    max-height: 85vh;
  }

  .modal-overlay.open .modal {
    transform: translateY(0);
  }

  .modal-wide {
    border-radius: 4px;
  }
}

/* ── SCORES ROW ── */
.scores-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--warm);
  border-radius: 4px;
}

.score-block {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex: 1;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.score-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.score-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
}

.score-max {
  font-size: 12px;
  color: var(--muted);
}

.score-divider {
  width: 1px;
  height: 48px;
  background: var(--soft);
}

/* ── STAR RATING ── */
.star-rating {
  margin-bottom: 20px;
  text-align: center;
}

.star-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}

.star {
  font-size: 28px;
  color: var(--soft);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  user-select: none;
}

.star:hover,
.star.active {
  color: var(--accent);
  transform: scale(1.1);
}

.star-current {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── AI IMPROVEMENT ── */
.ai-improvement {
  margin-top: 12px;
  background: rgba(201,169,110,0.08);
  border-left: 2px solid var(--ink);
  padding: 14px 16px;
  border-radius: 0 2px 2px 0;
}

.improvement-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.ai-improvement p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  font-style: italic;
}

/* ── FACEOFF ── */
.faceoff-progress {
  margin-bottom: 24px;
}

.faceoff-progress-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  text-align: center;
}

.faceoff-progress-bar {
  height: 3px;
  background: var(--soft);
  border-radius: 2px;
  overflow: hidden;
}

.faceoff-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.faceoff-arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
}

.faceoff-photo {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
}

.faceoff-photo:hover {
  border-color: var(--accent);
  transform: scale(1.02);
}

.faceoff-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.faceoff-author {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  padding: 20px 12px 10px;
  color: white;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.faceoff-vs {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 300;
  color: var(--soft);
  text-align: center;
}

.faceoff-hint {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── RESULTS ── */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-item {
  display: grid;
  grid-template-columns: 40px 80px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--soft);
  border-radius: 4px;
}

.result-rank {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 300;
  color: var(--accent);
  text-align: center;
}

.result-photo {
  width: 80px;
  height: 60px;
  border-radius: 2px;
  overflow: hidden;
}

.result-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-author {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
}

.result-points {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.result-medal {
  font-size: 24px;
}

@media (max-width: 600px) {
  .faceoff-arena { grid-template-columns: 1fr; }
  .faceoff-vs { display: none; }
}