/* ===== Exarch — styles ===== */

:root {
  --font-display: "Cormorant Garamond", "Noto Serif JP", serif;
  --font-body: "Inter", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* crystal accents */
  --crystal: oklch(0.72 0.13 220);
  --crystal-bright: oklch(0.82 0.14 215);
  --crystal-deep: oklch(0.55 0.15 230);
  --crystal-glow: oklch(0.72 0.13 220 / 0.35);

  --gold: oklch(0.82 0.12 82);
  --gold-deep: oklch(0.65 0.14 70);

  /* FFXIV role colors */
  --tank: #3c74c4;
  --healer: #67a851;
  --dps: #c44646;

  /* Discord palette (generic chat-app look, not branded) */
  --discord-blurple: #5865f2;
  --discord-green: #23a55a;
  --discord-red: #f23f42;
  --discord-yellow: #f0b232;
}

/* DARK theme */
[data-theme="dark"] {
  --bg: oklch(0.16 0.012 240);
  --bg-raised: oklch(0.20 0.014 240);
  --bg-panel: oklch(0.22 0.015 240);
  --bg-chat: oklch(0.24 0.014 240);
  --bg-input: oklch(0.18 0.014 240);
  --fg: oklch(0.96 0.008 240);
  --fg-muted: oklch(0.75 0.012 240);
  --fg-faint: oklch(0.58 0.012 240);
  --border: oklch(0.32 0.015 240);
  --border-soft: oklch(0.26 0.015 240);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 12px 30px -12px rgba(0, 0, 0, 0.5);
  --scrim: oklch(0.12 0.01 240 / 0.85);
}

/* LIGHT theme */
[data-theme="light"] {
  --bg: oklch(0.985 0.004 85);
  --bg-raised: oklch(1 0 0);
  --bg-panel: oklch(0.97 0.004 85);
  --bg-chat: oklch(0.99 0.003 85);
  --bg-input: oklch(0.95 0.005 85);
  --fg: oklch(0.18 0.012 240);
  --fg-muted: oklch(0.42 0.013 240);
  --fg-faint: oklch(0.58 0.012 240);
  --border: oklch(0.88 0.008 240);
  --border-soft: oklch(0.93 0.006 240);
  --shadow-lg: 0 24px 60px -20px rgba(30, 40, 80, 0.14);
  --shadow-md: 0 12px 30px -12px rgba(30, 40, 80, 0.10);
  --scrim: oklch(0.99 0.004 85 / 0.85);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: inherit; }
button { font-family: inherit; }

/* ================ TOP NAV ================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: var(--scrim);
  border-bottom: 1px solid var(--border-soft);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--fg);
  text-decoration: none;
}
.nav-brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
}
.nav-links a {
  text-decoration: none;
  transition: color 0.15s;
  cursor: pointer;
}
.nav-links a:hover { color: var(--fg); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.15s;
}
.nav-icon-btn:hover {
  color: var(--fg);
  background: var(--bg-raised);
  border-color: var(--border);
}
.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.lang-toggle button {
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.lang-toggle button.active {
  background: var(--crystal);
  color: white;
}

/* ================ BUTTONS ================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--crystal);
  color: white;
  box-shadow: 0 4px 16px -4px var(--crystal-glow);
}
.btn-primary:hover {
  background: var(--crystal-bright);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -6px var(--crystal-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-raised);
}
.btn-lg { padding: 14px 24px; font-size: 15px; }

/* ================ LAYOUT ================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
section {
  padding: 96px 0;
  position: relative;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--crystal);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--crystal);
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
}
h1 {
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 500;
}
h2 {
  font-size: clamp(34px, 4.2vw, 52px);
  margin-bottom: 24px;
}
h3 {
  font-size: 26px;
  font-weight: 600;
}
p { margin: 0; }
.lead {
  font-size: 19px;
  color: var(--fg-muted);
  max-width: 640px;
  line-height: 1.6;
}
em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--crystal-bright);
  font-weight: 500;
}
[lang="ja"] h1, [lang="ja"] h2, [lang="ja"] h3 {
  font-family: "Noto Serif JP", var(--font-display);
  letter-spacing: 0;
  font-weight: 600;
}

/* ================ HERO ================ */
.hero {
  padding-top: 160px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-copy h1 span.accent {
  color: var(--crystal);
  font-style: italic;
  font-weight: 500;
}
.hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 24px;
  background: var(--bg-raised);
}
.hero-copy .eyebrow .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--crystal);
  box-shadow: 0 0 0 4px var(--crystal-glow);
}
.hero-copy .lead {
  margin-top: 24px;
  margin-bottom: 36px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 32px;
  display: flex;
  gap: 28px;
  color: var(--fg-faint);
  font-size: 13px;
  font-family: var(--font-mono);
}
.hero-meta span { display: flex; align-items: center; gap: 6px; }

