/* =========================================
   Rolls — Paper / Analog Aesthetic
   Optimized for e-ink (Boox Palma 2)
   ========================================= */

:root {
  --paper: #f5f0e8;
  --paper-dark: #ede8df;
  --ink: #1a1a18;
  --ink-secondary: #4a4a45;
  --ink-muted: #8a8a82;
  --orange: #ff9500;
  --border: #c8c0b0;
  --border-light: #ddd8cc;

  /* Status colors */
  --status-loaded: #d4860a;
  --status-fridge: #4a90d9;
  --status-lab: #4a90d9;
  --status-scanned: #2a9d8f;
  --status-processed: #2d6a4f;
  --status-uploaded: #2d6a4f;
  --status-archived: #555;
}

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

html, body {
  height: 100%;
}

body.paper-body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--orange);
}

/* ---- Navigation ---- */

.main-nav {
  background: var(--ink);
  color: var(--paper);
  padding: 0 16px;
  height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  gap: 0;
  justify-content: center;
  grid-column: 2;
  height: 100%;
  align-items: stretch;
}

.nav-link {
  color: var(--paper);
  text-decoration: none;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 14px;
  display: flex;
  align-items: center;
  opacity: 0.45;
  transition: opacity 0.1s;
  border-radius: 0;
}

.nav-link:hover {
  color: var(--paper);
  opacity: 1;
}

.nav-link-active {
  opacity: 1;
  background: rgba(255,255,255,0.08);
}

.nav-more {
  position: relative;
}

.nav-more-btn {
  background: none;
  border: none;
  color: rgba(245,240,232,0.45);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 14px;
  height: 100%;
  cursor: pointer;
  border-radius: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}

.nav-more { display: flex; align-items: stretch; }
.nav-more-btn:hover { color: var(--paper); opacity: 1; }
.nav-more.open .nav-more-btn { color: var(--paper); opacity: 1; background: rgba(255,255,255,0.08); }

.nav-more-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 3px;
  min-width: 120px;
  z-index: 200;
  padding: 4px 0;
}

.nav-more.open .nav-more-dropdown { display: block; }

.nav-more-dropdown a {
  display: block;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.65);
  text-decoration: none;
}

.nav-more-dropdown a:hover { color: var(--paper); background: rgba(255,255,255,0.08); }
.nav-more-dropdown .nav-link-active { color: var(--paper); }

.nav-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  grid-column: 3;
}

.nav-username {
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.6;
  color: var(--paper);
}

/* ---- Layout ---- */

.main-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px;
}

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.page-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Back link ---- */

.page-back {
  margin-bottom: 12px;
}

.back-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

/* ---- Film swatch ---- */

.film-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ---- Email toggle ---- */

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.toggle-text {
  font-size: 13px;
  color: var(--ink);
}

/* ---- Flash messages ---- */

.flash {
  padding: 10px 16px;
  font-size: 13px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.flash-notice {
  background: #e8f5e9;
  color: #2d6a4f;
  border-color: #c8e6c9;
}

.flash-alert {
  background: #fff3e0;
  color: #8b4513;
  border-color: #ffe0b2;
}

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  padding: 7px 14px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.1s, color 0.1s;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: #333;
  color: var(--paper);
}

.btn-ghost {
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--paper);
  background: transparent;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.08em;
  border-radius: 2px;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.15);
  color: var(--paper);
}

.btn-sm {
  padding: 3px 8px;
  font-size: 11px;
}

.btn-danger {
  border-color: #cc2200;
  color: #cc2200;
}

.btn-danger:hover {
  background: #cc2200;
  color: var(--paper);
}

/* button_to wraps in a <form> — neutralise its effect on button height */
form.button_to {
  display: inline-flex;
  margin: 0;
}

/* ---- Roll timeline (edit form) ---- */

.roll-timeline {
  padding: 4px 0 0;
}

.tl-stage {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.tl-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-top: 3px;
}

.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  opacity: 0.25;
  flex-shrink: 0;
  transition: background 0.15s, opacity 0.15s;
}

.tl-dot-optional {
  border-style: dashed;
}

.tl-done .tl-dot {
  background: var(--ink);
  opacity: 1;
}

.tl-line {
  width: 1px;
  flex: 1;
  min-height: 32px;
  background: rgba(26, 20, 8, 0.12);
  margin: 4px 0;
}

.tl-stage-last .tl-node {
  justify-content: flex-start;
}

.tl-body {
  flex: 1;
  padding-bottom: 20px;
}

.tl-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.35;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s;
}

.tl-done .tl-label {
  opacity: 1;
}

.tl-optional {
  font-size: 9px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.5;
}

.tl-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(26, 20, 8, 0.12);
  padding: 4px 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  color: var(--ink);
  outline: none;
}

.tl-input:focus {
  border-bottom-color: var(--ink);
}

