:root {
  --page-width: 1350px;

  --sky: #061426;
  --night: #020712;

  --parchment: #f4d488;
  --parchment-light: #ffe4a3;
  --parchment-dark: #c58a2c;

  --ink: #3a2412;
  --ink-soft: #6d4a24;

  --wood: #5a260e;
  --wood-dark: #2f1308;
  --wood-light: #8a4716;

  --gold: #d9a441;
  --gold-bright: #ffe08a;

  --border: #9f671d;
  --border-soft: rgba(90, 38, 14, 0.35);

  --mage: #7c3aed;
  --army: #9f1d1d;
  --domain: #3f7d20;
  --ship: #176b8c;
  --poi: #b36a12;
  --highpriest: #b68a16;

  --new: #2f8f3a;
  --modified: #a97712;
  --removed: #a83232;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;

  background:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.100)),
    url("https://bicoguide.com/images/bp.webp");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}


.site-header,
main {
  width: min(var(--page-width), calc(100% - 28px));
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  position: relative;
  top: auto;
  z-index: 20;
  margin-top: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.header-inner {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 224, 138, 0.16), transparent 45%),
    linear-gradient(180deg, #183335, #0e2529 58%, #0b1b1d);
  border-left: 5px solid var(--wood-light);
  border-right: 5px solid var(--wood-light);
  border-top: 3px solid var(--wood-dark);
  border-bottom: 5px solid var(--wood-light);
  box-shadow:
    0 10px 0 rgba(57, 24, 8, 0.95),
    0 30px 80px rgba(0,0,0,0.46);
  position: relative;
  overflow: hidden;
}

.header-inner::before,
.header-inner::after {
  content: "";
  position: absolute;
  top: 0;
  width: 52px;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(255,224,138,0.2), transparent 38%),
    linear-gradient(90deg, rgba(80,34,10,0.9), rgba(140,71,22,0.85));
  opacity: 0.75;
}

.header-inner::before {
  left: 0;
}

.header-inner::after {
  right: 0;
  transform: scaleX(-1);
}

.header-inner > * {
  position: relative;
  z-index: 1;
}

h1 {
  margin: 0;
  max-width: 680px;
  color: var(--gold-bright);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -1px;
  text-shadow:
    0 3px 0 #3a210a,
    0 0 22px rgba(255, 224, 138, 0.35);
}

p {
  margin: 10px 0 0;
  color: #f7d991;
  font-style: normal;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill,
.sound-btn,
.discord-btn,
.menu-btn,
.menu-close {
  font-family: Georgia, "Times New Roman", serif;
}

.status-pill,
.sound-btn,
.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 800;
  color: #2f1a0a;
  border: 2px solid #7a4815;
  background:
    linear-gradient(180deg, #ffe7a7, #c98a32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 3px 0 #5b2a0c;
  text-decoration: none;
  cursor: pointer;
}

.status-dot {
  width: 9px;
  height: 9px;
  background: #2f8f3a;
  border-radius: 999px;
  box-shadow: 0 0 12px #6ee77a;
}

.sound-btn.sound-on {
  background: linear-gradient(180deg, #d8f3a1, #6e9b2c);
}

.discord-btn {
  background: linear-gradient(180deg, #b7bbff, #5865f2);
  color: white;
  border-color: #3340b8;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 3px 0 #252b74;
}

.status-pill:hover,
.sound-btn:hover,
.discord-btn:hover,
.menu-btn:hover {
  transform: translateY(-1px);
}

.menu-btn {
  width: 46px;
  height: 46px;
  border: 2px solid #7a4815;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffe7a7, #c98a32);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 3px 0 #5b2a0c;
}

.menu-btn span {
  width: 22px;
  height: 3px;
  background: #3a2412;
  border-radius: 999px;
}

.header-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 0 18px;
  background:
    linear-gradient(180deg, #704018, #3f1d0b 52%, #291105);
  border-left: 5px solid var(--wood-light);
  border-right: 5px solid var(--wood-light);
  border-bottom: 4px solid var(--wood-light);
  box-shadow:
    inset 0 1px 0 rgba(255, 224, 138, 0.26),
    0 10px 0 rgba(57, 24, 8, 0.95);
  position: relative;
  z-index: 2;
  overflow-x: auto;
  scrollbar-width: thin;
}

.header-nav::before,
.header-nav::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 58px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 224, 138, 0.6), transparent);
  transform: translateY(-50%);
  pointer-events: none;
}

