:root {
  --bg: #0f041a;
  --bg-raised: #180924;
  --bg-strong: #241033;
  --ink: #fbf7ff;
  --ink-muted: #c9b8d6;
  --line: #3a214b;
  --brand: #49156d;
  --brand-strong: #b561d1;
  --brand-rgb: 73 21 109;
  --brand-contrast: #ffffff;
  --accent: #ff8a4c;
  --accent-rgb: 255 138 76;
  --danger: #e85b65;
  --ok: #55d18f;
  --shadow: 0 20px 50px rgba(8, 0, 16, 0.42);
  --radius: 8px;
  --container: 1160px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  --bg: #fff7f1;
  --bg-raised: #ffffff;
  --bg-strong: #f4e5f4;
  --ink: #170b20;
  --ink-muted: #67536f;
  --line: #dfc9e6;
  --brand: #49156d;
  --brand-strong: #7f2ca6;
  --brand-rgb: 73 21 109;
  --brand-contrast: #ffffff;
  --accent: #d86233;
  --accent-rgb: 216 98 51;
  --danger: #bd3140;
  --ok: #197b4c;
  --shadow: 0 16px 38px rgba(73, 21, 109, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgb(var(--brand-rgb) / 0.08), transparent 360px),
    var(--bg);
  font-family: var(--font);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.narrow {
  width: min(760px, calc(100% - 32px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgb(var(--brand-rgb) / 0.2);
  background: rgba(15, 4, 26, 0.86);
  backdrop-filter: blur(14px);
}

html[data-theme="light"] .site-header {
  background: rgba(255, 247, 241, 0.9);
}

.header-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--bg-raised);
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a,
.theme-toggle {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink-muted);
  background: transparent;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.nav-links a:hover,
.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .theme-toggle:hover {
  background: rgba(20, 23, 28, 0.04);
}

.hero {
  position: relative;
  min-height: clamp(280px, 38svh, 420px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background-image:
    linear-gradient(115deg, rgba(15, 4, 26, 0.94) 0%, rgba(73, 21, 109, 0.62) 48%, rgba(255, 138, 76, 0.32) 78%, rgba(255, 190, 106, 0.18) 100%),
    url("/assets/hero-roleplay.svg");
  background-size: cover;
  background-position: center;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 4, 26, 0.96) 0%, rgba(73, 21, 109, 0.62) 46%, rgba(255, 138, 76, 0.12) 100%),
    linear-gradient(180deg, rgba(15, 4, 26, 0.08), rgba(15, 4, 26, 0.86));
}

html[data-theme="light"] .hero-shade {
  background:
    linear-gradient(90deg, rgba(255, 247, 241, 0.96) 0%, rgba(255, 247, 241, 0.74) 44%, rgba(255, 138, 76, 0.1) 100%),
    linear-gradient(180deg, rgba(255, 247, 241, 0.08), rgba(255, 247, 241, 0.8));
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 64px 0 34px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 14px;
  border: 1px solid rgb(var(--brand-rgb) / 0.44);
  border-radius: var(--radius);
  color: var(--brand-strong);
  background: rgb(var(--brand-rgb) / 0.12);
  padding: 5px 10px;
  font-size: 0.88rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: 5.2rem;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  max-width: 820px;
  margin-bottom: 12px;
  font-size: 2.3rem;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
  line-height: 1.2;
}

.hero-copy {
  max-width: 660px;
  color: var(--ink-muted);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}

.btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.btn-primary {
  color: var(--brand-contrast);
  background: var(--brand);
  box-shadow: 0 12px 26px rgb(var(--brand-rgb) / 0.28);
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-secondary {
  color: var(--ink);
  border-color: rgb(var(--accent-rgb) / 0.42);
  background: rgb(var(--accent-rgb) / 0.16);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.btn-ghost {
  color: var(--ink-muted);
  border-color: var(--line);
  background: transparent;
}

.hero-strip {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(247, 243, 234, 0.16);
  background: rgba(12, 15, 20, 0.68);
  box-shadow: var(--shadow);
}

html[data-theme="light"] .hero-strip {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(20, 23, 28, 0.12);
}

.hero-strip span {
  min-height: 70px;
  padding: 14px;
  border-right: 1px solid rgba(247, 243, 234, 0.12);
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-strip span:last-child {
  border-right: 0;
}

.hero-strip strong {
  color: var(--ink);
}

.section {
  padding: 78px 0;
}

.panel-section {
  padding: 52px 0 70px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgb(var(--accent-rgb) / 0.07), transparent 270px),
    var(--bg-raised);
}

.admin-section {
  background: var(--bg);
}

.section-head {
  margin-bottom: 28px;
}

.section-head p:not(.eyebrow) {
  max-width: 720px;
  color: var(--ink-muted);
}

.section-head.compact {
  margin-bottom: 22px;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.step-card,
.form-panel,
.member-profile,
.editor-panel,
.linked-card,
.admin-box,
.notice,
.locked-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
}

.step-card {
  min-height: 220px;
  padding: 20px;
}

.step-index {
  display: inline-flex;
  margin-bottom: 32px;
  color: var(--accent);
  font-weight: 900;
}

.step-card p,
.form-head p,
.member-profile p,
.locked-panel p,
.admin-box p {
  color: var(--ink-muted);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.65fr);
  gap: 16px;
  align-items: stretch;
}

.auth-copy {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgb(var(--brand-rgb) / 0.14), rgb(var(--accent-rgb) / 0.08)),
    var(--bg-raised);
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  align-content: center;
}

.auth-copy h3 {
  max-width: 560px;
  font-size: 2rem;
}

.auth-copy p {
  max-width: 620px;
  color: var(--ink-muted);
}

.auth-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.auth-highlights span {
  border: 1px solid rgb(var(--accent-rgb) / 0.36);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgb(var(--accent-rgb) / 0.12);
  padding: 8px 10px;
  font-weight: 800;
}

.auth-card {
  min-height: 100%;
}

.auth-switch {
  margin: 16px 0 0;
  color: var(--ink-muted);
}

.auth-switch a {
  border: 0;
  color: var(--accent);
  background: transparent;
  padding: 0;
  font-weight: 900;
  cursor: pointer;
}

.form-panel,
.editor-panel,
.admin-box,
.locked-panel {
  padding: 22px;
}

.form-head {
  margin-bottom: 18px;
}

.form-head p {
  margin-bottom: 0;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--ink-muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--bg);
  min-height: 44px;
  padding: 10px 12px;
  outline: none;
}

