/* Phantom PvM — night-time raid cavern: near-black violet-tinted neutrals,
   one crystal violet accent, a small crystal shard as the signature mark. */

:root {
  color-scheme: dark;
  --deep: #09080c;
  --bg: #0d0b11;
  --card: #141219;
  --raised: #1c1a22;
  --raised-2: #24212b;
  --line: rgba(238, 234, 243, .08);
  --line-strong: rgba(238, 234, 243, .14);
  --text: #eeeaf3;
  --text-2: #a9a3b4;
  --text-3: #8a8496;
  --accent: #b791ff;
  --accent-ink: #170f22;
  --accent-text: #c9adff;
  --accent-soft: rgba(183, 145, 255, .12);
  --positive: #4cc38a;
  --negative: #e5484d;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --display: "Instrument Serif", Georgia, serif;
  --header-h: 64px;
  font: 400 15px/1.6 var(--sans);
  color: var(--text);
  background: var(--bg);
  scrollbar-color: var(--raised-2) var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--bg); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; color: var(--text-2); }
h1, h2, h3 { margin: 0; color: var(--text); font-weight: 500; }
h2 { font-size: 32px; line-height: 1.15; letter-spacing: -.02em; }
h3 { font-size: 17px; line-height: 1.35; }
code { font: 13px var(--mono); color: var(--accent-text); background: var(--raised); padding: 2px 6px; border-radius: 4px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- controls ---------- */

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 500 14px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text);
  background: var(--raised);
  border-color: var(--line-strong);
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease);
}
.button:hover, button:hover { background: var(--raised-2); }
.button:active, button:active { transform: scale(.97); }
button:disabled { opacity: .45; cursor: default; transform: none; }
.button.primary, button.primary {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.button.primary:hover, button.primary:hover { background: #c8a9ff; }
.button.secondary, button.secondary { color: var(--text); background: var(--raised); border-color: var(--line-strong); box-shadow: none; }
.button.secondary:hover, button.secondary:hover { background: var(--raised-2); }
.button.small { min-height: 34px; padding: 0 14px; font-size: 13px; border-radius: 8px; }

label { display: block; margin-bottom: 16px; color: var(--text-2); font-size: 13px; font-weight: 500; }
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--deep);
  font: 400 14px/1.4 var(--sans);
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: rgba(238, 234, 243, .22); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }
output { display: block; color: var(--text-2); font-size: 14px; }
output:empty { display: none; }
output a, .text-link { color: var(--accent-text); text-decoration: none; }
output a:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }

/* Signature: a small crystal shard before section labels. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-2);
  font: 500 13px/1 var(--mono);
}
.eyebrow::before, .shard {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: rotate(45deg);
  border-radius: 1px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  background: rgba(13, 11, 17, .92);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font: 600 16px/1 var(--sans); text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}
.site-nav a:hover { color: var(--text); background: var(--raised); }
.site-nav a[aria-current] { color: var(--accent-text); background: var(--accent-soft); }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.nav-toggle { display: none; width: 36px; min-height: 36px; padding: 0; border-radius: 8px; background: transparent; border-color: var(--line-strong); }
.nav-toggle svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: max(560px, calc(100svh - var(--header-h)));
  overflow: hidden;
  background: var(--deep);
}
.hero-scene {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
  animation: settle 1.2s var(--ease) both;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(9, 8, 12, .94) 0%, rgba(9, 8, 12, .82) 30%, rgba(9, 8, 12, .2) 62%, rgba(9, 8, 12, 0) 80%),
    linear-gradient(0deg, var(--bg) 0%, rgba(13, 11, 17, 0) 22%);
}
.hero-inner { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px 48px; }
.hero-copy { max-width: 520px; animation: rise 500ms var(--ease) both; }
.hero h1 {
  font: 400 72px/1.02 var(--display);
  letter-spacing: -.02em;
  color: var(--text);
}
.hero .lead { margin-top: 20px; max-width: 36ch; color: var(--text-2); font-size: 18px; line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.actions .button { min-height: 46px; padding: 0 20px; font-size: 15px; }
.hero-caption {
  position: absolute;
  right: 32px;
  bottom: 32px;
  display: flex;
  gap: 12px;
  color: var(--text);
  font: 500 12px/1 var(--mono);
}
.hero-caption span { color: var(--text-3); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes settle { from { opacity: 0; } }

/* ---------- sections ---------- */