.header-nav::before {
  left: 10px;
}

.header-nav::after {
  right: 10px;
}

.header-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  color: #ffe4a3;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  border-left: 1px solid rgba(255, 224, 138, 0.15);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
  transition:
    color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.header-nav-link:last-child {
  border-right: 1px solid rgba(255, 224, 138, 0.15);
}

.header-nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  opacity: 0;
  transform: scaleX(0.45);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.header-nav-link:hover,
.header-nav-link.active {
  color: #fff4c8;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 224, 138, 0.2), transparent 62%),
    rgba(255, 224, 138, 0.08);
  transform: translateY(-1px);
}

.header-nav-link:hover::after,
.header-nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.discord-nav-link {
  color: #dfe2ff;
}

.support-nav-link {
  color: #ff66ff;
}

.filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(420px, 1.25fr) 170px 170px;
  gap: 8px;
  align-items: stretch;
  padding: 15px 18px;
  background:
    linear-gradient(180deg, #ffe6a6, #e6b85e);
  border-left: 5px solid var(--wood-light);
  border-right: 5px solid var(--wood-light);
  border-bottom: 5px solid var(--wood-light);
  box-shadow: 0 10px 0 rgba(57, 24, 8, 0.95);
}

.filters > input,
.filters > select {
  width: 100%;
  border: 1px solid #9f671d;
  background: #fff3c8;
  color: var(--ink);
  border-radius: 3px;
  padding: 9px 10px;
  font-size: 14px;
  outline: none;
  font-family: Georgia, "Times New Roman", serif;
  box-shadow: inset 0 1px 4px rgba(90, 38, 14, 0.18);
}

.filters > input::placeholder {
  color: rgba(58, 36, 18, 0.55);
}

.filters > input:focus,
.filters > select:focus {
  border-color: #5a260e;
  box-shadow:
    0 0 0 3px rgba(217, 164, 65, 0.24),
    inset 0 1px 4px rgba(90, 38, 14, 0.18);
}

.category-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
  min-height: 38px;
  padding: 6px;
  border: 1px solid #9f671d;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 248, 214, 0.86), rgba(255, 226, 151, 0.78));
  box-shadow: inset 0 1px 4px rgba(90, 38, 14, 0.18);
}

