:root {
  color-scheme: dark;
  --bg: #101613;
  --header: #121a16;
  --panel: #18211c;
  --well: #131c17;
  --border: #303d33;
  --ink: #f0eee3;
  --muted: #aeb9ad;
  --gold: #e6bc75;
  --gold-strong: #f4cd8b;
  --green: #a3c397;
  --sans: "DM Sans", system-ui, sans-serif;
  --serif: Cinzel, Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.65 var(--sans);
}
a { color: var(--gold); text-underline-offset: .22em; }
a:hover { color: var(--gold-strong); }
:focus-visible { outline: 2px solid var(--gold-strong); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); line-height: 1.22; }
h1 { font-weight: 700; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 17px; line-height: 1.35; }
p { color: var(--muted); }
p + p { margin-top: 12px; }
.shell { width: min(1180px, 100% - 64px); margin-inline: auto; }
.skip { position: fixed; z-index: 3; left: 12px; top: 12px; transform: translateY(-160%); background: var(--bg); padding: 8px 12px; }
.skip:focus { transform: none; }
.site-header { background: var(--header); border-bottom: 1px solid var(--border); }
.header-inner { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.header-inner > :last-child { justify-self: end; }
.brand { display: inline-flex; gap: 11px; align-items: center; width: fit-content; color: var(--ink); text-decoration: none; font: 700 17px/1.2 var(--serif); white-space: nowrap; }
.crest {
  display: inline-grid;
  place-items: center;
  width: 35px;
  height: 38px;
  flex: none;
  color: var(--gold);
  background: linear-gradient(145deg, #4b5031, #262e20);
  clip-path: polygon(0 0, 100% 0, 100% 75%, 50% 100%, 0 75%);
  box-shadow: inset 0 0 0 1px #777044;
  font: 22px/1 Georgia, serif;
  padding-bottom: 3px;
}
.header-inner nav { display: flex; align-items: stretch; gap: 26px; min-height: 72px; }
.header-inner nav a, .section-nav a { color: var(--muted); display: flex; align-items: center; text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap; }
.header-inner nav a:hover, .section-nav a:hover { color: var(--ink); }
.header-inner nav [aria-current="page"], .section-nav .selected { color: var(--gold); box-shadow: inset 0 -2px var(--gold); }

.home { padding-block: 32px 54px; }
.hero {
  display: flex;
  align-items: center;
  min-height: 382px;
  padding: 44px 46px;
  border: 1px solid #3b4838;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, #111b15 0%, #111b15e8 19%, #111b158a 48%, #111b150d 82%),
              linear-gradient(0deg, #0f1810a3, transparent 42%),
              #202d24 url("/assets/guild-banner.webp") center 55% / cover no-repeat;
}
.hero-copy { position: relative; }
.hero-crest { margin-bottom: 18px; }
.hero-crest .crest { width: 53px; height: 58px; font-size: 31px; background: linear-gradient(145deg, #575039, #272e22); }
.eyebrow { color: var(--gold); font-size: 11px; letter-spacing: .17em; font-weight: 700; text-transform: uppercase; }
.hero h1 { margin-top: 4px; font-size: clamp(32px, 5.4vw, 70px); letter-spacing: -.045em; color: #fff5df; text-shadow: 0 2px 14px #071109; }
.hero-description { font-size: 17px; color: #dadfd3; margin-top: 7px; }
.actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 24px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: fit-content;
  min-height: 43px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  font: 700 14px/1.4 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.button.primary { color: #251c10; background: var(--gold); border-color: #eec687; }
.button.primary:hover { background: var(--gold-strong); }
.button.secondary { color: var(--ink); background: #17201a; border-color: #475747; }
.button.secondary:hover { background: #273429; }
.button.compact { min-height: 36px; padding: 6px 12px; }
.button span { font-size: 16px; }
.section-nav { display: flex; gap: 27px; padding: 0 25px; min-height: 53px; background: var(--panel); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 10px 10px; }

.profile-grid { display: grid; grid-template-columns: minmax(0, 2.13fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.home .profile-grid { margin-top: 22px; }
.profile-main, .profile-side { display: grid; gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 22px 24px; scroll-margin-top: 18px; }
.panel-title, .panel-title > div { display: flex; align-items: center; gap: 11px; }
.panel-title { margin-bottom: 13px; }
.panel-title.split { justify-content: space-between; gap: 12px; }
.panel > h2 { margin-bottom: 14px; }
.icon { display: inline-grid; place-items: center; width: 33px; height: 33px; flex: none; background: #273027; border: 1px solid #3e4a37; border-radius: 7px; color: var(--gold); font: 19px/1 Georgia, serif; }
.activities, .role-row { display: flex; flex-wrap: wrap; gap: 7px; }
.activities { border-top: 1px solid var(--border); margin-top: 17px; padding-top: 15px; }
.activities span, .role-row span, .slots { border: 1px solid #3a493a; border-radius: 5px; color: #c2cdbe; padding: 3px 9px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.activities span, .role-row span { background: #202b22; }
.status { display: flex; align-items: center; gap: 8px; color: var(--green); font-size: 12px; font-weight: 700; margin-bottom: 9px; }
.status span { width: 7px; height: 7px; border-radius: 50%; background: #a0c990; box-shadow: 0 0 0 3px #9fc58f24; }
.recruit { background: linear-gradient(135deg, #202b21, var(--panel) 75%); border-color: #43513d; }
.recruit h2 { margin-bottom: 7px; }
.recruit .role-row { margin-block: 15px 17px; }
.recruit .primary { width: 100%; }
.details dl { margin: 0; }
.details dl div { display: flex; justify-content: space-between; gap: 8px; padding-block: 8px; border-top: 1px solid var(--border); }
.details dt { color: var(--muted); }
.details dd { margin: 0; text-align: right; font-weight: 600; }
.small-link { font-weight: 700; text-decoration: none; font-size: 13px; }
.empty { display: flex; gap: 13px; align-items: center; padding: 13px 14px; background: var(--well); border: 1px solid var(--border); border-radius: 7px; }
.empty p { font-size: 14px; }
.raid-list, .expectations { margin: 0; }
.expectations { padding-left: 21px; color: var(--muted); }
.expectations li + li { margin-top: 5px; }
.raid-list { padding: 0; list-style: none; }
.raid-list li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--border); }
.raid-list li .slots { margin-left: auto; }
.raid-title { display: block; font-weight: 700; color: var(--ink); text-decoration: none; }
.raid-list time { color: var(--muted); font-size: 13px; }
.site-footer { margin-top: auto; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; align-items: center; gap: 18px; padding-block: 24px; }
.footer-inner > :last-child { margin-left: auto; }
.footer-inner .brand { font-size: 14px; }
.footer-inner .crest { width: 24px; height: 26px; font-size: 15px; }

.inner { padding-block: 40px 60px; }
.inner.narrow { width: min(650px, 100% - 64px); }
.page-heading { margin-bottom: 22px; }
.page-heading h1 { font-size: clamp(29px, 4.1vw, 52px); margin: 9px 0 5px; overflow-wrap: anywhere; }
.form, .inline-form { display: grid; gap: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.profile-grid .form-grid { grid-template-columns: 1fr; }
label { display: grid; align-content: start; gap: 5px; font-size: 13px; font-weight: 700; }
input, select, textarea { color: var(--ink); font: 400 15px/1.5 var(--sans); width: 100%; padding: 8px 10px; border: 1px solid #465747; border-radius: 6px; background: var(--well); }
textarea { resize: vertical; }
.form-note { font-size: 13px; }
.panel > .form-note, .panel > .button, .panel > form:not(.form) { margin-top: 12px; }
.application { border-top: 1px solid var(--border); padding-block: 14px; }
.application:last-child { padding-bottom: 0; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.inline-form { grid-template-columns: minmax(0, 160px) auto; align-items: end; margin-top: 11px; }
.composition { margin-block: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th, td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
td { color: var(--muted); }
.cancel { margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--border); }
.cancel summary { cursor: pointer; color: var(--gold); }
.cancel p { margin-block: 8px; }
.invite-code { overflow-wrap: anywhere; background: var(--well); padding: 6px 9px; border-radius: 4px; color: var(--gold); }

@media (max-width: 820px) {
  .shell, .inner.narrow { width: calc(100% - 36px); }
  .profile-grid { grid-template-columns: minmax(0, 1.4fr) minmax(245px, 1fr); gap: 14px; }
  .hero { padding-inline: 30px; }
  .panel { padding: 18px; }
  .header-inner { gap: 12px; }
  .header-inner nav { gap: 13px; }
}
@media (max-width: 650px) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; padding-top: 12px; }
  .header-inner nav { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; gap: 0 14px; }
  .header-inner nav a { min-height: 45px; }
  .header-inner > :last-child { grid-column: 2; grid-row: 1; }
  .brand { font-size: 14px; gap: 8px; }
  .brand .crest { width: 29px; height: 32px; font-size: 18px; }
  .home { padding-top: 18px; }
  .hero { padding: 27px 20px; min-height: 315px; background-position: 64% center; }
  .hero h1 { font-size: clamp(24px, 7.3vw, 47px); }
  .hero-description { font-size: 15px; }
  .section-nav { gap: 17px; padding-inline: 13px; }
  .section-nav a { font-size: 12px; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-main, .profile-side { gap: 14px; }
  .footer-inner { flex-wrap: wrap; gap: 8px 12px; }
}
@media (max-width: 365px) {
  .form-grid { grid-template-columns: 1fr; }
  .panel-title h2 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.roster-totals strong { color: var(--ink); }
.roster-search { max-width: 300px; margin-bottom: 17px; }
.roster-search[hidden] { display: none; }
.roster-empty { padding-block: 8px; }
.guild-roster { min-width: 630px; }
.guild-roster thead { color: var(--muted); font-size: 12px; }
.guild-roster thead th { white-space: nowrap; }
.guild-roster th, .guild-roster td { padding: 9px 13px; }
.guild-roster tbody + tbody tr:first-child > * { border-top: 1px solid #465747; }
.guild-roster tbody tr {
  --class-color: var(--muted);
  --row-base: var(--panel);
  background: linear-gradient(to right, color-mix(in srgb, var(--class-color) 8%, transparent), transparent 30%) var(--row-base);
}
.guild-roster tbody .roster-alt { --row-base: var(--well); }
.guild-roster .roster-alt th { padding-left: 30px; }
.guild-roster [data-wow-class="warrior"] { --class-color: #c69b6d; }
.guild-roster [data-wow-class="paladin"] { --class-color: #f48cba; }
.guild-roster [data-wow-class="hunter"] { --class-color: #aad372; }
.guild-roster [data-wow-class="rogue"] { --class-color: #fff468; }
.guild-roster [data-wow-class="priest"] { --class-color: #fff; }
.guild-roster [data-wow-class="shaman"] { --class-color: #3399ff; }
.guild-roster [data-wow-class="mage"] { --class-color: #3fc7eb; }
.guild-roster [data-wow-class="warlock"] { --class-color: #a58dec; }
.guild-roster [data-wow-class="druid"] { --class-color: #ff8b40; }
.guild-roster tbody th { box-shadow: inset 3px 0 var(--class-color); }
.roster-character { display: flex; align-items: center; gap: 9px; }
.roster-character [data-roster-name] { color: var(--class-color); }
.roster-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  height: 36px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--class-color) 45%, var(--border));
  border-radius: 7px;
  background: color-mix(in srgb, var(--class-color) 14%, var(--well));
  color: var(--class-color);
  font-size: 11px;
}
.roster-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.roster-number { font-variant-numeric: tabular-nums; }
.roster-alt-label, .roster-account-count { color: var(--muted); font-size: 12px; font-weight: 500; }
.roster-alt-label { margin-left: 8px; }
.roster-account { vertical-align: top; background: var(--panel); }
.roster-account-count { display: block; margin-top: 4px; }
.roster-badge { display: inline-block; padding: 2px 8px; border: 1px solid var(--border); border-radius: 5px; font-size: 12px; }
.roster-linked { color: var(--green); background: #202b22; }

.raid-schedule { color: var(--muted); font-size: 13px; }
.slot-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.signup-choice, .composition-editor { display: grid; gap: 10px; margin-top: 10px; }
.composition-defaults { margin: 0; padding-left: 19px; color: var(--muted); font-size: 13px; }
.composition span { white-space: normal; }
.raid-group { margin-top: 12px; padding: 9px 12px; background: var(--well); border: 1px solid var(--border); border-radius: 7px; }
.raid-group summary, .form summary, .profile-side details > summary { cursor: pointer; color: var(--gold); }
.raid-group .table-wrap, .raid-group ul { margin-top: 8px; }
.raid-run-title { margin-top: 18px; }
.leader-action { margin-left: auto; }
@media (max-width: 650px) {
  .raid-list li:has(.raid-schedule) { flex-wrap: wrap; }
  .raid-list li:has(.raid-schedule) .slots { margin-left: 0; }
}

.raid-signups { margin: 8px 0 0; padding: 0; list-style: none; }
.raid-signups > li { border-top: 1px solid var(--border); padding: 8px 0; }
.raid-signups ol { margin: 3px 0 0; padding-left: 22px; color: var(--muted); }

.dungeon-roles { border: 1px solid var(--border); border-radius: 6px; margin: 0; padding: 9px 12px; }
.dungeon-roles legend { font-size: 13px; font-weight: 700; padding-inline: 5px; }
.dungeon-roles > div { display: flex; gap: 8px 14px; flex-wrap: wrap; }
.dungeon-roles label { display: inline-flex; align-items: center; min-height: 28px; }
.dungeon-roles input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--gold); }
.dungeon-roles label[hidden] { display: none; }
.dungeon-board { grid-template-areas: "dungeon-list dungeon-signup"; }
.dungeon-board-list { grid-area: dungeon-list; min-width: 0; }
.dungeon-signup-panel { grid-area: dungeon-signup; min-width: 0; }
.dungeon-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 12px; }
.dungeon-heading p { font-size: 13px; }
.dungeon-roster { min-width: 0; }
.dungeon-roster th, .dungeon-roster td { vertical-align: middle; }
.dungeon-character-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.dungeon-character-meta { color: var(--muted); font-size: 12px; font-weight: 400; }
.dungeon-role-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--well);
  color: var(--role-color);
  font: 13px/1 system-ui, sans-serif;
}
.dungeon-role-icon[data-role="tank"] { --role-color: #9bc8ee; }
.dungeon-role-icon[data-role="healer"] { --role-color: var(--green); }
.dungeon-role-icon[data-role="dps"] { --role-color: #edaa94; }
.dungeon-roster .dungeon-action { width: 1%; padding-inline: 4px 8px; }
.dungeon-remove {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.dungeon-remove:hover { background: #352823; color: #f2b3a3; border-color: #594139; }
.dungeon-remove span { position: relative; width: 11px; height: 11px; margin-top: 4px; border: 1.5px solid currentColor; border-top: 0; border-radius: 0 0 2px 2px; }
.dungeon-remove span::before { content: ""; position: absolute; inset: -3px -3px auto; border-top: 1.5px solid currentColor; }
.dungeon-remove span::after { content: ""; position: absolute; inset: -6px 2px auto; height: 3px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; }
@media (max-width: 650px) {
  .dungeon-board { grid-template-areas: "dungeon-signup" "dungeon-list"; }
}
@media (max-width: 480px) {
  .dungeon-roster th, .dungeon-roster td { padding-inline: 7px; }
  .dungeon-roster .roster-avatar { flex-basis: 28px; height: 28px; }
}
