:root {
  --bg: #f2f2f7; --card: #ffffff; --text: #111114; --muted: #6e6e76; --line: #e3e3e8;
  --accent: #0a7cff; --accent-text: #ffffff; --warn-bg: #fff4e0; --warn-text: #7a4b00;
  --error: #d70015; --ok: #1f9d55; --chip: #eef2f7; --input: #f2f2f7;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000000; --card: #1c1c1e; --text: #f2f2f7; --muted: #9a9aa2; --line: #2c2c30;
    --accent: #2f8cff; --warn-bg: #3a2a0d; --warn-text: #ffd48a; --error: #ff6961; --chip: #2a2a2e; --input: #2a2a2e; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.wrap { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h1 { font-size: 28px; margin: 8px 0 4px; letter-spacing: -0.02em; }
.sub { color: var(--muted); margin: 0 0 16px; }
.session { color: var(--muted); font-size: 13px; text-align: right; white-space: nowrap; }
.session a { color: var(--accent); text-decoration: none; font-weight: 600; }
.warn { background: var(--warn-bg); color: var(--warn-text); border-radius: 14px; padding: 12px 14px; margin: 0 0 16px; font-size: 15px; }
.hidden { display: none; }
.steps { background: var(--card); border-radius: 16px; padding: 4px 16px; margin: 0 0 24px; }
.steps summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; }
.steps summary::-webkit-details-marker { display: none; }
.steps summary::after { content: "⌄"; color: var(--muted); }
.steps[open] summary::after { content: "⌃"; }
.steps ol { margin: 0 0 14px; padding-left: 20px; }
.steps li { margin: 6px 0; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 24px 4px 8px; font-weight: 600; }
.list { background: var(--card); border-radius: 16px; overflow: hidden; }
.app { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.app:first-child { border-top: 0; }
.icon { width: 56px; height: 56px; border-radius: 13px; flex: none; object-fit: cover; background: var(--chip);
  display: grid; place-items: center; font-weight: 700; font-size: 22px; color: var(--muted); }
.meta { flex: 1; min-width: 0; }
.name { font-weight: 600; }
.detail { color: var(--muted); font-size: 13px; line-height: 1.3; margin-top: 2px; }
.btn { flex: none; border: 0; border-radius: 999px; background: var(--chip); color: var(--accent); font-weight: 700;
  font-size: 15px; padding: 7px 16px; text-decoration: none; }
.btn.done { color: var(--ok); }
.btn.busy { color: var(--muted); }
.qr { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.qr img { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 8px; display: block; margin: 0 auto 8px; }
@media (max-width: 700px), (pointer: coarse) { .qr { display: none; } }
.foot { color: var(--muted); font-size: 13px; margin: 24px 4px 0; }
.empty { padding: 20px 16px; color: var(--muted); }

/* login */
.login { max-width: 380px; margin: 12vh auto 0; padding: 0 16px; }
.login .card { background: var(--card); border-radius: 18px; padding: 22px 18px; }
.login h1 { margin: 0 0 4px; font-size: 26px; }
.login p { color: var(--muted); margin: 0 0 18px; }
.login label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.login input { width: 100%; font: inherit; color: var(--text); background: var(--input); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; outline: none; }
.login input:focus { border-color: var(--accent); }
.login button { width: 100%; margin-top: 18px; font: inherit; font-weight: 700; color: var(--accent-text);
  background: var(--accent); border: 0; border-radius: 12px; padding: 13px; }
.login .error { color: var(--error); margin: 0 0 6px; font-size: 15px; }
