:root {
  color-scheme: dark;
  --night: #080f0d;
  --forest: #13251e;
  --brass: #b5a16b;
  --parchment: #e9e1cb;
  --weathered: #a6aca0;
  --border: #3d4535;
  --button-border: #d8c58c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--parchment);
  font-family: "Caudex", Georgia, serif;
  font-size: 19px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, select:focus-visible {
  outline: 2px solid var(--button-border);
  outline-offset: 4px;
}

.site-header {
  align-items: center;
  background: var(--night);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  min-height: 88px;
  padding: 24px 32px;
}
.wordmark, .hero-wordmark {
  color: var(--brass);
  font-family: "Almendra", Georgia, serif;
  font-weight: 700;
  letter-spacing: 6px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .5);
}
.wordmark { font-size: 25px; }
.site-nav { align-items: center; display: flex; gap: 28px; }
.nav-link {
  color: var(--brass);
  font-family: "Cinzel", Georgia, serif;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--parchment); }
.nav-play {
  background: var(--brass);
  border: 1px solid var(--button-border);
  border-radius: 2px;
  color: var(--night);
  padding: 10px 16px;
}
.nav-play:hover, .nav-play:focus-visible { background: #d3c18b; color: var(--night); }
.is-disabled { color: #687066; cursor: not-allowed; }

.welcome {
  isolation: isolate;
  min-height: 740px;
  overflow: hidden;
  padding: 100px 32px 64px;
  position: relative;
}
.welcome-video, .welcome-overlay {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}
.welcome-video { object-fit: cover; z-index: -2; }
.welcome-overlay {
  background: linear-gradient(180deg, rgba(8,15,13,.5) 0%, rgba(8,15,13,.6) 45%, #080f0d 100%);
  z-index: -1;
}
.ornamental-rule {
  background: linear-gradient(to bottom, var(--brass), rgba(181,161,107,0));
  height: 85%;
  opacity: .65;
  position: absolute;
  top: 20px;
  width: 1px;
}
.ornamental-rule-left { left: 20px; }
.ornamental-rule-right { right: 20px; }
.welcome-content {
  align-items: center;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 800px;
  position: relative;
  text-align: center;
  z-index: 1;
}
.crest {
  border: 1px solid var(--brass);
  border-radius: 18% 38% 18% 38%;
  height: 56px;
  margin: 0 0 20px;
  position: relative;
  transform: rotate(45deg);
  width: 56px;
}
.crest span {
  border: 1px solid var(--brass);
  height: 27px;
  inset: 13px;
  position: absolute;
  width: 27px;
}
.hero-wordmark { font-size: 58px; line-height: 1; margin: 0; }
.inscription {
  color: var(--brass);
  font-family: "Cinzel", Georgia, serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  line-height: 1.4;
  text-transform: uppercase;
}
.welcome .inscription { margin: 18px 0 0; }
h1, h2 {
  font-family: "Almendra", Georgia, serif;
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
}
h1 {
  color: var(--parchment);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(42px, 6.3vw, 76px);
  margin-top: 24px;
  text-wrap: balance;
}
.welcome-copy {
  color: var(--parchment);
  margin: 24px auto 0;
  max-width: 680px;
}
.hero-actions { display: flex; gap: 14px; margin-top: 28px; }
.button {
  background: var(--brass);
  border: 1px solid var(--button-border);
  border-radius: 2px;
  color: var(--night);
  font-family: "Cinzel", Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  min-width: 150px;
  padding: 14px 28px;
  text-transform: uppercase;
}
.button:hover, .button:focus-visible { background: #d3c18b; }
.button:active { background: #968452; }
.hero-tagline { margin-top: 36px !important; }

.community-section {
  border-top: 1px solid var(--border);
  padding: 48px 32px 64px;
}
.community-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1080px;
}
.panel {
  background: var(--forest);
  border: 1px solid var(--border);
  border-radius: 2px;
  min-height: 240px;
  padding: 24px;
}
.panel h2 { color: var(--parchment); font-size: 32px; }
.panel-heading { align-items: flex-start; display: flex; justify-content: space-between; }
.panel-kicker {
  color: var(--brass);
  font-family: "Cinzel", Georgia, serif;
  font-size: 10px;
  letter-spacing: 2px;
  margin: 0 0 4px;
}
.panel-counter { color: var(--weathered); font-family: "Cinzel", Georgia, serif; font-size: 11px; letter-spacing: 1px; }
.kc-carousel { margin-top: 22px; }
.kc-slides { min-height: 104px; position: relative; }
.kc-slide { align-items: center; display: none; gap: 16px; min-height: 104px; }
.kc-slide.is-active { display: flex; }
.kc-rank { color: var(--brass); font-family: "Cinzel", Georgia, serif; font-size: 22px; }
.kc-player { color: var(--parchment); flex: 1; font-size: 20px; }
.kc-value { color: var(--brass); font-family: "Cinzel", Georgia, serif; font-size: 13px; white-space: nowrap; }
.kc-empty { color: var(--weathered); font-size: 15px; margin: 0; padding-top: 20px; }
.updates-carousel { margin-top: 22px; }
.update-slide { display: none; min-height: 104px; }
.update-slide.is-active { display: block; }
.update-slide[hidden] { display: none; }
.update-slide h3 { color: var(--parchment); font-size: 22px; margin: 0 0 12px; }
.update-slide p { color: var(--weathered); font-size: 15px; line-height: 1.55; margin: 0; }
.updates-controls { margin-top: 18px; }
.live-indicator { color: #9dcc83; font-family: "Cinzel", Georgia, serif; font-size: 10px; letter-spacing: 2px; }
.announcement-list { margin-top: 22px; }
.announcement-entry { align-items: flex-start; border-bottom: 1px solid var(--border); color: var(--weathered); display: flex; font-size: 14px; gap: 10px; margin: 0; padding: 10px 0; }
.announcement-entry:first-child { padding-top: 0; }
.announcement-entry:last-child { border-bottom: 0; }
.announcement-entry strong { color: var(--parchment); font-weight: 400; }
.announcement-icon { color: var(--brass); flex: 0 0 22px; font-family: "Cinzel", Georgia, serif; font-size: 11px; }
.kc-controls { align-items: center; display: flex; gap: 12px; justify-content: center; }
.carousel-button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--brass);
  cursor: pointer;
  font-size: 22px;
  height: 30px;
  line-height: 20px;
  width: 30px;
}
.carousel-button:hover, .carousel-button:focus-visible { border-color: var(--button-border); color: var(--parchment); }
.kc-dots { display: flex; gap: 6px; }
.kc-dot { background: var(--border); border: 0; border-radius: 50%; cursor: pointer; height: 6px; padding: 0; width: 6px; }
.kc-dot.is-active { background: var(--brass); }
.panel label {
  color: var(--brass);
  display: block;
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-top: 30px;
}
select {
  appearance: auto;
  background: var(--night);
  border: 1px solid var(--brass);
  border-radius: 2px;
  color: var(--parchment);
  font: inherit;
  height: 48px;
  margin-top: 8px;
  padding: 0 12px;
  width: 100%;
}
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--weathered);
  font-size: 13px;
  padding: 28px 24px;
  text-align: center;
}
.site-footer p { margin: 5px 0; }
.hiscores-page { margin: 0 auto; max-width: 1080px; padding: 80px 32px 100px; }
.hiscores-heading { margin: 0 auto 40px; max-width: 680px; text-align: center; }
.hiscores-heading h1 { font-size: clamp(42px, 7vw, 70px); margin-top: 8px; }
.hiscores-heading p:not(.inscription) { color: var(--weathered); font-size: 17px; margin: 18px auto 0; }
.hiscores-board { background: var(--forest); border: 1px solid var(--border); border-radius: 2px; padding: 24px; }
.hiscores-filters { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.hiscores-filters label { color: var(--brass); font-family: "Cinzel", Georgia, serif; font-size: 11px; letter-spacing: 2px; }
.hiscores-filters select, .hiscores-filters input { display: block; margin-top: 8px; width: 100%; }
.hiscores-filters input { background: var(--night); border: 1px solid var(--brass); border-radius: 2px; color: var(--parchment); font: inherit; height: 48px; padding: 0 12px; }
.hiscores-status { color: var(--weathered); font-size: 14px; margin: 28px 0 12px; }
.hiscores-table-wrap { overflow-x: auto; }
.hiscores-board table { border-collapse: collapse; width: 100%; }
.hiscores-board th, .hiscores-board td { border-bottom: 1px solid var(--border); padding: 14px 12px; text-align: left; }
.hiscores-board th { color: var(--brass); font-family: "Cinzel", Georgia, serif; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.hiscores-board td:first-child { color: var(--brass); width: 90px; }
.hiscores-board td:last-child { color: var(--brass); text-align: right; }
.hiscores-board th:last-child { text-align: right; }

@media (max-width: 809px) {
  .site-header { flex-direction: column; gap: 18px; padding: 24px; }
  .site-nav { flex-wrap: wrap; gap: 14px 20px; justify-content: center; }
  .welcome { min-height: 0; padding: 72px 24px 48px; }
  .hero-wordmark { font-size: 38px; letter-spacing: 4px; }
  .welcome-copy { font-size: 17px; }
  .hero-actions { flex-direction: column; width: min(100%, 300px); }
  .button { width: 100%; }
  .community-section { padding: 40px 24px; }
  .community-grid { grid-template-columns: 1fr; }
  .hiscores-page { padding: 60px 24px 70px; }
  .hiscores-filters { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .welcome-video { display: none; }
  .welcome { background: #101d18; }
}
