:root {
  color-scheme: dark;

  --bg: #06080d;
  --bg-deep: #04060a;
  --panel: #111827;
  --panel-2: #0d141f;
  --panel-3: #172033;
  --line: rgba(146, 172, 210, 0.14);
  --line-soft: rgba(146, 172, 210, 0.07);

  --text: #e9eff8;
  --dim: #97a4ba;
  --faint: #6b7789;

  --blue: #3ea0ff;
  --red: #ff5342;
  --orange: #ff9526;
  --gold: #ffc23d;
  --green: #3ddc84;
  --purple: #a97bff;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: Barlow, ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg-deep);
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(90rem 40rem at 12% -8%, rgba(62, 160, 255, 0.16), transparent 62%),
    radial-gradient(60rem 34rem at 92% 4%, rgba(169, 123, 255, 0.13), transparent 60%),
    radial-gradient(50rem 30rem at 50% 108%, rgba(61, 220, 132, 0.06), transparent 60%),
    linear-gradient(180deg, #0a101b 0%, var(--bg) 38%, var(--bg-deep) 100%);
}

button,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(62, 160, 255, 0.35);
}

a:hover {
  color: #8ec8ff;
  border-bottom-color: #8ec8ff;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.app {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 12px 56px;
}

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

.command {
  padding: 16px 0 10px;
}

.cmd-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.cmd-brand {
  color: var(--text);
  font-weight: 600;
}

.cmd-brand b {
  color: var(--blue);
  font-weight: 600;
}

.map-link {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.map-link:hover {
  border-color: var(--blue);
}

.cmd-bar .sep {
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.feed-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.16);
  vertical-align: 1px;
}

.feed-dot.is-fallback,
.feed-dot.is-stale {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 194, 61, 0.16);
}

.feed-dot.is-degraded {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 83, 66, 0.16);
}

.degraded-banner {
  margin: 0 2px 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 83, 66, 0.4);
  border-radius: var(--r-md);
  background: rgba(255, 83, 66, 0.08);
  color: #ffb3aa;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
}

.stale-chip {
  padding: 4px 8px;
  border: 1px solid rgba(255, 194, 61, 0.45);
  border-radius: 5px;
  background: rgba(255, 194, 61, 0.12);
  color: var(--gold);
  font-weight: 600;
}

.info-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.info-link:hover {
  border-color: var(--blue);
}

.info-link.is-compact {
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--dim);
  font-size: 12px;
}

.info-link.is-compact:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.ev-link-row {
  margin-top: -3px;
}

.one-day-chip {
  padding: 4px 8px;
  border: 1px solid rgba(255, 149, 38, 0.5);
  border-radius: 5px;
  background: rgba(255, 149, 38, 0.14);
  color: var(--orange);
  font-weight: 700;
}

/* one-day-only events get a brighter frame so they don't get lost under
   longer-running multi-day events with a higher generic score */

.hero-card.is-one-day,
.queue-row.is-one-day,
.ev.is-one-day {
  border-color: rgba(255, 149, 38, 0.5);
}

.queue-row.is-one-day,
.ev.is-one-day {
  box-shadow: 0 0 0 1px rgba(255, 149, 38, 0.16) inset;
}

.hero-card.is-one-day {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 149, 38, 0.2) inset;
}

.cmd-headline {
  display: grid;
  gap: 8px;
  padding: 0 2px 16px;
}

.live-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 10px 5px 8px;
  border: 1px solid rgba(255, 83, 66, 0.45);
  border-radius: 999px;
  background: rgba(255, 83, 66, 0.1);
  color: #ffb3aa;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.live-flag.is-quiet {
  border-color: var(--line);
  background: rgba(146, 172, 210, 0.07);
  color: var(--dim);
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(255, 83, 66, 0.6);
  animation: pulse 1.8s ease-out infinite;
}

.is-quiet .pulse {
  background: var(--faint);
  animation: none;
  box-shadow: none;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(255, 83, 66, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 83, 66, 0);
  }
}

.cmd-headline h1 {
  font-size: clamp(28px, 8.6vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.cmd-sub {
  color: var(--dim);
  font-size: 13.5px;
}

.cmd-sub b {
  color: var(--text);
  font-weight: 600;
}

.cmd-grid {
  display: grid;
  gap: 10px;
}

/* hero live card */

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 232px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #16202f 0%, #0c121c 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --acc: var(--blue);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--acc), transparent 72%);
}

.hero-card-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0.34;
  filter: saturate(1.15) contrast(1.05);
  mask-image: linear-gradient(105deg, transparent 18%, #000 88%);
}

.hero-card-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(6, 9, 15, 0.94) 8%, rgba(6, 9, 15, 0.55) 58%, rgba(6, 9, 15, 0.25) 100%),
    radial-gradient(70% 90% at 0% 100%, rgba(6, 9, 15, 0.9), transparent 70%);
}

.hero-card > .hero-body {
  position: relative;
}

.hero-body {
  display: grid;
  align-content: end;
  gap: 10px;
}

.metarow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--dim);
}

