:root {
  --navy: #071833;
  --gold: #f5c400;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e6edf5;
  --green: #15803d;
  --red: #b91c1c;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eef3f9;
}
button, input { font-family: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.wrap { max-width: 760px; margin: 0 auto; min-height: 100vh; }

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--navy);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  box-shadow: 0 8px 20px rgba(7, 24, 51, 0.18);
}
.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand strong { font-size: 18px; letter-spacing: -0.02em; }
.brand span { display: block; margin-top: 2px; color: rgba(255, 255, 255, 0.72); font-size: 12.5px; font-weight: 600; }
.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}
.live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  display: block;
}

.switch { display: flex; gap: 8px; overflow: auto; margin-top: 12px; padding-bottom: 2px; }
.switch button {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  text-align: left;
  min-width: 160px;
}
.switch button.on { background: var(--gold); color: #1a1a1a; }
.switch b, .switch small { display: block; }
.switch small { font-weight: 600; opacity: 0.8; margin-top: 2px; }

.event-name { margin: 12px 0 0; font-size: 20px; letter-spacing: -0.03em; }
.event-meta { margin: 3px 0 0; color: rgba(255, 255, 255, 0.75); font-size: 13px; font-weight: 600; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat {
  background: #fff;
  color: var(--ink);
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}
.stat.on { box-shadow: inset 0 0 0 2px #fff; }
.stat.ok.on { box-shadow: inset 0 0 0 2px var(--green); }
.stat.no.on { box-shadow: inset 0 0 0 2px var(--red); }
.stat b { display: block; font-size: 22px; line-height: 1.1; }
.stat span { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.stat.ok b { color: var(--green); }
.stat.no b { color: var(--red); }

.find {
  display: flex;
  align-items: center;
  margin-top: 10px;
  background: #fff;
  border-radius: 12px;
  padding: 0 12px;
  height: 44px;
}
.find input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 15px;
  background: transparent;
}

.sheet { padding: 14px 14px calc(24px + env(safe-area-inset-bottom)); }
#list-start { scroll-margin-top: 280px; }
.notice {
  background: #fff7ed;
  color: #9a3412;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 12px;
}
.empty {
  background: #fff;
  border-radius: 16px;
  padding: 22px 16px;
  text-align: center;
}
.empty h1 { margin: 0 0 6px; font-size: 22px; }
.empty p { margin: 0; color: var(--muted); }

.block-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 2px 8px;
}
.report-btn {
  width: 100%;
  border: 0;
  background: #fff;
  color: var(--navy);
  border-radius: 14px;
  height: 46px;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 12px;
}
.report-btn.on { background: var(--navy); color: #fff; }
.block-title h2 { margin: 0; font-size: 15px; }
.block-title button, .clear {
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 13px;
  padding: 0;
}

.halkas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.halka {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 10px;
}
.halka.on { border-color: #1d4ed8; box-shadow: inset 0 0 0 1px #1d4ed8; }
.halka strong { display: block; font-size: 14px; }
.halka em { display: block; margin-top: 2px; color: var(--muted); font-style: normal; font-size: 11.5px; font-weight: 600; min-height: 14px; }
.halka-counts { display: flex; gap: 10px; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.halka-counts b { font-size: 14px; }
.halka-counts .ok { color: var(--green); }
.halka-counts .no { color: var(--red); }

.person {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 8px;
}
.person.done { background: #f0fdf4; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  flex: 0 0 auto;
}
.who { flex: 1; min-width: 0; }
.who strong { display: block; font-size: 15px; }
.who a { color: #1d4ed8; font-weight: 700; font-size: 13px; text-decoration: none; }
.who small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 600; }
.mark, .undo {
  border: 0;
  border-radius: 10px;
  font-weight: 800;
  flex: 0 0 auto;
}
.mark {
  background: #16a34a;
  color: #fff;
  min-width: 84px;
  height: 42px;
  font-size: 14px;
}
.mark:disabled, .undo:disabled { opacity: 0.55; }
.undo {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
  height: 36px;
  padding: 0 10px;
}
.section-gap { height: 8px; }

@media (max-width: 560px) {
  .halkas { grid-template-columns: 1fr; }
}
