:root {
  --brand: #6d5bd0;
  --brand-dark: #5847b3;
  --ink: #1d1b2e;
  --muted: #6b6880;
  --line: #e7e4f0;
  --bg: #faf9fd;
  --card: #ffffff;
  --ok: #1f9d6b;
  --warn: #d97706;
  --danger: #d23f5a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(29, 27, 46, 0.06), 0 8px 24px rgba(29, 27, 46, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; }

/* top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand .dot { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--brand), #9b8bf0); }

/* hero */
.hero { padding: 72px 0 48px; text-align: center; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); letter-spacing: -0.03em; margin: 0 0 16px; }
.hero p.sub { font-size: 19px; color: var(--muted); max-width: 600px; margin: 0 auto 28px; }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; color: var(--brand-dark);
  background: #efeafc; padding: 6px 12px; border-radius: 999px; margin-bottom: 20px; letter-spacing: .02em; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: #fff; text-decoration: none; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: #f4f2fb; }
.btn.sm { padding: 7px 13px; font-size: 14px; border-radius: 8px; }
.btn.danger { background: #fff; color: var(--danger); border-color: #f3c9d2; }
.btn.danger:hover { background: #fdeef1; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* cards & grid */
.grid { display: grid; gap: 18px; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .cols-3 { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.feature h3 { margin: 6px 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.feature .ico { font-size: 24px; }

/* forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #45425c; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px #efeafc;
}
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* notices */
.notice { padding: 11px 14px; border-radius: 9px; font-size: 14px; margin-bottom: 14px; }
.notice.error { background: #fdeef1; color: #a32339; border: 1px solid #f3c9d2; }
.notice.ok { background: #e8f7f0; color: #15724f; border: 1px solid #bce6d4; }
.notice.info { background: #eef1fd; color: #3a4699; border: 1px solid #ccd4f5; }
.hidden { display: none !important; }

/* tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 24px 0; }
.tabs button {
  font: inherit; font-weight: 600; background: none; border: none; cursor: pointer;
  padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--brand-dark); border-bottom-color: var(--brand); }

/* session list */
.session {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px;
}
.session .bar { width: 5px; align-self: stretch; border-radius: 4px; background: var(--brand); }
.session .meta { flex: 1; min-width: 0; }
.session .meta .when { font-weight: 700; }
.session .meta .what { color: var(--muted); font-size: 14px; }
.session .cap { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.badge.full { background: #fdeef1; color: #a32339; }
.badge.open { background: #e8f7f0; color: #15724f; }

.muted { color: var(--muted); }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.flex { display: flex; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
footer { color: var(--muted); font-size: 14px; padding: 40px 0; text-align: center; }

table.roster { width: 100%; border-collapse: collapse; }
table.roster th, table.roster td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
table.roster th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(29,27,46,.45); display: flex;
  align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 460px; box-shadow: var(--shadow); }
.modal h3 { margin-top: 0; }