.tl-input-sub {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.6;
}

/* ---- Forms ---- */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 4px;
}

.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  background: var(--paper);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 2px;
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: -1px;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ---- Roll list & cards ---- */

.roll-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.roll-row-outer {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-light);
}

.roll-row-outer .roll-card {
  border-bottom: none;
  padding-bottom: 4px;
}

.roll-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 10px;
}

.roll-card-footer .roll-action-btn {
  margin-left: auto;
}

.roll-action-btn {
  padding: 2px 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 2px;
  white-space: nowrap;
  opacity: 0.4;
  transition: opacity 0.1s, background 0.1s, color 0.1s;
}

.roll-action-btn:hover {
  opacity: 1;
  background: var(--ink);
  color: var(--paper);
}

form.button_to:has(.roll-action-btn) {
  display: inline-flex;
  margin: 0;
  margin-left: auto;
}

.roll-card {
  padding: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  color: var(--ink);
}

.roll-card:hover {
  background: var(--paper-dark);
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
}

.roll-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.roll-film-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.roll-card-number {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

.roll-card-secondary {
  font-size: 13px;
  color: var(--ink-secondary);
}

.roll-card-notes {
  font-size: 13px;
  color: var(--ink-muted);
  font-style: italic;
  line-height: 1.4;
}

.roll-card-album {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

/* legacy */
.roll-number { font-size: 15px; font-weight: 700; letter-spacing: 0.05em; }
.roll-meta   { display: flex; flex-direction: column; gap: 2px; }
.roll-equipment { font-size: 12px; color: var(--ink-secondary); }
.roll-dates  { font-size: 11px; color: var(--ink-muted); }

.roll-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.tag {
  font-size: 10px;
  padding: 1px 5px;
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  border-radius: 2px;
  letter-spacing: 0.06em;
}

/* ---- Status badge ---- */

.status-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 2px;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.status-loaded   { color: var(--status-loaded); }
.status-fridge   { color: var(--status-fridge); }
.status-lab      { color: var(--status-lab); }
.status-scanned  { color: var(--status-scanned); }
.status-processed { color: var(--status-processed); }
.status-uploaded { color: var(--status-uploaded); }
.status-archived { color: var(--status-archived); }

/* ---- Detail view ---- */

.detail-section {
  margin-bottom: 24px;
}

.detail-section-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 6px 12px;
}

.detail-label {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 1px;
}

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

/* ---- Notes editor (roll show, active rolls) ---- */

.notes-editor-section {
  margin-bottom: 24px;
}

.notes-editor-wrap {
  position: relative;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  background: var(--paper);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.notes-editor-focused {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(26, 20, 8, 0.06);
}

.notes-editor {
  display: block;
  width: 100%;
  min-height: 80px;
  padding: 12px;
  background: transparent;
  border: none;
  resize: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  outline: none;
}

.notes-editor::placeholder {
  color: var(--ink-muted);
  font-style: italic;
}

.notes-editor-status {
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  pointer-events: none;
}

/* ---- Table ---- */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.data-table tr:hover td {
  background: var(--paper-dark);
}

/* ---- Auth layout (login/register) ---- */

body.auth-body {
  background: #f2ede4;
  font-family: 'Courier New', Courier, monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 40px 40px;
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}

.auth-wordstack {
  font-family: system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(52px, 14vw, 80px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -1px;
  text-transform: uppercase;
  color: #1a1310;
  margin-bottom: 20px;
}

.auth-wordstack .ws-shoot,
.auth-wordstack .ws-develop,
.auth-wordstack .ws-archive { display: block; }

.auth-appname {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #b0a898;
}

.auth-actions {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 24px 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-auth-apple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 20px;
  background: #1a1310;
  color: #f2ede4;
  border: none;
  border-radius: 6px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.12s;
}

.btn-auth-passkey {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  color: #1a1310;
  border: 1.5px solid rgba(26,19,16,0.2);
  border-radius: 6px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.12s;
}

.btn-auth-apple:hover,
.btn-auth-passkey:hover { opacity: 0.75; color: inherit; }

.auth-icon-dark { opacity: 0.8; }
.auth-icon-light { filter: invert(1); opacity: 0.9; }

.btn-auth-create {
  background: none;
  border: none;
  color: #b0a898;
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 8px;
  cursor: pointer;
  text-align: center;
  width: 100%;
  display: block;
  text-decoration: none;
}

.btn-auth-create:hover { color: #5c5248; }

/* Legacy auth (kept for register page) */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}

.auth-card {
  width: 100%;
  max-width: 360px;
  padding: 32px;
  border: 1px solid var(--border);
  background: var(--paper);
}

.auth-logo { text-align: center; margin-bottom: 28px; }

.auth-logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.auth-subtitle {
  font-size: 11px;
  color: var(--ink-muted);
  text-align: center;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--ink-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-link {
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 16px;
}

/* ---- New roll form ---- */

.new-roll-header {
  text-align: center;
  margin-bottom: 28px;
  padding-top: 8px;
}

.new-roll-number {
  font-size: 56px;
  font-weight: 700;
  color: rgba(26,26,24,0.07);
  letter-spacing: 4px;
  line-height: 1;
  margin-bottom: 4px;
}

.new-roll-number-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.form-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}

.form-label-row .form-label { margin-bottom: 0; }

.form-label-optional {
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  font-weight: 400;
  text-transform: none;
}

.form-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 7px;
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.form-hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.form-hint-dot.fridge { background: var(--status-fridge); }
.form-hint-dot.loaded { background: var(--status-loaded); }

/* ---- Rolls list sections (SHOOT / DEVELOP) ---- */

.rolls-section {
  margin-bottom: 32px;
}

.rolls-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.rolls-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.rolls-section-count {
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
}

.rolls-subsection {
  margin-bottom: 20px;
}

.rolls-subsection-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 10px 0 4px;
}

/* ---- Archive dark layout ---- */

body.archive-body {
  background: #1a1310;
}

body.archive-body .main-content {
  background: transparent;
  max-width: 680px;
}

body.archive-body .main-content {
  /* Remap ink variables to orange palette so all components inherit */
  --ink:           #ff9500;
  --ink-secondary: rgba(255, 149, 0, 0.7);
  --ink-muted:     rgba(255, 149, 0, 0.45);
  --border:        rgba(255, 149, 0, 0.15);
  --border-light:  rgba(255, 149, 0, 0.1);
  color: var(--ink);
}

body.archive-body .main-content .btn-danger {
  border-color: rgba(204, 34, 0, 0.5);
  color: rgba(204, 34, 0, 0.8);
}

body.archive-body .main-content .btn-danger:hover {
  background: rgba(204, 34, 0, 0.15);
  color: #cc2200;
}


.archive-year-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.archive-year-pill {
  padding: 4px 12px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  color: rgba(245,240,232,0.35);
  border: 1px solid rgba(245,240,232,0.12);
  border-radius: 20px;
  cursor: pointer;
  transition: color 0.1s, border-color 0.1s;
}

.archive-year-pill:hover {
  color: rgba(245,240,232,0.7);
  border-color: rgba(245,240,232,0.3);
}

.archive-year-pill.active {
  color: var(--orange);
  border-color: var(--orange);
}

.archive-year-section {
  margin-bottom: 40px;
}

.archive-year-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(245,240,232,0.06);
}

.archive-grid {
  display: flex;
  flex-direction: column;
}

.archive-card {
  display: block;
  text-decoration: none;
  color: var(--paper);
  border-top: 1px solid rgba(245,240,232,0.08);
  padding: 16px 0 0;
  margin-bottom: 32px;
}

.archive-card:hover .archive-card-image { opacity: 0.85; }

.archive-card-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 4px;
}

