/* Emkay's look (ovos-visage's colours), as the store: near-black, white type, the Mark II blue. */
:root {
  --bg: #05070a; --card: #10161e; --card-hi: #16202b; --line: #1f2a37;
  --fg: #ffffff; --muted: #8a96a8; --accent: #1e9bff; --accent-dim: #0f4c80;
  --accent-soft: rgba(30, 155, 255, 0.16);
  --ok: #3ddc84; --bad: #ff5c5c; --warn: #ffc93c;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); }
a { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px; background: rgba(5, 7, 10, .92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none;
  font-size: 20px; font-weight: 600; letter-spacing: .02em; margin-right: auto; }
.brand .eyes { width: 54px; height: 32px; }
.lang select { background: var(--card); color: var(--fg); border: 1px solid var(--line);
  border-radius: 18px; padding: 7px 10px; font: inherit; font-size: 14px; }
.open-emkay { background: var(--accent); color: #fff; text-decoration: none; padding: 8px 14px;
  border-radius: 18px; font-size: 14px; white-space: nowrap; }

main { max-width: 1000px; margin: 0 auto; padding: 18px 16px 30px; }
.tagline { color: var(--muted); font-size: 17px; line-height: 1.45; margin: 4px 0 18px; max-width: 46em; }
h2 { margin: 0 0 8px; font-size: 20px; }
h3 { margin: 0; font-size: 16px; }
p { line-height: 1.45; }
.muted, .hint { color: var(--muted); font-size: 14px; }
.error { color: var(--bad); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin: 0 0 14px; }
.card.big { padding: 22px; }
.card p { color: #c7d0dc; margin: 6px 0 12px; }
details summary { cursor: pointer; font-weight: 600; }
.steps { color: #c7d0dc; line-height: 1.5; padding-left: 22px; margin: 6px 0 12px; }
.steps li { margin: 6px 0; }
input, select { font: inherit; font-size: 16px; color: var(--fg); background: #0b1016; border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 14px; outline: none; min-width: 0; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: flex; gap: 10px; }
.row input { flex: 1; }
.stack { display: grid; gap: 10px; max-width: 420px; }
.btn { font: inherit; font-size: 15px; color: var(--fg); background: #1f2a37; border: 0; border-radius: 18px;
  padding: 9px 16px; cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--accent); }
.btn.small { font-size: 13px; padding: 6px 12px; }
.btn.bad { background: transparent; color: var(--bad); border: 1px solid #4a2326; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }

.bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.tabs { display: inline-flex; background: #111821; border: 1px solid var(--line); border-radius: 99px; padding: 3px; margin-right: auto; }
.tabs button { font: inherit; font-size: 15px; border: 0; background: transparent; color: var(--muted);
  padding: 8px 16px; border-radius: 99px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: #1f2a37; color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.device { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; cursor: pointer;
  text-align: left; color: inherit; font: inherit; display: grid; gap: 6px; transition: background .15s, transform .15s, border-color .15s; }
.device:hover, .device:focus-visible { background: var(--card-hi); border-color: var(--accent-dim); transform: translateY(-2px); outline: none; }
.device .face { width: 72px; height: 42px; margin-bottom: 6px; }
.device.away .face { opacity: .45; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; }
.away .dot { background: var(--muted); }

.list { display: grid; gap: 8px; margin: 8px 0 18px; }
.item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 14px; }
.item .name { flex: 1; min-width: 0; }
.item .name small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; }
.icon { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--accent-soft);
  display: grid; place-items: center; overflow: hidden; color: var(--accent); font-weight: 700; }
.icon img { width: 26px; height: 26px; object-fit: contain; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { font: inherit; font-size: 13px; border-radius: 99px; padding: 5px 11px; cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--line); }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: #fff; border-color: var(--accent-dim); }
.chip.pending { border-style: dashed; }
.pending-note { color: var(--warn); font-size: 12px; }
.section-title { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 6px; }

.form { display: grid; gap: 10px; padding: 6px 0 4px; }
.form label { display: grid; gap: 5px; font-size: 14px; color: #c7d0dc; }
.form label.check { display: flex; align-items: center; gap: 10px; }
.form label.check input { width: 20px; height: 20px; accent-color: var(--accent); }

.qr { display: grid; justify-items: start; gap: 10px; }
.qr canvas { border-radius: 12px; background: #fff; max-width: 260px; width: 100%; height: auto; }
.search { width: 100%; margin-bottom: 14px; border-radius: 26px; padding: 13px 20px; }

footer { max-width: 1000px; margin: 0 auto; padding: 10px 16px 40px; color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .open-emkay { display: none; } .row { flex-direction: column; } }
