/* lockbox 0.12.0 */
:root {
  --bg: #0c0d10;
  --panel: #16181e;
  --ink: #ece8df;
  --dim: #8b867c;
  --line: #2a2d36;
  --accent: #d4b483;
  --ok: #8fbf88;
  --bad: #d98980;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(circle at top, #1b1d24 0%, var(--bg) 55%);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.4;
}
.mono, .hint, .tabs a, .txt, button, input, select, textarea, .locknote, .foot, .status, .brand, .key {
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.noise { display: none; }
.sr { position: absolute; left: -9999px; }

.lock-body, .is-pin {
  min-height: 100vh;
}
.lock-wrap, .pinwrap {
  width: min(380px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 28px;
  padding: 32px 16px 48px;
}
.dial {
  position: relative;
  margin: 18px auto 0;
  width: 280px;
  height: 280px;
}
.dial-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #2a2c32 0deg 4deg, #111 4deg 10deg);
  box-shadow: var(--shadow), inset 0 0 0 10px #0a0a0c;
}
.dial-face {
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #1e2026, #121318);
  border: 1px solid #3a3d46;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 16px 12px;
}
.shackle {
  position: absolute;
  top: -54px;
  width: 88px;
  height: 70px;
  border: 10px solid #cfc7b6;
  border-bottom: none;
  border-radius: 44px 44px 0 0;
  box-shadow: inset 0 8px 10px rgba(255,255,255,0.12);
}
.eyebrow, .host {
  margin: 16px 0 8px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--dim);
  font-weight: 500;
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.slots { display: flex; gap: 6px; margin-bottom: 4px; }
.slots span {
  width: 16px;
  height: 24px;
  border-bottom: 2px solid #5c584f;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.slots span.filled::after { content: "•"; font-size: 20px; }
#pinjoin {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}
.status, .locknote {
  min-height: 1.3em;
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--dim);
}
.locknote, .status.error, .pin-bad .status { color: var(--bad); }
.pin-bad .dial-face { box-shadow: inset 0 0 0 1px var(--bad); }

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.key, .btn, button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #1a1c22;
  color: var(--ink);
  border-radius: 14px;
}
.key {
  height: 56px;
  font-size: 20px;
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.key:hover, .btn:hover, button:hover { border-color: var(--accent); }
.key:disabled, button:disabled { opacity: 0.4; cursor: not-allowed; }
.key.ghost { color: var(--dim); }
.key.ok { background: #2a2418; color: var(--accent); border-color: #5a4b2e; }

.setup {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 8px;
}
.setup input { width: 100%; }

.vault-body { min-height: 100vh; }
.bar, .topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 13, 16, 0.88);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(8px);
}
.brand, .bar .host {
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
  margin: 0;
  color: var(--ink);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs a, .txt, button.txt {
  color: var(--dim);
  text-decoration: none;
  font-size: 13px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 10px;
  letter-spacing: 0.04em;
}
.tabs a.on, .tabs a:hover, .txt:hover {
  color: var(--accent);
  border-color: #5a4b2e;
  background: #2a2418;
}
.outform { margin: 0; }
.barsp { flex: 1; }

.board, .wiki, .editpane, .vault {
  width: min(980px, calc(100% - 32px));
  margin: 28px auto 48px;
}
.searchbar { width: min(980px, calc(100% - 32px)); margin: 22px auto 0; }
.searchbar input, input[type="search"], input[type="text"], input:not([type]), input[name], select, textarea {
  background: #121318;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}
.searchbar input { width: 100%; max-width: 420px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }

.sec { margin: 22px 0 8px; }
.sec h2, .edh {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.tile:hover, .tile:focus {
  outline: none;
  border-color: var(--accent);
  background: #1c1f27;
}
.tile.dead { opacity: 0.55; }
.ico { font-size: 20px; color: var(--accent); }
.tn { font-size: 16px; font-weight: 600; word-break: break-word; }
.none, .empty, .hint, .lede, .dim { color: var(--dim); font-family: ui-sans-serif, system-ui, sans-serif; }
.hint { font-size: 12px; }
.foot {
  text-align: center;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 8px 16px 28px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
h1, h2 { margin: 0 0 8px; font-weight: 600; }
h1 { font-size: 28px; }
.wiki { max-width: 760px; }
.wikibody h2, .wikibody h3 { font-size: 22px; margin: 1.1em 0 0.4em; }
.wikibody a { color: var(--accent); }
.wikibody code {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  background: #121318;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 5px;
}
.wikibody hr { border: 0; border-top: 1px solid var(--line); }
.wikiedit { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 12px; }
.wikiedit summary { cursor: pointer; color: var(--dim); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px; }
textarea { width: 100%; margin: 10px 0; resize: vertical; line-height: 1.45; }

.editpane { max-width: 860px; }
.meta, .addform, .edform { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.meta, .addform {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin: 0 0 16px;
}
label { color: var(--dim); font-size: 13px; font-family: ui-sans-serif, system-ui, sans-serif; }
input.url { min-width: 220px; flex: 1; }
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 10px 16px;
  font-size: 14px;
}
button.danger, .btn.danger { color: var(--bad); }
.edlist { list-style: none; margin: 0; padding: 0; }
.edrow {
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 10px;
  padding: 12px;
  background: var(--panel);
}
.edico { width: 28px; padding-top: 8px; }
.edfields { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; min-width: 200px; }
.edacts { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { display: inline-flex; align-items: center; gap: 6px; }
.addlab { width: 100%; margin: 0 0 4px; color: var(--dim); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.flash, .banner {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1a1c22;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
}
.banner.ok { color: var(--ok); }
.banner.error, .flash { color: var(--bad); }

.iconpick {
  flex: 1 1 100%;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #121318;
}
.iplab { display: block; color: var(--dim); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.iprow { display: flex; align-items: center; gap: 8px; }
.ipprev { font-size: 18px; color: var(--accent); width: 1.3em; }
.ipcls { font-size: 11px; color: var(--dim); white-space: nowrap; }
.js-fa-q { flex: 1; min-width: 0; }
.faresults[hidden] { display: none; }
.faresults {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 6px;
  margin-top: 8px;
  max-height: 180px;
  overflow: auto;
}
.fahit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  background: #1a1c22;
  color: var(--ink);
  padding: 8px 4px;
  cursor: pointer;
  font-size: 10px;
  border-radius: 10px;
}
.fahit:hover { border-color: var(--accent); color: var(--accent); }
.fahit i { font-size: 16px; color: var(--accent); }
.faempty { color: var(--dim); font-size: 12px; padding: 8px; grid-column: 1 / -1; }

.upload { display: flex; gap: 10px; align-items: center; margin: 18px 0 8px; flex-wrap: wrap; }
.drop {
  flex: 1;
  min-width: 220px;
  border: 1px dashed #3d414c;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--dim);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
}
.drop input { width: 100%; color: var(--ink); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.count {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}
.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.file-meta { display: grid; gap: 4px; }
.file-meta strong { word-break: break-all; }
.file-meta span { color: var(--dim); font-size: 12px; font-family: ui-sans-serif, system-ui, sans-serif; }
.actions { display: flex; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.btn.small, button.small { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.btn.ghost, button.ghost { background: transparent; }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .bar { flex-wrap: wrap; }
  .dial { width: 250px; height: 250px; }
  .dial-face { inset: 26px; }
}

.savestrip {
  position: sticky;
  bottom: 12px;
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}
.save-all {
  min-width: 120px;
  background: var(--accent);
  color: #1a140c;
  border-color: var(--accent);
  font-weight: 600;
}
