/* Social Match web UI — P1d. Vanilla CSS, no build step. */
:root {
  --bg: #f7f5f1;
  --ink: #1f2421;
  --muted: #5d6a63;
  --line: #dcd7cf;
  --card: #ffffff;
  --accent: #2f6f5e;
  --accent-ink: #ffffff;
  --ok-bg: #e2f3e8;
  --err-bg: #fbe4e0;
  --info-bg: #e8eef6;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { font-weight: 700; text-decoration: none; color: var(--ink); letter-spacing: -0.01em; }

.topbar nav { display: flex; align-items: center; gap: 1rem; }
.topbar nav a { text-decoration: none; color: var(--muted); font-size: 0.95rem; }
.topbar nav a:hover { color: var(--ink); }

main { flex: 1; width: 100%; max-width: 60rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

h1 { font-size: 1.6rem; margin: 0 0 0.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }
h3 { margin: 0 0 0.25rem; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.hero { padding: 1rem 0 0.5rem; }

.panel, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1rem 0;
  box-shadow: 0 1px 2px rgba(31, 36, 33, 0.04);
}

.card.narrow { max-width: 30rem; margin: 1.5rem auto; }
.match-card { max-width: 34rem; margin: 1.5rem auto; }

.stack { display: flex; flex-direction: column; gap: 0.85rem; }
.stack label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.92rem; color: var(--muted); }
label.check { flex-direction: row; align-items: flex-start; gap: 0.55rem; color: var(--ink); }

input, select, textarea {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="checkbox"] { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }

button, .button {
  font: inherit;
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { border-color: var(--accent); }
button:disabled { opacity: 0.55; cursor: progress; }

button.primary, .button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
button.yes { background: var(--ok-bg); border-color: #b9dcc6; }
button.no { background: var(--err-bg); border-color: #efc4bc; }
button.danger { background: #fff; border-color: #e2b6ae; color: #8c2f22; }
button.secondary { background: #f2f0ec; }
button.linklike { border: none; background: none; color: var(--muted); padding: 0; }

.notice {
  border-radius: 9px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  background: #f4f2ee;
  font-size: 0.92rem;
}
.notice.ok { background: var(--ok-bg); border-color: #b9dcc6; }
.notice.error { background: var(--err-bg); border-color: #efc4bc; }
.notice.info { background: var(--info-bg); border-color: #c7d5e8; }

.cards { display: grid; gap: 0.9rem; }
.card.candidate { margin: 0; }

.card-head { display: flex; align-items: center; gap: 0.9rem; }
.card-head h1 { margin: 0; font-size: 1.35rem; }
.card-head > div { flex: 1; }

.avatar {
  font-size: 1.8rem;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  background: #f2f0ec;
  border-radius: 50%;
  flex: none;
}

.pill {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #eeeae3;
  color: var(--muted);
}

.window { font-size: 1.15rem; margin: 1rem 0 0.15rem; }

.reasons { margin: 1rem 0 0.5rem; }
.reasons p { margin: 0.2rem 0; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.tag {
  font-size: 0.8rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #eef3f0;
  border: 1px solid #d3e2db;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.counter { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }

.steps { margin: 0.5rem 0 1rem; padding-left: 1.25rem; }
.steps li { margin: 0.3rem 0; }

.pair-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #faf8f5;
}

.doc-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.95rem;
  margin: 0;
}

.panel.danger { border-color: #e2b6ae; background: #fffaf9; }

.foot {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  padding: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (max-width: 560px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .actions { flex-direction: column; }
  .actions button { width: 100%; }
}
