/* Cinzel (Google Fonts, SIL Open Font License), served by us: the site's title font. */
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/fonts/cinzel-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/fonts/cinzel-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #12100e;
  --panel: #1c1916;
  --panel-raised: #25211d;
  --border: #3a332b;
  --text: #ece4d8;
  --muted: #9d9284;
  --gold: #d9a441;
  --high: #5fbf6a;
  --mid: #e0b84a;
  --low: #e07a3f;
  --none: #5b544c;
  --error: #e05a4f;
  --radius: 10px;
}

* { box-sizing: border-box; }

/* Hidden means hidden, also for elements whose class sets a display (e.g. .podium). */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.4;
}

/* A fixed background picture (static/images/background.jpg: CipSoft's Summer Update
   2021 artwork, © CipSoft GmbH, credited in the footer): only the content scrolls.
   Two fixed layers instead of background-attachment: fixed, which phones (iOS)
   ignore: the picture, muted (less colour, darker), and a dark veil over it so
   tables stay readable. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background: url("/images/background.jpg") center / cover no-repeat, var(--bg);
  filter: saturate(0.55) brightness(0.62);
}
body::after {
  background: linear-gradient(rgba(18, 16, 14, 0.80), rgba(18, 16, 14, 0.92));
}

/* App shell: top bar menu + page + footer */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 1200px;
  height: 56px;
  margin: 0 auto;
  padding: 0 16px;
}

.topbar-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-right: 16px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark { width: 30px; height: 30px; filter: drop-shadow(0 1px 4px rgba(224, 168, 60, 0.35)); }
.brand-name { font-family: "Cinzel", Georgia, serif; font-size: 18px; font-weight: 700; letter-spacing: 0.03em; color: var(--gold); }

.topbar-nav { display: flex; gap: 4px; align-items: center; }

.nav-dropdown { position: relative; }

.topbar-link {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.topbar-link:hover { background: var(--panel-raised); color: var(--text); }
.topbar-link.active { color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 8px 8px 0 0; }

@media (max-width: 900px) {
  .topbar-link { padding: 12px 10px; border-radius: 8px; }
  .topbar-link.active { box-shadow: none; background: var(--panel-raised); }
}

.nav-group-button {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.nav-group-button::after { content: "▾"; color: var(--muted); font-size: 11px; }
.nav-group-button:hover, .nav-dropdown.open .nav-group-button { background: var(--panel-raised); filter: none; }
.nav-dropdown.active .nav-group-button { color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); }

.nav-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  display: none;
  min-width: 230px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.45);
}

.nav-dropdown.open .nav-menu { display: block; }

@media (hover: hover) and (min-width: 901px) {
  .nav-dropdown:hover .nav-menu { display: block; }
  /* Bridges the gap so the menu stays open while the pointer moves down. */
  .nav-dropdown:hover::after { content: ""; position: absolute; inset: 100% 0 auto; height: 8px; }
}

.nav-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-item:hover { background: var(--panel-raised); }

.nav-item.active {
  background: var(--panel-raised);
  box-shadow: inset 3px 0 0 var(--gold);
  color: var(--gold);
  font-weight: 600;
}

.nav-icon { width: 18px; color: var(--muted); text-align: center; }
.nav-item.active .nav-icon { color: var(--gold); }

.topbar-account {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 280px;
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
}

button.topbar-account { background: none; font-weight: 400; text-align: left; }
.topbar-account:hover { border-color: var(--gold); filter: none; }
.account-dropdown { margin-left: auto; }
.account-dropdown .topbar-account { margin-left: 0; }
.account-dropdown.active .topbar-account, .account-dropdown.open .topbar-account { border-color: var(--gold); }
.account-dropdown .nav-menu { left: auto; right: 0; }
.topbar-account small { color: var(--muted); font-size: 11px; }

.menu-toggle { display: none; padding: 4px 10px; background: var(--panel-raised); border-color: var(--border); color: var(--text); }

.app-main { display: flex; flex-direction: column; min-height: calc(100vh - 57px); }
.app-main > main { flex: 1; width: 100%; }

.site-footer-rights { flex-basis: 100%; color: var(--muted); font-size: 11px; opacity: 0.8; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.site-footer a { color: var(--muted); }
/* Footer links: spaced out; the admin-only ones after a thin divider */
.site-footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.site-footer-links a { text-decoration: none; }
.site-footer-links a:hover { text-decoration: underline; }
.site-footer-links a[data-admin] { font-size: 12px; }
.site-footer-links a:not([data-admin]) + a[data-admin] { padding-left: 18px; border-left: 1px solid var(--border); }
.site-footer-links .feedback-button {
  padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--gold) 50%, var(--border));
  border-radius: 999px;
}
.site-footer-links .feedback-button:hover { background: var(--panel-raised); text-decoration: none; }
.site-footer a:hover, .site-footer a[aria-current] { color: var(--gold); }

.page-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 16px 20px;
}

h1 { margin: 0; font-size: 22px; letter-spacing: 0.02em; }
.subtitle { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* Narrow screens: the groups fold into a menu under the bar, the account shows only the avatar. */
@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .topbar-brand { margin-right: 0; }

  .topbar-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - 56px);
    padding: 8px 16px 16px;
    overflow-y: auto;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 30px rgb(0 0 0 / 0.45);
  }

  .menu-open .topbar-nav { display: flex; }

  .nav-group-button {
    padding: 12px 10px 6px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
  }

  .nav-group-button::after { content: none; }
  .nav-dropdown.active .nav-group-button { color: var(--muted); box-shadow: none; }
  .topbar-nav .nav-menu { position: static; display: block; min-width: 0; padding: 0; border: none; box-shadow: none; }

  .topbar-account { padding: 4px; }
  .topbar-account .account-text, .topbar-account .account-level { display: none; }
  .page-header { padding-top: 20px; }
}

.world-form { display: flex; gap: 8px; align-items: center; }
.world-form label { color: var(--muted); font-size: 13px; }

input, select, button {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}

input:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
#world-select { width: 160px; }

button {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1408;
  font-weight: 600;
  cursor: pointer;
}

button:hover { filter: brightness(1.1); }
button:disabled { opacity: 0.6; cursor: wait; }

/* Source status */

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sources { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.source {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  font-size: 13px;
  cursor: default;
}

.source::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--high); }
.source.off { color: var(--muted); }
.source.off::before { background: var(--error); }
.source.waiting::before { background: var(--mid); }
.source time { color: var(--muted); font-size: 12px; }

.updated { color: var(--muted); font-size: 13px; }

.server-day {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: var(--panel);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
}

.server-day strong { color: var(--text); }

/* Kill reports */

.report {
  margin-bottom: 20px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.report-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.report-form select, .report-form input { background: var(--panel-raised); }
#report-boss { flex: 1 1 180px; }
.report-error { color: var(--error); font-size: 13px; }

.reports { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.reports:not(:empty) { margin-top: 10px; }

.reports li {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 2px 4px 2px 10px;
  background: var(--panel-raised);
  border-radius: 999px;
  font-size: 13px;
}

.reports button {
  padding: 0 7px;
  background: none;
  border: none;
  color: var(--muted);
  font-weight: 400;
}

.reports button:hover { color: var(--error); }
.reported { color: var(--gold); }

/* Loading / error */

.state { padding: 48px 16px; text-align: center; color: var(--muted); }
.state-error { color: var(--error); }

.spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Podium */

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--tier);
  border-radius: var(--radius);
  text-align: center;
}

.card .place {
  position: absolute;
  top: 8px;
  left: 12px;
  color: var(--muted);
  font-weight: 700;
}

.card .sprite { width: 96px; height: 96px; }
.card .name { font-weight: 600; font-size: 16px; }
.card .chance { font-size: 30px; font-weight: 700; color: var(--tier); font-variant-numeric: tabular-nums; }
.card .seen { color: var(--muted); font-size: 13px; }

/* Recently killed */

.recent { margin-bottom: 24px; }

.recent h2 { margin: 0 0 8px; font-size: 16px; }
.recent .hint { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }

