/* Synkloft: shared look for the gallery, the creator app and the home page. */
:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #efede8;
  --text: #1b1a17;
  --muted: #6d6a63;
  --border: #e2dfd8;
  --accent: #b5532f;
  --accent-ink: #ffffff;
  --accent-soft: #f6e5dd;
  --heart: #d93a56;
  --ok: #2f7a4b;
  --ok-soft: #e1f0e6;
  --warn: #9a6200;
  --warn-soft: #fbefd7;
  --danger: #b3261e;
  --danger-soft: #fbe3e1;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110; --surface: #1c1b19; --surface-2: #262420; --text: #f0ede6; --muted: #a39e94;
    --border: #34312c; --accent: #e07a52; --accent-ink: #1b1a17; --accent-soft: #3a261d; --heart: #ff6b85;
    --ok: #7fcf9b; --ok-soft: #1d3326; --warn: #f0c05a; --warn-soft: #3a2f16; --danger: #ff8a80; --danger-soft: #3d1e1b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121110; --surface: #1c1b19; --surface-2: #262420; --text: #f0ede6; --muted: #a39e94;
  --border: #34312c; --accent: #e07a52; --accent-ink: #1b1a17; --accent-soft: #3a261d; --heart: #ff6b85;
  --ok: #7fcf9b; --ok-soft: #1d3326; --warn: #f0c05a; --warn-soft: #3a2f16; --danger: #ff8a80; --danger-soft: #3d1e1b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; margin: 0 0 .4em; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-decoration: none; color: var(--text); }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.small { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.btn.ghost { background: transparent; border-color: transparent; }

.field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; padding: 11px 13px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 16px; }
.error-box, .warn-box, .info-box, .ok-box { padding: 12px 14px; border-radius: 8px; margin: 0 0 14px; }
.error-box { background: var(--danger-soft); color: var(--danger); }
.warn-box { background: var(--warn-soft); color: var(--warn); }
.info-box { background: var(--accent-soft); color: var(--accent); }
.ok-box { background: var(--ok-soft); color: var(--ok); }
.chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 999px; z-index: 100; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; }
.foot-brand { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 16px; }
.foot-brand a { color: inherit; }

.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); border-radius: 14px; padding: 22px; width: min(460px, 100%); box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