.pri-chip {
  padding: 4px 8px;
  border: 1px solid color-mix(in oklch, var(--acc) 55%, transparent);
  border-radius: 5px;
  background: color-mix(in oklch, var(--acc) 14%, transparent);
  color: color-mix(in oklch, var(--acc) 78%, white);
  font-weight: 600;
}

.hero-body h2 {
  font-size: clamp(21px, 6vw, 30px);
  line-height: 1.08;
  max-width: 22ch;
}

.hero-clock {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-family: var(--font-mono);
}

.hero-clock .tick {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ffd6cf;
}

.hero-clock .window {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--dim);
}

.bar {
  height: 3px;
  border-radius: 99px;
  background: rgba(146, 172, 210, 0.16);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--acc), color-mix(in oklch, var(--acc) 40%, white));
}

.hero-targets {
  display: flex;
  gap: 10px;
  padding-top: 2px;
}

/* secondary live queue */

.queue {
  display: grid;
  gap: 8px;
}

.queue-row {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(23, 32, 51, 0.8), rgba(13, 20, 31, 0.8));
  --acc: var(--blue);
}

.queue-side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.queue-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 99px;
  background: var(--acc);
}

.queue-thumb {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: radial-gradient(circle at 50% 30%, rgba(62, 160, 255, 0.16), rgba(255, 255, 255, 0.02) 72%);
  overflow: hidden;
}

.queue-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.queue-text {
  min-width: 0;
}

.queue-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-text .metarow {
  font-size: 9.5px;
  margin-bottom: 3px;
}

.queue-row .tick {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: right;
  white-space: nowrap;
  color: var(--dim);
}

.live-mark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ff8b7e;
  font-weight: 600;
}

.live-mark .pulse {
  width: 5px;
  height: 5px;
}

/* ---------- target tiles ---------- */

.target-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 8px;
}

.target {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px 11px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(23, 32, 51, 0.72), rgba(12, 18, 28, 0.72));
  text-align: center;
  --acc: var(--blue);
}

.portrait {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in oklch, var(--acc) 32%, transparent);
  background:
    radial-gradient(circle at 50% 32%, color-mix(in oklch, var(--acc) 26%, transparent), rgba(255, 255, 255, 0.02) 70%),
    #0b111b;
  box-shadow: inset 0 0 22px color-mix(in oklch, var(--acc) 12%, transparent);
}

.portrait img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
}

.portrait .shiny {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 194, 61, 0.5);
  background: #14101c;
  color: var(--gold);
  font-size: 11px;
  line-height: 1;
}

.target-name {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.15;
}

