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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  color: #1a1a1a;
  background: #fafafa;
}

header {
  margin-bottom: 2rem;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.5rem;
}

header p {
  color: #666;
  font-size: 0.875rem;
}

.activity {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.activity-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.activity-date {
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.activity-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.stat {
  font-size: 0.85rem;
}

.stat-label {
  color: #888;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.activity-device {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #999;
}

#auth {
  font-size: 0.9rem;
}

#auth .auth-handle {
  margin-right: 0.5rem;
  font-weight: 600;
}

#login-form {
  display: flex;
  gap: 0.5rem;
}

#login-handle {
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#logout-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: none;
  cursor: pointer;
}

.delete-form {
  margin-top: 0.75rem;
}

.delete-btn {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  border: 1px solid #c00;
  border-radius: 4px;
  background: none;
  color: #c00;
  cursor: pointer;
}

#activities .loading {
  color: #888;
}

#activities .error {
  color: #c00;
}
