:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111318;
  --muted: #6b7280;
  --line: #e7e9ee;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --ok-line: #abefc6;
  --bad: #b42318;
  --bad-bg: #fef3f2;
  --ink: #111318;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 8% -10%, #ffffff 0%, transparent 55%),
    var(--bg);
}
button, input { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; }

.wrap { max-width: 760px; margin: 0 auto; padding: 28px 18px 72px; }
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -8px 14px;
  padding: 4px 8px 10px;
  background:
    linear-gradient(var(--bg) 70%, rgba(243, 244, 246, .92) 100%);
  backdrop-filter: blur(8px);
}

header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.brand { display: flex; gap: 12px; align-items: center; flex: 1; }
.logo {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 750;
  letter-spacing: -.03em;
  display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(17, 19, 24, .18);
}
h1 { margin: 0; font-size: 1.18rem; letter-spacing: -.03em; }
.sub { margin: 3px 0 0; color: var(--muted); font-size: .8rem; }

.ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 13px;
  font-weight: 600;
  font-size: .86rem;
}
.ghost:hover { background: #f8fafc; }
.hdr-acts { display: flex; gap: 8px; flex-shrink: 0; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.worker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  white-space: nowrap;
}
.worker::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c7ccd6;
}
.worker.on {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: var(--ok-line);
}
.worker.on::before { background: #12b76a; }
.worker.off {
  background: var(--bad-bg);
  color: var(--bad);
  border-color: #fecdca;
}
.worker.off::before { background: #f04438; }

.cookie-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 14px;
}
.cookie-box .hint { margin: 0 0 8px; color: var(--muted); font-size: .8rem; }
.cookie-box textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  min-height: 90px;
  margin-bottom: 10px;
  resize: vertical;
}
.notice {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  margin: 0 0 14px;
}
.notice-title {
  margin: 0;
  font-weight: 750;
  font-size: .95rem;
  letter-spacing: -.02em;
}
.maint-banner {
  background: #fff7ed;
  border-color: #fed7aa;
}
.maint-banner .notice-title { color: #9a3412; }
.maint-banner .notice-msg { color: #c2410c; }
.maint-card {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  padding: 28px 18px;
  text-align: center;
}
.maint-card .notice-title { color: #9a3412; font-size: 1.05rem; }
.maint-card .notice-msg { color: #c2410c; margin-top: 8px; }
body.maint .toolbar { display: none; }
.notice-msg {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.45;
}
.toolbar { margin-bottom: 10px; }
.toolbar input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.toolbar input:focus {
  outline: none;
  border-color: #c7ccd6;
  box-shadow: 0 0 0 4px rgba(17, 19, 24, .06);
}

.warn {
  background: var(--bad-bg);
  color: var(--bad);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 12px;
  font-size: .88rem;
}
.warn.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.banner {
  align-items: center;
  gap: 16px;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0;
  border: 1px solid transparent;
}
.banner:not([hidden]).wait,
.banner:not([hidden]).ok,
.banner:not([hidden]).warn {
  display: flex;
}
.banner[hidden],
.banner:not(.wait):not(.ok):not(.warn),
.pct-block[hidden],
.banner.ok .pct-block,
.banner.warn .pct-block,
#btn-cancel[hidden] {
  display: none !important;
}
.banner.warn {
  background: var(--bad-bg);
  color: var(--bad);
  border-color: #fecdca;
}
.banner.ok {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: var(--ok-line);
}
.banner.wait {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}
.banner-copy { min-width: 0; }
.banner-title {
  margin: 0;
  font-weight: 750;
  font-size: 1rem;
  letter-spacing: -.02em;
}
.banner-msg {
  margin: 4px 0 0;
  font-size: .86rem;
  line-height: 1.4;
  opacity: .92;
}
.pct-block {
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 7.2rem;
}
.pct-block:not([hidden]) {
  display: flex;
}
.pct {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: .01em;
  line-height: 1;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.bar {
  width: 7.2rem;
  height: 7px;
  background: #fed7aa;
  border-radius: 999px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: #ea580c;
  border-radius: inherit;
  transition: width .25s linear;
}
.member.waiting {
  border-color: #fed7aa;
  background: linear-gradient(#fff, #fffaf5);
}
.wait-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 8.2rem;
}
.wait-box .pct { font-size: 1.45rem; color: #9a3412; }
.wait-box .bar { width: 100%; max-width: 8.2rem; background: #ffedd5; }
.wait-lbl {
  color: #c2410c;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.note { color: var(--muted); font-size: .84rem; padding: 18px 4px; }
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 12px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 600;
  text-align: center;
}
.loading p { margin: 0; }
.spin {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.seats {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
}
.cards { display: flex; flex-direction: column; gap: 8px; }
.member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.member.on {
  border-color: var(--ok-line);
  background: linear-gradient(#fff, #f7fdf9);
}
.member.blocked {
  border-color: #fecdca;
  background: linear-gradient(#fff, #fffbfa);
}
.mail {
  font-weight: 650;
  letter-spacing: -.01em;
  font-family: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}
.meta { color: var(--muted); font-size: .8rem; margin-top: 3px; }
.when { color: #8b93a1; font-size: .75rem; margin-top: 5px; }
.acts { flex-shrink: 0; }
.act {
  background: var(--ink);
  color: #fff;
  border-radius: 11px;
  padding: 9px 14px;
  font-weight: 650;
  font-size: .86rem;
}
.act:hover { filter: brightness(1.12); }
.act:disabled { opacity: .55; cursor: wait; }
.done {
  display: inline-flex;
  align-items: center;
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok-line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .78rem;
  font-weight: 700;
}
.done.lock {
  background: var(--bad-bg);
  color: var(--bad);
  border-color: #fecdca;
}
@media (max-width: 600px) {
  .member { flex-direction: column; align-items: flex-start; }
  .acts { width: 100%; }
  .act { width: 100%; }
  .banner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .pct { font-size: 2rem; }
  .bar { width: 8rem; }
  .wait-box { align-items: flex-start; width: 100%; }
  .wait-box .bar { max-width: none; }
}
