/* ── NOMUS — Shared Stylesheet ── */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600&display=swap');

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

:root {
  --bg: #0a0a0a;
  --surface: #111;
  --border: #1e1e1e;
  --border-active: #3a3a3a;
  --text: #c8c8c8;
  --text-dim: #3a3a3a;
  --text-mid: #555;
  --accent: #fff;
  --error: #6b2020;
  --ok: #1a4a2a;
}

:root.light {
  --bg: #f4f4f2;
  --surface: #ebebea;
  --border: #d4d4d2;
  --border-active: #aaaaaa;
  --text: #1a1a1a;
  --text-dim: #aaaaaa;
  --text-mid: #777;
  --accent: #000;
  --error: #cc3333;
  --ok: #226622;
}

:root.tokyo {
  --bg: #1a1b26;
  --surface: #24283b;
  --border: #2f3347;
  --border-active: #565f89;
  --text: #c0caf5;
  --text-dim: #414868;
  --text-mid: #565f89;
  --accent: #7aa2f7;
  --error: #f7768e;
  --ok: #9ece6a;
}

:root.miami {
  --bg: #0d0d1a;
  --surface: #12122a;
  --border: #2a1a3e;
  --border-active: #ff2d78;
  --text: #f0e6ff;
  --text-dim: #4a2a6a;
  --text-mid: #9a6abf;
  --accent: #ff2d78;
  --error: #ff6b6b;
  --ok: #00ffcc;
}

:root.miami .btn-primary { background: #ff2d78; color: #fff; }
:root.miami .btn-primary:hover { background: #ff5599; }
:root.miami .nav-tab.active { color: #ff2d78; border-bottom-color: #ff2d78; }
:root.miami .progress-bar { background: #ff2d78; }

:root.tokyo .btn-primary { background: #7aa2f7; color: #1a1b26; }
:root.tokyo .btn-primary:hover { background: #89b4fa; }
:root.tokyo .nav-tab.active { color: #7aa2f7; border-bottom-color: #7aa2f7; }
:root.tokyo .progress-bar { background: #7aa2f7; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 60px;
}

/* ── Header ── */
header {
  width: 100%;
  max-width: 960px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 28px;
}

header h1 { font-size: 13px; font-weight: 400; letter-spacing: 0.35em; color: var(--accent); }
header .header-right { display: flex; align-items: center; gap: 16px; }
header span { font-size: 10px; color: var(--text-dim); letter-spacing: 0.1em; }

/* ── Nav ── */
nav.nav {
  width: 100%;
  max-width: 960px;
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.nav-tab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 20px;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
}

.nav-tab:hover { color: var(--text-mid); }
.nav-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.nav-tab.stub { color: var(--text-dim); cursor: default; opacity: 0.4; pointer-events: none; }

/* ── Page container ── */
.page { width: 100%; max-width: 960px; }

/* ── Buttons ── */
.btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  border-radius: 0;
  padding: 13px 20px;
  transition: background 0.15s;
}

.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: #ddd; }
.btn-primary:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-full { width: 100%; }

/* ── Form elements ── */
label {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
}

textarea, select, input[type="text"], input[type="number"] {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 10px 12px;
  transition: border-color 0.15s;
  appearance: none;
}

textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
textarea::placeholder, input::placeholder { color: #222; }
textarea:focus, select:focus, input:focus { outline: none; border-color: var(--border-active); }

.field { display: flex; flex-direction: column; margin-bottom: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.divider { border: none; border-top: 1px solid #161616; margin: 8px 0; }

/* ── Gallery ── */
.gallery { display: grid; gap: 8px; }
.gallery-1 { grid-template-columns: 1fr; }
.gallery-2 { grid-template-columns: 1fr 1fr; }
.gallery-3 { grid-template-columns: 1fr 1fr 1fr; }

.img-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-wrap .placeholder { color: var(--border-active); }

/* ── Progress ── */
.progress-wrap { margin-bottom: 12px; }
.progress-bar-bg { background: #161616; height: 2px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width 0.4s; }
.progress-label { font-size: 10px; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 6px; }

/* ── Status / meta ── */
.meta { font-size: 10px; color: #2a2a2a; letter-spacing: 0.06em; min-height: 16px; }
.meta.ok { color: var(--ok); }
.meta.error { color: var(--error); }

/* ── Stub ── */
.stub-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 12px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.stub-panel p { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.stub-panel small { font-size: 10px; color: #222; }

/* ── Lightbox ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 200;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
#lightbox.active { display: flex; }
#lightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain; }
#lbClose {
  position: absolute;
  top: 18px; right: 22px;
  font-size: 10px; color: #333;
  letter-spacing: 0.12em;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Theme toggle ── */
.theme-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px 0 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