.content { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }
.section-head { margin-bottom: 32px; }
.section-head p:not(.eyebrow) { margin-top: 12px; max-width: 44ch; }
.section-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.section-split > .section-head { margin-bottom: 0; }
#player .section-split { align-items: end; }
.form-card { padding: 24px; }
.form-card > .button, .form-card > button { margin-top: 4px; }
.form-card output { margin-top: 16px; }
.split-result { color: var(--text); font: 500 20px/1.4 var(--mono); font-variant-numeric: tabular-nums; }

/* player lookup */
.lookup-form label { margin: 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }
.field-row input { margin: 0; min-height: 44px; }
.field-row .button { min-height: 44px; }
.lookup-status { margin-top: 16px; color: var(--text-2); }
.lookup-status:empty { display: none; }
.lookup-status[data-state='error'] { color: var(--negative); }
.lookup-status[data-state='success'] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#player-results:not(:empty) { margin-top: 32px; }
.lookup-summary { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 20px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.lookup-summary::before { content: ""; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); border-radius: 1px; }
.lookup-player { color: var(--text); font: 400 32px/1.1 var(--display); overflow-wrap: anywhere; }
.lookup-panels { display: grid; gap: 16px; }
.lookup-panel { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.lookup-panel-title { margin: 0; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 15px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); gap: 8px; margin: 0; padding: 12px; list-style: none; }
.metric-card { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 12px; background: var(--raised); border-radius: 8px; }
.metric-name { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); font-size: 13px; font-weight: 500; line-height: 1.3; }
.metric-name > :last-child { min-width: 0; overflow-wrap: anywhere; }
.metric-icon { display: inline-flex; flex: none; width: 24px; height: 24px; align-items: center; justify-content: center; }
.metric-icon img { width: 100%; height: 100%; object-fit: contain; }
.lookup-skills .metric-icon img { image-rendering: pixelated; }
.metric-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-variant-numeric: tabular-nums; }
.metric-stats > div { display: flex; align-items: baseline; gap: 4px; }
.metric-stats dt { color: var(--text-3); font-size: 12px; }
.metric-stats dd { margin: 0; color: var(--text); font: 500 12px var(--mono); white-space: nowrap; }
.lookup-empty { margin: 16px 20px; font-size: 14px; }

/* high scores */
.board { overflow: hidden; }
.board-controls { display: flex; flex-wrap: wrap; gap: 12px; padding: 20px; border-bottom: 1px solid var(--line); }
.board-controls label { margin: 0; min-width: 180px; }
.board-controls .grow { flex: 1; }
#hiscores table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
#hiscores th { padding: 12px 20px; color: var(--text-3); font-size: 12px; font-weight: 500; text-align: left; border-bottom: 1px solid var(--line); }
#hiscores td { height: 48px; padding: 0 20px; color: var(--text); font-size: 14px; border-bottom: 1px solid var(--line); }
#hiscores tbody tr { transition: background-color 160ms var(--ease); }
#hiscores tbody tr:hover { background: var(--raised); }
#hiscores tbody tr:last-child td { border-bottom: 0; }
#hiscores td:first-child { width: 96px; color: var(--text-3); font-family: var(--mono); font-size: 13px; }
#hiscores th:last-child, #hiscores td:last-child { text-align: right; font-family: var(--mono); }
#hiscores tr[data-top] td:first-child { color: var(--accent-text); }
#hiscores tr[data-top] td:first-child::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 10px; background: var(--accent); transform: rotate(45deg) translateY(-2px); border-radius: 1px; }
#hiscores tr[data-top='1'] td:nth-child(2) { font-weight: 500; }
#hiscores output { padding: 12px 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }

/* raids */
.raid-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.raid-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color 180ms var(--ease); }
.raid-card:hover { border-color: var(--line-strong); }
.relic { position: relative; height: 176px; margin: 8px 8px 0; background: var(--raised); border-radius: 8px; }
.relic img { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .5)); }
.raid-tag { position: absolute; top: 12px; left: 12px; color: var(--text-3); font: 500 12px/1 var(--mono); }
.raid-copy { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.raid-place { color: var(--text-3); font-size: 13px; }
.raid-copy h3 { margin: 4px 0 8px; }
.raid-copy p:not(.raid-place) { font-size: 14px; }
.raid-copy .text-link { margin-top: auto; padding-top: 16px; font-size: 14px; }

/* guide */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 20px 0 20px 56px; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 22px; color: var(--accent-text); font: 500 13px var(--mono); }
.steps p { margin-top: 4px; }

