:root {
  --bg: #0e0e11;
  --panel: #191920;
  --panel-2: #21212b;
  --line: #2c2c38;
  --text: #ecebf0;
  --muted: #9a99a8;
  --accent: #c1416b;
  --accent-2: #7a3ff2;
  --ok: #3ecf8e;
  --warn: #f5a623;
  --danger: #e14b4b;
  --radius: 14px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding: 20px 16px 48px;
}

.wrap { max-width: 480px; margin: 0 auto; }

header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
h1 { font-size: 1.15rem; font-weight: 650; margin: 0; letter-spacing: .3px; }
.role-tag { font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }

/* status chips */
.pills { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.pill {
  font-size: .74rem; padding: 5px 10px; border-radius: 999px;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 6px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--danger); }
.dot.warn { background: var(--warn); }

/* main lock card */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-bottom: 16px;
}
.lockface { text-align: center; padding: 14px 0 6px; }
.lock-emoji { font-size: 3.2rem; line-height: 1; }
.lock-word { font-size: 1.1rem; font-weight: 650; margin-top: 8px; letter-spacing: 1px; }
.lock-word.locked { color: var(--accent); }
.lock-word.unlocked { color: var(--ok); }
.countdown { font-size: 2.9rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: 10px 0 2px; }
.countdown.hidden-time { font-size: 1.4rem; color: var(--muted); font-weight: 500; }
.sub-note { color: var(--muted); font-size: .8rem; }

.flags { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

/* controls */
.section-title { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 6px 0 10px; }
.row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
label.inline { font-size: .9rem; color: var(--muted); flex: 1; }

input[type="number"] {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; padding: 12px 14px; font-size: 1rem;
}
button {
  border: none; border-radius: 10px; padding: 13px 16px; font-size: .95rem;
  font-weight: 600; cursor: pointer; color: #fff; background: var(--accent-2);
  transition: filter .12s ease, opacity .12s ease;
}
button:hover { filter: brightness(1.1); }
button:active { filter: brightness(.95); }
button:disabled { opacity: .4; cursor: not-allowed; }
button.wide { width: 100%; }
button.lock { background: var(--accent); }
button.release { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
button.danger { background: var(--danger); }
button.ghost { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* toggle switch */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.track { width: 40px; height: 23px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; position: relative; transition: background .15s; }
.track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + .track { background: var(--accent-2); }
.switch input:checked + .track::after { transform: translateX(17px); background: #fff; }

/* event log */
.log { font-family: ui-monospace, Menlo, monospace; font-size: .76rem; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; max-height: 150px; overflow-y: auto; }
.log div { padding: 2px 0; border-bottom: 1px solid var(--line); }
.log div:last-child { border-bottom: none; }

.hint { color: var(--muted); font-size: .78rem; line-height: 1.5; margin-top: 14px; }
.landing a { display: block; text-align: center; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 600; margin-bottom: 14px; }