textarea {
  min-height: 126px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.16);
}

.form-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.form-status.success {
  color: var(--ok);
}

.form-status.error {
  color: var(--danger);
}

.notice {
  margin-bottom: 16px;
  padding: 14px 16px;
  color: var(--ink);
}

.notice.success {
  border-color: rgba(85, 209, 143, 0.5);
}

.notice.error {
  border-color: rgba(232, 91, 101, 0.55);
}

.member-shell {
  display: grid;
  gap: 16px;
}

.dashboard-shell {
  display: grid;
  gap: 16px;
}

.dashboard-top {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.dashboard-top p {
  color: var(--ink-muted);
}

.dashboard-actions {
  display: flex;
  justify-content: flex-end;
}

.dashboard-header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.dashboard-body {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.dashboard-nav {
  position: sticky;
  top: 88px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
  padding: 10px;
  display: grid;
  gap: 6px;
}

.dashboard-tab {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink-muted);
  background: transparent;
  padding: 0 12px;
  display: flex;
  align-items: center;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-tab:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.dashboard-tab.active {
  color: var(--brand-contrast);
  border-color: var(--brand);
  background: var(--brand);
}

.dashboard-content {
  min-width: 0;
}

.dashboard-note {
  margin: 16px 0 0;
  color: var(--ink-muted);
}

.dashboard-linked-preview {
  margin-top: 16px;
}

.dashboard-linked-preview .linked-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.panel-stack {
  display: grid;
  gap: 16px;
}

.member-profile {
  padding: 20px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: start;
}

.profile-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.meta-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--bg);
}