/* Background crystal hex pattern */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}
.hero-bg svg { position: absolute; opacity: 0.5; }

/* ================ DISCORD CHAT MOCKUP ================ */
.discord-window {
  background: var(--bg-chat);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  min-height: 500px;
}
.discord-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--fg);
}
.discord-header .hash {
  color: var(--fg-faint);
  font-weight: 400;
  font-size: 18px;
}
.discord-body {
  flex: 1;
  padding: 20px 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.discord-input {
  margin: 12px;
  background: var(--bg-input);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid transparent;
  transition: border-color 0.15s;
}
.discord-input.focused { border-color: var(--crystal); }
.discord-input .caret {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--fg);
  margin-left: 1px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.casting-spinner {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid #ffcf33;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: msgIn 0.35s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: white;
}
.msg-body { flex: 1; min-width: 0; }
.msg-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.msg-author {
  font-weight: 600;
  font-size: 15px;
  color: var(--fg);
}
.msg-bot-tag {
  background: var(--crystal);
  color: white;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.msg-time { font-size: 12px; color: var(--fg-faint); }
.msg-text { color: var(--fg); }
.msg-text .mention {
  background: color-mix(in oklch, var(--crystal), transparent 78%);
  color: var(--crystal-bright);
  padding: 0 3px;
  border-radius: 3px;
  font-weight: 500;
}

/* Embed */
.embed {
  margin-top: 6px;
  background: var(--bg-raised);
  border-left: 4px solid var(--crystal);
  border-radius: 4px;
  padding: 12px 16px 14px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.embed-title {
  font-weight: 600;
  font-size: 16px;
  color: var(--fg);
}
.embed-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
}
.embed-author img, .embed-author .av {
  width: 22px; height: 22px;
  border-radius: 50%;
}
.embed-desc { font-size: 14px; color: var(--fg-muted); line-height: 1.5; }
.embed-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}
.embed-field { font-size: 13px; }
.embed-field-name { font-weight: 600; color: var(--fg); margin-bottom: 2px; }
.embed-field-value { color: var(--fg-muted); }
.embed-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--fg-faint);
  margin-top: 4px;
}

