:root {
  --bg: #0d0d0c;
  --bg-panel: #161513;
  --border: #2a2825;
  --text: #e8e6e1;
  --text-dim: #8f8d87;
  --accent: #c9a13b;      /* bronze gold */
  --accent-text: #171204; /* dark text on gold buttons */
  --ok: #4cbf7e;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

/* ---------- two-column layout ---------- */
.layout {
  display: flex;
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  min-height: 100vh;
}

/* left: text, out of the way */
.side {
  width: 320px;
  flex-shrink: 0;
}

/* right: sign button + signatures */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- left column ---------- */
.crosshair { color: var(--accent); margin-bottom: 14px; }

.side h1 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.accent { color: var(--accent); }

.tagline {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.pitch {
  margin-top: 22px;
  font-size: 0.92rem;
  color: var(--text-dim);
}
.pitch p + p { margin-top: 12px; }

.side footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* ---------- right column ---------- */
#open-sign {
  width: 100%;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 13px;
  cursor: pointer;
  margin-bottom: 14px;
}
#open-sign:hover { opacity: 0.9; }

.sig-panel {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sig-panel-head {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
}
.sig-panel-head span { color: var(--text); font-weight: 600; }

.sig-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
}

/* one signature = one horizontal row: embark id | discord | date */
.sig-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  white-space: nowrap;
}
.sig-item:last-child { border-bottom: none; }

.sig-embark {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sig-discord {
  color: var(--text-dim);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sig-discord::before { content: "@ "; }

.sig-date {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sig-empty {
  color: var(--text-dim);
  padding: 20px 16px;
}

/* ---------- modal popup ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}
.modal-overlay[hidden] { display: none; }

.modal {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
}

.modal h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); }

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.req, .opt {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-dim);
  margin-left: 6px;
}

.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  padding: 10px 12px;
}
.field input:focus {
  outline: none;
  border-color: var(--text-dim);
}

.field small {
  display: block;
  margin-top: 5px;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* honeypot — visually removed but present for bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#sign-btn {
  width: 100%;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
}
#sign-btn:hover { opacity: 0.9; }
#sign-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.form-msg {
  margin-top: 10px;
  font-size: 0.9rem;
  min-height: 1.4em;
}
.form-msg.error { color: #d05c5c; }
.form-msg.success { color: var(--ok); }

/* ---------- mobile: stack the columns ---------- */
@media (max-width: 720px) {
  .layout {
    flex-direction: column;
    min-height: auto;
  }
  .side { width: 100%; }
  .side footer { display: none; }
  .sig-panel { min-height: 300px; }
}
