:root {
  color-scheme: dark;
  --gold: #e3bc77;
  --edge: #705638;
  --muted: #c8baa5;
  --ink: #f5e9d5;
  font-family: system-ui, sans-serif;
  background: #100d0c;
  color: var(--ink);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 0 280px, #421b16 0, transparent 42%),
    radial-gradient(ellipse at 100% 440px, #172637 0, transparent 42%),
    #100d0c;
}
main { max-width: 1180px; margin: auto; padding: 28px clamp(14px, 3vw, 36px) 40px; }
h1, h2, .brand, .empty strong { font-family: Georgia, serif; }
h1, h2 { margin: 6px 0 12px; color: var(--ink); line-height: 1.16; }
h1 { font-size: clamp(26px, 4vw, 42px); }
h2 { font-size: clamp(23px, 3vw, 32px); }
p { color: var(--muted); line-height: 1.55; }
a { color: #f1cd8d; }
[hidden] { display: none !important; }
.guild-banner, .panel {
  position: relative;
  border: 1px solid var(--edge);
  box-shadow: inset 0 0 0 3px #c69a4e0d, 0 14px 32px #0006;
}
.guild-banner::before, .panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  pointer-events: none;
}
.guild-banner {
  display: grid;
  grid-template-columns: minmax(120px, 29%) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 4vw, 54px);
  padding: clamp(16px, 4vw, 38px);
  background: radial-gradient(ellipse at 20% 0, #5f4227 0, transparent 56%),
    linear-gradient(115deg, #2c1613, #171313 53%, #17212c);
}
.crest { display: block; width: 100%; height: auto; border: 1px solid #a88049; box-shadow: 0 8px 24px #0009; }
.brand { font-size: clamp(32px, 6vw, 74px); line-height: .98; color: #f7d9a4; text-shadow: 0 3px 12px #000; }
.brand span { display: inline-block; color: var(--gold); font-size: .55em; font-style: italic; }
.eyebrow { margin: 0 0 10px; font-size: .69rem; font-weight: 750; letter-spacing: .19em; text-transform: uppercase; color: var(--gold); }
nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
nav a { font-size: .86rem; text-underline-offset: 5px; }
.panel { margin-top: 24px; padding: clamp(14px, 3vw, 28px); background: linear-gradient(150deg, #241c17, #151212 68%); }
.stream-status { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.status { padding: 5px 10px; border: 1px solid #6d5438; background: #332419; color: #f1d7af; font-size: .8rem; }
.player { position: relative; padding: 4px; border: 1px solid var(--edge); background: #221913; }
video { display: block; width: 100%; aspect-ratio: 16/9; background: #090807; }
.empty {
  position: absolute;
  inset: 5px;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 12px;
  pointer-events: none;
  background: radial-gradient(ellipse at center, #3b2a1c, #0e0b0a 70%);
}
.offline-ornament { font-size: clamp(18px, 4vw, 42px); color: var(--gold); }
.empty strong { font-size: clamp(16px, 3vw, 27px); }
.empty p { margin: 6px 0 0; font-size: .82rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
button, .card, .download {
  font: inherit;
  color: var(--ink);
  background: linear-gradient(145deg, #382a20, #231a16);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .card:hover, .download:hover { border-color: var(--gold); }
:focus-visible { outline: 2px solid #ffdf9f; outline-offset: 3px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 12px; }
.archive-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.archive-item .card { display: block; flex: 1; padding: 16px; }
.vod-streamer { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #ffe1a9; font-size: 1.25rem; line-height: 1.2; overflow-wrap: anywhere; }
.vod-streamer img { flex: none; border: 1px solid var(--edge); border-radius: 4px; }
.card small { display: block; margin-top: 8px; color: var(--muted); }
.download { text-align: center; font-size: .84rem; }
.report-link { display: block; margin: 14px 0; overflow-wrap: anywhere; }
.fight-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.fight-row { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 12px; border: 1px solid; border-radius: 4px; }
.fight-row.wipe { background: linear-gradient(135deg, #46221f, #2c1817); border-color: #8b4941; }
.fight-row.kill { background: linear-gradient(135deg, #233b2a, #15281e); border-color: #547855; }
.fight-row button { flex: 1; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; font-size: .82rem; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.fight-row a { align-self: flex-end; font-size: .75rem; }
.fight-row.kill button { color: #dcf4db; }
.fight-row.wipe button { color: #ffe0d9; }
input, select { font: inherit; color: var(--ink); background: #201813; border: 1px solid var(--edge); padding: 7px; max-width: 100%; }
input { width: 90px; }
.hint { color: var(--muted); font-size: .82rem; }
.vod-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.admin form { display: grid; gap: 10px; justify-items: start; margin: 12px 0; }
.admin label { display: grid; gap: 6px; width: min(100%, 660px); }
.admin input:not([type=checkbox]), .admin textarea { width: 100%; }
.admin textarea { min-height: 64px; padding: 8px; font: inherit; color: var(--ink); background: #201813; border: 1px solid var(--edge); }
.admin-vod { border-top: 1px solid var(--edge); padding: 12px 0; }
.admin .delete-confirm { display: flex; align-items: center; }
.admin input[type=checkbox] { width: auto; }
.admin .danger { background: #46221f; }
.discord-banner-preview { display: block; width: min(100%, 480px); max-height: 180px; object-fit: contain; object-position: left; border: 1px solid var(--edge); border-radius: 4px; }
.archive-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 12px; }
.archive-status-card { padding: 14px 16px; background: #211912; border: 1px solid var(--edge); border-radius: 4px; }
.archive-status-card h3 { margin: 0 0 12px; color: #ffe1a9; }
.archive-status-card dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; font-size: .86rem; }
.archive-status-card dt { color: var(--muted); }
.archive-status-card dd { margin: 0; text-align: right; }
.archive-state { font-weight: 700; }
.archive-state.ok { color: #b8dca6; }
.archive-state.pending { color: #f0cf91; }
.archive-state.error { color: #ffaea1; }
.archive-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 0 18px; }
.clip-editor { margin-top: 18px; border-top: 1px solid var(--edge); padding-top: 16px; }
.clip-editor label { display: grid; gap: 6px; }
.clip-editor > label input { width: min(100%, 580px); }
.clip-times, .clip-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 12px; }
.clip-times input { width: 124px; }
.clip-times button { padding: 7px 9px; font-size: .82rem; }
.clip-card strong { overflow-wrap: anywhere; }
.fight-row .fight-clip { align-self: flex-start; width: auto; flex: none; padding: 3px 6px; border: 1px solid currentColor; }
.guest-streams { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.guest-streams .panel { min-width: 0; }
.guest-streams button { margin-bottom: 6px; }
.live-chat { margin-top: 16px; border-top: 1px solid var(--edge); padding-top: 12px; }
.live-chat h3 { margin: 0 0 8px; font-family: Georgia, serif; }
.chat-messages { height: 170px; overflow-y: auto; overflow-wrap: anywhere; background: #100d0c; padding: 8px; }
.chat-message { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 5px; }
.chat-message strong { color: var(--gold); }
.live-chat form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.live-chat input { flex: 1; min-width: 0; }
.chat-identity { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-identity button, .chat-message button { padding: 3px 6px; font-size: .75rem; }
.perspective-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.perspective-buttons button:disabled { opacity: .55; cursor: default; }
.progress-panel { background: radial-gradient(ellipse at top right, #3b2c1d, transparent 65%), #191411; }
.progress-header { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.progress-header .eyebrow { margin-bottom: 2px; }
.progress-header a { font-size: .8rem; }
.progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.progress-total, .progress-card { border: 1px solid #705638; padding: 9px 11px; background: #1c1511; }
.progress-total { margin-bottom: 8px; border-color: #9c7949; }
.progress-total h3, .progress-card h3 { margin: 0 0 8px; font: 700 .95rem Georgia, serif; color: #f7d9a4; }
.progress-levels { display: grid; gap: 4px; }
.progress-total .progress-levels { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; }
.progress-level { display: grid; grid-template-columns: 1fr auto; gap: 1px 4px; align-items: center; font-size: .73rem; }
.progress-level strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.progress-level progress { grid-column: 1 / -1; width: 100%; height: 5px; border: 0; appearance: none; background: #3e3126; }
.progress-level.normal { --fill: #9bb98f; }
.progress-level.heroic { --fill: #8bb8df; }
.progress-level.mythic { --fill: #e8bb6e; }
.progress-level progress::-webkit-progress-bar { background: #3e3126; }
.progress-level progress::-webkit-progress-value { background: var(--fill); }
.progress-level progress::-moz-progress-bar { background: var(--fill); }
.progress-panel .hint { margin: 8px 0 0; }
#conference-progress { display: block; width: 100%; height: 8px; margin-top: 12px; accent-color: #e8bb6e; }
#conference-remaining { margin: 5px 0 0; }
.live-channels { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.live-channel { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: min(100%, 136px); min-height: 42px; max-width: 100%; padding: 8px 14px; border: 1px solid var(--edge); border-radius: 4px; background: #282018; color: #ffe1a9; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.live-channel:hover, .live-channel:focus-visible { border-color: #e8bb6e; background: #36291d; }
.live-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #f45958; }
.quality-control { display: inline-flex; gap: 4px; }
.quality-control button { min-width: 64px; padding: 6px 10px; }
.quality-control button[aria-pressed="true"] { background: #e8bb6e; border-color: #e8bb6e; color: #21160d; }
.quality-control button:disabled { opacity: .45; cursor: default; }
.raid-days { display: grid; gap: 8px; }
.raid-day { border: 1px solid var(--edge); background: #1c1511; }
.raid-day summary { padding: 12px 14px; cursor: pointer; color: #f7d9a4; font-weight: 700; }
.raid-day summary small { margin-left: 10px; color: var(--muted); font-weight: 400; }
.raid-day .grid { padding: 0 12px 12px; }
.raid-perspectives { display: grid; gap: 10px; padding: 0 12px 12px; }
.raid-perspective { border: 1px solid #70563880; border-radius: 4px; background: #241c16; }
.raid-perspective > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 14px 16px; }
.raid-perspective > summary::before { content: '▸'; font-size: .9rem; }
.raid-perspective[open] > summary::before { content: '▾'; }
.raid-perspective > summary .vod-streamer { margin: 0; }
.raid-perspective > summary small { margin: 0; color: var(--muted); font-weight: 400; }
.twitch-source { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: #c7a9ff; font-size: .8rem; }
.twitch-source img { flex: none; }
.twitch-import-job { border-top: 1px solid var(--edge); padding: 12px 0; }
.twitch-import-job > summary { cursor: pointer; font-weight: 700; color: #f7d9a4; }
.twitch-import-job select { width: 100%; }
.recap-jump { margin: 4px 0 4px 8px; padding: 5px 8px; font-size: .8rem; }
.login-page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 12% 18%, #49231a 0, transparent 48%),
    radial-gradient(ellipse at 92% 80%, #172d42 0, transparent 48%),
    #100d0c;
}
.login-shell { width: min(100%, 1030px); }
.login-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: center;
  gap: clamp(20px, 5vw, 56px);
  padding: clamp(16px, 4vw, 42px);
  background: linear-gradient(135deg, #2c1d16, #171313 56%, #16212d);
  border: 1px solid #87663f;
  box-shadow: inset 0 0 0 5px #e3bc770b, 0 20px 65px #0009;
}
.login-card::before {
  content: "";
  position: absolute;
  top: -1px;
  inset-inline: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.login-crest img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #87663f;
  box-shadow: 0 10px 32px #000a;
}
.login-intro h1 { font-size: clamp(32px, 5vw, 62px); color: #f7d9a4; }
.login-intro h1 span { color: var(--gold); font-style: italic; white-space: nowrap; }
.login-description { max-width: 35ch; margin: 14px 0 24px; }
.discord-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 100%;
  padding: 12px 18px;
  border: 1px solid #a2a5ff;
  border-radius: 5px;
  background: #454ac1;
  box-shadow: 0 5px 18px #0005;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.discord-login:hover { background: #5257d3; }
.login-note, .login-footer { font-size: .8rem; }
.login-note span, .login-footer span { color: var(--gold); margin-right: 4px; }
.login-footer { text-align: center; letter-spacing: .05em; margin: 16px 0 0; }
@media (max-width: 620px) {
  .login-card { grid-template-columns: 1fr; text-align: center; }
  .login-crest { width: min(55%, 185px); margin: auto; }
  .login-description { margin-inline: auto; }
}
.warning { color: #ffce85; }
footer { margin-top: 28px; text-align: center; color: var(--muted); font-size: .75rem; }
footer span { color: var(--gold); margin: 0 6px; }
@media (max-width: 850px) { .fight-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) {
  .guild-banner { grid-template-columns: 1fr; text-align: center; }
  .crest { width: min(56%, 170px); margin: auto; }
  nav { justify-content: center; }
  .fight-list { grid-template-columns: minmax(0, 1fr); }
}