.meta-box > span {
  display: block;
  color: var(--ink-muted);
  font-size: 0.84rem;
}

.meta-box strong {
  display: block;
  overflow-wrap: anywhere;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 0 10px;
  color: var(--ink-muted);
  font-weight: 800;
}

.status-pill.ok {
  color: var(--ok);
  border-color: rgba(85, 209, 143, 0.5);
}

.status-pill.pending {
  color: var(--brand-strong);
  border-color: rgb(var(--brand-rgb) / 0.54);
}

.member-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.sub-panel {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.sub-panel h4 {
  margin: 0 0 12px;
}

.preline {
  white-space: pre-line;
}

.question-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 14px;
  padding: 14px;
}

.question-block legend {
  padding: 0 6px;
  font-weight: 800;
}

.qcm-choice-row {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
  color: var(--ink);
}

.radio-row input {
  width: 18px;
  min-height: 18px;
}

.linked-list {
  display: grid;
  gap: 10px;
}

.linked-grid {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  margin-top: 16px;
}

.staff-account-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 14px;
  margin-top: 12px;
}

.staff-account-head strong,
.staff-account-head small {
  display: block;
  overflow-wrap: anywhere;
}

.staff-account-head small {
  color: var(--ink-muted);
}

.oauth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.oauth-button {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--bg);
  padding: 14px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.oauth-button span {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
}

.oauth-button.discord span {
  background: #5865f2;
}

.oauth-button.steam span {
  background: #1b2838;
}

.oauth-button.twitch span {
  background: #9146ff;
}

.oauth-button strong,
.oauth-button small {
  display: block;
}

.oauth-button small {
  color: var(--ink-muted);
}

.oauth-button:hover {
  border-color: rgb(var(--accent-rgb) / 0.62);
  background: rgb(var(--accent-rgb) / 0.08);
}

.oauth-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.oauth-button.linked {
  border-color: rgba(85, 209, 143, 0.5);
}

.linked-card {
  padding: 14px;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  align-items: center;
}

.account-card {
  align-items: start;
  overflow: hidden;
}

.account-card.discord {
  border-color: rgba(88, 101, 242, 0.44);
}

.account-card.steam {
  border-color: rgba(91, 139, 179, 0.44);
}

.account-card.twitch {
  border-color: rgba(145, 70, 255, 0.44);
}

.linked-avatar {
  width: 62px;
  height: 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--bg);
  color: var(--brand-strong);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.account-body {
  min-width: 0;
}

.account-heading span,
.linked-card small {
  display: block;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

.account-heading strong {
  display: block;
  overflow-wrap: anywhere;
}

.account-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.account-facts span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 8px;
  min-width: 0;
}

.account-facts small,
.account-facts strong {
  display: block;
  overflow-wrap: anywhere;
}

.account-facts small {
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.linked-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.02);
}

.locked-panel {
  display: grid;
  gap: 12px;
}

.admin-workspace {
  display: grid;
  gap: 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.admin-box h3 {
  margin-bottom: 14px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-panel {
  display: grid;
  gap: 18px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.admin-tab {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--ink-muted);
  min-height: 38px;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.admin-tab.active {
  border-color: rgb(var(--accent-rgb) / 0.48);
  background: rgb(var(--accent-rgb) / 0.14);
  color: var(--ink);
}

.admin-tab-body {
  display: grid;
  gap: 14px;
}

.settings-checks,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.field-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.field-action-row label {
  margin-bottom: 0;
}

.staff-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.staff-toolbar h4,
.staff-toolbar p {
  margin: 0;
}

.staff-toolbar p {
  color: var(--ink-muted);
}

.staff-question-list,
.staff-session-list {
  display: grid;
  gap: 12px;
}

.staff-question-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.staff-question-card strong,
.staff-question-card small {
  display: block;
}

.staff-question-card small {
  color: var(--ink-muted);
}

.question-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.question-answer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 8px;
}

.question-answer-list span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-muted);
  background: var(--bg-raised);
  padding: 4px 8px;
  font-size: 0.86rem;
  font-weight: 700;
}

