:root {
  --bg: #121212;
  --panel: #1c1c1c;
  --text: #f0f0f0;
  --muted: #a0a0a0;
  --accent: #d9a441;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid #2a2a2a;
}

.site-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.8rem;
  letter-spacing: 0.02em;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.controls input,
.controls select {
  background: var(--panel);
  border: 1px solid #333;
  color: var(--text);
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.controls input {
  flex: 1 1 320px;
  max-width: 480px;
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease;
  border: 1px solid #2a2a2a;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: #0c0c0c;
}

.card-label {
  padding: 0.6rem 0.7rem;
}

.card-name {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-year {
  font-size: 0.8rem;
  color: var(--muted);
}

.load-more {
  display: block;
  margin: 2rem auto;
  padding: 0.7rem 1.6rem;
  background: var(--panel);
  color: var(--text);
  border: 1px solid #333;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.load-more:hover { border-color: var(--accent); }

.empty-msg {
  text-align: center;
  color: var(--muted);
  margin-top: 3rem;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: var(--panel);
  border-radius: 10px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
}

.modal-content img {
  flex: 1 1 480px;
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  background: #0c0c0c;
}

.modal-info {
  flex: 1 1 280px;
  padding: 1.5rem;
}

.modal-info h2 {
  margin-top: 0;
}

.field {
  margin: 0.4rem 0;
  color: var(--muted);
  line-height: 1.4;
}

.field strong {
  color: var(--text);
}

@media (max-width: 600px) {
  .controls input { max-width: none; }
}

/* --- Per-print standalone pages --- */

.print-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.print-page-image {
  flex: 1 1 420px;
  max-width: 100%;
  border-radius: 8px;
  background: #0c0c0c;
}

.print-page-info {
  flex: 1 1 280px;
}

.print-page-info h1 {
  margin-top: 0;
}

.history-article {
  flex-basis: 100%;
  border-top: 1px solid #2a2a2a;
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  line-height: 1.6;
}

.history-article h2 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--accent);
}

/* --- History index page --- */

.history-list {
  list-style: none;
  margin: 0;
  padding: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-item a {
  display: flex;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 1rem;
  transition: border-color 0.15s ease;
}

.history-item a:hover {
  border-color: var(--accent);
}

.history-item img {
  width: 90px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #0c0c0c;
}

.history-item h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.history-excerpt {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.subtitle a {
  color: var(--accent);
  text-decoration: none;
}

.subtitle a:hover {
  text-decoration: underline;
}

.history-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0 0.4rem;
}

.history-toggle input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

/* --- Submit a print page --- */

.submit-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem;
}

.submit-intro {
  color: var(--muted);
  line-height: 1.5;
}

.submit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-row label {
  font-size: 0.85rem;
  color: var(--muted);
}

.form-row input,
.form-row textarea {
  background: var(--panel);
  border: 1px solid #333;
  color: var(--text);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  font: inherit;
  font-size: 0.9rem;
}

.form-row .required {
  color: var(--accent);
  font-size: 0.8rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit-form button[type="submit"] {
  background: var(--accent);
  color: #1a1300;
  border: none;
  padding: 0.75rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}

.submit-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.submit-status {
  color: var(--accent);
  font-size: 0.9rem;
}

.submit-status.error {
  color: #e06060;
}

/* --- Review (moderation) page --- */

.review-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}

.review-gate {
  display: flex;
  gap: 0.6rem;
  max-width: 400px;
  margin: 2rem auto;
}

.review-gate input {
  flex: 1;
  background: var(--panel);
  border: 1px solid #333;
  color: var(--text);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
}

.review-gate button,
.review-actions button {
  background: var(--accent);
  color: #1a1300;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.review-summary {
  color: var(--muted);
  margin-bottom: 1rem;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.review-card {
  display: flex;
  gap: 1.25rem;
  background: var(--panel);
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 1rem;
  flex-wrap: wrap;
}

.review-card img {
  width: 180px;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  background: #0c0c0c;
  flex-shrink: 0;
}

.review-card-body {
  flex: 1 1 300px;
}

.review-actions {
  display: flex;
  gap: 0.6rem;
  margin: 0.75rem 0;
  flex-wrap: wrap;
}

.review-download {
  color: var(--accent);
  text-decoration: none;
  padding: 0.6rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-size: 0.9rem;
}

.review-delete {
  background: transparent !important;
  color: #e06060 !important;
  border: 1px solid #e06060;
}

.review-csv {
  background: #0c0c0c;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
}