.archive-card-info-left,
.archive-card-info-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.archive-card-info-right { text-align: right; }

.archive-card-film {
  font-size: 15px;
  font-weight: 700;
  color: var(--orange);
}

.archive-card-number {
  font-size: 15px;
  font-weight: 700;
  color: var(--orange);
}

.archive-card-meta {
  font-size: 11px;
  color: rgba(245,240,232,0.35);
}

.archive-card-date {
  font-size: 11px;
  color: rgba(245,240,232,0.35);
}

.archive-card-image {
  width: 100%;
  aspect-ratio: 5/3;
  background: #1f1a14;
  overflow: hidden;
  transition: opacity 0.12s;
  margin-top: 10px;
}

.archive-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Contact sheet ---- */

.contact-sheet {
  width: 100%;
  display: block;
  object-fit: cover;
  margin-bottom: 12px;
}

/* ---- Stats ---- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  border: 1px solid var(--border);
  padding: 14px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* ---- Settings ---- */

.settings-section {
  margin-bottom: 28px;
}

.settings-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

/* ---- Utilities ---- */

.text-muted   { color: var(--ink-muted); }
.text-sm      { font-size: 12px; }
.text-xs      { font-size: 11px; }
.mono         { font-family: 'Courier New', Courier, monospace; }
.truncate     { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-4         { margin-top: 16px; }
.mb-4         { margin-bottom: 16px; }
.flex         { display: flex; }
.items-center { align-items: center; }
.gap-2        { gap: 8px; }
.gap-4        { gap: 16px; }

.empty-state {
  padding: 40px 16px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* ---- E-ink optimizations ---- */
@media (prefers-contrast: more) {
  :root {
    --paper: #ffffff;
    --ink: #000000;
    --border: #888;
  }
}

/* Reduce animations for e-ink */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