/* faq */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; color: var(--text); font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); transform: rotate(45deg) translateY(-3px); transition: transform 180ms var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.faq details p { padding-bottom: 20px; max-width: 60ch; }

/* footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer-inner { display: flex; align-items: center; gap: 16px; max-width: 1200px; margin: 0 auto; padding: 32px; color: var(--text-3); font-size: 13px; }
.site-footer .brand { font-size: 14px; }
.site-footer .brand img { width: 22px; height: 22px; border-radius: 6px; }
.site-footer a:last-child { margin-left: auto; color: var(--text-3); text-decoration: none; }
.site-footer a:last-child:hover { color: var(--text); }

/* ---------- small screens ---------- */

@media (max-width: 1080px) {
  .raid-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .site-header-inner { grid-template-columns: 1fr auto; padding: 0 16px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 0s 200ms;
  }
  .menu-open .site-nav { opacity: 1; visibility: visible; transform: none; transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
  .site-nav a { padding: 12px; border-radius: 8px; font-size: 15px; }
  .section-split { grid-template-columns: 1fr; gap: 32px; }
  .content { padding: 0 16px; }
  .section { padding: 64px 0; }
}
@media (max-width: 660px) {
  .hero { align-items: flex-end; min-height: 640px; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 8%, rgba(9, 8, 12, .86) 46%, rgba(9, 8, 12, .1) 80%); }
  .hero-inner { padding: 0 16px 64px; }
  .hero h1 { font-size: 44px; }
  .hero .lead { font-size: 16px; }
  .hero-caption { display: none; }
  .raid-grid { grid-template-columns: 1fr; }
  .board-controls label { min-width: 0; flex: 1 1 140px; }
  #hiscores td, #hiscores th { padding-left: 12px; padding-right: 12px; }
  #hiscores td:first-child { width: 64px; }
  h2 { font-size: 28px; }
  .site-footer-inner { flex-wrap: wrap; padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- staff dashboard ---------- */

.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100svh; }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100svh;
  padding: 16px 12px;
  background: var(--deep);
  border-right: 1px solid var(--line);
}
.sidebar .brand { padding: 8px 8px 24px; }
.side-label { margin: 16px 8px 8px; color: var(--text-3); font-size: 12px; font-weight: 500; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.side-nav a:hover { color: var(--text); background: var(--card); }
.side-nav a[aria-current] { color: var(--text); background: var(--raised); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.side-nav a[aria-current] svg { stroke: var(--accent); }
.icon { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; color: var(--text-3); }
.side-nav a:hover .icon, .side-nav a[aria-current] .icon { color: inherit; }
.side-foot { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; font-weight: 500; }
.who .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); }
.who-role { margin: 4px 0 12px 16px; color: var(--text-3); font-size: 12px; }
.side-foot .button, .side-foot button { width: 100%; justify-content: flex-start; margin-top: 4px; }