.question-answer-list .correct {
  border-color: rgba(85, 209, 143, 0.46);
  color: var(--ink);
  background: rgba(85, 209, 143, 0.12);
}

.question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.staff-voice-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 14px;
  display: grid;
  gap: 14px;
}

.staff-voice-form h4 {
  margin: 0;
}

.discord-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.discord-choice {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  padding: 10px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.discord-choice:hover,
.discord-choice.selected {
  border-color: rgb(var(--accent-rgb) / 0.58);
  background: rgb(var(--accent-rgb) / 0.12);
}

.discord-choice-icon,
.role-swatch {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgb(var(--accent-rgb) / 0.18);
  color: var(--ink);
  font-weight: 900;
}

.discord-choice-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.role-swatch {
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.2);
}

.discord-choice strong,
.discord-choice small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-choice small {
  color: var(--ink-muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
}

.modal-card {
  width: min(640px, 100%);
  max-height: min(760px, calc(100svh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
  padding: 18px;
}

.compact-modal form {
  display: grid;
  gap: 14px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.modal-head h3 {
  margin: 0;
}

.user-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.35fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.user-toolbar label {
  margin-bottom: 0;
}

.users-table small,
.muted {
  display: block;
  color: var(--ink-muted);
}

.users-table {
  min-width: 820px;
}

.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-list {
  margin-top: 0;
}

.role-badge {
  --role-color: var(--accent);
  --role-rgb: var(--accent-rgb);
  min-height: 28px;
  border: 1px solid rgb(var(--role-rgb) / 0.38);
  border-radius: var(--radius);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgb(var(--role-rgb) / 0.2), rgb(var(--role-rgb) / 0.08)),
    var(--bg);
  padding: 4px 9px;
  display: inline-grid;
  grid-template-columns: 15px max-content;
  align-items: center;
  column-gap: 8px;
  font-weight: 800;
  font-size: 0.84rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
  white-space: nowrap;
}

.role-badge svg {
  display: block;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  stroke: var(--role-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.role-badge span {
  display: inline;
  color: inherit;
  font-size: inherit;
  line-height: 1;
}

.discord-mention-badge {
  --role-color: #5865f2;
  --role-rgb: 88 101 242;
  appearance: none;
  cursor: pointer;
}

.discord-mention-badge:hover {
  border-color: rgb(var(--role-rgb) / 0.72);
  background:
    linear-gradient(135deg, rgb(var(--role-rgb) / 0.3), rgb(var(--role-rgb) / 0.12)),
    var(--bg);
}

.discord-at-icon {
  display: inline-grid !important;
  place-items: center;
  color: var(--role-color) !important;
  font-size: 0.94rem !important;
  font-weight: 950;
  line-height: 1 !important;
}

.role-user {
  --role-color: #4fb7ff;
  --role-rgb: 79 183 255;
}

.role-whitelist {
  --role-color: #58d884;
  --role-rgb: 88 216 132;
}

.role-recruiter {
  --role-color: #f2b84b;
  --role-rgb: 242 184 75;
}

.role-staff {
  --role-color: #b98cff;
  --role-rgb: 185 140 255;
}

.role-admin {
  --role-color: #ff6f84;
  --role-rgb: 255 111 132;
}

.role-list-profile {
  margin-top: 8px;
}

.role-meta-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.badge-meta-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.profile-badge {
  --badge-color: var(--accent);
  --badge-rgb: var(--accent-rgb);
  min-height: 32px;
  border: 1px solid rgb(var(--badge-rgb) / 0.42);
  border-radius: var(--radius);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgb(var(--badge-rgb) / 0.22), rgb(var(--badge-rgb) / 0.08)),
    var(--bg);
  padding: 5px 10px;
  display: inline-grid;
  grid-template-columns: 18px max-content;
  align-items: center;
  column-gap: 9px;
  font-weight: 850;
  font-size: 0.86rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
  white-space: nowrap;
}

.profile-badge svg {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  stroke: var(--badge-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.profile-badge span {
  display: inline;
  color: inherit;
  font-size: inherit;
  line-height: 1;
}

.zodiac-badge {
  --role-color: #b98cff;
  --role-rgb: 185 140 255;
  --badge-color: #b98cff;
  --badge-rgb: 185 140 255;
  grid-template-columns: 18px max-content;
}

.zodiac-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-grid;
  place-items: center;
  color: var(--badge-color);
  font-size: 1.05rem;
  font-family: system-ui, "Segoe UI Symbol", sans-serif;
  line-height: 1;
}

.status-email-pending,
.status-pending-whitelist {
  --role-color: #f2b84b;
  --role-rgb: 242 184 75;
  --badge-color: #f2b84b;
  --badge-rgb: 242 184 75;
}

.status-validated,
.status-qcm-passed {
  --role-color: #58d884;
  --role-rgb: 88 216 132;
  --badge-color: #58d884;
  --badge-rgb: 88 216 132;
}

.status-voice-pending {
  --role-color: #4fb7ff;
  --role-rgb: 79 183 255;
  --badge-color: #4fb7ff;
  --badge-rgb: 79 183 255;
}

.status-whitelist {
  --role-color: #55d18f;
  --role-rgb: 85 209 143;
  --badge-color: #55d18f;
  --badge-rgb: 85 209 143;
}

.status-qcm-failed,
.status-rejected-final {
  --role-color: #ff6f84;
  --role-rgb: 255 111 132;
  --badge-color: #ff6f84;
  --badge-rgb: 255 111 132;
}

.status-unknown {
  --role-color: #9aa4b2;
  --role-rgb: 154 164 178;
  --badge-color: #9aa4b2;
  --badge-rgb: 154 164 178;
}

.dashboard-ok {
  --role-color: #58d884;
  --role-rgb: 88 216 132;
}

.dashboard-pending {
  --role-color: #f2b84b;
  --role-rgb: 242 184 75;
}

.dashboard-active {
  --role-color: #4fb7ff;
  --role-rgb: 79 183 255;
}

.dashboard-neutral {
  --role-color: #9aa4b2;
  --role-rgb: 154 164 178;
}

.dashboard-background.dashboard-ok {
  --role-color: #b98cff;
  --role-rgb: 185 140 255;
}

.dashboard-accounts.dashboard-ok {
  --role-color: #55d18f;
  --role-rgb: 85 209 143;
}

.session-scheduled,
.registration-registered {
  --role-color: #4fb7ff;
  --role-rgb: 79 183 255;
}

.session-in-progress,
.registration-in-progress {
  --role-color: #f2b84b;
  --role-rgb: 242 184 75;
}

.session-completed,
.registration-accepted {
  --role-color: #58d884;
  --role-rgb: 88 216 132;
}

.session-cancelled,
.registration-refused,
.registration-refused-final {
  --role-color: #ff6f84;
  --role-rgb: 255 111 132;
}

.btn-action svg,
.btn-ghost svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex: 0 0 16px;
}

.icon-btn {
  width: 44px;
  padding: 0;
  font-size: 1.45rem;
}

.btn-claim,
.btn-comment {
  color: #d7f0ff;
  border-color: rgba(79, 183, 255, 0.45);
  background: rgba(79, 183, 255, 0.18);
}

.btn-accept {
  color: #dbffe8;
  border-color: rgba(88, 216, 132, 0.46);
  background: rgba(88, 216, 132, 0.18);
}

.btn-refuse {
  color: #fff0cf;
  border-color: rgba(242, 184, 75, 0.5);
  background: rgba(242, 184, 75, 0.18);
}

.btn-absent,
.btn-final {
  color: #ffe2e7;
  border-color: rgba(255, 111, 132, 0.5);
  background: rgba(255, 111, 132, 0.18);
}

html[data-theme="light"] .btn-claim,
html[data-theme="light"] .btn-comment {
  color: #14506b;
}

html[data-theme="light"] .btn-accept {
  color: #176233;
}

html[data-theme="light"] .btn-refuse {
  color: #72500d;
}

html[data-theme="light"] .btn-absent,
html[data-theme="light"] .btn-final {
  color: #8c2433;
}

.recruiter-panel {
  display: grid;
  gap: 18px;
}

.recruiter-calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 10px;
}

.recruiter-calendar-head strong {
  text-transform: capitalize;
  font-size: 1.08rem;
}

.recruiter-weekdays,
.recruiter-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.recruiter-weekdays span {
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.recruiter-day {
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recruiter-day.outside {
  opacity: 0.48;
}

.recruiter-day.today {
  border-color: rgb(var(--accent-rgb) / 0.68);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.24);
}

.recruiter-day-head {
  display: flex;
  justify-content: flex-end;
  color: var(--ink-muted);
  font-weight: 900;
}

.recruiter-day-sessions {
  display: grid;
  gap: 6px;
}

.session-chip,
.session-overflow {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--ink);
  padding: 5px 7px;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  text-align: left;
  font-weight: 800;
}

.session-chip span,
.session-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-chip.session-in-progress {
  border-color: rgba(242, 184, 75, 0.5);
  background: rgba(242, 184, 75, 0.14);
}

.session-chip.session-completed {
  border-color: rgba(88, 216, 132, 0.45);
  background: rgba(88, 216, 132, 0.12);
}

.session-overflow {
  grid-template-columns: 1fr;
  text-align: center;
  color: var(--ink-muted);
}

.recruiter-session-list,
.recruiter-candidate-list,
.qcm-attempt-list {
  display: grid;
  gap: 10px;
}

.recruiter-session-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(130px, auto) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.recruiter-session-row small {
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

.recruiter-detail-head {
  align-items: center;
}

.recruiter-detail-head .btn {
  margin-bottom: 10px;
}

.recruiter-session-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.meta-box.wide {
  grid-column: 1 / -1;
}

.recruiter-candidate-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 14px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.recruiter-candidate-card.focused {
  display: block;
  padding: 18px;
  animation: candidateFocus 0.22s ease-out;
}

@keyframes candidateFocus {
  from {
    opacity: 0.72;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.candidate-avatar {
  width: 62px;
  height: 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--brand-strong);
  background: var(--panel-soft);
  font-weight: 900;
}

.candidate-head,
.candidate-focus-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.candidate-focus-head {
  margin-bottom: 16px;
}

.candidate-focus-head h3,
.candidate-focus-head p {
  margin: 0;
}

.candidate-head small,
.candidate-focus-head small,
.candidate-meta,
.taken-label {
  color: var(--ink-muted);
}

.candidate-head small {
  display: block;
  overflow-wrap: anywhere;
}

.candidate-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.taken-label {
  margin: 10px 0 0;
}

.candidate-block {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.candidate-block h4 {
  margin: 0 0 12px;
}

.qcm-attempt-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--ink);
  padding: 12px;
  display: block;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.qcm-attempt-card:hover {
  border-color: rgb(var(--accent-rgb) / 0.5);
  background: rgb(var(--accent-rgb) / 0.08);
  transform: translateY(-1px);
}

.qcm-attempt-card small {
  display: block;
  color: var(--ink-muted);
}

.background-facts {
  margin-bottom: 12px;
}

.background-section-grid {
  display: grid;
  gap: 10px;
}

.background-section-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 12px;
}

.background-section-card strong {
  display: block;
  margin-bottom: 6px;
}

.background-section-card p {
  margin: 0;
}

.qcm-modal {
  width: min(900px, 100%);
}

.qcm-detail-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.qcm-detail-question {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 14px;
}

.qcm-detail-question > strong {
  display: block;
  margin-bottom: 12px;
}

.qcm-answer-list {
  display: grid;
  gap: 8px;
}

.qcm-answer-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.qcm-answer-row span:first-child {
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.qcm-answer-row.correct {
  border-color: rgba(88, 216, 132, 0.46);
  background: rgba(88, 216, 132, 0.12);
}

.qcm-answer-row.selected {
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.3);
}

.qcm-answer-row.wrong {
  border-color: rgba(255, 111, 132, 0.52);
  background: rgba(255, 111, 132, 0.13);
}

.recruiter-comment-form {
  display: grid;
  gap: 12px;
}

.decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clickable-row a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgb(var(--accent-rgb) / 0.5);
  text-underline-offset: 3px;
}

.profile-page-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.profile-page-stack {
  display: grid;
  gap: 24px;
}

.background-read {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.background-read h4 {
  margin: 8px 0 0;
}

.comment-list,
.template-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.comment-card,
.template-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 14px;
}

.comment-card small {
  display: block;
  color: var(--ink-muted);
}

.template-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.checkbox-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink-muted);
  font-size: 0.86rem;
}

td {
  overflow-wrap: anywhere;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 28px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
}

.footer-logo {
  width: 36px;
  height: 36px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  object-fit: contain;
}

.discord-link {
  min-height: 44px;
  border: 1px solid rgb(var(--accent-rgb) / 0.42);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink);
  background: rgb(var(--accent-rgb) / 0.14);
  padding: 0 14px;
  font-weight: 800;
}