/* Roster (member list inside embed) */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}
.roster-col { min-width: 0; }
.roster-quote {
  border-left: 4px solid var(--border);
  padding: 3px 8px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.roster-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  flex-wrap: wrap;
}
.roster-colon { color: var(--fg-faint); font-weight: 600; }
.mention-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 3px;
  background: color-mix(in oklch, var(--crystal), transparent 80%);
  color: var(--crystal-bright);
  font-weight: 500;
  font-size: 11px;
}
.mention-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--crystal);
}
.ts-rel {
  color: var(--fg-faint);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Reactions */
.reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.reaction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.reaction:hover {
  background: color-mix(in oklch, var(--crystal), var(--bg-input) 85%);
  border-color: var(--crystal);
}
.reaction.me {
  background: color-mix(in oklch, var(--crystal), var(--bg-input) 80%);
  border-color: var(--crystal);
  color: var(--crystal-bright);
}
.reaction .emoji {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  font-size: 13px;
}
.reaction-pop {
  animation: pop 0.5s ease;
}
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Role/Job pill icons — stylized hex */
.job-hex {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: white;
  font-family: var(--font-mono);
}
.job-hex.tank { background: var(--tank); }
.job-hex.healer { background: var(--healer); }
.job-hex.dps { background: var(--dps); }
.job-hex.obj { background: var(--gold-deep); }

/* Select menu (draft) */
.discord-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-top: 6px;
  transition: border-color 0.15s;
}
.discord-select:hover { border-color: var(--crystal); }
.discord-select.active { border-color: var(--crystal); color: var(--fg); }
.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 3px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  color: white;
  transition: filter 0.15s;
}
.discord-btn:hover { filter: brightness(1.1); }
.discord-btn.primary { background: var(--discord-blurple); }
.discord-btn.success { background: var(--discord-green); }
.discord-btn.danger { background: var(--discord-red); }
.discord-btn.secondary { background: #4e5058; }

.btn-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* Modal mock — faithful Discord modal style */
.discord-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 10;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(4px);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.discord-modal {
  background: var(--bg-raised);
  border-radius: 5px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.2);
  overflow: hidden;
  animation: modalIn 0.25s cubic-bezier(.2,.9,.3,1.1);
  display: flex;
  flex-direction: column;
  max-height: 90%;
}
[data-theme="dark"] .discord-modal {
  background: #313338;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 16px 16px 8px;
  color: var(--fg);
}
.modal-title {
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  color: var(--fg);
}
.modal-body {
  padding: 0 16px 16px;
  overflow-y: auto;
  flex: 1;
}
.modal-field { margin-top: 20px; }
.modal-field:first-child { margin-top: 0; }
.modal-field label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  margin-bottom: 8px;
  font-weight: 700;
  line-height: 1.3;
}
[data-theme="dark"] .modal-field label {
  color: #b5bac1;
}
.modal-field .required {
  color: #f23f43;
  margin-left: 4px;
}
.modal-field input, .modal-field textarea {
  width: 100%;
  padding: 10px;
  background: var(--bg-input);
  border: none;
  border-radius: 3px;
  color: var(--fg);
  font-size: 16px;
  font-family: inherit;
  line-height: 1.375;
  resize: none;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.15s;
}
[data-theme="dark"] .modal-field input,
[data-theme="dark"] .modal-field textarea {
  background: #1e1f22;
  color: #dbdee1;
}
.modal-field textarea {
  min-height: 72px;
  resize: vertical;
}
.modal-field input:focus, .modal-field textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--crystal);
}
.modal-field input::placeholder, .modal-field textarea::placeholder {
  color: var(--fg-faint);
}
[data-theme="dark"] .modal-field input::placeholder,
[data-theme="dark"] .modal-field textarea::placeholder {
  color: #6b6e75;
}
.modal-footer {
  padding: 16px;
  background: var(--bg);
  border-top: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
[data-theme="dark"] .modal-footer {
  background: #2b2d31;
}
.modal-footer .cancel-link {
  background: none;
  border: none;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  padding: 2px 16px;
  min-height: 38px;
  cursor: pointer;
  font-family: inherit;
  border-radius: 3px;
  transition: text-decoration 0.15s;
}
.modal-footer .cancel-link:hover { text-decoration: underline; }
.modal-footer .submit-btn {
  background: var(--crystal);
  color: white;
  border: none;
  font-size: 14px;
  font-weight: 500;
  padding: 2px 16px;
  min-height: 38px;
  min-width: 96px;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.modal-footer .submit-btn:hover { background: var(--crystal-deep); }
.modal-footer .submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Legacy modal-actions for backward compat — no longer used in modal */
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ================ FEATURE GRID ================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.feature-card {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 28px;
  transition: all 0.2s;
}
.feature-card:hover {
  border-color: var(--crystal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.6;
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: color-mix(in oklch, var(--crystal), transparent 82%);
  color: var(--crystal);
  display: grid; place-items: center;
  margin-bottom: 18px;
}

/* ================ COMMANDS ================ */
.cmd-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  margin-top: 48px;
}
.cmd-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 88px;
  align-self: start;
}
.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-muted);
  border: 1px solid transparent;
  transition: all 0.15s;
}
.cmd-item:hover { background: var(--bg-raised); color: var(--fg); }
.cmd-item.active {
  background: var(--bg-raised);
  color: var(--fg);
  border-color: var(--border);
}
.cmd-item.active .cmd-item-dot {
  background: var(--crystal);
  box-shadow: 0 0 0 4px var(--crystal-glow);
}
.cmd-item-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--fg-faint);
}
.cmd-detail {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 32px;
  min-height: 420px;
}
.cmd-sig {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--crystal-bright);
  font-weight: 500;
  margin-bottom: 4px;
}
.cmd-sig .arg { color: var(--gold); font-style: italic; }
.cmd-type {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  margin-bottom: 20px;
}
.cmd-desc {
  color: var(--fg);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.cmd-section h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 10px;
}
.cmd-section {
  margin-bottom: 20px;
}
.cmd-params {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 14px;
}
.cmd-params .pname {
  font-family: var(--font-mono);
  color: var(--gold);
}
.cmd-params .pdesc { color: var(--fg-muted); }
.cmd-example {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
  display: flex;
  gap: 10px;
  align-items: center;
}
.cmd-example .prompt { color: var(--crystal); }

