/* Feuerwerk Passphrase — the house black and gold livery. */

:root {
  --gold: #f5c211;
  --gold-dim: #aa7733;
  --gold-deep: #aa4400;
  --ink: #000000;
  --ink-2: #0b0b0b;
  --ink-3: #141414;
  --line: #262626;
  --paper: #f4f4f2;
  --grey: #8a8a8a;
  --grey-2: #5c5c5c;
  --pale: #ffffaa;
}

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

html, body {
  min-height: 100%;
  background: var(--ink);
  color: var(--paper);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1000px 560px at 50% -10%, rgba(245,194,17,.10), transparent 60%),
    var(--ink);
}

.hidden { display: none !important; }
.dim { color: var(--grey-2); }
.spacer { flex: 1; }

/* ── the mark: a gold key on black ─────────────────────────── */
.mark {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--ink); border: 1px solid var(--gold-dim);
  position: relative; flex: none; margin: 0 auto 14px;
}
.mark::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 34% 34%, transparent 0 9px, var(--gold) 9px 12px, transparent 12px),
    linear-gradient(45deg, transparent 46%, var(--gold) 46% 56%, transparent 56%);
  border-radius: inherit;
}
.mark-sm { width: 30px; height: 30px; border-radius: 9px; margin: 0; }
.mark-sm::before {
  background:
    radial-gradient(circle at 34% 34%, transparent 0 5px, var(--gold) 5px 6.5px, transparent 6.5px),
    linear-gradient(45deg, transparent 46%, var(--gold) 46% 56%, transparent 56%);
}

/* ── the screens ───────────────────────────────────────────── */
.screen { min-height: 100vh; display: grid; place-items: center; padding: 28px 20px; }
#main { display: block; padding: 0; }

.panel {
  width: 100%; max-width: 440px;
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: 20px; padding: 30px 28px 26px;
  text-align: center;
}
.panel h1 { font-size: 24px; color: var(--gold); margin-bottom: 5px; }
.lede { font-size: 14px; color: var(--grey); margin-bottom: 18px; }
.note {
  font-size: 12.5px; color: var(--grey); line-height: 1.5; text-align: left;
  background: rgba(245,194,17,.07); border: 1px solid rgba(245,194,17,.22);
  border-radius: 11px; padding: 11px 13px; margin-bottom: 18px;
}
.note strong { color: var(--pale); }

/* ── the fields ────────────────────────────────────────────── */
.field { display: block; text-align: left; margin-bottom: 14px; }
.field > span {
  display: block; margin-bottom: 5px; font-size: 12px;
  color: var(--grey); letter-spacing: .3px;
}
.field input, .field textarea, .field select, .note-form input, .note-form textarea {
  width: 100%; padding: 11px 13px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--line); border-radius: 11px;
  font: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus,
.note-form input:focus, .note-form textarea:focus {
  border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(245,194,17,.12);
}
.field.inline { margin-bottom: 0; }
.field.inline > span { font-size: 11px; }
.field.inline input, .field.inline select { padding: 8px 10px; }

.check {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--grey); margin-bottom: 16px; text-align: left;
}
.check input { accent-color: var(--gold); width: 16px; height: 16px; }

/* ── the buttons ───────────────────────────────────────────── */
.btn {
  padding: 11px 18px; border-radius: 11px;
  border: 1px solid var(--line); background: transparent;
  color: var(--paper); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s, filter .15s, background .15s;
}
.btn:hover { border-color: var(--gold-dim); color: var(--gold); }
.btn-gold { background: var(--gold); color: var(--ink); border-color: var(--gold); width: 100%; }
.btn-gold:hover { filter: brightness(1.08); color: var(--ink); }
.btn-quiet { color: var(--grey); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.file-btn { position: relative; overflow: hidden; display: inline-block; }
.row { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.row .btn-gold { width: auto; }

.msg { min-height: 18px; margin: 12px 0 0; font-size: 13px; color: var(--gold); text-align: left; }
.msg:empty { margin: 0; }
.msg.bad { color: var(--gold-deep); }

/* ── the bar ───────────────────────────────────────────────── */
.bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: var(--ink-2);
}
.bar-title { font-weight: 700; color: var(--gold); font-size: 15px; }

/* ── the content ───────────────────────────────────────────── */
.content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  padding: 22px; max-width: 1100px; margin: 0 auto;
}
.pane {
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px 22px 22px;
}
.pane h2 { font-size: 13px; color: var(--grey); letter-spacing: .6px; text-transform: uppercase; margin-bottom: 14px; }

.phrase {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 19px; line-height: 1.4; color: var(--gold);
  background: var(--ink); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 17px; min-height: 58px;
  word-break: break-word; user-select: all;
}
.strength {
  height: 5px; border-radius: 3px; background: var(--ink);
  margin: 14px 0 6px; overflow: hidden;
}
.bar-fill { display: block; height: 100%; width: 0; background: var(--gold-deep); transition: width .3s, background .3s; }
.strength-label { font-size: 12px; margin-bottom: 16px; }

.gen-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-bottom: 6px; }

/* ── the notes ─────────────────────────────────────────────── */
.notes { display: flex; flex-direction: column; gap: 9px; max-height: 300px; overflow-y: auto; margin-bottom: 14px; }
.note-card {
  background: var(--ink); border: 1px solid var(--line);
  border-radius: 11px; padding: 12px 13px;
}
.note-card h3 { font-size: 14px; color: var(--paper); margin-bottom: 5px; }
.note-card p { font-size: 13px; color: var(--grey); white-space: pre-wrap; word-break: break-word; }
.note-card .note-actions { display: flex; gap: 8px; margin-top: 9px; }
.note-card .note-del {
  background: none; border: none; cursor: pointer;
  color: var(--grey-2); font-size: 12px; padding: 0;
}
.note-card .note-del:hover { color: var(--gold-deep); }
.empty { font-size: 13px; padding: 16px 0; }

.note-form { display: flex; flex-direction: column; gap: 9px; }

/* ── the vault import/export ───────────────────────────────── */
.vault-io { margin-top: 22px; text-align: left; }
.vault-io hr { border: none; border-top: 1px solid var(--line); margin: 0 0 16px; }
.small { font-size: 12px; color: var(--grey); margin-bottom: 9px; }
.io-row { display: flex; gap: 9px; flex-wrap: wrap; }
#vault-info { margin-top: 9px; }

/* ── narrow screens ────────────────────────────────────────── */
@media (max-width: 760px) {
  .content { grid-template-columns: 1fr; padding: 14px; }
  .gen-controls { grid-template-columns: 1fr 1fr; }
  .bar { padding: 12px 14px; }
}