.discord-link img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

html[data-theme="light"] .discord-link img {
  filter: brightness(0);
}

.footer-grid p {
  margin: 0;
  color: var(--ink-muted);
  text-align: right;
}

.not-found {
  min-height: 100svh;
  display: grid;
  place-items: center;
}

@media (max-width: 980px) {
  h1 {
    font-size: 3.6rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-strip,
  .step-grid,
  .oauth-grid,
  .member-profile,
  .member-grid,
  .admin-grid,
  .settings-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .member-profile,
  .member-grid,
  .auth-shell,
  .dashboard-top,
  .dashboard-body,
  .user-toolbar,
  .recruiter-session-row,
  .staff-question-card,
  .field-action-row,
  .panel-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .staff-toolbar,
  .recruiter-detail-head,
  .candidate-head,
  .candidate-focus-head,
  .modal-head {
    flex-direction: column;
  }

  .question-actions {
    justify-content: flex-start;
  }

  .dashboard-nav {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .dashboard-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

}

@media (max-width: 720px) {
  .header-row {
    min-height: 64px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    border: 0;
    border-radius: var(--radius);
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-links a,
  .theme-toggle {
    justify-content: center;
  }

  .hero {
    min-height: 300px;
  }

  .hero-content {
    padding: 44px 0 26px;
  }

  h1 {
    font-size: 2.7rem;
  }

  h2 {
    font-size: 1.7rem;
  }

  .section {
    padding: 54px 0;
  }

  .hero-strip,
  .step-grid,
  .auth-shell,
  .oauth-grid,
  .profile-meta,
  .settings-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-strip span {
    border-right: 0;
    border-bottom: 1px solid rgba(247, 243, 234, 0.12);
  }

  .hero-strip span:last-child {
    border-bottom: 0;
  }

  .footer-grid p {
    text-align: left;
  }

  .recruiter-panel {
    overflow-x: auto;
  }

  .recruiter-weekdays,
  .recruiter-calendar-grid {
    min-width: 760px;
  }

  .recruiter-candidate-card {
    grid-template-columns: 1fr;
  }

  .decision-actions .btn {
    width: 100%;
  }
}