/* ================ DASHBOARD ================ */
.dash-window {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 560px;
  margin-top: 32px;
}
.dash-sidebar {
  background: var(--bg);
  border-right: 1px solid var(--border-soft);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-sidebar .dash-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: var(--bg-raised);
  margin-bottom: 16px;
}
.dash-sidebar .dash-user .av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--crystal) 0%, var(--crystal-deep) 100%);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: white;
}
.dash-sidebar .dash-user div { font-size: 13px; }
.dash-sidebar .dash-user .uname { font-weight: 600; color: var(--fg); }
.dash-sidebar .dash-user .utag { color: var(--fg-faint); font-size: 11px; font-family: var(--font-mono); }
.dash-nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-faint);
  padding: 14px 12px 6px;
  font-weight: 700;
}
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.12s;
}
.dash-nav-item:hover { background: var(--bg-raised); color: var(--fg); }
.dash-nav-item.active {
  background: color-mix(in oklch, var(--crystal), transparent 85%);
  color: var(--crystal-bright);
}
.dash-nav-item.active svg { color: var(--crystal); }
.dash-main {
  padding: 28px 32px;
  overflow: auto;
}
.dash-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.dash-header h3 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
}
.dash-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.dash-chip {
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.12s;
  background: transparent;
  font-family: inherit;
}
.dash-chip:hover { color: var(--fg); }
.dash-chip.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.party-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.party-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  transition: all 0.15s;
}
.party-row:hover {
  border-color: var(--crystal);
  background: var(--bg-chat);
}
.party-date {
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
  padding: 6px 12px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  min-width: 74px;
}
.party-date .day { font-size: 20px; font-weight: 600; color: var(--crystal-bright); display: block; line-height: 1; margin: 3px 0; font-family: var(--font-display); }
.party-date .m { font-size: 10px; color: var(--fg-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.party-date .t { font-size: 11px; color: var(--fg-muted); }
.party-main .pt { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.party-main .pm { font-size: 12px; color: var(--fg-muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-family: var(--font-mono); }
.party-roster {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.roster-slot {
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 100px;
  font-weight: 600;
  color: white;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.roster-slot.filled.t { background: var(--tank); }
.roster-slot.filled.h { background: var(--healer); }
.roster-slot.filled.d { background: var(--dps); }
.roster-slot.empty {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--fg-faint);
}
.party-actions {
  display: flex;
  gap: 6px;
}
.icon-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.15s;
}
.icon-btn:hover {
  color: var(--fg);
  border-color: var(--crystal);
}

/* ================ STATS / STATUS ================ */
.status-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  margin-top: 40px;
  margin-bottom: 40px;
}
.pulse {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--discord-green);
  box-shadow: 0 0 0 0 var(--discord-green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(35,165,90,0.6); }
  70% { box-shadow: 0 0 0 10px rgba(35,165,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(35,165,90,0); }
}
.status-strip .status-text { font-weight: 600; font-size: 14px; }
.status-strip .status-meta { color: var(--fg-faint); font-size: 13px; font-family: var(--font-mono); margin-left: auto; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  padding: 24px;
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.stat-card .stat-num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .stat-label {
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 500;
}
.stat-card .stat-delta {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 11px;
  color: var(--healer);
  font-family: var(--font-mono);
  font-weight: 600;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.panel {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 24px;
}
.panel h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 18px;
}
.spark {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 140px;
  padding: 10px 0;
}
.spark .bar {
  flex: 1;
  background: linear-gradient(to top, var(--crystal), var(--crystal-bright));
  border-radius: 3px;
  opacity: 0.85;
  transition: opacity 0.15s;
  position: relative;
}
.spark .bar:hover { opacity: 1; }
.spark .bar::after {
  content: attr(data-v);
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--fg-faint);
  font-family: var(--font-mono);
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.spark .bar:hover::after { opacity: 1; }
.spark-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: var(--fg-faint);
  font-family: var(--font-mono);
}

.job-rank {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.job-rank-row {
  display: grid;
  /* Fixed side columns so every row's bar starts and ends at the same x. */
  grid-template-columns: 7.5em 1fr 3em;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.job-rank-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}
.job-rank-bar-fill {
  height: 100%;
  border-radius: 3px;
}
.job-rank-row .count {
  font-family: var(--font-mono);
  color: var(--fg-muted);
  font-size: 12px;
  text-align: right;
}

/* ================ FAQ ================ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 40px;
  max-width: 820px;
}
.faq-item {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-raised);
  overflow: hidden;
}
.faq-q {
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 16px;
  user-select: none;
}
.faq-a {
  padding: 0 22px;
  max-height: 0;
  overflow: hidden;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 22px 20px; }
.faq-plus {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--fg-muted);
  transition: transform 0.3s;
}
.faq-item.open .faq-plus { transform: rotate(45deg); color: var(--crystal); }

/* ================ FOOTER / CTA ================ */
.cta-section {
  text-align: center;
  padding: 100px 0;
  border-top: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
}
.cta-section h2 { margin-bottom: 20px; max-width: 680px; margin-left: auto; margin-right: auto; }
.cta-section .lead { margin: 0 auto 40px; }
.cta-section .hero-bg { z-index: 0; }
.cta-section > .container { position: relative; z-index: 1; }

footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0;
  font-size: 13px;
  color: var(--fg-faint);
  text-align: center;
}
footer .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer .links { display: flex; gap: 24px; }
footer a {
  text-decoration: none;
  color: var(--fg-muted);
  transition: color 0.15s;
}
footer a:hover { color: var(--fg); }

/* ================ TWEAKS PANEL ================ */
.tweaks {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 280px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  font-size: 13px;
}
.tweaks-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tweaks-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.tweak-field label { display: block; font-weight: 500; margin-bottom: 8px; color: var(--fg); }
.tweak-seg {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.tweak-seg button {
  flex: 1;
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--fg-muted);
  font-family: inherit;
  font-weight: 500;
}
.tweak-seg button.active { background: var(--crystal); color: white; }

/* Section divider — subtle crystal hex */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--fg-faint);
  padding: 40px 0;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  max-width: 240px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}
.divider svg { color: var(--crystal); }

/* Responsive tweaks */
@media (max-width: 900px) {
  .hero-grid, .dash-window, .cmd-layout, .panel-grid {
    grid-template-columns: 1fr;
  }
  .feature-grid, .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .nav-links { display: none; }
  .cmd-list { position: static; flex-direction: row; overflow-x: auto; }
  .dash-sidebar { display: none; }
}