.category-filter-title {
  padding: 0 7px 0 4px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.category-chip {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  user-select: none;
}

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

.category-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(90, 38, 14, 0.32);
  border-radius: 999px;
  background: rgba(255, 243, 200, 0.62);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.category-chip:hover span {
  transform: translateY(-1px);
  background: rgba(255, 243, 200, 0.95);
}

.category-chip input:focus-visible + span {
  outline: 3px solid rgba(217, 164, 65, 0.35);
  outline-offset: 2px;
}

.category-chip input:checked + span {
  color: #fff4c8;
  border-color: #5a260e;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 224, 138, 0.28), transparent 62%),
    linear-gradient(180deg, #704018, #3f1d0b 52%, #291105);
  box-shadow:
    inset 0 1px 0 rgba(255, 224, 138, 0.22),
    0 2px 0 rgba(57, 24, 8, 0.6);
}

body.side-nav-open {
  overflow: hidden;
}

main {
  padding: 18px;
  background:
    linear-gradient(180deg, #d99a38, #b8731f);
  border-left: 5px solid var(--wood-light);
  border-right: 5px solid var(--wood-light);
  border-bottom: 6px solid var(--wood-dark);
  box-shadow:
    0 35px 90px rgba(0,0,0,0.5),
    inset 0 0 0 2px rgba(255, 238, 184, 0.12);
}

.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px;
  background:
    linear-gradient(180deg, #f2d281, #d8a448);
  border: 3px solid #6b3410;
  box-shadow:
    inset 0 0 0 2px rgba(255, 238, 184, 0.55),
    4px 4px 0 rgba(73, 32, 10, 0.35);
}

.stat-card {
  padding: 11px 10px;
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 248, 214, 0.72), rgba(235, 191, 92, 0.38));
  border: 1px solid rgba(90, 38, 14, 0.35);
}

.stat-label {
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
}

.stat-value {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 900;
  color: var(--wood-dark);
}

.updates {
  display: grid;
  gap: 14px;
}

.update {
  border-radius: 6px;
  background:
    linear-gradient(180deg, #f8da91, #e7b85d);
  border: 2px solid var(--border);
  box-shadow:
    inset 0 0 0 2px rgba(255, 244, 205, 0.42),
    4px 4px 0 rgba(73, 32, 10, 0.22);
  overflow: hidden;
}

.update-inner {
  display: grid;
  grid-template-columns: 6px 1fr;
}

.stripe {
  background: var(--mage);
}

.stripe.Mage { background: var(--mage); }
.stripe.Army { background: var(--army); }
.stripe.Domain { background: var(--domain); }
.stripe.Ship { background: var(--ship); }
.stripe.POI { background: var(--poi); }
.stripe.Highpriest { background: var(--highpriest); }
.stripe.GP { background: var(--highpriest); }

.content {
  padding: 17px;
}

.topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 12px;
}

.title {
  font-size: 25px;
  font-weight: 900;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 244, 205, 0.75);
}

.badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 3px;
  color: #2f1a0a;
  background: rgba(255, 243, 200, 0.82);
  border: 1px solid rgba(90, 38, 14, 0.28);
  font-weight: 900;
}

.badge.new { color: var(--new); }
.badge.modified { color: var(--modified); }
.badge.removed { color: var(--removed); }

.time {
  color: var(--ink-soft);
  font-size: 13px;
  white-space: nowrap;
  text-align: right;
  font-weight: 700;
}

.sections {
  display: grid;
  gap: 10px;
}

.section {
  background: rgba(255, 243, 200, 0.46);
  border: 1px solid rgba(90, 38, 14, 0.25);
  border-radius: 4px;
  padding: 12px;
}

.section-title {
  font-weight: 900;
  margin-bottom: 9px;
  font-size: 16px;
  color: var(--wood-dark);
  border-bottom: 1px solid rgba(90, 38, 14, 0.22);
  padding-bottom: 5px;
}

.kv {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 7px 12px;
  font-size: 14px;
}

.key {
  color: var(--ink-soft);
  font-weight: 800;
}

.value {
  color: var(--ink);
}

.map-coordinate-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--wood-dark);
  font-weight: 900;
  text-decoration: none;
  border-bottom: 1px solid rgba(90, 38, 14, 0.38);
}

.map-coordinate-link:hover,
.map-coordinate-link:focus-visible {
  color: #7c3aed;
  border-bottom-color: currentColor;
}

.change-line {
  padding: 8px 0;
  border-bottom: 1px solid rgba(90, 38, 14, 0.2);
  font-size: 14px;
}

.change-line:last-child {
  border-bottom: 0;
}

.old {
  color: var(--removed);
  font-weight: 800;
}

.new {
  color: var(--new);
  font-weight: 800;
}

.note {
  line-height: 1.45;
  margin-bottom: 10px;
  font-size: 14px;
}

.note:last-child {
  margin-bottom: 0;
}

.note-label {
  color: var(--wood-dark);
  font-weight: 900;
}

details {
  margin-top: 12px;
}

