:root {
  --bg: #f6f6fb;
  --surface: #ffffff;
  --text: #1c1e33;
  --muted: #5d6079;
  --line: #dcdcea;
  --accent: #2b2f6b;
  --accent-text: #ffffff;
  --warn-bg: #fff4d6;
  --warn-text: #5c4300;
  --error: #b3261e;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12131c;
    --surface: #1c1e2b;
    --text: #e9e9f2;
    --muted: #a3a5bd;
    --line: #2f3245;
    --accent: #8f95ff;
    --accent-text: #12131c;
    --warn-bg: #3a3014;
    --warn-text: #ffe39a;
    --error: #ff8a80;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 1.0625rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: env(safe-area-inset-bottom);
}
.bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: calc(.75rem + env(safe-area-inset-top)) 1rem .75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 1.15rem; }
.tag {
  margin-left: auto;
  font-size: .75rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn-text);
}
main { max-width: 32rem; margin: 0 auto; padding: 1rem; }
h2 { font-size: 1.2rem; margin: 1.25rem 0 .5rem; }
.muted { color: var(--muted); }
.message {
  padding: .75rem 1rem;
  border-radius: 10px;
  background: var(--warn-bg);
  color: var(--warn-text);
}
.error { color: var(--error); margin: .25rem 0; }
button { font: inherit; cursor: pointer; }
.primary, .secondary {
  display: block;
  width: 100%;
  padding: .8rem 1rem;
  margin: .5rem 0;
  border-radius: 12px;
  border: 1px solid var(--accent);
}
.primary { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.secondary { background: transparent; color: var(--accent); }
.big { padding: 1.1rem 1rem; font-size: 1.15rem; }
.link {
  background: none;
  border: 0;
  padding: .25rem 0;
  color: var(--accent);
  text-decoration: underline;
}
.danger { color: var(--error); }
.list-head { display: flex; align-items: baseline; justify-content: space-between; }
.people { list-style: none; padding: 0; margin: 0; }
.people li { display: flex; gap: .5rem; align-items: stretch; margin: .5rem 0; }
.person {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .1rem .75rem;
  text-align: left;
  padding: .75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.person .name { font-weight: 600; }
.person .pnr { font-variant-numeric: tabular-nums; color: var(--muted); }
.person .note { grid-column: 1 / -1; font-size: .875rem; color: var(--muted); }
.choose .person { border-color: var(--accent); }
.tools { display: flex; flex-direction: column; gap: .25rem; }
.icon {
  width: 2.25rem;
  flex: 1;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.icon:disabled { opacity: .35; cursor: default; }
.camera {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}
.camera video { width: 100%; height: 100%; object-fit: cover; }
.card {
  padding: 1.25rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}
.who { font-size: 1.3rem; font-weight: 700; margin: 0; }
.pnr { font-variant-numeric: tabular-nums; }
.card .pnr { color: var(--muted); margin: .25rem 0 0; }
.stack { display: flex; flex-direction: column; gap: .35rem; }
.stack label { margin-top: .5rem; font-weight: 600; font-size: .95rem; }
input, textarea {
  font: inherit;
  width: 100%;
  padding: .65rem .75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
textarea { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }
details { margin: 1rem 0; }
summary { cursor: pointer; color: var(--accent); }
.footer-links { margin-top: 1.5rem; text-align: center; }
[hidden] { display: none !important; }
