:root {
  --bg: #f3f0e9;
  --text: #191613;
  --muted: #71695e;
  --faint: #a39a8c;
  --rule: #dcd5c7;
  --hover: #ebe6db;
  --num: #a8500a;
  --live: #c22a1c;
  --ok: #2f8a3e;
  --spark: #c9b9a0;
  --spark-hot: #a8500a;
  --focus: #2f6fdf;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11100e;
    --text: #ebe6de;
    --muted: #958c80;
    --faint: #5e574e;
    --rule: #26231f;
    --hover: #1a1815;
    --num: #ff9d2e;
    --live: #f0503f;
    --ok: #4cc263;
    --spark: #3b352d;
    --spark-hot: #ff9d2e;
    --focus: #79a6ff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
.nb { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button { font: inherit; color: inherit; }

/* Masthead */
.mast { display: flex; align-items: center; justify-content: space-between; padding-top: 26px; padding-bottom: 18px; }
.mark { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.mark img { height: 48px; width: auto; }
.mark span { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.mast-end { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.live { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: beat 2.4s ease-in-out infinite; }
.live.off { color: var(--live); }
.live.off .dot { background: var(--live); animation: none; }
@keyframes beat { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .live .dot { animation: none; } }
.notify, .support { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.notify.on { color: var(--text); }
.notify.on::before { content: "\25CF  "; color: var(--ok); font-size: 9px; vertical-align: 2px; }
.notify-wrap { position: relative; }
.panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 10; width: 340px; padding: 14px 16px 12px;
  background: var(--bg); border: 1px solid var(--rule); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); white-space: normal;
}
.panel fieldset { border: 0; margin: 0 0 12px; padding: 0; }
.panel legend { display: flex; justify-content: space-between; width: 100%; padding: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.quick { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--faint); }
.quick button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 600; }
.quick button:hover { color: var(--text); }
.checks { display: grid; gap: 2px; }
.checks.two { grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.check { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 13px; cursor: pointer; }
.check input { margin: 0; accent-color: var(--num); }
.check img { width: 20px; height: 20px; object-fit: contain; }
.check img.px { width: auto; height: 13px; }
.go { width: 100%; padding: 8px; background: var(--text); color: var(--bg); border: 0; font-size: 13px; font-weight: 700; cursor: pointer; }
.go:hover { opacity: 0.88; }
.note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.support::after { content: " \2197"; }
.notify:hover, .support:hover { color: var(--text); }

/* Filters */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 2px solid var(--text); border-bottom: 1px solid var(--rule); }
.modes { display: flex; gap: 22px; }
.modes button {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; cursor: pointer;
  padding: 12px 0 10px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font-weight: 600; white-space: nowrap;
}
.modes button[aria-checked="true"] { color: var(--text); border-bottom-color: var(--text); }
.modes .short { display: none; }
.find input {
  font: inherit; font-size: 14px; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  padding: 6px 2px; width: 160px; border-radius: 0;
}
.find input::placeholder { color: var(--faint); }
.find input:focus { outline: none; border-bottom-color: var(--text); }

/* Boss filter: the boss art with its name, since variants share a model. */
.bosses {
  display: flex; gap: 6px; padding-top: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--rule);
  overflow-x: auto; scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}
.bosses::-webkit-scrollbar { display: none; }
.bosses button { flex: none; }
.bosses button {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 4px;
  background: none; border: 1px solid var(--rule); cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.bosses button:first-child { padding: 0 12px; }
.bosses button img { width: 28px; height: 28px; }
.bosses button:hover { border-color: var(--muted); color: var(--text); }
.bosses button[aria-checked="true"] { border-color: var(--num); box-shadow: inset 0 0 0 1px var(--num); color: var(--text); }

/* Rows */
.slot { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; }
.row { border-bottom: 1px solid var(--rule); }
.row-main {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 0 16px;
  width: 100%; padding: 12px 6px; background: none; border: 0; text-align: left; cursor: pointer;
}
.row-main:hover, .row-main[aria-expanded="true"] { background: var(--hover); }
.what { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.who { display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 13px; min-width: 0; }
.name { color: var(--text); font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; letter-spacing: 0.04em; }
.tag img { align-self: center; }
.kills { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: 15px; }
.k { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.k .n { color: var(--num); font-weight: 800; font-size: 17px; }
.kc, .dur { color: var(--muted); font-size: 13px; }
.when { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; }

.detail { position: relative; padding: 2px 6px 14px 74px; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.timeline li { display: grid; grid-template-columns: 8.5em 1fr; gap: 12px; padding: 3px 0; }
.timeline time { color: var(--muted); }
.timeline .loading { color: var(--muted); }
.hs { position: absolute; top: 3px; right: 6px; font-size: 13px; color: var(--muted); text-decoration: none; }
.hs::after { content: " \2197"; }
.hs:hover { color: var(--text); }

.empty { color: var(--muted); padding: 40px 0; text-align: center; margin: 0; }
.more { height: 1px; }
.foot { color: var(--faint); font-size: 12px; padding-top: 20px; padding-bottom: 32px; }
.foot a { color: var(--muted); text-underline-offset: 3px; }
.foot a:hover { color: var(--text); }

@media (max-width: 640px) {
  .mast-end { gap: 14px; }
  .panel { position: fixed; left: 16px; right: 16px; top: 76px; width: auto; }
  .mark span { white-space: nowrap; }
  .live #live-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .live.off #live-text { position: static; width: auto; height: auto; clip: auto; }
  .mark span { font-size: 26px; }
  .mark img { height: 40px; }
  .bar { flex-direction: column; align-items: stretch; gap: 0; }
  .modes { gap: 20px; }
  .modes .long { display: none; }
  .modes .short { display: inline; }
  .find input { width: 100%; margin: 8px 0 10px; }
  .row-main { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 0 12px; padding: 12px 2px; align-items: start; }
  .slot { width: 44px; height: 44px; }
  .slot img { width: 38px; height: 38px; }
  .name { white-space: normal; overflow: visible; }
  .who { flex-wrap: wrap; gap: 2px 8px; }
  .kills { gap: 4px 14px; }
  .k { white-space: normal; }
  .when { font-size: 12px; padding-top: 3px; }
  .detail { padding: 24px 2px 14px; }
  .hs { top: 2px; right: 2px; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
}
