/* ========================================
   Base — Variables, Reset, Typography
   ======================================== */

:root {
  --gold-light: #F5E6D3;
  --gold: #D4A574;
  --gold-dark: #C4956A;
  --gold-darker: #A67B5B;
  --cream: #FFF9F2;
  --cream-dark: #F0E6DA;
  --text: #3D2C1E;
  --text-light: #6B5A4E;
  --text-muted: #8A7B6E;
  --text-primary: #3D2C1E;
  --green: #4CAF50;
  --green-light: #E8F5E9;
  --green-bg: #C8E6C9;
  --red: #E57373;
  --red-light: #FFEBEE;
  --red-bg: #FFCDD2;
  --blue: #64B5F6;
  --blue-light: #E3F2FD;
  --orange: #FFB74D;
  --orange-light: #FFF3E0;
  --purple: #BA68C8;
  --purple-light: #F3E5F5;
  --teal: #4DB6AC;
  --teal-light: #E0F2F1;
  --success: #4CAF50;
  --accent: #D4A574;
  --error: #e74c3c;
  --card-bg: white;
  --card-shadow: 0 1px 3px rgba(61, 44, 30, 0.08);
  --bg-secondary: #f0e6da;
  --shadow-sm: 0 1px 3px rgba(61, 44, 30, 0.08);
  --shadow-md: 0 4px 12px rgba(61, 44, 30, 0.1);
  --shadow-lg: 0 8px 24px rgba(61, 44, 30, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --nav-height: 72px;
  --header-height: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Skip Link (Accessibility) ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--gold-dark);
  color: white;
  padding: 8px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 10000;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ---- Focus Styles (Accessibility) ---- */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Empty States ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-emoji {
  font-size: 56px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.empty-state p {
  font-size: 15px;
  font-weight: 500;
}

.empty-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 400;
}

.empty-hint {
  text-align: left;
  background: white;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

.empty-hint p {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-hint ul {
  list-style: none;
  padding: 0;
}

.empty-hint li {
  padding: 4px 0;
}

.empty-hint li::before {
  content: '• ';
  color: var(--purple);
  font-weight: bold;
}

/* ---- Loading dots ---- */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.loading-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  margin: 0 4px;
  animation: bounce 1.2s infinite ease-in-out;
}

.loading-dot:nth-child(2) { animation-delay: 0.1s; }
.loading-dot:nth-child(3) { animation-delay: 0.2s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