summary {
  cursor: pointer;
  color: var(--wood-dark);
  font-weight: 900;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(58, 36, 18, 0.12);
  border: 1px solid rgba(90, 38, 14, 0.24);
  border-radius: 4px;
  padding: 12px;
  font-size: 12px;
  max-height: 420px;
  overflow: auto;
  color: var(--ink);
}

.empty {
  padding: 44px;
  color: var(--ink-soft);
  text-align: center;
  border: 2px dashed rgba(90, 38, 14, 0.35);
  border-radius: 6px;
  background: rgba(255, 243, 200, 0.46);
  font-weight: 800;
}

/* Side menu */

.side-overlay,
.side-nav {
  display: none;
}

.side-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.58);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.side-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: min(360px, 88vw);
  height: 100vh;
  z-index: 100;
  background:
    linear-gradient(180deg, #f2d281, #d8a448);
  border-right: 5px solid var(--wood-light);
  box-shadow: 24px 0 70px rgba(0,0,0,0.56);
  transform: translateX(-105%);
  transition: transform 0.24s ease;
  padding: 18px;
  color: var(--ink);
  overflow-y: auto;
}

.side-nav.open {
  transform: translateX(0);
}

.side-nav-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 2px solid rgba(90, 38, 14, 0.35);
  margin-bottom: 18px;
}

.side-nav-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--wood-dark);
}

.side-nav-subtitle {
  color: var(--ink-soft);
  font-size: 13px;
  margin-top: 4px;
  font-style: italic;
}

.menu-close {
  width: 38px;
  height: 38px;
  border: 2px solid #7a4815;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffe7a7, #c98a32);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.side-link {
  display: block;
  padding: 13px 12px;
  margin-bottom: 9px;
  border-radius: 3px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 243, 200, 0.54);
  border: 1px solid rgba(90, 38, 14, 0.25);
  font-weight: 900;
  transition: all 0.2s ease;
}

.side-link:hover,
.side-link.active {
  transform: translateX(4px);
  background: rgba(255, 243, 200, 0.9);
}

.discord-side-link {
  color: #3340b8;
}

.support-side-link {
  color: #9f1d9f;
}

.title-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--border-soft);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.title-link:hover,
.title-link:focus {
  color: var(--wood);
  border-bottom-color: var(--gold);
}

.entity-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
}

.entity-summary-card {
  margin-top: 18px;
  margin-bottom: 24px;
}

.entity-summary-card .title {
  font-size: 1.45em;
}


/* Responsive */

@media (max-width: 980px) {
  .filters {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 760px) {
  body {
    background-attachment: scroll;
  }

  .site-header,
  main {
    width: min(100%, calc(100% - 16px));
  }

  .header-inner {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 16px;
  }

  .header-inner::before,
  .header-inner::after {
    width: 24px;
  }

  h1 {
    font-size: clamp(30px, 11vw, 44px);
    line-height: 0.95;
  }

  p {
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 46px 1fr 1fr;
    gap: 8px;
    justify-content: stretch;
  }

  .menu-btn {
    display: inline-flex;
  }

  .status-pill,
  .sound-btn {
    justify-content: center;
    min-height: 46px;
    padding: 8px 9px;
    font-size: 12px;
  }

  .discord-btn {
    display: none;
  }

  .header-nav {
    display: none;
  }

  .side-overlay,
  .side-nav {
    display: block;
  }

  .filters {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .category-filter {
    display: none;
  }

  .filters > input,
  .filters > select {
    min-height: 44px;
    font-size: 15px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }

  main {
    padding: 12px;
  }

  .topline {
    flex-direction: column;
    gap: 8px;
  }

  .time {
    text-align: left;
    white-space: normal;
  }

  .title {
    font-size: 22px;
  }

  .content {
    padding: 14px;
  }

  .kv {
    grid-template-columns: 1fr;
    gap: 3px 0;
  }

}

@media (max-width: 420px) {
  .header-actions {
    grid-template-columns: 46px 1fr;
  }

  .sound-btn {
    grid-column: span 2;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}