.recent details {
  margin-bottom: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.recent summary { padding: 8px 12px; cursor: pointer; font-weight: 600; }
.recent summary .count { margin-left: 6px; color: var(--muted); font-weight: 400; }

.recent-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0 12px 12px; list-style: none; }

.recent-item {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 2px 10px 2px 2px;
  background: var(--panel-raised);
  border-radius: 999px;
  font-size: 13px;
}

.recent-item .sprite { width: 28px; height: 28px; border-radius: 50%; font-size: 10px; }

/* Toolbar */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

#search { flex: 1 1 220px; }
.toggle { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; cursor: pointer; }
.toggle input { accent-color: var(--gold); }
.count { margin-left: auto; color: var(--muted); font-size: 13px; }

.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.legend span { display: flex; gap: 6px; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 2px; background: var(--tier); }

/* List */

.list { margin: 0 0 22px; padding: 4px 16px; list-style: none; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.list > .row:last-child, .today-section .today-list > .row:last-child { border-bottom: 0; }

.row {
  display: grid;
  grid-template-columns: 36px 48px minmax(140px, 1.2fr) 2fr 70px;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.row:hover { background: var(--panel); }
.rank { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.info { display: flex; flex-direction: column; min-width: 0; }
.row .name { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; min-width: 0; font-weight: 600; }
.row .name .boss-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .seen { color: var(--muted); font-size: 12px; }
.row .window { margin-top: 3px; }

/* Spawn window */

.window { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; color: var(--muted); font-size: 12px; }
.card .window { justify-content: center; }

.badge {
  padding: 1px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.window-open { color: var(--high); }
.window-before { color: var(--muted); }
.window-after { color: var(--low); }
.window-unknown { color: var(--none); }
.legend-sep { width: 1px; height: 12px; background: var(--border); }

.bar { height: 10px; background: var(--panel-raised); border-radius: 999px; overflow: hidden; }
.fill { height: 100%; width: 0; background: var(--tier); border-radius: 999px; transition: width 0.4s ease; }
.per-source { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; color: var(--muted); font-size: 11px; }

.history-chip { color: var(--gold); }

/* Boss location: description + map / route / wiki links */

.where {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  align-items: baseline;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.where:empty { display: none; }
.where-place { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.where a { color: var(--gold); text-decoration: none; white-space: nowrap; }
.where a:hover { text-decoration: underline; }
.where-card { margin: -6px 0 12px; }
/* Cards: at most two lines of the place text (the full text is the tooltip). */
.where-card .where-place { display: -webkit-box; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Boss page: minimap of each spawn (tibiamaps.io open data) */
.where-text { margin: 0 0 10px; line-height: 1.5; }
.minimaps { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 14px; }
.minimap { margin: 0; display: flex; flex-direction: column; gap: 4px; max-width: 100%; }
.minimap-view { position: relative; display: block; flex: none; border-radius: 8px; border: 1px solid var(--border); background-color: #000; background-repeat: no-repeat; image-rendering: pixelated; }
.minimap-marker { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid #ff3b3b; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,0,0,.6); pointer-events: none; }
.minimap figcaption { color: var(--muted); font-size: 12px; text-align: center; }
.where-actions { display: flex; justify-content: center; }

/* A link that looks like a button (outlined, gold accent) */
.action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: var(--panel-raised);
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.action-link:hover { background: var(--gold); color: var(--bg); }
#where a { color: var(--gold); }

.row .chance { text-align: right; font-weight: 700; color: var(--tier); font-variant-numeric: tabular-nums; }
.row-end { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.row-note { margin-top: 3px; color: var(--muted); font-size: 12px; }

/* Shared legend (boss-row.js): colours, window statuses and what they mean */
.legend-button {
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.legend-button:hover { color: var(--gold); border-color: var(--gold); }
.legend-dialog { max-width: min(640px, calc(100vw - 32px)); padding: 20px; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); }
.legend-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.legend-dialog h2 { margin: 0 0 12px; font-size: 16px; }
.legend-dialog form { display: flex; justify-content: flex-end; margin-top: 14px; }
.legend-help { display: grid; grid-template-columns: max-content 1fr; gap: 8px 12px; margin: 0; font-size: 13px; }
.legend-help dt { margin: 0; }
.legend-colors { display: flex; gap: 4px; align-items: center; }
.legend-help dd { margin: 0; color: var(--muted); line-height: 1.45; }

/* "Do sprawdzenia": ranking rows inside the sections */
.today-section .today-list { gap: 0; }
.today-row { grid-template-columns: 28px 48px minmax(160px, 1.2fr) 2fr 96px; }
.today-killed .today-row { opacity: 0.7; }

/* Sprites */

.sprite {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel-raised);
}

.sprite img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.sprite.fallback { color: var(--muted); font-weight: 700; }

/* Chance tiers */

.tier-high { --tier: var(--high); }
.tier-mid { --tier: var(--mid); }
.tier-low { --tier: var(--low); }
.tier-none { --tier: var(--none); }

@media (max-width: 640px) {
  .podium { grid-template-columns: 1fr; }
  .row, .today-row { grid-template-columns: 28px 40px 1fr 88px; }
  .legend-help { grid-template-columns: 1fr; }
  .row .sprite { width: 40px; height: 40px; }
  .meter { grid-column: 2 / -1; grid-row: 2; }
}

/* Filter chips: checkboxes (multi-select) or radios (single choice) styled as pills */

.filter-panel { margin-bottom: 14px; }

.filter-panel summary {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.filter-panel summary::-webkit-details-marker { display: none; }
.filter-panel summary::after { content: "▾"; color: var(--muted); transition: transform 0.15s; }
.filter-panel[open] summary::after { transform: rotate(180deg); }
.filter-panel summary:hover { border-color: var(--muted); }
.filter-icon { color: var(--gold); }
.filter-summary { color: var(--gold); font-size: 12px; }
.filter-summary:empty { display: none; }

.filters { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
}

.chip-group legend {
  float: left;
  width: 72px;
  color: var(--muted);
  font-size: 13px;
}

.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }

.chip span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chip:hover span { border-color: var(--muted); }
.chip small { color: var(--muted); font-size: 11px; }

.chip input:checked + span {
  background: rgb(217 164 65 / 0.14);
  border-color: var(--gold);
  color: var(--text);
}

.chip input[type="checkbox"]:checked + span::before { content: "✓"; color: var(--gold); font-weight: 700; }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Respawn analysis */

.analysis-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 12px; }

.analysis-card {
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.analysis-card h2 { margin: 0; font-size: 16px; }
/* Profile: the GuildStats import as numbered steps */
.import-steps { display: flex; flex-direction: column; gap: 14px; margin: 14px 0 0; padding-left: 22px; }
.import-steps li { line-height: 1.5; }
.import-steps li::marker { color: var(--gold); font-weight: 700; }
.import-steps small { display: block; color: var(--muted); font-size: 12px; }
.import-steps p { margin: 8px 0 0; }
.import-steps kbd { padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel-raised); font-size: 12px; }
.gs-links { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.gs-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--panel-raised); border: 1px solid var(--border); border-left: 3px solid var(--low); border-radius: 8px; }
.gs-row.is-done { border-left-color: var(--high); }
.gs-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gs-row-state { color: var(--low); font-size: 13px; }
.gs-row.is-done .gs-row-state { color: var(--high); }
.gs-row-url { color: var(--muted); font-size: 12px; text-decoration: none; word-break: break-all; }
.gs-row-url:hover { color: var(--gold); text-decoration: underline; }
.gs-row .action-link { padding: 6px 14px; font-size: 13px; }
.gs-row .gs-row-again { border-color: var(--border); color: var(--muted); }

.pending-box { margin-top: 24px; }
.pending-box > h2 { margin: 0 0 10px; font-size: 16px; }
.pending-box > h2 small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
.pending-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.pending-card .card-meta { color: var(--muted); font-size: 12px; }
.analysis-meta { margin: 2px 0 10px; color: var(--muted); font-size: 12px; }

.hist {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(var(--days), 1fr);
  gap: 1px;
  align-items: end;
  height: 90px;
  border-bottom: 1px solid var(--border);
}

.hist-col { display: flex; align-items: end; height: 100%; }
.hist-col:hover { background: var(--panel-raised); }
/* Today's day after the kill: an outlined column with a marker above it. */
.hist-col.hist-today { position: relative; outline: 1px dashed var(--high); outline-offset: -1px; }
.hist-col.hist-today::before { content: "▼"; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); color: var(--high); font-size: 10px; }
.hist-bar { width: 100%; border-radius: 2px 2px 0 0; }

.hist-window { --tier: var(--gold); background: var(--gold); }
.hist-outside { --tier: var(--none); background: var(--none); }
.hist-plain { --tier: var(--muted); background: color-mix(in srgb, var(--gold) 35%, var(--panel-raised)); }
.hist-key { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.hist-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }

.analysis-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.analysis-head h2 { margin-right: 4px; }
.card-header { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.card-title { min-width: 0; }
.card-header .analysis-meta { margin: 2px 0 0; }
.sprite-small { flex: none; width: 44px; height: 44px; border-radius: 8px; font-size: 12px; }
.pattern-note { margin: -6px 0 12px; }
.legend-link { color: var(--gold); text-decoration: none; }
.legend-link:hover { text-decoration: underline; }
.tag { color: var(--muted); }
.tag-raid { color: var(--low); }
.tag-mwc { color: #6fb7d9; }
.tag-opportunity { color: var(--high); }
.tag-neglected { color: var(--muted); }
.tag-competition { color: var(--mid); }

.neglect-line { margin: -4px 0 12px; color: var(--muted); font-size: 12px; }
.neglect-line strong { color: var(--text); font-weight: 600; }

.related-line { margin: -6px 0 12px; color: var(--muted); font-size: 12px; }
.related-line strong { color: var(--text); font-weight: 600; }
.related-line b { color: var(--gold); font-weight: 600; }

.analysis-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.analysis-warning { color: var(--low); }

.key-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 4px 0 14px;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.fact { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--panel-raised); }
.fact-label { color: var(--muted); font-size: 11px; }
.fact-value { color: var(--gold); font-size: 17px; font-variant-numeric: tabular-nums; }
.fact-note { color: var(--muted); font-size: 11px; }
.fact-note .badge { font-size: 10px; }

@media (max-width: 480px) {
  .key-facts { grid-template-columns: 1fr; }
}

.chance-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.chance-table caption { margin-bottom: 4px; color: var(--muted); font-size: 11px; text-align: left; }
.chance-table th { color: var(--muted); font-weight: 400; text-align: right; }
.chance-table th:first-child, .chance-table td:first-child { text-align: left; }
.chance-table td { padding: 3px 0; border-top: 1px solid var(--border); text-align: right; }
.chance-table .peak td { color: var(--gold); font-weight: 600; }
.chance-table .today td { background: var(--panel-raised); }
.chance-table .gap td { padding: 0; border-top: 0; color: var(--muted); text-align: center; }
.chance-table .today td:first-child::after { content: " ← dziś"; color: var(--high); font-weight: 600; }

.hist-axis {
  display: grid;
  grid-template-columns: repeat(var(--days), 1fr);
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.hist-axis span { overflow: visible; white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; margin: 12px 0 0; }
.stat dt { color: var(--muted); font-size: 11px; }
.stat dd { margin: 0; font-size: 13px; font-weight: 600; }

/* Today: the daily checklist */

.today-toolbar { justify-content: space-between; }
.today-toolbar .count { margin-left: 0; }

/* Every section sits on its own panel, like the podium cards, so the page
   background picture does not show through the lists. */
.today-section { margin-bottom: 22px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.today-section h2 { margin: 0 0 8px; font-size: 16px; }
.today-section h2 small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }

.today-killed { margin-top: 8px; }
.today-killed summary { list-style: none; cursor: pointer; }
/* No white focus frame after a mouse click on a fold-out header (keyboard focus keeps it). */
summary:focus:not(:focus-visible) { outline: none; }
.today-killed summary::-webkit-details-marker { display: none; }
.today-killed summary h2::before { content: "▸ "; color: var(--muted); }
.today-killed[open] summary h2::before { content: "▾ "; }

.today-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }

.today-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.today-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.today-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.today-reason { color: var(--muted); font-size: 12px; }
.today-chance { color: var(--gold); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

.today-killed .today-item { opacity: 0.7; }

.today-actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

.kill-button { padding: 3px 10px; font-size: 12px; white-space: nowrap; }

.button-quiet {
  background: none;
  border-color: var(--border);
  color: var(--muted);
  font-weight: 400;
}

.button-quiet:hover { color: var(--text); }

.kill-form { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.kill-form input { padding: 3px 6px; font-size: 12px; background: var(--panel-raised); }
.kill-form button { padding: 3px 10px; font-size: 12px; }

.boosted {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 16px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  font-size: 14px;
}

.boosted strong { color: var(--gold); }
.tag-boosted { color: var(--gold); }
.tag-bosstiary { color: var(--high); }
.kill-bosstiary { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; cursor: pointer; }
.kill-form .kill-bosstiary input { padding: 0; accent-color: var(--gold); }

@media (max-width: 640px) {
  .today-item { grid-template-columns: auto 1fr; }
  .today-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}

.today-toolbar { flex-wrap: wrap; gap: 10px 16px; }

/* One "⚙ Filtry" menu (filter-menu.js) and the active filters as removable labels */
.filter-menu { position: relative; }
.filter-menu-button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}
.filter-menu-button:hover, .filter-menu-button[aria-expanded="true"] { border-color: var(--gold); }
.filter-menu-button.is-active { border-color: var(--gold); color: var(--gold); }
.filter-menu-count { min-width: 1.4em; padding: 0 5px; border-radius: 999px; background: var(--gold); color: var(--bg); font-size: 11px; font-weight: 700; text-align: center; }
.filter-menu-panel {
  position: absolute;
  z-index: 25;
  top: calc(100% + 6px);
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 260px;
  padding: 14px 16px;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.filter-menu-group { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; }
.filter-menu-group legend { margin-bottom: 4px; padding: 0; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.filter-menu-group label { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.filter-menu-group input { accent-color: var(--gold); }
.filter-menu-group small { color: var(--muted); }
.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }
.filter-pill { padding: 3px 10px; background: none; border: 1px solid var(--gold); border-radius: 999px; color: var(--gold); font: inherit; font-size: 12px; font-weight: 400; cursor: pointer; }
.filter-pill:hover { background: var(--gold); color: var(--bg); }

/* Always-visible filters under the search (filter-menu.js filterBar) */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: -4px 0 16px; }
.filter-segments { display: inline-flex; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; }
.filter-segments button, .filter-toggles button {
  padding: 6px 14px;
  background: var(--panel);
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}
.filter-segments button + button { border-left: 1px solid var(--border); }
.filter-segments button:hover, .filter-toggles button:hover { color: var(--text); }
.filter-segments button[aria-pressed="true"] { background: var(--gold); color: var(--bg); font-weight: 600; }
.filter-segments button[aria-pressed="true"] small { color: var(--bg); }
.filter-toggles { display: inline-flex; gap: 6px; }
.filter-toggles button { border: 1px solid var(--border); border-radius: 8px; }
.filter-toggles button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.filter-bar small { margin-left: 2px; color: var(--muted); font-size: 12px; }

/* Boss search with its own suggestion list (boss-search.js) */
.boss-search { position: relative; flex: 1 1 240px; min-width: 0; }
.boss-search input { width: 100%; }
.boss-suggest {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--panel-raised);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.boss-suggest li { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 6px; font-size: 15px; cursor: pointer; }
.boss-suggest li b { color: var(--gold); }
.boss-suggest li.is-active, .boss-suggest li:hover { background: var(--panel); }
.boss-suggest li.is-active::after { content: "Enter ↵"; margin-left: auto; color: var(--muted); font-size: 11px; }
.boss-suggest-sprite { display: grid; place-items: center; flex: none; width: 32px; height: 32px; }
.boss-suggest-sprite img { max-width: 32px; max-height: 32px; image-rendering: pixelated; }
.today-toolbar .chip-group legend { width: auto; margin-right: 8px; }
.view-hidden { display: none; }

/* Routes editor */

.routes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; margin-bottom: 24px; }

.route-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.route-head { display: flex; gap: 8px; align-items: center; }
.route-head input { flex: 1; font-weight: 600; background: var(--panel-raised); }
.route-card select { align-self: flex-start; background: var(--panel-raised); }

.route-bosses { display: flex; flex-wrap: wrap; gap: 6px; }
.route-bosses:empty::before { content: "Brak bossów, dodaj z listy poniżej."; color: var(--muted); font-size: 12px; }

.route-boss {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 3px 4px 3px 10px;
  background: var(--panel-raised);
  border-radius: 999px;
  font-size: 13px;
}

.route-boss:not(:has(button)) { padding-right: 10px; }
.route-boss button { padding: 0 6px; background: none; border: none; color: var(--muted); font-weight: 400; }
.route-boss button:hover { color: var(--error); }

.unassigned .route-boss { color: var(--muted); }

/* Data status */

.checks { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tier);
  border-radius: var(--radius);
}

.check-ok { --tier: var(--high); }
.check-warning { --tier: var(--mid); }
.check-error { --tier: var(--error); }

.check-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--tier);
  color: #1a1408;
  font-size: 13px;
  font-weight: 700;
}

.check-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.check-summary { color: var(--muted); font-size: 13px; }
.check details { margin-top: 4px; font-size: 12px; }
.check summary { color: var(--muted); cursor: pointer; }
.check pre { margin: 4px 0 0; color: var(--muted); font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Boss page */

.boss-title { display: flex; gap: 14px; align-items: center; }
.boss-title .sprite { width: 56px; height: 56px; border-radius: 10px; }
.boss-title .subtitle { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.boss-today { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.boss-today strong { color: var(--gold); }

.boss-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.history-table td:last-child, .history-table th:last-child { text-align: left; padding-left: 12px; }
.history-table td:nth-child(2), .history-table th:nth-child(2) { text-align: right; }

.verdict-ok { color: var(--high); }
.verdict-missed { color: var(--low); }
.verdict-early { color: var(--mid); }
.verdict-unknown { color: var(--muted); }

a.boss-link { color: inherit; text-decoration: none; }
a.boss-link:hover { color: var(--gold); text-decoration: underline; }

/* Calendar of upcoming windows */

.calendar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }

.calendar-day {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.calendar-day.weekend { border-left: 3px solid var(--mid); }
.calendar-day.today { border-color: var(--gold); }
.calendar-day h3 { margin: 2px 0 0; font-size: 14px; text-transform: capitalize; }
.calendar-day h3 small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; text-transform: none; }

.calendar-bosses { display: flex; flex-wrap: wrap; gap: 6px; }

.calendar-boss {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 2px 10px 2px 4px;
  background: var(--panel-raised);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
}

.calendar-boss img { width: 22px; height: 22px; image-rendering: pixelated; }
.calendar-boss b { color: var(--gold); font-variant-numeric: tabular-nums; }
.calendar-boss.is-peak { border-color: var(--gold); }
.calendar-more { padding: 2px 10px; font-size: 12px; }

@media (max-width: 640px) {
  .calendar-day { grid-template-columns: 1fr; }
}

/* Account */

.account-avatar {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: color-mix(in srgb, var(--gold) 20%, var(--panel)); color: var(--gold); font-weight: 700;
}
.account-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.account-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-level {
  margin-left: auto; padding: 2px 7px; border: 1px solid var(--gold); border-radius: 999px;
  color: var(--gold); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}

.account { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.account img { width: 48px; height: 48px; border-radius: 50%; }
.account div { display: flex; flex-direction: column; }
.account button { margin-left: auto; }

/* Profile: the Discord account as a slim panel above the characters */
.account-card { padding: 12px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.account-card-avatar { display: grid; place-items: center; flex: none; width: 44px; height: 44px; overflow: hidden; border: 2px solid #5865f2; border-radius: 50%; background: #5865f2; }
.account-card-avatar img { width: 100%; height: 100%; }
.account-card-avatar:not(:has(img:not([hidden])))::before { content: "👤"; font-size: 20px; }
.account-card-text { gap: 2px; }
.account-card-label { color: #8f98ff; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.account-card-text strong { font-size: 16px; }
.account-card-logout { padding: 6px 14px; font-size: 13px; }

.discord-login {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 18px;
  background: #5865f2;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.character.is-active { border-color: var(--gold); }
.add-character { margin-top: 10px; }
.add-character input { flex: 1 1 220px; }

/* Bosstiary */

.bosstiary-summary { grid-template-columns: repeat(4, 1fr); }
.bosstiary-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }

.bosstiary-boss {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tier);
  border-radius: var(--radius);
}

.bosstiary-boss.level-0 { --tier: var(--none); }
.bosstiary-boss.level-1 { --tier: var(--low); }
.bosstiary-boss.level-2 { --tier: var(--mid); }
.bosstiary-boss.level-3 { --tier: var(--high); }
.bosstiary-boss .bar { margin: 4px 0 2px; }
.bosstiary-boss .fill { background: var(--tier); }

.stars { color: var(--gold); letter-spacing: 1px; }
.class-bane { color: var(--muted); }
.class-archfoe { color: var(--mid); }
.class-nemesis { color: var(--low); }

.kills-editor { display: flex; gap: 4px; align-items: center; }
.kills-editor button { padding: 4px 10px; }
.kills-editor input { width: 72px; text-align: center; background: var(--panel-raised); }

@media (max-width: 640px) {
  .bosstiary-summary { grid-template-columns: repeat(2, 1fr); }
  .bosstiary-boss { grid-template-columns: auto 1fr; }
  .kills-editor,
  .level-picker { grid-column: 1 / -1; justify-content: flex-end; }
}

.bosstiary-hero {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: 14px 20px;
  margin-bottom: 18px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
}

.hero-total { display: flex; flex-direction: column; gap: 2px; }
.hero-points { color: var(--gold); font-size: 40px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-bar { margin-top: 8px; }
.hero-bar .fill { background: var(--gold); }
.hero-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.hero-levels .fact { background: var(--panel-raised); border-radius: 8px; }
.hero-classes { grid-column: 1 / -1; margin-top: 0; }
.hero-quick { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 720px) {
  .bosstiary-hero { grid-template-columns: 1fr; }
}

/* Bestiary */

.difficulty-harmless, .difficulty-trivial { color: var(--muted); }
.difficulty-easy { color: var(--high); }
.difficulty-medium { color: var(--mid); }
.difficulty-hard { color: var(--low); }
.difficulty-challenging { color: var(--error); }
.show-more { align-self: center; margin: 8px auto; }

.total-row td { border-top: 2px solid var(--border); color: var(--gold); font-weight: 700; }

.hunt-panel { padding: 12px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.hunt-panel summary { list-style: none; cursor: pointer; }
.hunt-panel summary::-webkit-details-marker { display: none; }
.hunt-panel textarea {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: 12px/1.4 ui-monospace, Consolas, monospace;
  resize: vertical;
}

.hunt-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
#hunt-result { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.hunt-history-title { margin: 12px 0 6px; color: var(--muted); font-size: 13px; }
.hunt-history > summary.hunt-history-title { cursor: pointer; font-weight: 600; list-style: revert; }
.hunt-history > summary.hunt-history-title:hover { color: var(--text); }
.hunt-history[open] > summary.hunt-history-title { margin-bottom: 8px; }
.hunt-item { grid-template-columns: 1fr auto; }

/* Bestiary classes: tiles grouped as in the game */

.bestiary-classes { display: flex; flex-direction: column; gap: 8px; }

.bestiary-class {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.bestiary-class > summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.bestiary-class > summary::-webkit-details-marker { display: none; }
.bestiary-class > summary::before { content: "▸"; color: var(--gold); }
.bestiary-class[open] > summary::before { content: "▾"; }
.class-name { color: var(--gold); font-size: 15px; }
.class-charm, .class-done { color: var(--muted); font-size: 12px; }

.creature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  padding: 0 14px 14px;
}

.creature-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  padding: 8px 6px;
  background: var(--panel-raised);
  border: 1px solid var(--tier);
  border-radius: 8px;
  color: var(--text);
  font-size: 11px;
  font-weight: 400;
  cursor: pointer;
}

.creature-tile:hover { filter: brightness(1.15); }
.tile-sprite { display: grid; place-items: center; width: 48px; height: 48px; }
.tile-sprite img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.tile-name { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.creature-tile .bar { width: 100%; height: 4px; }
.creature-tile .fill { background: var(--gold); }
.tile-progress { color: var(--muted); font-variant-numeric: tabular-nums; }
.creature-tile.stage-3 { box-shadow: inset 0 0 0 1px var(--high); }
.creature-tile.stage-3 .tile-progress { color: var(--high); }

.difficulty-border-harmless, .difficulty-border-trivial { --tier: var(--none); }
.difficulty-border-easy { --tier: var(--high); }
.difficulty-border-medium { --tier: #4f8fd6; }
.difficulty-border-hard { --tier: #9a6ad6; }
.difficulty-border-challenging { --tier: var(--error); }

.creature-editor {
  width: min(420px, 92vw);
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--text);
}

.creature-editor::backdrop { background: rgb(0 0 0 / 0.6); }
.creature-editor form { display: flex; flex-direction: column; gap: 10px; }
.editor-head { display: flex; gap: 12px; align-items: center; }
.editor-stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stage-button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px;
  background: var(--panel-raised); color: var(--muted); border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.stage-button strong { font-size: 15px; color: var(--text); }
.stage-button span { font-size: 12px; }
.stage-button:hover { border-color: var(--gold); }
.stage-button.done { border-color: var(--high); }
.stage-button.done strong { color: var(--high); }
.stage-button.current { background: color-mix(in srgb, var(--high) 18%, var(--panel-raised)); cursor: default; }
.editor-close { align-self: flex-end; }

.editor-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.editor-buttons .editor-close { margin-left: auto; padding: 6px 22px; }
.class-actions { display: flex; justify-content: flex-end; padding: 0 14px 8px; }
.class-actions button { padding: 3px 10px; font-size: 12px; }

.quick-bar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
}

.quick-bar > div { display: flex; flex-direction: column; gap: 2px; }
.quick-bar strong { color: var(--gold); }
.quick-bar button { flex: none; padding: 8px 18px; }
.quick-bar:not(.is-on) button { background: var(--panel-raised); border-color: var(--gold); color: var(--gold); }

.quick-bar.is-on {
  position: sticky;
  top: 64px; /* below the sticky top bar */
  z-index: 5;
  background: rgb(217 164 65 / 0.15);
  border-style: solid;
}

.quick-on .creature-tile { position: relative; }
.quick-on .creature-tile:not(.stage-3):hover::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 6px;
  color: var(--high);
  font-size: 16px;
  font-weight: 700;
}

/* Bestiary: Echo Warden and Animus Mastery markers, as in the game's tile corners */
.creature-tile { position: relative; }
.creature-tile { overflow: hidden; }
.tile-mark { position: absolute; top: 0; width: 20px; height: 20px; image-rendering: pixelated; pointer-events: none; }
.tile-animus { left: 0; }
.tile-warden { right: 0; }
.inline-icon { width: 18px; height: 18px; vertical-align: middle; object-fit: contain; }
.quick-on .creature-tile:has(.tile-warden):hover::after { content: none; }
.editor-flags { display: flex; flex-direction: column; gap: 6px; }
.flag-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.flag-toggle input { accent-color: var(--gold); }

/* Bestiary flat view for "closest" / "most points" sorts */
.bestiary-flat { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.flat-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.flat-more { align-self: center; }

/* Bosstiary quick mode: one click per level */
.level-picker { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.level-picker button { padding: 4px 10px; font-size: 12px; }
.level-picker .is-current { background: rgb(217 164 65 / 0.2); border-color: var(--gold); color: var(--gold); font-weight: 600; }

/* Bestiary suggestions: "what is worth hunting now" */
#suggestions { overflow-x: auto; }
.suggestion-table th + th,
.suggestion-table td + td { padding-left: 12px; white-space: nowrap; }
.suggestion-creature { display: inline-flex; align-items: center; gap: 8px; }
.suggestion-creature .sprite { width: 32px; height: 32px; flex: none; }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.link-button:hover { color: var(--gold); text-decoration: underline; }
.suggestion-more { margin: 8px 0; }
.suggestion-more > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.suggestion-table small.muted { color: var(--muted); }

/* Hunting places (Expowiska) */
.place-list { display: flex; flex-direction: column; gap: 8px; }
.place-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.place-card > summary {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center;
  padding: 10px 14px; cursor: pointer; list-style: none;
}
.place-card > summary::-webkit-details-marker { display: none; }
.place-card[open] > summary { border-bottom: 1px solid var(--border); }
.place-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.place-title .badge { color: var(--gold); }
.place-facts { display: flex; gap: 12px; align-items: baseline; color: var(--muted); font-size: 13px; }
.place-charm { color: var(--gold); }
.place-card .bar { grid-column: 1 / -1; height: 6px; }
.place-preview { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.place-creatures { margin: 0; padding: 6px 14px; list-style: none; }
.place-creature {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto 48px; gap: 10px; align-items: center;
  padding: 4px 0; font-size: 13px;
}
.place-creature .sprite { width: 32px; height: 32px; }
.place-creature.is-done { opacity: .55; }
.place-creature .muted { color: var(--muted); }
.place-creature-progress, .place-creature-charm { text-align: right; white-space: nowrap; }
.place-creature-charm { color: var(--gold); }
.place-wiki { display: inline-block; margin: 0 14px 10px; font-size: 13px; }
@media (max-width: 560px) {
  .place-card > summary { grid-template-columns: 1fr; }
  .place-creature { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .place-creature > .muted { display: none; }
  .place-creature-charm { display: none; }
}
.suggest-filters { margin: 0 0 6px; }

/* Ranking: raid (world) bosses, listed apart */
.raids-section .hint { display: block; margin: 2px 0 0; }
.raid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 0; padding: 0 12px 12px; list-style: none; }
.raid-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; background: var(--panel-raised); border-radius: 8px; }
.raid-item > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.raid-item .sprite { width: 40px; height: 40px; flex: none; }
.raid-item .seen { color: var(--muted); font-size: 12px; }

/* Bosstiary class icon (Bane, Archfoe, Nemesis) before boss names */
.class-icon { width: 15px; height: 15px; vertical-align: -2px; image-rendering: pixelated; }

/* Hunting place of a hunt */
.hunt-place { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.hunt-place-label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.hunt-place-label input { flex: 1; max-width: 320px; }
.hunt-place-inline { margin-top: 4px; font-weight: 400; font-size: 13px; }
.hunt-place-hints { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-button {
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--panel-raised); color: var(--text); border: 1px solid var(--border);
}
.chip-button:hover { border-color: var(--gold); }
.place-rates-wrap { overflow-x: auto; padding: 0 14px 10px; }
.place-rates { margin: 0; }
.place-rates th, .place-rates td { padding: 4px 8px 4px 0; text-align: right; white-space: nowrap; }
.place-rates th:first-child, .place-rates td:first-child { text-align: left; }
.place-rates td:first-child { display: flex; align-items: center; gap: 6px; }
.place-rates .sprite { width: 28px; height: 28px; }
.place-rates tr.is-done { opacity: .55; }
.place-unmet { margin: 0 14px 10px; }
.place-title .muted { color: var(--muted); font-size: 12px; }
.hunt-details { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.hunt-kind { display: flex; flex-wrap: wrap; gap: 6px; }
.hunt-kind-inline { margin-top: 4px; }
.hunt-kind-inline .chip span { font-size: 12px; padding: 2px 8px; }
.hunt-place[hidden], .hunt-place-label[hidden] { display: none; }
.places-toolbar { margin-top: 0; }
.places-filters { flex-direction: row; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 18px; }
.places-block { margin-bottom: 22px; }
.places-heading { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; font-size: 16px; }
.places-heading .info { color: var(--muted); font-size: 13px; font-weight: 400; cursor: help; }
.places-filters .chip-group legend { width: auto; margin-right: 4px; }

/* Bestiary notes */
.suggestion-table small.muted { color: var(--muted); }

/* Home page: live widgets + one section of tiles per menu group */

.home-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  /* Each card as tall as its content: no stretched, empty boxes. */
  align-items: start;
  gap: 12px;
  margin-bottom: 32px;
}

.widget {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.widget-title {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.widget-title span { color: var(--gold); }
.widget-empty { color: var(--muted); font-size: 13px; }

.widget-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 20px; }
.widget-list li { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
/* Today's top bosses on the home page: even rows, the chance next to the name. */
.widget-list:has(.widget-boss-row) { padding-left: 0; list-style: none; counter-reset: top; }
.widget-list .widget-boss-row {
  display: grid;
  grid-template-columns: 1.2em 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 10px 6px 8px;
  border-radius: 8px;
  background: var(--panel-raised);
  counter-increment: top;
}
.widget-boss-row::before { content: counter(top); color: var(--muted); font-weight: 700; text-align: center; }
.widget-sprite { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; background: var(--bg); overflow: hidden; }
.widget-sprite img { max-width: 44px; max-height: 44px; image-rendering: pixelated; }
.widget-boss-text { display: flex; flex-direction: column; min-width: 0; }
.widget-boss-text a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.widget-boss-text small { color: var(--muted); font-size: 12px; }
.widget-boss-row .widget-chance { padding: 2px 10px; border-radius: 999px; background: var(--bg); }
.widget-list li::marker { color: var(--muted); }
.widget-list .widget-empty { list-style: none; margin-left: -20px; }
.widget-chance { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
/* "Cała lista na dziś": a real button (the shared .action-link look), full width of the widget */
.widget-more { align-self: stretch; justify-content: center; margin-top: auto; }

.home-widgets { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.widget-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; font-size: 13px; }
.widget-links a {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
}
.widget-links a:hover { border-color: var(--gold); color: var(--gold); }

/* Character card on the home page */
.widget-char-head { display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; }
.widget-char-head:hover .widget-char-name { color: var(--gold); }
.widget-char-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: var(--panel-raised);
  color: var(--gold);
  font-size: 22px;
  font-weight: 700;
}
.widget-char-who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.widget-char-name { font-size: 18px; }
.widget-char-line { color: var(--muted); font-size: 13px; }
.widget-progress { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 12px; }
.widget-progress-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel-raised);
  color: var(--text);
  text-decoration: none;
}
.widget-progress-row:hover { outline: 1px solid var(--gold); }
.widget-progress-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.widget-progress-top strong { color: var(--gold); font-variant-numeric: tabular-nums; }
.widget-progress-bar { height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.widget-progress-bar span { display: block; height: 100%; border-radius: 999px; background: var(--gold); }
.widget-progress-row small { color: var(--muted); font-size: 12px; }

@media (max-width: 640px) {
  .home-widgets { grid-template-columns: 1fr; }
}

.boosted-strip {
  display: flex; gap: 10px; align-items: center; margin: 0; padding: 2px 10px 2px 8px;
  border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 12px;
}
.boosted-label { color: var(--gold); font-size: 12px; }
.boosted-item { display: inline-flex; gap: 4px; align-items: center; }
.boosted-sprite { width: 22px; height: 22px; object-fit: contain; image-rendering: pixelated; }

.widget-character { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.widget-character small { color: var(--muted); font-size: 12px; }
.widget-character-name { color: var(--text); font-size: 17px; font-weight: 700; text-decoration: none; }
.widget-character-name:hover { color: var(--gold); }
.widget-gain { color: var(--high); font-weight: 600; font-variant-numeric: tabular-nums; }
.widget-character .action-link { align-self: flex-start; margin-top: 6px; }

.home-section { margin-bottom: 32px; }
#sections { margin-bottom: 32px; }
.home-section-title { display: flex; gap: 10px; align-items: center; margin: 0; font-size: 18px; }
.home-section-icon { color: var(--gold); }
.home-section-about { margin: 4px 0 14px; color: var(--muted); font-size: 13px; }

/* Home: the world tools as big tiles (icon, title, description, accent line) */
.home-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.home-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 190px;
  padding: 22px 20px 20px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
/* The accent line at the bottom */
.home-tile::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}

.home-tile:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); }
.home-tile:hover::after { opacity: 1; }
.home-tile-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 8px; color: var(--accent); }
.home-tile-icon svg { width: 44px; height: 44px; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 40%, transparent)); }
.home-tile-label { margin-top: auto; font-family: "Cinzel", Georgia, serif; font-size: 17px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.home-tile-about { color: var(--muted); font-size: 13px; line-height: 1.5; }
.account-dropdown .topbar-account::after { content: "▾"; color: var(--muted); font-size: 11px; }
.nav-logout { width: 100%; margin-top: 4px; padding-top: 10px; background: none; border: none; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; color: var(--muted); font-weight: 400; text-align: left; }
.nav-logout:hover { background: var(--panel-raised); color: var(--text); filter: none; }

/* Character statistics */

.stats-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.stats-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: var(--panel-raised);
  color: var(--gold);
  font-size: 26px;
  font-weight: 700;
}
.stats-identity h2 { margin: 0; font-size: 22px; }
.stats-identity p { margin: 4px 0 0; color: var(--muted); }
.level-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
}
.stats-summary { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.stats-summary-item { padding-left: 12px; border-left: 2px solid var(--border); }
.stats-summary dt { color: var(--muted); font-size: 11px; }
.stats-summary dd { margin: 0; color: var(--gold); font-size: 16px; font-variant-numeric: tabular-nums; }
.stats-summary .stats-summary-note { color: var(--muted); font-size: 11px; }

.stats-notice {
  margin: 12px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--low);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
}

.stats-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 16px 0;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.stats-panel {
  padding: 16px 20px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.stats-panel-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 18px;
}
.title-filters { display: flex; gap: 18px; color: var(--muted); font-size: 14px; font-weight: 400; }
.title-filters label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.title-filters input { width: 16px; height: 16px; margin: 0; accent-color: var(--gold); cursor: pointer; }
.stats-panel .fact, .stats-panel .hero-levels .fact { background: var(--panel-raised); }
.stats-tabs button {
  padding: 12px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.stats-tabs button:hover { color: var(--text); }
.stats-tabs button[aria-selected="true"] { border-bottom-color: var(--gold); color: var(--gold); }

.stats-heading { margin: 18px 0 8px; font-size: 15px; }
.stats-table { font-size: 13px; }
.stats-table th, .stats-table td { padding: 6px 10px; text-align: left; }
.stats-table th { border-bottom: 1px solid var(--border); }
.stats-table td { border-top: 0; }
.stats-table tbody tr:nth-child(odd) td { background: var(--bg); }
.stats-table tbody tr:nth-child(even) td { background: var(--panel-raised); }
.stats-table tbody tr:hover td { background: #2f2a24; }
.stats-table .num { text-align: right; }
.stats-empty { color: var(--muted); }
/* Level: numbers in one column, the arrow in its own slot next to them. */
.lvl { display: inline-grid; grid-template-columns: 4ch 1.4em; gap: 4px; font-variant-numeric: tabular-nums; }
.lvl b { font-weight: 400; text-align: right; }
.lvl i { font-style: normal; }
.level-up { color: var(--high); }
.level-down { color: var(--error); }
.death-reason { color: var(--low); }

.bars-wrap { position: relative; padding: 18px 0 0; }
.bars-max { position: absolute; top: 0; left: 0; color: var(--muted); font-size: 11px; }
.bars {
  display: grid;
  grid-template-columns: repeat(var(--count), 1fr);
  gap: 2px;
  height: 140px;
  border-bottom: 1px solid var(--border);
}
.bars-col { display: flex; align-items: end; height: 100%; }
.bars-col:hover { background: var(--panel-raised); }
.bars-col.is-unknown { background: repeating-linear-gradient(45deg, transparent 0 4px, var(--panel-raised) 4px 8px); }
.bars-bar { width: 100%; border-radius: 2px 2px 0 0; background: var(--gold); }
.bars-axis { display: grid; grid-template-columns: repeat(var(--count), 1fr); margin-top: 2px; color: var(--muted); font-size: 10px; }
.bars-axis span { overflow: visible; white-space: nowrap; }

.timeline { display: flex; flex-direction: column; gap: 4px; }
.timeline-row { display: grid; grid-template-columns: 80px 1fr 70px; gap: 8px; align-items: center; font-size: 12px; }
.timeline-day { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline-total { text-align: right; font-variant-numeric: tabular-nums; }
.timeline-bar { position: relative; height: 16px; border-radius: 3px; background: repeating-linear-gradient(45deg, var(--panel) 0 4px, var(--panel-raised) 4px 8px); overflow: hidden; }
.timeline-bar i { position: absolute; top: 0; bottom: 0; }
.timeline-scale { height: 14px; background: none; overflow: visible; color: var(--muted); font-size: 10px; }
.timeline-scale span { position: absolute; }
.tl-online { background: var(--high); }
.tl-offline { background: #3a2622; }
.tl-unknown { background: repeating-linear-gradient(45deg, var(--panel) 0 3px, var(--panel-raised) 3px 6px); }
.timeline-legend { margin-left: 10px; color: var(--muted); font-size: 12px; font-weight: 400; }
.timeline-legend i { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 8px; border-radius: 2px; vertical-align: -1px; }

.row-number { color: var(--muted); font-variant-numeric: tabular-nums; }
.exp-lost { color: var(--error); font-variant-numeric: tabular-nums; }

.killers { display: flex; flex-direction: column; gap: 6px; max-width: 640px; margin: 0 0 8px; padding: 0; list-style: none; }
.killer { display: grid; grid-template-columns: 3.5em minmax(120px, 220px) 1fr; gap: 10px; align-items: center; font-size: 14px; }
.killer-count { color: var(--gold); font-size: 18px; font-variant-numeric: tabular-nums; text-align: right; }
.killer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.killer-track { height: 10px; border-radius: 999px; background: var(--panel-raised); overflow: hidden; }
.killer-bar { display: block; height: 100%; border-radius: 999px; background: var(--low); }

.stats-centered .fact { align-items: center; padding: 14px 10px; text-align: center; }
.stats-centered .fact-value { font-size: 26px; }
.stats-fun { margin-top: 8px; }

.goal { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 4px 0 10px; }
.goal label { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.goal input {
  width: 9em;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-raised);
  color: var(--text);
  font: inherit;
}
.goal #goal-level { width: 5.5em; }
.goal #goal-hours { width: 4.5em; }
.goal select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-raised);
  color: var(--text);
  font: inherit;
}
.goal-result { margin-bottom: 4px; }
.stats-fun .fact { border: 1px dashed var(--border); }
.stats-fun .fact-note { color: var(--text); font-size: 13px; }

@media (max-width: 600px) {
  .stats-card { grid-template-columns: auto 1fr; }
  .stats-summary { grid-column: 1 / -1; }
  .timeline-row { grid-template-columns: 62px 1fr 52px; gap: 4px; font-size: 11px; }
}

/* Raids */

.raid-report { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 18px; }
.raid-report label { display: flex; gap: 8px; align-items: center; }
.raid-report select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel-raised); color: var(--text); font: inherit; }
.raid-alerts { display: flex; flex-direction: column; gap: 10px; }
.raid-alert { padding: 12px 16px; border: 1px solid var(--low); border-radius: var(--radius); background: var(--panel); }
.raid-alert-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.raid-alert-head strong { font-size: 17px; }
.raid-alert-head button { margin-left: auto; }
.raid-countdown { color: var(--gold); }
.raid-creatures { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.raid-creatures .raid-boss { font-weight: 600; }
.raid-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 8px; }
.raid-area { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.raid-area summary { cursor: pointer; font-weight: 600; }
.raid-area summary small { color: var(--muted); font-weight: 400; }
.raid-setup summary { cursor: pointer; color: var(--muted); }
.raid-setup code { font-size: 12px; }

/* Reminders on the home page */

.reminder {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: var(--panel);
  font-size: 14px;
}
.reminder small { color: var(--muted); }

/* Tabs of "Dziś": to check, everyone, by route (layout.js BOSS_TABS) */

.boss-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin: 0 0 16px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.boss-tabs a {
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}
.boss-tabs a:hover { color: var(--text); }
.boss-tabs a[aria-current="page"] { border-bottom-color: var(--gold); color: var(--gold); }
.boss-tabs .boss-tabs-edit { margin-left: auto; font-size: 13px; }
.today-section-tomorrow { margin-bottom: 22px; }
.today-section-tomorrow h2 { margin: 0 0 8px; font-size: 16px; }
.today-section-tomorrow h2 small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }

/* Boss page: the next 14 days */
.upcoming { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.upcoming-day { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); text-align: center; }
.upcoming-day strong { color: var(--gold); font-variant-numeric: tabular-nums; }
/* Today's tile is the only framed one; window days get the calendar's green line. */
.upcoming-day.is-today { border-color: var(--text); background: color-mix(in srgb, var(--text) 9%, var(--panel)); }
.upcoming-day.is-today .upcoming-date { color: var(--text); font-weight: 700; }
.upcoming-day.in-window { box-shadow: inset 0 -3px 0 var(--high); }
.upcoming-day.is-empty strong { color: var(--muted); }
.upcoming-date { color: var(--muted); font-size: 11px; }

/* Analysis page: short summary, sort next to the search, collapsed legend */
.analysis-summary { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.analysis-summary .info { cursor: help; color: var(--gold); }
.analysis-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.analysis-toolbar #search { flex: 1 1 240px; }
.analysis-toolbar .sort-chips { margin: 0; }
.filter-hint { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 8px 0; }
.legend-panel { margin-bottom: 12px; }
.legend-panel summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.legend-panel .legend { margin-top: 8px; }

/* 📌 favorite toggle: faded until pinned */
.pin {
  padding: 2px 4px;
  border: 0;
  background: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  filter: grayscale(1);
  opacity: 0.35;
  transition: opacity 0.15s;
}
.pin:hover { opacity: 0.8; }
.pin.is-on { filter: none; opacity: 1; transform: rotate(-45deg); }
/* The pin shows the state: tilted = not pinned, turned upright (stuck in) = pinned. */
.pin { display: inline-block; transition: opacity 0.15s, transform 0.2s; }
.pin-icon { display: inline-block; transition: transform 0.2s; }
.pin-button.is-on .pin-icon { transform: rotate(-45deg); }
.my-empty { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 0 0 16px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--gold); border-radius: var(--radius); }
.my-empty p { flex: 1 1 300px; margin: 0; }
.pin-button { padding: 3px 10px; font-size: 12px; white-space: nowrap; }
/* Pin states, apart from the gold "⚔ Zabity": not pinned = grey outline with a coloured
   pin; pinned = a muted rose fill; hover on a pinned one (or the
   pinned filter) = red outline "✕ Odepnij". */
/* Not pinned: the pin keeps its colour; hover lights the button in the pin's rose. */
.pin-button:not(.is-on):hover { border-color: color-mix(in srgb, #c2405f 60%, var(--border)); color: #e7b3c0; }
.pin-button.is-on { background: color-mix(in srgb, #c2405f 22%, var(--panel)); border-color: color-mix(in srgb, #c2405f 60%, var(--border)); color: #e7b3c0; font-weight: 600; }
.pin-button .pin-action { display: none; }
.pin-button.is-on:hover, .pin-button.is-on:focus-visible, .pin-button.unpin-only { background: none; border-color: var(--error); color: var(--error); font-weight: 400; }
.pin-button.is-on:hover .pin-state, .pin-button.is-on:focus-visible .pin-state, .pin-button.unpin-only .pin-state { display: none; }
.pin-button.is-on:hover .pin-action, .pin-button.is-on:focus-visible .pin-action, .pin-button.unpin-only .pin-action { display: inline; }
h1 .pin { font-size: 20px; vertical-align: middle; }

/* "Ostatnio zabici" on Dziś: sprites with names, a day switch (like GuildStats' yesterday spawns) */
.recent-strip { margin-bottom: 22px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.recent-strip-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.recent-strip-head h2 { margin: 0; font-size: 16px; }
.recent-days { display: flex; flex-wrap: wrap; gap: 6px; }
.recent-days button { padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.recent-days button[aria-selected="true"] { border-color: var(--gold); color: var(--gold); }
.recent-days-count { display: inline-block; min-width: 1.6em; padding: 0 5px; border-radius: 999px; background: var(--low); color: var(--bg); font-size: 11px; font-weight: 700; text-align: center; }
.recent-strip-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px 6px; margin: 0; padding: 0; list-style: none; }
.recent-strip-head { cursor: pointer; list-style: none; }
.recent-strip-head::-webkit-details-marker { display: none; }
.recent-strip-head h2::after { content: " ▾"; color: var(--muted); font-size: 12px; }
.recent-strip details:not([open]) .recent-strip-head { margin-bottom: 0; }
.recent-strip details:not([open]) .recent-strip-head h2::after { content: " ▸"; }
.recent-strip-boss {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.recent-strip-boss:hover { background: var(--panel-raised); color: var(--gold); }
.recent-strip-boss .recent-strip-sprite { transition: transform 0.15s; }
.recent-strip-boss:hover .recent-strip-sprite { transform: scale(1.15); }
.recent-strip-sprite { display: grid; place-items: center; width: 64px; height: 64px; }
.recent-strip-sprite img { max-width: 64px; max-height: 64px; image-rendering: pixelated; }

/* "Dziś": the boss search next to the count */
.today-toolbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 14px; }
.today-toolbar #boss-search, .today-toolbar #search {
  flex: 1 1 260px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}
.today-toolbar #boss-search:focus, .today-toolbar #search:focus { outline: none; border-color: var(--gold); }

/* "Tydzień": bosses x the next 7 days */

.week-hint { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.week-legend { display: block; margin-top: 4px; font-size: 12px; }
.week-scroll { overflow-x: auto; margin-bottom: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.week-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.week-table th, .week-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.week-table tbody tr:last-child > * { border-bottom: none; }
/* Hover keeps the colours (chance, window line, today's column): the row only
   brightens, and the boss name gets a lighter background. */
.week-table tbody tr:hover > td { filter: brightness(1.3); }
.week-table tbody tr:hover > th { background: var(--panel-raised); }
.week-boss-head { text-align: left; }
.week-boss-name { display: flex; gap: 8px; align-items: center; }
.week-boss { position: sticky; left: 0; z-index: 1; min-width: 200px; background: var(--panel); font-weight: 400; text-align: left; white-space: nowrap; }
.week-day { min-width: 72px; font-weight: 600; text-align: center; text-transform: capitalize; }
.week-day span, .week-day small { display: block; }
.week-day small { color: var(--muted); font-weight: 400; }
.week-day.weekend span { color: var(--muted); }
/* Today: a slightly lighter column down the whole table (neutral, so it does not
   mix with the gold chance colours or the green window line), gold header text */
.week-day.today { color: var(--gold); background: color-mix(in srgb, var(--text) 9%, transparent); }
.week-today { background-image: linear-gradient(color-mix(in srgb, var(--text) 6%, transparent), color-mix(in srgb, var(--text) 6%, transparent)); }
.week-day-count { display: block; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 400; text-transform: none; }
.week-cell { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; background: color-mix(in srgb, var(--gold) calc(var(--heat, 0%) * 0.45), transparent); }
.week-hot { color: var(--gold); font-weight: 700; }
/* The spawn window: a green line under its days, continuous across the week */
.week-in-window { box-shadow: inset 0 -3px 0 var(--high); }
.week-legend-window { padding-bottom: 1px; border-bottom: 3px solid var(--high); }
.week-empty { color: var(--muted); opacity: 0.5; }
.week-low { color: var(--muted); }
.week-daily h2 { margin: 0 0 8px; font-size: 16px; }
.week-daily h2 small { color: var(--muted); font-size: 12px; font-weight: 400; }
.week-daily-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.week-daily-list .sprite { width: 22px; height: 22px; }

/* Home page: the author's credit under the tiles */
.powered-by { margin: 24px 0 12px; color: var(--muted); font-family: "Cinzel", Georgia, serif; font-size: 13px; letter-spacing: 0.08em; text-align: center; }
.powered-by a { color: var(--gold); font-weight: 700; text-decoration: none; }
.powered-by a:hover { text-decoration: underline; }

/* Home page: the site's title and motto, centred like a hero banner */
.home-hero { flex-direction: column; align-items: center; gap: 14px; padding-top: 28px; text-align: center; }
.home-hero h1 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-shadow: 0 2px 18px rgba(224, 168, 60, 0.25), 0 2px 2px rgba(0, 0, 0, 0.6);
}
.home-hero .subtitle {
  margin: 6px 0 0;
  color: var(--text);
  font-size: clamp(15px, 2vw, 18px);
  letter-spacing: 0.02em;
}
.home-hero .subtitle::after {
  content: "";
  display: block;
  width: 80px;
  height: 2px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Feedback: the footer button, the dialog and the admin list */
.feedback-button { padding: 0; background: none; border: 0; color: var(--gold); font: inherit; font-size: inherit; font-weight: 400; cursor: pointer; }
.feedback-button:hover { text-decoration: underline; }
.feedback-dialog { width: min(560px, calc(100vw - 32px)); }
.feedback-form { display: flex; flex-direction: column; gap: 12px; }
.feedback-form h2 { margin: 0; }
.feedback-intro { margin: 0; color: var(--muted); font-size: 13px; }
.feedback-form textarea, .feedback-form input[name="contact"] { width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: inherit; resize: vertical; }
.feedback-form textarea:focus, .feedback-form input[name="contact"]:focus { outline: none; border-color: var(--gold); }
.feedback-status { min-height: 1em; margin: 0; color: var(--high); font-size: 14px; font-weight: 600; }
.feedback-status.is-error { color: var(--error); }
.feedback-actions { display: flex; gap: 8px; justify-content: flex-end; }
.feedback-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.feedback-item { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: var(--radius); }
.feedback-item.status-done { border-left-color: var(--high); opacity: 0.75; }
.feedback-item.status-rejected { border-left-color: var(--muted); opacity: 0.6; }
.feedback-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.feedback-meta { color: var(--muted); font-size: 12px; }
.feedback-message { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.feedback-note { padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font: inherit; font-size: 13px; }
.feedback-statuses { display: flex; flex-wrap: wrap; gap: 6px; }
.feedback-statuses button { padding: 4px 12px; font-size: 12px; }
.feedback-statuses .is-current { background: var(--gold); color: var(--bg); }

/* Admin panel */
.admin-links { display: flex; gap: 8px; margin: 0; }
.admin-links .action-link { padding: 6px 14px; font-size: 13px; }
.admin-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.admin-count { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.admin-count strong { color: var(--gold); font-size: 24px; font-variant-numeric: tabular-nums; }
.admin-count span { color: var(--muted); font-size: 12px; }
.admin-count.is-hot { border-color: var(--gold); cursor: pointer; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.admin-table th { color: var(--muted); font-weight: 600; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table tr.is-banned td { opacity: 0.6; }
.admin-actions { display: flex; gap: 6px; justify-content: flex-end; }
.admin-actions button { padding: 4px 10px; font-size: 12px; }

/* Privacy page and the account deletion button */
.legal h2 { margin: 18px 0 6px; font-size: 16px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { line-height: 1.6; color: var(--text); }
.legal ul { margin: 0; padding-left: 20px; }
.legal-updated { margin-top: 18px; color: var(--muted); font-size: 12px; }
.account-card-delete { margin-left: 0 !important; padding: 6px 12px; color: var(--muted); font-size: 12px; }
.account-card-delete:hover { border-color: var(--error); color: var(--error); }
