* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; margin: 0; background: #f7f7f9; color: #222; font-size: 16px; line-height: 1.6; }
.container { max-width: 960px; margin: 0 auto; padding: 1rem; }
.header { background: #1f2937; color: #fff; }
.header .container { display: flex; align-items: center; justify-content: space-between; }
.header a { color: #fff; margin-right: 1rem; text-decoration: none; }
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.row { flex-wrap: wrap; margin-bottom: 1rem; }
input, select, textarea { padding: 0.75rem; border: 1px solid #d1d5db; border-radius: 8px; min-height: 44px; font-size: 1rem; }
.btn { padding: 0.75rem 1rem; border: none; border-radius: 10px; cursor: pointer; font-size: 1rem; min-height: 44px; }
.btn-sm { padding: 0.6rem 0.9rem; font-size: 0.95rem; min-height: 40px; }
.btn.primary { background: #2563eb; color: #fff; }
.btn.danger { background: #ef4444; color: #fff; }
.table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.table th, .table td { border-bottom: 1px solid #e5e7eb; padding: 0.75rem; text-align: left; }
.error { color: #b91c1c; margin-top: 0.5rem; }

/* Gallery cards */
.card .card-title { font-size: 1.05rem; }
.card .btn { width: 100%; }
.card .d-flex.gap-2 { gap: 0.75rem !important; }
.card-img-top { object-fit: cover; width: 100%; height: auto; }

/* Icon sizing and alignment */
.btn .feather { width: 18px; height: 18px; vertical-align: text-bottom; }
.small .feather { width: 16px; height: 16px; }

/* Photo owner line */
.photo-owner { font-size: 0.85rem; color: #6c757d; }

/* Mobile-first adjustments */
@media (max-width: 576px) {
  body { font-size: 17px; }
  h1, .h1 { font-size: 1.6rem; }
  h2, .h2 { font-size: 1.4rem; }
  h3, .h3 { font-size: 1.2rem; }
  .container { padding: 1rem; }
  nav a, nav .btn { margin-right: 0.5rem; }
  .card { padding: 0.75rem; }
  .vote-btn, .delete-photo-btn { padding: 0.8rem 1rem; font-size: 1rem; }
  /* Ensure two columns in gallery on mobile via Bootstrap col-6 already applied */
}

/* Larger screens fine-tuning */
@media (min-width: 992px) {
  body { font-size: 16px; }
  .btn { font-size: 0.95rem; }
}