.app-main { min-width: 0; padding: 32px 40px 96px; max-width: 1280px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-head h1 { font: 500 28px/1.15 var(--sans); letter-spacing: -.01em; }
.page-head p { margin-top: 4px; }
.panel { margin-bottom: 24px; scroll-margin-top: 24px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 17px; letter-spacing: 0; }
.panel-head p { font-size: 13px; }
.panel-body { padding: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.compose-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); }
.compose-layout > form { padding: 24px; }
.preview { padding: 24px; background: var(--deep); border-left: 1px solid var(--line); border-radius: 0 0 16px 0; }
.preview-label { margin-bottom: 12px; color: var(--text-3); font: 500 12px/1 var(--mono); }
.discord-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.discord-msg img { width: 40px; height: 40px; border-radius: 50%; }
.discord-who { color: var(--text); font-size: 14px; font-weight: 500; }
.discord-who span { margin-left: 6px; padding: 1px 4px; border-radius: 3px; background: #5865f2; color: #fff; font-size: 10px; vertical-align: 1px; }
.discord-ping { margin: 4px 0 0; color: #c9cdfb; font-size: 14px; }
.embed { margin-top: 6px; padding: 12px 16px; border-left: 4px solid var(--accent); border-radius: 4px; background: #2b2d31; }
.embed-author { color: #f2f3f5; font-size: 12px; font-weight: 500; }
.embed-title { margin-top: 6px; color: #f2f3f5; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.embed-body { margin-top: 6px; color: #dbdee1; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.embed-field { margin-top: 10px; color: #dbdee1; font-size: 14px; }
.embed-field b { display: block; color: #f2f3f5; font-size: 13px; }
.embed-foot { margin-top: 10px; color: #b5bac1; font-size: 12px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.form-actions output { margin: 0; }
.field-note { margin-top: 8px; color: var(--text-3); font-size: 12px; }
.inline-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }
.inline-field input { margin: 0; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.member-list { list-style: none; margin: 16px 0 0; padding: 0; }
.member-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 0; border-top: 1px solid var(--line); }
.member-list strong { color: var(--text); font-weight: 500; }
.member-list small { display: block; color: var(--text-3); font-size: 12px; }
.member-list .dashboard-secondary { min-height: 32px; padding: 0 12px; font-size: 13px; }
.split-panel { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.split-panel > form { padding: 24px; }
.split-panel > form + form { border-left: 1px solid var(--line); }
.split-panel h3 { margin-bottom: 4px; }

/* sign-in */
.signin { display: grid; place-items: center; min-height: 100svh; padding: 24px; }
.signin-card { width: min(100%, 440px); padding: 32px; }
.signin-card .brand { margin-bottom: 32px; }
.signin-card h1 { font: 500 24px/1.2 var(--sans); }
.signin-card > p { margin-top: 8px; }
.signin-steps { margin: 24px 0; padding: 0; list-style: none; counter-reset: s; }
.signin-steps li { counter-increment: s; display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.signin-steps li::before { content: counter(s); color: var(--accent-text); font: 500 13px var(--mono); }
.notice { margin-top: 16px; padding: 12px 16px; border-radius: 8px; background: rgba(229, 72, 77, .1); color: #f2a1a4; font-size: 14px; }
.signin-foot { display: flex; justify-content: space-between; margin-top: 24px; font-size: 13px; }
.signin-foot a { color: var(--text-3); text-decoration: none; }
.signin-foot a:hover { color: var(--text); }

@media (max-width: 1100px) {
  .compose-layout { grid-template-columns: 1fr; }
  .preview { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { padding: 0; margin-right: auto; }
  .side-label, .who-role { display: none; }
  .side-nav { order: 3; flex-direction: row; width: 100%; overflow-x: auto; }
  .side-nav a { flex: none; }
  .side-foot { margin: 0; padding: 0; border: 0; display: flex; align-items: center; gap: 8px; }
  .side-foot .button { width: auto; }
  .app-main { padding: 24px 16px 64px; }
  .grid-2, .split-panel { grid-template-columns: 1fr; }
  .split-panel > form + form { border-left: 0; border-top: 1px solid var(--line); }
}
#manage-roster .inline-field { max-width: 448px; }
#manage-links .field-note + label, #manage-links .inline-field + label, #verification-member label { margin-top: 16px; }
#verification-member .form-actions, #manage-links .form-actions { margin-top: 20px; }

/* account (Discord login) */
.header-actions .icon { color: inherit; }
.account { position: relative; }
.account-button { gap: 8px; padding: 0 10px 0 6px; }
.account-button img { width: 22px; height: 22px; border-radius: 50%; background: var(--raised-2); }
.account-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 192px;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 0s 180ms;
}
.account.open .account-menu { opacity: 1; visibility: visible; transform: none; transition: opacity 180ms var(--ease), transform 180ms var(--ease); }
.account-menu a, .account-menu button {
  display: flex;
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font: 500 14px/1 var(--sans);
  text-decoration: none;
  box-shadow: none;
}
.account-menu a:hover, .account-menu button:hover { color: var(--text); background: var(--raised); }
.discord-login { width: 100%; min-height: 44px; margin-top: 24px; background: #5865f2; border-color: transparent; color: #fff; font-size: 15px; }
.discord-login:hover { background: #4752c4; }
.discord-login svg { width: 20px; height: 20px; fill: currentColor; }
.notice.ok { background: var(--accent-soft); color: var(--accent-text); }
@media (max-width: 900px) {
  .account-name { display: none; }
  .account-button { padding: 0 6px; }
  #login-link .icon { display: none; }
}
.link-button { min-height: 0; padding: 0; border: 0; background: none; color: var(--text-3); font-size: 13px; box-shadow: none; }
.link-button:hover { background: none; color: var(--text); }
.who img { width: 20px; height: 20px; border-radius: 50%; }
