.hero h1 { margin-bottom: 6px; }
.hero .desc { white-space: pre-line; color: var(--muted); }

.rules { border-left: 4px solid var(--accent); }
.rules summary { cursor: pointer; font-weight: 700; }
.rules ol, .rules ul { margin: 10px 0 0; padding-left: 22px; }
.rules li + li { margin-top: 4px; }

.name-search { margin-bottom: 10px; }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.name-btn {
  text-align: left;
  padding: 12px 14px;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.name-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.name-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.name-btn .tag { font-size: 0.75rem; font-weight: 600; color: var(--ok); white-space: nowrap; }

.who {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.notice { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }

.q-card.invalid { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-soft); }
.q-head { display: flex; gap: 10px; align-items: baseline; }
.q-num { font-weight: 800; color: var(--accent); }
.q-title { font-size: 1.1rem; font-weight: 700; white-space: pre-line; }
.q-title .req { color: var(--danger); }
.q-desc { color: var(--muted); margin-top: 4px; white-space: pre-line; }
.q-rule { margin: 12px 0 10px; padding: 8px 12px; background: var(--bg); border-radius: 10px; font-size: 0.88rem; color: var(--muted); }
.q-rule b { color: var(--ink); }
.q-error { color: var(--danger); font-weight: 600; margin-top: 8px; font-size: 0.92rem; }
.q-counter { margin-top: 8px; font-size: 0.86rem; color: var(--muted); }
.q-counter.bad { color: var(--danger); font-weight: 600; }

.opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 8px;
  cursor: pointer;
  background: var(--card);
  transition: border-color 0.15s, background 0.15s;
}
.opt:hover { border-color: var(--accent); }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt.disabled { opacity: 0.5; cursor: not-allowed; }
.opt .mark {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 2px solid var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.8rem;
  font-weight: 800;
}
.opt .mark.radio { border-radius: 50%; }
.opt .mark.box { border-radius: 6px; }
.opt.on .mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.opt .body { flex: 1 1 auto; min-width: 0; }
.opt .otext { font-weight: 600; white-space: pre-line; }
.opt .odesc { color: var(--muted); font-size: 0.88rem; white-space: pre-line; }
.opt img.o-image { display: block; max-width: 100%; max-height: 200px; border-radius: 8px; margin-top: 8px; cursor: zoom-in; }

.scale-opt { cursor: default; display: block; }
.scale-opt.on { background: var(--accent-soft); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.chip {
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  font-weight: 700;
  position: relative;
}
.chip:hover:not(:disabled) { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.taken::after { content: ''; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.chip:disabled { opacity: 0.35; cursor: not-allowed; }
.chip.clear { min-width: 0; font-weight: 600; color: var(--muted); border-style: dashed; }
.scale-val { margin-left: auto; font-weight: 800; color: var(--accent); }

.savebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  z-index: 20;
}
.savebar .inner { max-width: 760px; margin: 0 auto; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.savebar .btn { min-width: 160px; }

.done { text-align: center; padding: 36px 18px; }
.done .tick {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  animation: pop 0.35s ease;
}
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.res-q + .res-q { margin-top: 18px; }
.bar-row { margin-top: 10px; }
.bar-row .top { display: flex; justify-content: space-between; gap: 10px; font-size: 0.92rem; }
.bar-row .meta { color: var(--muted); font-size: 0.82rem; }