.tagrow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.tag {
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(146, 172, 210, 0.08);
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag.t-raid {
  border-color: rgba(255, 83, 66, 0.4);
  background: rgba(255, 83, 66, 0.12);
  color: #ff9c91;
}

.tag.t-pvp {
  border-color: rgba(62, 160, 255, 0.4);
  background: rgba(62, 160, 255, 0.12);
  color: #9dcdff;
}

.tag.t-mega {
  border-color: rgba(169, 123, 255, 0.4);
  background: rgba(169, 123, 255, 0.12);
  color: #cdb2ff;
}

.tag.t-candy {
  border-color: rgba(61, 220, 132, 0.36);
  background: rgba(61, 220, 132, 0.1);
  color: #93ecbb;
}

.tag.t-shiny {
  border-color: rgba(255, 194, 61, 0.4);
  background: rgba(255, 194, 61, 0.12);
  color: #ffd884;
}

.tag.t-max {
  border-color: rgba(255, 149, 38, 0.4);
  background: rgba(255, 149, 38, 0.12);
  color: #ffc38b;
}

.target-why {
  align-self: start;
  min-height: 0;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* small variant inside hero + cards */

.target.is-sm {
  padding: 0;
  border: 0;
  background: none;
  gap: 5px;
}

.target.is-sm .portrait {
  width: 68px;
  height: 68px;
}

.target.is-sm .target-name {
  font-size: 12px;
  line-height: 1.2;
  color: var(--dim);
  max-width: 84px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.target.is-xs {
  padding: 0;
  border: 0;
  background: none;
  gap: 4px;
}

.target.is-xs .portrait {
  width: 60px;
  height: 60px;
}

.target.is-xs .portrait .shiny {
  width: 18px;
  height: 18px;
  font-size: 9px;
}

.target.is-xs .target-name {
  font-size: 11px;
  line-height: 1.2;
  color: var(--dim);
  max-width: 74px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.controls {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  gap: 8px;
  margin: 4px -12px 18px;
  padding: 8px 12px 10px;
  background: rgba(6, 8, 13, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(17, 24, 39, 0.7);
}

.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab:hover {
  background: rgba(62, 160, 255, 0.08);
  color: var(--text);
}

.tab.is-active {
  background: linear-gradient(180deg, rgba(62, 160, 255, 0.22), rgba(62, 160, 255, 0.1));
  border: 1px solid rgba(62, 160, 255, 0.34);
  color: #cfe6ff;
}

.tab-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
}

.tab.is-active .tab-count {
  color: #8ec8ff;
}

.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(17, 24, 39, 0.6);
}

.filters label > span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}

.filters select {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.filters select option {
  background: #0d141f;
}

/* ---------- views ---------- */

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 2px 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.view > .section-title:first-child {
  margin-top: 4px;
}

.section-title h2 {
  font-size: 15px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title p {
  margin: 0;
  color: var(--faint);
  font-size: 11.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-align: right;
}

.event-grid {
  display: grid;
  gap: 10px;
}

/* ---------- event card ---------- */

.ev {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 11px;
  padding: 13px 13px 13px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  --acc: var(--blue);
}

.ev::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--acc), color-mix(in oklch, var(--acc) 30%, transparent));
}

.ev.p-high {
  border-color: color-mix(in oklch, var(--red) 26%, transparent);
  background: linear-gradient(180deg, #1a1620 0%, #0f1420 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.ev.p-low {
  opacity: 0.78;
}

.ev.p-low:hover {
  opacity: 1;
}

.ev-head {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: start;
}

.ev-thumb {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: radial-gradient(circle at 50% 28%, color-mix(in oklch, var(--acc) 20%, transparent), rgba(255, 255, 255, 0.02) 72%);
}

.ev-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ev-thumb.is-sprite img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.ev-title {
  margin: 4px 0 6px;
  font-size: 16px;
  line-height: 1.18;
}

.ev-window {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
}

.ev-window .window {
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: rgba(146, 172, 210, 0.07);
  color: #cdd8e8;
  font-weight: 500;
}

.ev-window .tick {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.1em;
}

.ev.is-live .ev-window .tick {
  color: #ff9c91;
}

.ev-summary {
  margin: 0;
  align-self: start;
  min-height: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ev-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 0 2px;
  border-top: 1px solid var(--line-soft);
}

.ev-bonuses {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pill {
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid rgba(62, 160, 255, 0.2);
  background: rgba(62, 160, 255, 0.08);
  color: #b6d5f5;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.ev-prep {
  border-top: 1px solid var(--line-soft);
  padding-top: 9px;
}

.ev-prep summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  min-height: 22px;
}

.ev-prep summary::-webkit-details-marker {
  display: none;
}

.ev-prep summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
}

.ev-prep[open] summary::before {
  content: "−";
}

.ev-prep summary:hover {
  color: var(--dim);
}

.ev-prep p {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.45;
}

/* priority accents */

.p-high {
  --acc: var(--red);
}

.p-worth {
  --acc: var(--green);
}

.p-collection {
  --acc: var(--gold);
}

.p-low {
  --acc: #5c6a80;
}

.empty {
  padding: 22px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  background: rgba(17, 24, 39, 0.4);
  color: var(--faint);
  font-size: 13px;
}

/* ---------- week ---------- */

.week-list {
  display: grid;
  gap: 16px;
}

.day-card {
  display: grid;
  gap: 8px;
}

.day-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.day-head strong {
  font-size: 12px;
  font-weight: 600;
}

.day-head span {
  color: var(--faint);
  font-size: 10.5px;
}

.day-head .today-mark {
  margin-left: auto;
  color: var(--blue);
  font-size: 9.5px;
}

.day-card .ev {
  padding: 11px 11px 11px 14px;
}

.day-card .ev-bonuses,
.day-card .ev-prep,
.day-card .ev-summary {
  display: none;
}

.day-card .ev-head {
  grid-template-columns: 48px 1fr;
}

.day-card .ev-thumb {
  width: 48px;
  height: 48px;
}

.day-card .ev-title {
  font-size: 14px;
}

/* ---------- sources ---------- */

.source-panel {
  display: grid;
  gap: 8px;
}

.source-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
}

.source-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(62, 160, 255, 0.08);
  color: #9dcdff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.source-row h3 {
  margin: 4px 0 5px;
  font-size: 14.5px;
  font-weight: 500;
}

.source-row p {
  margin: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- footer ---------- */

.app-foot {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.7;
}

.app-foot b {
  color: var(--dim);
}

.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.foot-sub {
  margin-top: 4px;
  color: var(--faint);
}

.refresh-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.refresh-btn:hover {
  border-color: var(--blue);
  color: var(--text);
}

.refresh-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ---------- breakpoints ---------- */

@media (min-width: 620px) {
  .app {
    padding: 0 20px 64px;
  }

  .controls {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: center;
    margin-inline: -20px;
    padding-inline: 20px;
  }

  .hero-card {
    min-height: 260px;
    padding: 22px;
  }

  .target-board {
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 10px;
  }

  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .cmd-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .hero-card {
    min-height: 300px;
    padding: 26px;
  }

  .hero-body h2 {
    font-size: 34px;
  }

  .queue {
    align-content: start;
  }

  .event-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .week-list {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
  }

  .day-card .ev-head {
    grid-template-columns: 1fr;
  }

  .day-card .ev-thumb {
    width: 100%;
    height: 62px;
  }

  .day-card .ev-targets {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse {
    animation: none;
  }
}
